Commit 084d8bf5 authored by salix5's avatar salix5

fix

c34680482 マドルチェ・エンジェリー
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=13085&keyword=&tag=-1
If a player uses the sp_summon effect to sp_summon monster x in turn 1 and then uses the same effect to sp_summon monster x in turn 3,
the to_deck effect will work properly now.
EFFECT_FLAG_IGNORE_IMMUNE is added since the to_deck effect cannot be avoided by immune effect.
parent 2e6532c7
......@@ -55,7 +55,6 @@ function c34680482.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(34680482,RESET_EVENT+0x1fe0000,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......@@ -64,22 +63,20 @@ function c34680482.spop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetLabel(Duel.GetTurnCount())
e2:SetLabelObject(tc)
e2:SetCondition(c34680482.tdcon)
e2:SetOperation(c34680482.tdop)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetCountLimit(1)
Duel.RegisterEffect(e2,tp)
tc:RegisterEffect(e2)
end
end
function c34680482.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp
return Duel.GetTurnCount()==e:GetLabel()+2 and Duel.GetTurnPlayer()==tp
end
function c34680482.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(34680482)>0 then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
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