Commit d247a521 authored by GuGu's avatar GuGu

Update c200203.lua

parent 66a3c1dd
Pipeline #29230 passed with stage
in 10 seconds
...@@ -19,37 +19,10 @@ function c200203.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,37 +19,10 @@ function c200203.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.HintSelection(g) Duel.HintSelection(g)
local pos=0
if tc:IsFacedown() then pos=1 end
--forbidden
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_FORBIDDEN) e1:SetCode(EFFECT_FORBIDDEN)
e1:SetCondition(c200203.bancon) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetTarget(c200203.bantg) tc:RegisterEffect(e1,true)
e1:SetLabel(pos)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
function c200203.banfilter1(c,e)
return c==e:GetLabelObject() and c:IsFaceup() and c:IsOnField()
end
function c200203.banfilter2(c,e)
return c==e:GetLabelObject() and c:IsFacedown() and c:IsOnField()
end
function c200203.bancon(e)
local tp=e:GetHandlerPlayer()
local tc=e:GetLabelObject()
local pos=e:GetLabel()
if pos==1 and Duel.IsExistingMatchingCard(c200203.banfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) then return true
else e:SetLabel(0) end
if Duel.IsExistingMatchingCard(c200203.banfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) then return true end
e:Reset()
return false
end
function c200203.bantg(e,c)
return c==e:GetLabelObject()
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