Commit 626fe28e authored by Chen Bill's avatar Chen Bill Committed by GitHub

remove s.toss_coin (#2731)

* use Card.IsEffectProperty

* Revert "add toss_coin mark"

This reverts commit 5f67c188.

* remove s.toss_coin
parent 1e5c6f87
......@@ -24,9 +24,8 @@ function c11819473.initial_effect(c)
e2:SetOperation(c11819473.sumop)
c:RegisterEffect(e2)
end
c11819473.toss_coin=true
function c11819473.thfilter1(c)
return not c:IsCode(11819473) and c.toss_coin and c:IsAbleToHand()
return not c:IsCode(11819473) and c:IsEffectProperty(aux.EffectCategoryFilter(CATEGORY_COIN)) and c:IsAbleToHand()
end
function c11819473.thfilter2(c,p)
return c:IsAbleToHand(p)
......
......@@ -36,7 +36,6 @@ function c15130912.initial_effect(c)
e3:SetOperation(c15130912.coinop2)
c:RegisterEffect(e3)
end
c15130912.toss_coin=true
function c15130912.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local zone=1<<c:GetSequence()
......
......@@ -38,7 +38,6 @@ function c15317640.initial_effect(c)
e4:SetOperation(c15317640.desop)
c:RegisterEffect(e4)
end
c15317640.toss_coin=true
function c15317640.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x1f)
......
......@@ -25,7 +25,6 @@ function c16625614.initial_effect(c)
e4:SetOperation(c16625614.operation)
c:RegisterEffect(e4)
end
c16625614.toss_coin=true
function c16625614.efilter(e,te)
local tc=te:GetHandler()
return not tc:IsCode(94212438)
......
......@@ -27,7 +27,6 @@ function c17032740.initial_effect(c)
c:RegisterEffect(e5)
end
c17032740.material_setcode=0x8
c17032740.toss_coin=true
function c17032740.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
......
......@@ -28,7 +28,6 @@ function c21598948.initial_effect(c)
e3:SetOperation(c21598948.mtop)
c:RegisterEffect(e3)
end
c21598948.toss_coin=true
function c21598948.atkcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
......
......@@ -12,7 +12,6 @@ function c2196767.initial_effect(c)
e1:SetOperation(c2196767.desop)
c:RegisterEffect(e1)
end
c2196767.toss_coin=true
function c2196767.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3)
......
......@@ -4,7 +4,6 @@ function c23846921.initial_effect(c)
--coin
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
c23846921.toss_coin=true
function c23846921.arcanareg(c,coin)
--coin effect
local e1=Effect.CreateEffect(c)
......
......@@ -13,7 +13,6 @@ function c25551951.initial_effect(c)
e1:SetOperation(c25551951.desop)
c:RegisterEffect(e1)
end
c25551951.toss_coin=true
function c25551951.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
......
......@@ -24,7 +24,6 @@ function s.initial_effect(c)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
end
s.toss_coin=true
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -24,7 +24,6 @@ function c26273196.initial_effect(c)
e2:SetOperation(c26273196.matop)
c:RegisterEffect(e2)
end
c26273196.toss_coin=true
function c26273196.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
......
......@@ -31,7 +31,6 @@ function c28112535.initial_effect(c)
e5:SetOperation(c28112535.desop)
c:RegisterEffect(e5)
end
c28112535.toss_coin=true
function c28112535.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -17,7 +17,6 @@ function c34568403.initial_effect(c)
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
c34568403.toss_coin=true
function c34568403.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local res=0
......
......@@ -4,7 +4,6 @@ function c35781051.initial_effect(c)
--coin
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
c35781051.toss_coin=true
function c35781051.arcanareg(c,coin)
--coin effect
local e1=Effect.CreateEffect(c)
......
......@@ -26,7 +26,6 @@ function c36378044.initial_effect(c)
e3:SetOperation(c36378044.desop)
c:RegisterEffect(e3)
end
c36378044.toss_coin=true
function c36378044.atkcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
......
......@@ -11,7 +11,6 @@ function c37313786.initial_effect(c)
e1:SetOperation(c37313786.activate)
c:RegisterEffect(e1)
end
c37313786.toss_coin=true
function c37313786.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<=2 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=6
end
......
......@@ -10,7 +10,6 @@ function c37812118.initial_effect(c)
e1:SetOperation(c37812118.activate)
c:RegisterEffect(e1)
end
c37812118.toss_coin=true
function c37812118.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsPlayerCanDraw(1-tp,2) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
......
......@@ -26,7 +26,6 @@ function c38143903.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
c:RegisterEffect(e2)
end
c38143903.toss_coin=true
function c38143903.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER)
and Duel.IsChainNegatable(ev)
......
......@@ -21,7 +21,6 @@ function c4483989.initial_effect(c)
e2:SetOperation(c4483989.atkop)
c:RegisterEffect(e2)
end
c4483989.toss_coin=true
function c4483989.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return tp~=Duel.GetTurnPlayer() and at and at:IsPosition(POS_FACEUP_DEFENSE)
......
......@@ -10,7 +10,6 @@ function c50470982.initial_effect(c)
e1:SetOperation(c50470982.activate)
c:RegisterEffect(e1)
end
c50470982.toss_coin=true
function c50470982.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,PLAYER_ALL,1)
......
......@@ -12,7 +12,6 @@ function c50593156.initial_effect(c)
e1:SetOperation(c50593156.desop)
c:RegisterEffect(e1)
end
c50593156.toss_coin=true
function c50593156.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
......
......@@ -21,7 +21,6 @@ function c5861892.initial_effect(c)
--coin
aux.EnableArcanaCoin(c,EVENT_SPSUMMON_SUCCESS)
end
c5861892.toss_coin=true
function c5861892.spfilter(c)
return c:IsAbleToGraveAsCost()
end
......
......@@ -16,7 +16,6 @@ function s.initial_effect(c)
--coin
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
s.toss_coin=true
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
......
......@@ -14,7 +14,6 @@ function c60953118.initial_effect(c)
--coin
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
c60953118.toss_coin=true
function c60953118.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetBattleDamage(tp)>0
end
......
......@@ -4,7 +4,6 @@ function c61175706.initial_effect(c)
--coin
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
c61175706.toss_coin=true
function c61175706.arcanareg(c,coin)
--coin effect
local e1=Effect.CreateEffect(c)
......
......@@ -45,7 +45,6 @@ function c62528292.target(e,tp,eg,ep,ev,re,r,rp,chk)
c:SetTurnCounter(0)
c:RegisterEffect(e1)
end
c62528292.toss_coin=true
function c62528292.stgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -20,7 +20,6 @@ function c62784717.initial_effect(c)
e2:SetOperation(c62784717.coinop)
c:RegisterEffect(e2)
end
c62784717.toss_coin=true
function c62784717.coincon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
......
......@@ -16,7 +16,6 @@ function c62892347.initial_effect(c)
--coin
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
c62892347.toss_coin=true
function c62892347.poscon(e)
return e:GetHandler():IsPosition(POS_FACEUP_ATTACK)
end
......
......@@ -12,7 +12,6 @@ function c64538655.initial_effect(c)
e1:SetOperation(c64538655.desop)
c:RegisterEffect(e1)
end
c64538655.toss_coin=true
function c64538655.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()~=nil
end
......
......@@ -12,7 +12,6 @@ function c67959180.initial_effect(c)
e1:SetOperation(c67959180.operation)
c:RegisterEffect(e1)
end
c67959180.toss_coin=true
function c67959180.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
......
......@@ -21,7 +21,6 @@ function c69831560.initial_effect(c)
--coin
aux.EnableArcanaCoin(c,EVENT_SPSUMMON_SUCCESS)
end
c69831560.toss_coin=true
function c69831560.spfilter(c)
return c:IsAbleToGraveAsCost()
end
......
......@@ -18,7 +18,6 @@ function c70050374.initial_effect(c)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
c70050374.toss_coin=true
function c70050374.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return true end
......
......@@ -12,7 +12,6 @@ function c71625222.initial_effect(c)
e1:SetOperation(c71625222.desop)
c:RegisterEffect(e1)
end
c71625222.toss_coin=true
function c71625222.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
......
......@@ -39,7 +39,6 @@ function c73206827.initial_effect(c)
e4:SetOperation(c73206827.recop)
c:RegisterEffect(e4)
end
c73206827.toss_coin=true
function c73206827.coincon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
......
......@@ -37,7 +37,6 @@ function c76728962.initial_effect(c)
e3:SetOperation(c76728962.thop)
c:RegisterEffect(e3)
end
c76728962.toss_coin=true
function c76728962.filter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and bit.band(c:GetPreviousRaceOnField(),RACE_MACHINE)~=0
and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_DARK)~=0 and c:IsPreviousControler(tp)
......@@ -89,7 +88,7 @@ function c76728962.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c76728962.thfilter(c)
return c.toss_coin and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(7) and c:IsAbleToHand()
return c:IsEffectProperty(aux.EffectCategoryFilter(CATEGORY_COIN)) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(7) and c:IsAbleToHand()
end
function c76728962.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76728962.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -40,7 +40,6 @@ function s.initial_effect(c)
e4:SetOperation(s.countop)
c:RegisterEffect(e4)
end
s.toss_coin=true
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,0)
......
......@@ -10,7 +10,6 @@ function c81172176.initial_effect(c)
e1:SetOperation(c81172176.activate)
c:RegisterEffect(e1)
end
c81172176.toss_coin=true
function c81172176.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE) end
......
......@@ -13,7 +13,6 @@ function c81480460.initial_effect(c)
e1:SetOperation(c81480460.desop)
c:RegisterEffect(e1)
end
c81480460.toss_coin=true
function c81480460.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -13,7 +13,6 @@ function c82642348.initial_effect(c)
e1:SetOperation(c82642348.desop)
c:RegisterEffect(e1)
end
c82642348.toss_coin=true
function c82642348.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
......
......@@ -4,7 +4,6 @@ function c8396952.initial_effect(c)
--coin
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
c8396952.toss_coin=true
function c8396952.arcanareg(c,coin)
--disable effect
local e1=Effect.CreateEffect(c)
......
......@@ -8,7 +8,6 @@ function c84677654.initial_effect(c)
e1:SetOperation(c84677654.operation)
c:RegisterEffect(e1)
end
c84677654.toss_coin=true
function c84677654.cfilter(c)
return c:IsFaceup() and c:IsLevelAbove(0)
end
......
......@@ -18,7 +18,6 @@ function c86767655.initial_effect(c)
e1:SetOperation(c86767655.disop)
c:RegisterEffect(e1)
end
c86767655.toss_coin=true
function c86767655.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetFlagEffect(FLAG_ID_CHAINING)>0
end
......
......@@ -15,7 +15,6 @@ function c87751584.initial_effect(c)
e1:SetOperation(c87751584.desop)
c:RegisterEffect(e1)
end
c87751584.toss_coin=true
function c87751584.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3)
......
......@@ -12,7 +12,6 @@ function c89718302.initial_effect(c)
e1:SetOperation(c89718302.damop)
c:RegisterEffect(e1)
end
c89718302.toss_coin=true
function c89718302.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
......
......@@ -11,7 +11,6 @@ function c94773007.initial_effect(c)
e1:SetOperation(c94773007.atop)
c:RegisterEffect(e1)
end
c94773007.toss_coin=true
function c94773007.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
......
......@@ -4,7 +4,6 @@ function c97452817.initial_effect(c)
--coin
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
c97452817.toss_coin=true
function c97452817.arcanareg(c,coin)
--coin effect
local e1=Effect.CreateEffect(c)
......
......@@ -4,7 +4,6 @@ function c97574404.initial_effect(c)
--coin
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
c97574404.toss_coin=true
function c97574404.arcanareg(c,coin)
--coin effect
local e1=Effect.CreateEffect(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