Commit 1d73a2b0 authored by DailyShana's avatar DailyShana

fix cannot be target 1

parent 32cd639f
......@@ -32,7 +32,7 @@ function c10000000.initial_effect(c)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(aux.tgval)
e5:SetValue(1)
c:RegisterEffect(e5)
--to grave
local e6=Effect.CreateEffect(c)
......
......@@ -22,7 +22,7 @@ function c16259549.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(aux.tgval)
e2:SetValue(1)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
......
......@@ -30,7 +30,7 @@ function c16308000.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c16308000.rcon)
e1:SetValue(aux.tgval)
e1:SetValue(1)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
......@@ -38,7 +38,7 @@ function c1644289.eqlimit(e,c)
return c:IsSetCard(0x30)
end
function c1644289.tglimit(e,re,rp)
return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_TRAP+TYPE_MONSTER)
return rp~=e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP+TYPE_MONSTER)
end
function c1644289.filter(c)
return c:IsFaceup() and c:IsSetCard(0x30)
......
......@@ -38,7 +38,7 @@ function c1686814.initial_effect(c)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetValue(aux.tgval)
e5:SetValue(1)
c:RegisterEffect(e5)
end
function c1686814.sprfilter1(c,tp)
......
......@@ -7,7 +7,7 @@ function c17985575.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c17985575.etarget)
e1:SetValue(aux.tgval)
e1:SetValue(1)
c:RegisterEffect(e1)
end
function c17985575.etarget(e,c)
......
......@@ -22,7 +22,7 @@ function c19870120.initial_effect(c)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c19870120.target)
e3:SetValue(aux.tgval)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
......
......@@ -24,7 +24,7 @@ function c25796442.initial_effect(c)
c:RegisterEffect(e4)
end
function c25796442.tgval(e,re,rp)
return re:IsActiveType(TYPE_EFFECT) and aux.tgval(e,re,rp)
return re:IsActiveType(TYPE_EFFECT)
end
function c25796442.efilter(e,re)
return re:IsActiveType(TYPE_EFFECT)
......
......@@ -12,7 +12,7 @@ function c269012.initial_effect(c)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c269012.target)
e2:SetValue(aux.tgval)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
......
......@@ -12,5 +12,5 @@ function c27527047.initial_effect(c)
end
function c27527047.tgval(e,re,rp)
local tp=e:GetHandler():GetControler()
return tp~=rp and re:GetHandler():IsType(TYPE_MONSTER) and aux.tgval(e,re,rp)
return tp~=rp and re:GetHandler():IsType(TYPE_MONSTER)
end
......@@ -25,7 +25,7 @@ function c28124263.initial_effect(c)
e3:SetCondition(c28124263.cond)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x26))
e3:SetValue(aux.tgval)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c28124263.check(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -80,7 +80,7 @@ function c38296564.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c38296564.tgval(e,re,rp)
return rp~=e:GetOwnerPlayer() and aux.tgval(e,re,rp)
return rp~=e:GetOwnerPlayer()
end
function c38296564.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
......
......@@ -8,7 +8,7 @@ function c40502912.initial_effect(c)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9b))
e1:SetCondition(c40502912.tgcon)
e1:SetValue(aux.tgval)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......
......@@ -43,7 +43,7 @@ function c40908371.effop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(aux.tgval)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
tc=g:GetNext()
......
......@@ -26,7 +26,7 @@ function c46195773.tfilter(c)
return c:IsCode(67270095) or c:IsHasEffect(20932152)
end
function c46195773.efilter(e,re,rp)
return re:GetHandler():IsLevelBelow(6) and aux.tgval(e,re,rp)
return re:GetHandler():IsLevelBelow(6)
end
function c46195773.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget()
......
......@@ -30,7 +30,7 @@ function c48582558.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.tgval)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
......
......@@ -25,7 +25,7 @@ function c50527144.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(c50527144.tgfilter)
e1:SetValue(aux.tgval)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
......
......@@ -24,7 +24,7 @@ function c5255013.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c5255013.tgcon)
e3:SetValue(aux.tgval)
e3:SetValue(1)
c:RegisterEffect(e3)
--self destroy
local e4=Effect.CreateEffect(c)
......
......@@ -19,7 +19,7 @@ function c55885348.initial_effect(c)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c55885348.tgval)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
......@@ -47,9 +47,6 @@ function c55885348.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c55885348.tgval(e,re,rp)
return rp~=e:GetHandlerPlayer() and not re:GetHandler():IsImmuneToEffect(e)
end
function c55885348.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
......
......@@ -25,7 +25,7 @@ function c58601383.ffilter(c)
return c:IsType(TYPE_SYNCHRO) and not c:IsType(TYPE_EFFECT)
end
function c58601383.efilter1(e,re,rp)
return re:IsActiveType(TYPE_EFFECT) and aux.tgval(e,re,rp)
return re:IsActiveType(TYPE_EFFECT)
end
function c58601383.efilter2(e,re)
return re:IsActiveType(TYPE_EFFECT)
......
......@@ -34,7 +34,7 @@ function c59048135.etarget(e,c)
return c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_XYZ)
end
function c59048135.evalue(e,re,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and aux.tgval(e,re,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c59048135.cfilter(c)
return c:IsSetCard(0x76) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
......
......@@ -31,7 +31,7 @@ function c60234913.utop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgval)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
......
......@@ -15,7 +15,7 @@ function c6165656.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(aux.tgval)
e2:SetValue(1)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
......
......@@ -27,7 +27,7 @@ function c67328336.initial_effect(c)
c:RegisterEffect(e3)
end
function c67328336.effval(e,re,rp)
return re:GetHandler():IsType(TYPE_SYNCHRO) and aux.tgval(e,re,rp)
return re:GetHandler():IsType(TYPE_SYNCHRO)
end
function c67328336.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -43,5 +43,5 @@ function c71209500.efop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c71209500.efilter(e,re,rp)
return re:IsActiveType(TYPE_MONSTER) and aux.tgval(e,re,rp)
return re:IsActiveType(TYPE_MONSTER)
end
\ No newline at end of file
......@@ -7,7 +7,7 @@ function c7183277.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c7183277.etarget)
e1:SetValue(aux.tgval)
e1:SetValue(1)
c:RegisterEffect(e1)
--discard deck
local e2=Effect.CreateEffect(c)
......
......@@ -10,7 +10,7 @@ function c75779210.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetTarget(c75779210.uttg)
e1:SetValue(aux.tgval)
e1:SetValue(1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
......
......@@ -18,7 +18,7 @@ function c77797992.initial_effect(c)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c77797992.cond)
e2:SetTarget(c77797992.targetd)
e2:SetValue(aux.tgval)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
......
......@@ -33,7 +33,7 @@ function c8062132.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetValue(aux.tgval)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_IMMUNE_EFFECT)
......
......@@ -26,7 +26,7 @@ function c85028288.initial_effect(c)
c:RegisterEffect(e3)
end
function c85028288.efilter(e,re,rp)
return re:GetHandler():IsType(TYPE_TRAP+TYPE_MONSTER) and aux.tgval(e,re,rp)
return re:GetHandler():IsType(TYPE_TRAP+TYPE_MONSTER)
end
function c85028288.cfilter(c)
return c:IsAttackBelow(1700) and c:IsSetCard(0x22) and c:IsAbleToRemoveAsCost()
......
......@@ -93,7 +93,7 @@ function c87564935.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c87564935.efilter1(e,re,rp)
return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_MONSTER)
return rp~=e:GetHandlerPlayer() and re:IsActiveType(TYPE_MONSTER)
end
function c87564935.efilter2(e,te)
return te:GetHandlerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
......
......@@ -9,7 +9,7 @@ function c88754763.initial_effect(c)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgval)
e1:SetValue(1)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
......
......@@ -12,7 +12,7 @@ function c96457619.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c96457619.etarget)
e2:SetValue(aux.tgval)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c96457619.etarget(e,c)
......
......@@ -35,7 +35,7 @@ function c96864811.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.tgval)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
......
......@@ -16,7 +16,7 @@ function c99000107.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetCondition(c99000107.tgcon)
e2:SetValue(aux.tgval)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
......
......@@ -1627,13 +1627,9 @@ end
function Auxiliary.imval1(e,c)
return not c:IsImmuneToEffect(e)
end
--default filter for EFFECT_CANNOT_BE_EFFECT_TARGET
function Auxiliary.tgval(e,re,rp)
return not re:GetHandler():IsImmuneToEffect(e)
end
--filter for EFFECT_CANNOT_BE_EFFECT_TARGET + opponent
function Auxiliary.tgoval(e,re,rp)
return rp~=e:GetHandlerPlayer() and not re:GetHandler():IsImmuneToEffect(e)
return rp~=e:GetHandlerPlayer()
end
--filter for non-zero ATK
function Auxiliary.nzatk(c)
......
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