Commit 33935dd3 authored by wyykak's avatar wyykak

fix 22202201

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 91ab3096
...@@ -36,24 +36,22 @@ function c22202201.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,24 +36,22 @@ function c22202201.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c22202201.con)
e1:SetTarget(c22202201.tg) e1:SetTarget(c22202201.tg)
e1:SetOperation(c22202201.op) e1:SetOperation(c22202201.op)
e1:SetLabel(nseq) e1:SetLabel(nseq, 1-tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c22202201.filter(c,nseq) function c22202201.filter(c,nseq,player)
return c:GetSequence()==nseq return c:IsLocation(LOCATION_MZONE) and c:GetSequence()==nseq and c:IsControler(player)
end
function c22202201.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c22202201.filter,1,nil,e:GetLabel())
end end
function c22202201.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c22202201.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return eg:IsExists(c22202201.filter,1,nil,e:GetLabel()) end
Duel.SetTargetCard(eg)
local g=eg:Filter(c22202201.filter,nil,e:GetLabel()) local g=eg:Filter(c22202201.filter,nil,e:GetLabel())
g:ForEach(Card.CreateEffectRelation,e)
g:KeepAlive()
e:SetLabelObject(g)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end end
function c22202201.op(e,tp,eg,ep,ev,re,r,rp) function c22202201.op(e,tp,eg,ep,ev,re,r,rp)
...@@ -61,7 +59,7 @@ function c22202201.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +59,7 @@ function c22202201.op(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.ChangePosition(c,POS_FACEDOWN) Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
local g=eg:Filter(c22202201.filter,nil,e:GetLabel()):Filter(Card.IsRelateToEffect,nil,e):Filter(Card.IsAbleToGrave,nil) local g=e:GetLabelObject():Filter(Card.IsRelateToEffect,nil,e):Filter(Card.IsAbleToGrave,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end 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