Commit fd884888 authored by salix5's avatar salix5

fix

c34680482 マドルチェ・エンジェリー
Reset added

c23681456 マドルチェ・ハッピーフェスタ
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=12636&keyword=&tag=-1
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=11694&keyword=&tag=-1
1. Now the flag_effect id of each マドルチェ・ハッピーフェスタ is unique.
This makes todeck effct send the correct card group to deck together.
2. The todeck effect will be applied in every end_phase, as what other similar effect does.
parent 084d8bf5
......@@ -8,6 +8,10 @@ function c23681456.initial_effect(c)
e1:SetTarget(c23681456.target)
e1:SetOperation(c23681456.operation)
c:RegisterEffect(e1)
if not c23681456.global_check then
c23681456.global_check=true
c23681456.count=0
end
end
function c23681456.filter(c,e,tp)
return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -23,30 +27,33 @@ function c23681456.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c23681456.filter,tp,LOCATION_HAND,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
c23681456.count=c23681456.count+1
local tc=g:GetFirst()
local id=c23681456.count*100000000+23681456
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(23681456,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(id,RESET_EVENT+0x1fe0000,0,1)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabelObject(g)
e1:SetLabel(id)
e1:SetOperation(c23681456.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c23681456.retfilter(c)
return c:GetFlagEffect(23681456)>0
function c23681456.retfilter(c,id)
return c:GetFlagEffect(id)>0
end
function c23681456.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c23681456.retfilter,nil)
g:DeleteGroup()
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
local id=e:GetLabel()
local g=Duel.GetMatchingGroup(c23681456.retfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,id)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
else
e:Reset()
end
end
......@@ -79,4 +79,5 @@ function c34680482.tdcon(e,tp,eg,ep,ev,re,r,rp)
end
function c34680482.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
e:Reset()
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