Commit b8c0e2b6 authored by nekrozar's avatar nekrozar Committed by nanahira

fix activate limit (#1197)

* fix activate limit

* fix activate limit
parent 83799fbe
...@@ -24,7 +24,7 @@ function c12255007.initial_effect(c) ...@@ -24,7 +24,7 @@ function c12255007.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c12255007.aclimit(e,re,tp) function c12255007.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c12255007.actcon(e) function c12255007.actcon(e)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
......
...@@ -89,7 +89,7 @@ end ...@@ -89,7 +89,7 @@ end
function c13331639.limval(e,re,rp) function c13331639.limval(e,re,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER)
and rc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) and not rc:IsImmuneToEffect(e) and rc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ)
end end
function c13331639.ddcon(e,tp,eg,ep,ev,re,r,rp) function c13331639.ddcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW return Duel.GetCurrentPhase()~=PHASE_DRAW
......
...@@ -65,5 +65,5 @@ function c15419596.actcon(e) ...@@ -65,5 +65,5 @@ function c15419596.actcon(e)
end end
function c15419596.aclimit(e,re,tp) function c15419596.aclimit(e,re,tp)
local tc=re:GetHandler() local tc=re:GetHandler()
return tc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetColumnGroup():IsContains(tc) and not tc:IsImmuneToEffect(e) return tc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetColumnGroup():IsContains(tc)
end end
...@@ -58,5 +58,5 @@ function c17194258.sumlimit(e,c) ...@@ -58,5 +58,5 @@ function c17194258.sumlimit(e,c)
return c:IsCode(e:GetLabel()) return c:IsCode(e:GetLabel())
end end
function c17194258.aclimit(e,re,tp) function c17194258.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER)
end end
...@@ -62,7 +62,7 @@ function c17663375.sumlimit(e,c,sump,sumtype,sumpos,targetp) ...@@ -62,7 +62,7 @@ function c17663375.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0 return bit.band(sumpos,POS_FACEDOWN)>0
end end
function c17663375.aclimit(e,re,tp) function c17663375.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return re:IsActiveType(TYPE_MONSTER)
end end
function c17663375.actcon(e) function c17663375.actcon(e)
return Duel.GetAttacker()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler()
......
...@@ -46,7 +46,7 @@ function c24940422.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function c24940422.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c24940422.aclimit(e,re,tp) function c24940422.aclimit(e,re,tp)
return not re:GetHandler():IsCode(24940422) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:GetHandler():IsImmuneToEffect(e) return not re:GetHandler():IsCode(24940422) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end end
function c24940422.tdfilter(c) function c24940422.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
......
...@@ -17,7 +17,7 @@ function c25494711.initial_effect(c) ...@@ -17,7 +17,7 @@ function c25494711.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetValue(c25494711.aclimit) e2:SetValue(1)
e2:SetCondition(c25494711.actcon) e2:SetCondition(c25494711.actcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy replace --destroy replace
...@@ -64,9 +64,6 @@ end ...@@ -64,9 +64,6 @@ end
function c25494711.ftarget(e,c) function c25494711.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID() return e:GetLabel()~=c:GetFieldID()
end end
function c25494711.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c25494711.actcon(e) function c25494711.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end end
......
...@@ -63,7 +63,7 @@ function c2602411.eqlimit(e,c) ...@@ -63,7 +63,7 @@ function c2602411.eqlimit(e,c)
end end
function c2602411.aclimit(e,re,tp) function c2602411.aclimit(e,re,tp)
local loc=re:GetActivateLocation() local loc=re:GetActivateLocation()
return loc==LOCATION_GRAVE and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return loc==LOCATION_GRAVE and re:IsActiveType(TYPE_MONSTER)
end end
function c2602411.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c2602411.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
...@@ -44,5 +44,5 @@ function c26202165.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,5 +44,5 @@ function c26202165.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c26202165.aclimit(e,re,tp) function c26202165.aclimit(e,re,tp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(tc:GetCode())
end end
...@@ -70,7 +70,7 @@ function c26232916.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +70,7 @@ function c26232916.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function c26232916.aclimit(e,re,tp) function c26232916.aclimit(e,re,tp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(tc:GetCode())
end end
function c26232916.repfilter(c,tp) function c26232916.repfilter(c,tp)
return c:IsFaceup() and (c:IsType(TYPE_MONSTER) and c:IsSetCard(0x2b) or c:IsSetCard(0x61)) return c:IsFaceup() and (c:IsType(TYPE_MONSTER) and c:IsSetCard(0x2b) or c:IsSetCard(0x61))
...@@ -99,4 +99,3 @@ function c26232916.repop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,4 +99,3 @@ function c26232916.repop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end end
...@@ -70,5 +70,5 @@ function c29208536.aclimit(e,re,tp) ...@@ -70,5 +70,5 @@ function c29208536.aclimit(e,re,tp)
table.insert(cg,tc:GetCode()) table.insert(cg,tc:GetCode())
tc=g:GetNext() tc=g:GetNext()
end end
return re:GetHandler():IsCode(table.unpack(cg)) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(table.unpack(cg))
end end
...@@ -36,5 +36,5 @@ function c32231618.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,5 +36,5 @@ function c32231618.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c32231618.actlimit(e,re,rp) function c32231618.actlimit(e,re,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(0xcc) and not rc:IsImmuneToEffect(e) return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(0xcc)
end end
...@@ -68,7 +68,7 @@ function c32465539.efop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,7 @@ function c32465539.efop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(c32465539.aclimit) e1:SetValue(1)
e1:SetCondition(c32465539.actcon) e1:SetCondition(c32465539.actcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true) rc:RegisterEffect(e1,true)
...@@ -81,9 +81,6 @@ function c32465539.efop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,9 +81,6 @@ function c32465539.efop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e2,true) rc:RegisterEffect(e2,true)
end end
end end
function c32465539.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c32465539.actcon(e) function c32465539.actcon(e)
return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget() and Duel.GetAttackTarget():IsPosition(POS_DEFENSE) return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget() and Duel.GetAttackTarget():IsPosition(POS_DEFENSE)
end end
...@@ -25,7 +25,7 @@ function c33022867.initial_effect(c) ...@@ -25,7 +25,7 @@ function c33022867.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
e3:SetCondition(c33022867.condition) e3:SetCondition(c33022867.condition)
e3:SetValue(c33022867.aclimit) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c33022867.fselect(g,tp) function c33022867.fselect(g,tp)
...@@ -71,6 +71,3 @@ function c33022867.condition(e) ...@@ -71,6 +71,3 @@ function c33022867.condition(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c33022867.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
...@@ -30,7 +30,7 @@ function c33950246.initial_effect(c) ...@@ -30,7 +30,7 @@ function c33950246.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c33950246.aclimit(e,re,tp) function c33950246.aclimit(e,re,tp)
return re:IsActiveType(TYPE_FLIP) and not re:GetHandler():IsImmuneToEffect(e) return re:IsActiveType(TYPE_FLIP)
end end
function c33950246.disable(e,c) function c33950246.disable(e,c)
return c:IsType(TYPE_FLIP) return c:IsType(TYPE_FLIP)
......
...@@ -23,7 +23,7 @@ function c34010534.initial_effect(c) ...@@ -23,7 +23,7 @@ function c34010534.initial_effect(c)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
e3:SetCondition(c34010534.actcon) e3:SetCondition(c34010534.actcon)
e3:SetValue(c34010534.aclimit) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c34010534.sumfilter(c) function c34010534.sumfilter(c)
...@@ -61,6 +61,3 @@ function c34010534.actcon(e) ...@@ -61,6 +61,3 @@ function c34010534.actcon(e)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return (a and c34010534.cfilter(a,tp)) or (d and c34010534.cfilter(d,tp)) return (a and c34010534.cfilter(a,tp)) or (d and c34010534.cfilter(d,tp))
end end
function c34010534.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
...@@ -78,7 +78,7 @@ function c35618217.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +78,7 @@ function c35618217.actop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetCondition(c35618217.actcon) e1:SetCondition(c35618217.actcon)
e1:SetValue(c35618217.actlimit) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
...@@ -86,6 +86,3 @@ function c35618217.actcon(e) ...@@ -86,6 +86,3 @@ function c35618217.actcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c35618217.actlimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
...@@ -60,7 +60,7 @@ function c38601126.eqlimit(e,c) ...@@ -60,7 +60,7 @@ function c38601126.eqlimit(e,c)
end end
function c38601126.aclimit(e,re,tp) function c38601126.aclimit(e,re,tp)
local loc=re:GetActivateLocation() local loc=re:GetActivateLocation()
return loc==LOCATION_SZONE and not re:IsHasType(EFFECT_TYPE_ACTIVATE) and not re:GetHandler():IsImmuneToEffect(e) return loc==LOCATION_SZONE and not re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c38601126.dacost(e,tp,eg,ep,ev,re,r,rp,chk) function c38601126.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
...@@ -23,10 +23,7 @@ function c402568.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,10 +23,7 @@ function c402568.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(c402568.aclimit) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c402568.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
...@@ -10,7 +10,7 @@ function c40509732.initial_effect(c) ...@@ -10,7 +10,7 @@ function c40509732.initial_effect(c)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(c40509732.aclimit) e1:SetValue(1)
e1:SetCondition(c40509732.con) e1:SetCondition(c40509732.con)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable --disable
...@@ -36,9 +36,6 @@ function c40509732.initial_effect(c) ...@@ -36,9 +36,6 @@ function c40509732.initial_effect(c)
e4:SetOperation(c40509732.spop) e4:SetOperation(c40509732.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c40509732.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c40509732.con(e) function c40509732.con(e)
local c=e:GetHandler() local c=e:GetHandler()
return (Duel.GetAttacker()==c and c:GetBattleTarget()) or Duel.GetAttackTarget()==c return (Duel.GetAttacker()==c and c:GetBattleTarget()) or Duel.GetAttackTarget()==c
......
...@@ -28,7 +28,7 @@ function c40583194.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function c40583194.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET) e1:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,0xff) e1:SetTargetRange(0,0xff)
e1:SetValue(c40583194.etarget) e1:SetValue(c40583194.etarget)
......
...@@ -24,13 +24,10 @@ function c41128647.initial_effect(c) ...@@ -24,13 +24,10 @@ function c41128647.initial_effect(c)
e4:SetCode(EFFECT_CANNOT_ACTIVATE) e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_FZONE) e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(0,1) e4:SetTargetRange(0,1)
e4:SetValue(c41128647.aclimit) e4:SetValue(1)
e4:SetCondition(c41128647.actcon) e4:SetCondition(c41128647.actcon)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c41128647.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c41128647.cfilter(c,tp) function c41128647.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp)
end end
......
...@@ -40,7 +40,7 @@ function c43845801.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,7 @@ function c43845801.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetLabelObject(tc) e2:SetLabelObject(tc)
e2:SetValue(c43845801.aclimit) e2:SetValue(1)
e2:SetCondition(c43845801.actcon) e2:SetCondition(c43845801.actcon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
...@@ -49,6 +49,3 @@ end ...@@ -49,6 +49,3 @@ end
function c43845801.actcon(e) function c43845801.actcon(e)
return Duel.GetAttacker()==e:GetLabelObject() return Duel.GetAttacker()==e:GetLabelObject()
end end
function c43845801.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
...@@ -65,7 +65,7 @@ function c43994202.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function c43994202.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c43994202.aclimit(e,re,tp) function c43994202.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER)
end end
function c43994202.splimit(e,c,sump,sumtype,sumpos,targetp) function c43994202.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsCode(e:GetLabel()) return c:IsCode(e:GetLabel())
......
...@@ -10,7 +10,7 @@ function c44509529.initial_effect(c) ...@@ -10,7 +10,7 @@ function c44509529.initial_effect(c)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(c44509529.aclimit) e1:SetValue(1)
e1:SetCondition(c44509529.actcon) e1:SetCondition(c44509529.actcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
...@@ -29,9 +29,6 @@ function c44509529.initial_effect(c) ...@@ -29,9 +29,6 @@ function c44509529.initial_effect(c)
e2:SetOperation(c44509529.spop) e2:SetOperation(c44509529.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c44509529.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c44509529.actcon(e) function c44509529.actcon(e)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
return a and a:IsControler(e:GetHandlerPlayer()) and a:IsSetCard(0x120) return a and a:IsControler(e:GetHandlerPlayer()) and a:IsSetCard(0x120)
......
...@@ -70,7 +70,7 @@ function c44874522.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +70,7 @@ function c44874522.regop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c44874522.aclimit(e,re,tp) function c44874522.aclimit(e,re,tp)
return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) and not re:GetHandler():IsImmuneToEffect(e) return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)
end end
function c44874522.actcon(e) function c44874522.actcon(e)
return Duel.GetAttacker()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler()
......
...@@ -12,7 +12,7 @@ function c45349196.initial_effect(c) ...@@ -12,7 +12,7 @@ function c45349196.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetCondition(c45349196.accon) e1:SetCondition(c45349196.accon)
e1:SetValue(c45349196.aclimit) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--damage --damage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -37,9 +37,6 @@ end ...@@ -37,9 +37,6 @@ end
function c45349196.accon(e) function c45349196.accon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end end
function c45349196.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c45349196.damcon(e,tp,eg,ep,ev,re,r,rp) function c45349196.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and c:GetBattledGroupCount()>0 return c:IsSummonType(SUMMON_TYPE_FUSION) and c:GetBattledGroupCount()>0
......
...@@ -18,7 +18,7 @@ function c46897277.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +18,7 @@ function c46897277.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(c46897277.aclimit) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
...@@ -29,6 +29,3 @@ function c46897277.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,6 +29,3 @@ function c46897277.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c46897277.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
...@@ -66,7 +66,7 @@ function c48770333.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c48770333.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(c48770333.aclimit) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
...@@ -79,6 +79,3 @@ function c48770333.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,6 +79,3 @@ function c48770333.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
function c48770333.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
...@@ -73,7 +73,7 @@ function c49306994.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function c49306994.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c49306994.aclimit(e,re,tp) function c49306994.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and not re:GetHandler():IsImmuneToEffect(e) return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c49306994.actcon(e) function c49306994.actcon(e)
local tc=e:GetHandler():GetEquipTarget() local tc=e:GetHandler():GetEquipTarget()
......
...@@ -79,10 +79,7 @@ function c50139096.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,10 +79,7 @@ function c50139096.actop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(c50139096.actlimit) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE) e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c50139096.actlimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
...@@ -48,5 +48,5 @@ function c51788412.actcon(e) ...@@ -48,5 +48,5 @@ function c51788412.actcon(e)
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c51788412.actlimit(e,re,tp) function c51788412.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return re:IsActiveType(TYPE_MONSTER)
end end
...@@ -17,7 +17,7 @@ function c56421754.initial_effect(c) ...@@ -17,7 +17,7 @@ function c56421754.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetValue(c56421754.aclimit) e2:SetValue(1)
e2:SetCondition(c56421754.actcon) e2:SetCondition(c56421754.actcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -37,9 +37,6 @@ function c56421754.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -37,9 +37,6 @@ function c56421754.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,c56421754.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft) local g=Duel.SelectMatchingCard(tp,c56421754.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c56421754.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c56421754.actcon(e) function c56421754.actcon(e)
return Duel.GetAttacker()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler()
end end
...@@ -10,7 +10,7 @@ function c57477163.initial_effect(c) ...@@ -10,7 +10,7 @@ function c57477163.initial_effect(c)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(c57477163.aclimit) e1:SetValue(1)
e1:SetCondition(c57477163.actcon) e1:SetCondition(c57477163.actcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
...@@ -25,9 +25,6 @@ function c57477163.initial_effect(c) ...@@ -25,9 +25,6 @@ function c57477163.initial_effect(c)
e2:SetOperation(c57477163.operation) e2:SetOperation(c57477163.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c57477163.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c57477163.actcon(e) function c57477163.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end end
......
...@@ -29,7 +29,7 @@ function c58569561.accon(e) ...@@ -29,7 +29,7 @@ function c58569561.accon(e)
return Duel.GetLP(tp)>Duel.GetLP(1-tp) and ac and ac:IsControler(tp) and ac:IsRace(RACE_PLANT) return Duel.GetLP(tp)>Duel.GetLP(1-tp) and ac and ac:IsControler(tp) and ac:IsRace(RACE_PLANT)
end end
function c58569561.actlimit(e,re,tp) function c58569561.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return re:IsActiveType(TYPE_MONSTER)
end end
function c58569561.poscon(e,tp,eg,ep,ev,re,r,rp) function c58569561.poscon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp return ep==tp
......
...@@ -41,7 +41,7 @@ function c60508057.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function c60508057.damop(e,tp,eg,ep,ev,re,r,rp)
end end
function c60508057.actlimit(e,re,rp) function c60508057.actlimit(e,re,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(0xba) and not rc:IsImmuneToEffect(e) return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(0xba)
end end
function c60508057.spcon(e,tp,eg,ep,ev,re,r,rp) function c60508057.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) return e:GetHandler():IsLocation(LOCATION_GRAVE)
......
...@@ -19,7 +19,7 @@ function c62000467.initial_effect(c) ...@@ -19,7 +19,7 @@ function c62000467.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetValue(c62000467.aclimit) e2:SetValue(1)
e2:SetCondition(c62000467.actcon) e2:SetCondition(c62000467.actcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon --special summon
...@@ -39,9 +39,6 @@ end ...@@ -39,9 +39,6 @@ end
function c62000467.indtg(e,c) function c62000467.indtg(e,c)
return c:IsSetCard(0x19) and Duel.GetAttacker()==c return c:IsSetCard(0x19) and Duel.GetAttacker()==c
end end
function c62000467.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c62000467.actcon(e) function c62000467.actcon(e)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
......
...@@ -73,5 +73,5 @@ function c65330383.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,5 +73,5 @@ function c65330383.setop(e,tp,eg,ep,ev,re,r,rp)
end end
function c65330383.aclimit(e,re,tp) function c65330383.aclimit(e,re,tp)
local tc=re:GetHandler() local tc=re:GetHandler()
return tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:IsSummonType(SUMMON_TYPE_SPECIAL) and not tc:IsLinkState() and re:IsActiveType(TYPE_MONSTER) and not tc:IsImmuneToEffect(e) return tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:IsSummonType(SUMMON_TYPE_SPECIAL) and not tc:IsLinkState() and re:IsActiveType(TYPE_MONSTER)
end end
...@@ -17,16 +17,13 @@ function c67985943.initial_effect(c) ...@@ -17,16 +17,13 @@ function c67985943.initial_effect(c)
e3:SetCode(EFFECT_CANNOT_ACTIVATE) e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
e3:SetValue(c67985943.aclimit) e3:SetValue(1)
e3:SetCondition(c67985943.actcon) e3:SetCondition(c67985943.actcon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c67985943.splimit(e,se,sp,st) function c67985943.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end end
function c67985943.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c67985943.actcon(e) function c67985943.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end end
...@@ -58,7 +58,7 @@ function c68396121.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function c68396121.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c68396121.aclimit(e,re,tp) function c68396121.aclimit(e,re,tp)
return re:GetHandler():IsOnField() and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsOnField()
end end
function c68396121.atkcon(e,tp,eg,ep,ev,re,r,rp) function c68396121.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP()
...@@ -83,4 +83,3 @@ function c68396121.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,4 +83,3 @@ function c68396121.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
...@@ -65,7 +65,7 @@ function c68431965.lvop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function c68431965.lvop1(e,tp,eg,ep,ev,re,r,rp)
end end
function c68431965.aclimit(e,re,tp) function c68431965.aclimit(e,re,tp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(tc:GetCode())
end end
function c68431965.sccon(e,tp,eg,ep,ev,re,r,rp) function c68431965.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
......
...@@ -22,5 +22,5 @@ function c68937720.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,5 +22,5 @@ function c68937720.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c68937720.aclimit(e,re,tp) function c68937720.aclimit(e,re,tp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsLocation(LOCATION_HAND) and re:IsActiveType(TYPE_MONSTER) and not rc:IsImmuneToEffect(e) return rc:IsLocation(LOCATION_HAND) and re:IsActiveType(TYPE_MONSTER)
end end
...@@ -50,7 +50,7 @@ function c70917315.limcon(e) ...@@ -50,7 +50,7 @@ function c70917315.limcon(e)
end end
function c70917315.limval(e,re,rp) function c70917315.limval(e,re,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return re:IsActiveType(TYPE_SPELL) and not rc:IsSetCard(0xe0) and not rc:IsImmuneToEffect(e) return re:IsActiveType(TYPE_SPELL) and not rc:IsSetCard(0xe0)
end end
function c70917315.descon(e,tp,eg,ep,ev,re,r,rp) function c70917315.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
......
...@@ -65,5 +65,5 @@ function c7305060.limcon(e) ...@@ -65,5 +65,5 @@ function c7305060.limcon(e)
end end
function c7305060.limval(e,re,rp) function c7305060.limval(e,re,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return re:IsActiveType(TYPE_TRAP) and not rc:IsSetCard(0xe0) and not rc:IsImmuneToEffect(e) return re:IsActiveType(TYPE_TRAP) and not rc:IsSetCard(0xe0)
end end
...@@ -22,5 +22,5 @@ function c73599290.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,5 +22,5 @@ function c73599290.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c73599290.aclimit(e,re,tp) function c73599290.aclimit(e,re,tp)
local loc=re:GetActivateLocation() local loc=re:GetActivateLocation()
return (loc==LOCATION_GRAVE or loc==LOCATION_REMOVED) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return (loc==LOCATION_GRAVE or loc==LOCATION_REMOVED) and re:IsActiveType(TYPE_MONSTER)
end end
...@@ -42,5 +42,5 @@ end ...@@ -42,5 +42,5 @@ end
function c7403341.aclimit(e,re,tp) function c7403341.aclimit(e,re,tp)
local c=re:GetHandler() local c=re:GetHandler()
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and not c:IsImmuneToEffect(e) return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end end
...@@ -25,5 +25,5 @@ function c74717840.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,5 +25,5 @@ function c74717840.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c74717840.aclimit(e,re,tp) function c74717840.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return re:IsActiveType(TYPE_MONSTER)
end end
...@@ -97,7 +97,7 @@ function c75059201.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,7 +97,7 @@ function c75059201.lvop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c75059201.aclimit(e,re,tp) function c75059201.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return re:IsActiveType(TYPE_MONSTER)
end end
function c75059201.actcon(e) function c75059201.actcon(e)
if not e:GetHandler():IsLevelAbove(7) then return false end if not e:GetHandler():IsLevelAbove(7) then return false end
......
...@@ -44,5 +44,5 @@ function c78010363.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,5 +44,5 @@ function c78010363.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c78010363.aclimit(e,re,tp) function c78010363.aclimit(e,re,tp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(tc:GetCode())
end end
...@@ -51,7 +51,7 @@ function c81055000.thop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c81055000.thop1(e,tp,eg,ep,ev,re,r,rp)
end end
function c81055000.aclimit(e,re,tp) function c81055000.aclimit(e,re,tp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(tc:GetCode())
end end
function c81055000.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81055000.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
......
...@@ -24,7 +24,7 @@ function c81193865.initial_effect(c) ...@@ -24,7 +24,7 @@ function c81193865.initial_effect(c)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
e3:SetCondition(c81193865.actcon) e3:SetCondition(c81193865.actcon)
e3:SetValue(c81193865.actlimit) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--chain attack --chain attack
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -87,9 +87,6 @@ function c81193865.actcon(e) ...@@ -87,9 +87,6 @@ function c81193865.actcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==e:GetHandler():GetControler() and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return Duel.GetTurnPlayer()==e:GetHandler():GetControler() and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c81193865.actlimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c81193865.cacon(e,tp,eg,ep,ev,re,r,rp) function c81193865.cacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler():GetEquipTarget() and Duel.GetAttackTarget()~=nil return Duel.GetAttacker()==e:GetHandler():GetEquipTarget() and Duel.GetAttackTarget()~=nil
end end
......
...@@ -82,7 +82,7 @@ function c81269231.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,7 +82,7 @@ function c81269231.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c81269231.aclimit(e,re,tp) function c81269231.aclimit(e,re,tp)
return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) and not re:GetHandler():IsImmuneToEffect(e) return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)
end end
function c81269231.actcon(e) function c81269231.actcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
......
...@@ -17,7 +17,7 @@ function c83866861.initial_effect(c) ...@@ -17,7 +17,7 @@ function c83866861.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetValue(c83866861.aclimit) e2:SetValue(1)
e2:SetCondition(c83866861.actcon) e2:SetCondition(c83866861.actcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon --special summon
...@@ -39,9 +39,6 @@ function c83866861.initial_effect(c) ...@@ -39,9 +39,6 @@ function c83866861.initial_effect(c)
e4:SetValue(c83866861.atkval) e4:SetValue(c83866861.atkval)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c83866861.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c83866861.actcon(e) function c83866861.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end end
......
...@@ -35,7 +35,7 @@ function c8529136.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function c8529136.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetCondition(c8529136.actcon) e1:SetCondition(c8529136.actcon)
e1:SetValue(c8529136.aclimit) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -73,9 +73,6 @@ function c8529136.actcon(e) ...@@ -73,9 +73,6 @@ function c8529136.actcon(e)
return (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) and c:GetBattleTarget()~=nil return (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) and c:GetBattleTarget()~=nil
and e:GetOwnerPlayer()==e:GetHandlerPlayer() and e:GetOwnerPlayer()==e:GetHandlerPlayer()
end end
function c8529136.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c8529136.effcon(e) function c8529136.effcon(e)
return e:GetOwnerPlayer()==e:GetHandlerPlayer() return e:GetOwnerPlayer()==e:GetHandlerPlayer()
end end
......
...@@ -50,13 +50,10 @@ function c86221741.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,13 +50,10 @@ function c86221741.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetValue(c86221741.aclimit) e2:SetValue(1)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c86221741.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c86221741.atkcon(e,tp,eg,ep,ev,re,r,rp) function c86221741.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xba) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xba)
end end
......
...@@ -63,7 +63,7 @@ function c88581108.atop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,7 @@ function c88581108.atop(e,tp,eg,ep,ev,re,r,rp)
end end
function c88581108.aclimit(e,re,tp) function c88581108.aclimit(e,re,tp)
local c=re:GetHandler() local c=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and c:IsAttribute(e:GetLabel()) and not c:IsImmuneToEffect(e) return re:IsActiveType(TYPE_MONSTER) and c:IsAttribute(e:GetLabel())
end end
function c88581108.atktarget(e,c) function c88581108.atktarget(e,c)
return c:IsAttribute(e:GetLabel()) return c:IsAttribute(e:GetLabel())
......
...@@ -36,7 +36,7 @@ function c92781606.initial_effect(c) ...@@ -36,7 +36,7 @@ function c92781606.initial_effect(c)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetLabel(4) e4:SetLabel(4)
e4:SetCondition(c92781606.actcon) e4:SetCondition(c92781606.actcon)
e4:SetValue(c92781606.actlimit) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--direct attack --direct attack
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
...@@ -97,6 +97,3 @@ function c92781606.actcon(e) ...@@ -97,6 +97,3 @@ function c92781606.actcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return c92781606.effcon(e) and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return c92781606.effcon(e) and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c92781606.actlimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
...@@ -50,5 +50,5 @@ function c94016752.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,5 +50,5 @@ function c94016752.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c94016752.aclimit(e,re,tp) function c94016752.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER)
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