Commit 95024f0c authored by Grajade's avatar Grajade

Update c1111002.lua

parent cf6b5d31
Pipeline #33105 passed with stage
in 18 seconds
......@@ -17,6 +17,8 @@ function c1111002.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c1111002.con2)
e2:SetTarget(c1111002.tg2)
e2:SetOperation(c1111002.op2)
c:RegisterEffect(e2)
......@@ -71,17 +73,19 @@ function c1111002.op1_2(e,tp,eg,ep,ev,re,r,rp)
end
end
--
function c1111002.tfilter2(c,tp)
return c:GetPreviousControler()==tp
function c1111002.tfilter2(c,tp,rp)
return c:IsPreviousControler(tp)
and c:IsPreviousPosition(POS_FACEUP)
and c:IsSetCard(0x3e1f) and c:IsType(TYPE_MONSTER)
and c:IsSetCard(0x3e1f) and bit.band(c:GetPreviousTypeOnField(),TYPE_MONSTER)~=0
and c:IsAbleToHand()
and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function c1111002.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1111002.tfilter2,1,nil,tp,rp) and not eg:IsContains(e:GetHandler())
end
function c1111002.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return r and r==REASON_EFFECT and rp==1-tp
and e:GetHandler():IsAbleToHand()
and eg:IsExists(c1111002.tfilter2,1,nil,tp)
and not eg:IsContains(e:GetHandler()) end
if chk==0 then return e:GetHandler():IsAbleToHand()
and eg:IsExists(c1111002.tfilter2,1,nil,tp,rp) end
local sg=eg:Filter(c1111002.tfilter2,nil,tp)
sg:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
......
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