Commit 41920300 authored by Tachibana's avatar Tachibana

得得得得得

parent 100237f8
Pipeline #12058 passed with stages
in 34 minutes and 45 seconds
......@@ -19,7 +19,7 @@ function c17032730.initial_effect(c)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17032730,0))
e3:SetCategory(CATEGORY_DRAW)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_PHASE+PHASE_END)
......
......@@ -33,16 +33,17 @@ function c17032790.tgfilter(c,mc)
return c:IsLevel(lv)
end
function c17032790.cfilter(c,e,tp)
if not c:IsFaceup() then return end
local g=e:GetHandler():GetOverlayGroup():Filter(c17032790.spfilter,nil,e,tp)
local b1=Duel.IsExistingMatchingCard(c17032790.tgfilter,tp,LOCATION_DECK,0,1,nil,c)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 and c~=e:GetHandler()
return c:IsFaceup() and (b1 or b2)
local b1=Duel.IsExistingMatchingCard(c17032790.tgfilter,tp,LOCATION_DECK,0,1,nil,c) and c:IsAbleToGrave()
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return b1 or (b2 and #g>0 and c~=e:GetHandler())
end
function c17032790.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c17032790.cfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c17032790.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SelectTarget(tp,c17032790.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
end
function c17032790.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -50,7 +51,7 @@ function c17032790.operation(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) then return end
local g=e:GetHandler():GetOverlayGroup():Filter(c17032790.spfilter,nil,e,tp)
local b1=Duel.IsExistingMatchingCard(c17032790.tgfilter,tp,LOCATION_DECK,0,1,nil,tc)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 and tc~=e:GetHandler()
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local off=1
local ops={}
local opval={}
......@@ -59,7 +60,7 @@ function c17032790.operation(e,tp,eg,ep,ev,re,r,rp)
opval[off-1]=1
off=off+1
end
if b2 then
if b2 and #g>0 and tc~=c then
ops[off]=aux.Stringid(17032790,3)
opval[off-1]=2
off=off+1
......@@ -69,8 +70,8 @@ function c17032790.operation(e,tp,eg,ep,ev,re,r,rp)
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c17032790.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tc)
if tg:GetCount()>0 then
Duel.SendtoGrave(tg,REASON_EFFECT)
if tg:GetCount()>0 and Duel.SendtoGrave(tg,REASON_EFFECT)~=0 then
Duel.Destroy(tc,REASON_EFFECT)
end
else
sg=g:Select(tp,1,1,nil)
......
......@@ -8,7 +8,6 @@ function c17032810.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,17032810)
e1:SetCondition(c17032810.effcon)
e1:SetOperation(c17032810.effop)
c:RegisterEffect(e1)
......
......@@ -36,12 +36,10 @@ function c17032820.op(e,tp,eg,ep,ev,re,r,rp)
local val=e:GetLabel()+10
Duel.Damage(1-tp,200,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,val,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
if (Duel.GetFlagEffect(tp,val))/4==math.floor((Duel.GetFlagEffect(tp,val))/4) then
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if (Duel.GetFlagEffect(tp,val))/4==math.floor((Duel.GetFlagEffect(tp,val))/4) and #g>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--绝望的崇拜者
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c17032830.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_LIGHT),2,2)
......@@ -6,11 +7,10 @@ function c17032830.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17032830,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,17032830)
e1:SetCondition(c17032830.rccon)
e1:SetTarget(c17032830.rctg)
e1:SetOperation(c17032830.rcop)
......@@ -21,7 +21,6 @@ function c17032830.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RECOVER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,17032830)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c17032830.target)
e2:SetOperation(c17032830.activate)
......@@ -44,7 +43,7 @@ function c17032830.spfilter(c,e,tp)
return c:IsSetCard(0x97f3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c17032830.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c17032830.spfilter(chkc,e,tp) end
if chkc then return true end
local b1=Duel.IsExistingTarget(c17032830.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return true end
local op=0
......
......@@ -39,7 +39,7 @@ function c17032840.thfilter(c)
end
function c17032840.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c17032840.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(17032730,0)) then
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(17032840,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
......@@ -47,7 +47,7 @@ end
cm.pendulum_level=7
function cm.xyzfilter(c,xyzc)
return c:IsXyzLevel(xyzc,7) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and (c:IsRace(RACE_REPTILE) or not c:IsLocation(LOCATION_GRAVE))
and ((c:IsRace(RACE_REPTILE) and c:IsSetCard(0x57f6))or not c:IsLocation(LOCATION_GRAVE))
end
function cm.fselect(g,tp,xyzc)
return g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1
......
......@@ -135,15 +135,18 @@ function cm.posac(g,e,tp)
for tc in aux.Next(g) do
if tc:IsFaceup() and tc:IsCanTurnSet() then
if tc:IsLocation(LOCATION_MZONE) then
local pos1=Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
local pos1=Duel.GetOperatedGroup():GetCount()
ac=ac+pos1
else
local pos2=Duel.ChangePosition(tc,POS_FACEDOWN)
Duel.ChangePosition(tc,POS_FACEDOWN)
local pos2=Duel.GetOperatedGroup():GetCount()
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
ac=ac+pos2
end
else
local tg=Duel.SendtoGrave(tc,REASON_EFFECT)
Duel.SendtoGrave(tc,REASON_EFFECT)
local tg=Duel.GetOperatedGroup():GetCount()
ac=ac+tg
end
if ac>0 then og:AddCard(tc) end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment