Commit adacfb5a authored by salix5's avatar salix5

EFFECT_CANNOT_SELECT_BATTLE_TARGET

parent 15322377
...@@ -25,5 +25,5 @@ function c10979723.filter(c) ...@@ -25,5 +25,5 @@ function c10979723.filter(c)
return c:IsFaceup() and c:IsSetCard(0x4) return c:IsFaceup() and c:IsSetCard(0x4)
end end
function c10979723.atlimit(e,c) function c10979723.atlimit(e,c)
return c:IsSetCard(0x4) and c~=e:GetHandler() return c:IsFaceup() and c:IsSetCard(0x4) and c~=e:GetHandler()
end end
...@@ -52,5 +52,5 @@ function c11475049.atop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,5 +52,5 @@ function c11475049.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c11475049.atlimit(e,c) function c11475049.atlimit(e,c)
return c:IsSetCard(0x97) return c:IsFaceup() and c:IsSetCard(0x97)
end end
...@@ -24,5 +24,5 @@ function c2333365.descon(e) ...@@ -24,5 +24,5 @@ function c2333365.descon(e)
return not Duel.IsExistingMatchingCard(c2333365.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) return not Duel.IsExistingMatchingCard(c2333365.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
end end
function c2333365.atlimit(e,c) function c2333365.atlimit(e,c)
return c:GetCode()~=2333365 and c:IsSetCard(0x42) return c:IsFaceup() and c:GetCode()~=2333365 and c:IsSetCard(0x42)
end end
...@@ -19,7 +19,7 @@ function c2460565.initial_effect(c) ...@@ -19,7 +19,7 @@ function c2460565.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c2460565.atlimit(e,c) function c2460565.atlimit(e,c)
return c~=e:GetHandler() and c:IsRace(RACE_WARRIOR) return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end end
function c2460565.filter(c,e,tp) function c2460565.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -10,5 +10,5 @@ function c25034083.initial_effect(c) ...@@ -10,5 +10,5 @@ function c25034083.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c25034083.atlimit(e,c) function c25034083.atlimit(e,c)
return not c:IsCode(25034083) return not c:IsCode(25034083) and c:IsFaceup()
end end
...@@ -19,7 +19,7 @@ function c2986553.initial_effect(c) ...@@ -19,7 +19,7 @@ function c2986553.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c2986553.atlimit(e,c) function c2986553.atlimit(e,c)
return c:IsRace(RACE_PLANT) return c:IsFaceup() and c:IsRace(RACE_PLANT)
end end
function c2986553.filter(c,e,tp) function c2986553.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -102,7 +102,7 @@ function c38369349.atcon(e) ...@@ -102,7 +102,7 @@ function c38369349.atcon(e)
return Duel.IsExistingMatchingCard(c38369349.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(c38369349.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end end
function c38369349.atlimit(e,c) function c38369349.atlimit(e,c)
return not c:IsType(TYPE_TOON) return not c:IsType(TYPE_TOON) or c:IsFacedown()
end end
function c38369349.atklimit(e,tp,eg,ep,ev,re,r,rp) function c38369349.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -43,5 +43,5 @@ function c40583194.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,5 +43,5 @@ function c40583194.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c40583194.etarget(e,re,c) function c40583194.etarget(e,re,c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER) and (c:IsFaceup() or c:IsLocation(LOCATION_MZONE))
end end
...@@ -22,7 +22,7 @@ function c45298492.initial_effect(c) ...@@ -22,7 +22,7 @@ function c45298492.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c45298492.atlimit(e,c) function c45298492.atlimit(e,c)
return c~=e:GetHandler() and c:IsRace(RACE_WARRIOR) return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end end
function c45298492.valcon(e,re,r,rp) function c45298492.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 return bit.band(r,REASON_BATTLE)~=0
......
...@@ -77,5 +77,5 @@ function c48179391.atkfilter(c,atk) ...@@ -77,5 +77,5 @@ function c48179391.atkfilter(c,atk)
return c:IsFaceup() and c:GetAttack()<atk return c:IsFaceup() and c:GetAttack()<atk
end end
function c48179391.atlimit(e,c) function c48179391.atlimit(e,c)
return not Duel.IsExistingMatchingCard(c48179391.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,c,c:GetAttack()) return c:IsFaceup() and not Duel.IsExistingMatchingCard(c48179391.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,c,c:GetAttack())
end end
...@@ -32,13 +32,10 @@ function c53183600.initial_effect(c) ...@@ -32,13 +32,10 @@ function c53183600.initial_effect(c)
e4:SetCondition(c53183600.dircon) e4:SetCondition(c53183600.dircon)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetTarget(c53183600.attg)
e5:SetCondition(c53183600.atcon) e5:SetCondition(c53183600.atcon)
e5:SetValue(c53183600.atval) e5:SetValue(c53183600.atlimit)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE) e6:SetType(EFFECT_TYPE_SINGLE)
...@@ -104,11 +101,8 @@ end ...@@ -104,11 +101,8 @@ end
function c53183600.atcon(e) function c53183600.atcon(e)
return Duel.IsExistingMatchingCard(c53183600.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(c53183600.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end end
function c53183600.attg(e,c) function c53183600.atlimit(e,c)
return not c:IsType(TYPE_TOON) return not c:IsType(TYPE_TOON) or c:IsFacedown()
end
function c53183600.atval(e,c)
return c==e:GetHandler()
end end
function c53183600.atklimit(e,tp,eg,ep,ev,re,r,rp) function c53183600.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -10,5 +10,5 @@ function c55401221.initial_effect(c) ...@@ -10,5 +10,5 @@ function c55401221.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c55401221.atlimit(e,c) function c55401221.atlimit(e,c)
return c:IsRace(RACE_THUNDER) and c:GetCode()~=55401221 return return c:IsFaceup() and c:IsRace(RACE_THUNDER) and c:GetCode()~=55401221
end end
...@@ -102,7 +102,7 @@ function c65458948.atcon(e) ...@@ -102,7 +102,7 @@ function c65458948.atcon(e)
return Duel.IsExistingMatchingCard(c65458948.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(c65458948.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end end
function c65458948.atlimit(e,c) function c65458948.atlimit(e,c)
return not c:IsType(TYPE_TOON) return not c:IsType(TYPE_TOON) or c:IsFacedown()
end end
function c65458948.atklimit(e,tp,eg,ep,ev,re,r,rp) function c65458948.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -6,7 +6,7 @@ function c67511500.initial_effect(c) ...@@ -6,7 +6,7 @@ function c67511500.initial_effect(c)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(aux.TargetBoolFunction(Card.IsRace,RACE_DRAGON)) e1:SetValue(c67511500.atlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy replace --destroy replace
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -17,6 +17,9 @@ function c67511500.initial_effect(c) ...@@ -17,6 +17,9 @@ function c67511500.initial_effect(c)
e2:SetTarget(c67511500.desreptg) e2:SetTarget(c67511500.desreptg)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c67511500.atlimit(e,c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end
function c67511500.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c67511500.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return not c:IsReason(REASON_REPLACE) if chk==0 then return not c:IsReason(REASON_REPLACE)
......
...@@ -38,7 +38,7 @@ function c6924874.cfilter(c) ...@@ -38,7 +38,7 @@ function c6924874.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x64) and c:GetCode()~=6924874 return c:IsFaceup() and c:IsSetCard(0x64) and c:GetCode()~=6924874
end end
function c6924874.atlimit(e,c) function c6924874.atlimit(e,c)
return c:IsSetCard(0x64) and c:GetCode()~=6924874 return c:IsFaceup() and c:IsSetCard(0x64) and c:GetCode()~=6924874
end end
function c6924874.adcon(e) function c6924874.adcon(e)
return Duel.IsExistingMatchingCard(c6924874.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil) return Duel.IsExistingMatchingCard(c6924874.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil)
......
...@@ -19,7 +19,7 @@ function c70458081.initial_effect(c) ...@@ -19,7 +19,7 @@ function c70458081.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c70458081.atlimit(e,c) function c70458081.atlimit(e,c)
return c:IsSetCard(0x9f) and c~=e:GetHandler() return c:IsFaceup() and c:IsSetCard(0x9f) and c~=e:GetHandler()
end end
function c70458081.repfilter(c,tp) function c70458081.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x9f) and not c:IsCode(70458081) return c:IsFaceup() and c:IsSetCard(0x9f) and not c:IsCode(70458081)
......
...@@ -47,5 +47,5 @@ function c73219648.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,5 +47,5 @@ function c73219648.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c73219648.atktg(e,c) function c73219648.atktg(e,c)
return c:IsSetCard(0x45) and c:GetCode()~=73219648 return c:IsFaceup() and c:IsSetCard(0x45) and c:GetCode()~=73219648
end end
...@@ -33,5 +33,5 @@ function c75363626.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,5 +33,5 @@ function c75363626.retop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c75363626.atktg(e,c) function c75363626.atktg(e,c)
return c:GetCode()~=75363626 and c:IsSetCard(0x71) return c:IsFaceup() and c:GetCode()~=75363626 and c:IsSetCard(0x71)
end end
...@@ -21,7 +21,7 @@ function c79636594.initial_effect(c) ...@@ -21,7 +21,7 @@ function c79636594.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c79636594.bttg(e,c) function c79636594.bttg(e,c)
return c:IsRace(RACE_INSECT) and c~=e:GetHandler() return c:IsFaceup() and c:IsRace(RACE_INSECT) and c~=e:GetHandler()
end end
function c79636594.filter(c,e,tp) function c79636594.filter(c,e,tp)
return c:IsCode(79636594) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(79636594) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -10,5 +10,5 @@ function c80304126.initial_effect(c) ...@@ -10,5 +10,5 @@ function c80304126.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c80304126.tg(e,c) function c80304126.tg(e,c)
return c~=e:GetHandler() and c:IsRace(RACE_SPELLCASTER) return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end end
...@@ -21,7 +21,7 @@ function c87294988.initial_effect(c) ...@@ -21,7 +21,7 @@ function c87294988.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c87294988.bttg(e,c) function c87294988.bttg(e,c)
return c~=e:GetHandler() and c:IsRace(RACE_PLANT) return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_PLANT)
end end
function c87294988.spcon(e,tp,eg,ep,ev,re,r,rp) function c87294988.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and e:GetHandler():GetPreviousControler()==tp return rp~=tp and e:GetHandler():GetPreviousControler()==tp
......
...@@ -103,7 +103,7 @@ function c90960358.atcon(e) ...@@ -103,7 +103,7 @@ function c90960358.atcon(e)
return Duel.IsExistingMatchingCard(c90960358.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(c90960358.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end end
function c90960358.atlimit(e,c) function c90960358.atlimit(e,c)
return not c:IsType(TYPE_TOON) return not c:IsType(TYPE_TOON) or c:IsFacedown()
end end
function c90960358.atklimit(e,tp,eg,ep,ev,re,r,rp) function c90960358.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -74,5 +74,5 @@ function c91420254.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,5 +74,5 @@ function c91420254.posop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c91420254.bttg(e,c) function c91420254.bttg(e,c)
return c:IsSetCard(0xb3) and c~=e:GetHandler() return c:IsFaceup() and c:IsSetCard(0xb3) and c~=e:GetHandler()
end end
...@@ -20,7 +20,7 @@ function c91559748.initial_effect(c) ...@@ -20,7 +20,7 @@ function c91559748.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c91559748.tg(e,c) function c91559748.tg(e,c)
return c:IsRace(RACE_INSECT) return c:IsFaceup() and c:IsRace(RACE_INSECT)
end end
function c91559748.cpcon(e,tp,eg,ep,ev,re,r,rp) function c91559748.cpcon(e,tp,eg,ep,ev,re,r,rp)
local t=e:GetHandler():GetBattleTarget() local t=e:GetHandler():GetBattleTarget()
......
...@@ -102,7 +102,7 @@ function c91842653.atcon(e) ...@@ -102,7 +102,7 @@ function c91842653.atcon(e)
return Duel.IsExistingMatchingCard(c91842653.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(c91842653.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end end
function c91842653.atlimit(e,c) function c91842653.atlimit(e,c)
return not c:IsType(TYPE_TOON) return not c:IsType(TYPE_TOON) or c:IsFacedown()
end end
function c91842653.atklimit(e,tp,eg,ep,ev,re,r,rp) function c91842653.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -11,5 +11,5 @@ function c9264485.initial_effect(c) ...@@ -11,5 +11,5 @@ function c9264485.initial_effect(c)
end end
function c9264485.etarget(e,re,c) function c9264485.etarget(e,re,c)
local code=c:GetCode() local code=c:GetCode()
return c:IsLocation(LOCATION_MZONE) and (code==75830094 or code==11224103 or code==48229808) return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and (code==75830094 or code==11224103 or code==48229808)
end end
...@@ -19,5 +19,5 @@ function c95466842.initial_effect(c) ...@@ -19,5 +19,5 @@ function c95466842.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c95466842.atlimit(e,c) function c95466842.atlimit(e,c)
return c~=e:GetHandler() and c:IsAttribute(ATTRIBUTE_WATER) return c~=e:GetHandler() and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end end
...@@ -10,5 +10,5 @@ function c9666558.initial_effect(c) ...@@ -10,5 +10,5 @@ function c9666558.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c9666558.tg(e,c) function c9666558.tg(e,c)
return c~=e:GetHandler() and c:IsRace(RACE_DRAGON) return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_DRAGON)
end end
...@@ -21,7 +21,7 @@ function c99348756.initial_effect(c) ...@@ -21,7 +21,7 @@ function c99348756.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c99348756.atktg(e,c) function c99348756.atktg(e,c)
return c:GetCode()~=99348756 and c:IsRace(RACE_WARRIOR) return c:GetCode()~=99348756 and c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end end
function c99348756.spcon(e,tp,eg,ep,ev,re,r,rp) function c99348756.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
......
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