Commit a6713964 authored by GuGu's avatar GuGu

Update c7770133.lua

parent d247a521
Pipeline #29231 passed with stage
in 6 seconds
......@@ -51,57 +51,12 @@ function l.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
--forbidden
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_FORBIDDEN)
e2:SetTargetRange(0xff,0xff)
--e2:SetCondition(l.bancon)
e2:SetTarget(l.bantg)
e2:SetLabelObject(tc)
Duel.RegisterEffect(e2,tp)
--adjust
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_ADJUST)
e3:SetCondition(l.adjustcon)
e3:SetOperation(l.adjustop)
e3:SetLabelObject(e2)
Duel.RegisterEffect(e3,tp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2,true)
tc=g:GetNext()
end
end
end
function l.banfilter(c,e)
return c==e:GetLabelObject() and c:IsPublic()
end
function l.bancon(e)
local tp=e:GetHandlerPlayer()
local tc=e:GetLabelObject()
if Duel.IsExistingMatchingCard(l.banfilter,tp,LOCATION_HAND,LOCATION_HAND,1,nil,e) then return true end
e:Reset()
return false
end
function l.banfilter2(c,tc)
return c==tc and c:IsPublic()
end
function l.adjustcon(e,tp,eg,ep,ev,re,r,rp)
local e2=e:GetLabelObject()
if not e2 then return false end
local tc=e2:GetLabelObject()
if not tc then return false end
return not Duel.IsExistingMatchingCard(l.banfilter2,tp,LOCATION_HAND,LOCATION_HAND,1,nil,tc)
end
function l.adjustop(e,tp,eg,ep,ev,re,r,rp)
local e2=e:GetLabelObject()
if not e2 then return false end
local tc=e2:GetLabelObject()
if not tc then return false end
if not Duel.IsExistingMatchingCard(l.banfilter2,tp,LOCATION_HAND,LOCATION_HAND,1,nil,tc) then
e2:Reset()
e:Reset()
end
end
function l.bantg(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
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