Commit 61b14e65 authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/ROTA' into master

parents b1c787f1 95b57fa2
......@@ -19,7 +19,6 @@ function c10960419.initial_effect(c)
c:RegisterEffect(e2)
end
c10960419.material_race=RACE_SPELLCASTER
c10960419.toss_dice=true
function c10960419.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=e:GetHandler() end
if chk==0 then return true end
......
......@@ -20,7 +20,6 @@ function c11808215.initial_effect(c)
e2:SetOperation(c11808215.diceop)
c:RegisterEffect(e2)
end
c11808215.toss_dice=true
function c11808215.thfilter(c)
return c:IsCode(47292920) and c:IsAbleToHand()
end
......
......@@ -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)
......
......@@ -12,7 +12,6 @@ function c12148078.initial_effect(c)
e1:SetOperation(c12148078.activate)
c:RegisterEffect(e1)
end
c12148078.toss_dice=true
function c12148078.cfilter(c,e,tp)
return c:IsDiscardable()
and Duel.IsExistingMatchingCard(c12148078.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,c,e,tp,6)
......
......@@ -3,7 +3,7 @@
function c126218.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -13,7 +13,6 @@ function c126218.initial_effect(c)
e1:SetOperation(c126218.activate)
c:RegisterEffect(e1)
end
c126218.toss_dice=true
function c126218.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
......
......@@ -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)
......
......@@ -16,7 +16,7 @@ function c15521027.initial_effect(c)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15521027,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetCategory(CATEGORY_DICE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
......@@ -27,6 +27,7 @@ function c15521027.initial_effect(c)
--sort deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(15521027,2))
e3:SetCategory(CATEGORY_DICE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
......@@ -35,7 +36,6 @@ function c15521027.initial_effect(c)
e3:SetOperation(c15521027.opd)
c:RegisterEffect(e3)
end
c15521027.toss_dice=true
function c15521027.spfilter(c)
return c:IsSetCard(0x26) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
......
......@@ -12,7 +12,6 @@ function c15744417.initial_effect(c)
e1:SetOperation(c15744417.operation)
c:RegisterEffect(e1)
end
c15744417.toss_dice=true
function c15744417.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,3)
......
......@@ -12,7 +12,6 @@ function c16135253.initial_effect(c)
e1:SetOperation(c16135253.operation)
c:RegisterEffect(e1)
end
c16135253.toss_dice=true
function c16135253.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
......
......@@ -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
......
......@@ -12,7 +12,6 @@ function c17530001.initial_effect(c)
e1:SetOperation(c17530001.operation)
c:RegisterEffect(e1)
end
c17530001.toss_dice=true
function c17530001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
......
......@@ -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)
......
......@@ -11,7 +11,6 @@ function c22802010.initial_effect(c)
e1:SetOperation(c22802010.activate)
c:RegisterEffect(e1)
end
c22802010.toss_dice=true
function c22802010.filter(c,lv)
return c:IsFaceup() and (c:IsLevelBelow(lv) or c:IsRankBelow(lv))
end
......
......@@ -2,34 +2,7 @@
---@param c Card
function c23846921.initial_effect(c)
--coin
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(23846921,0))
e1:SetCategory(CATEGORY_COIN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c23846921.cointg)
e1:SetOperation(c23846921.coinop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
c23846921.toss_coin=true
function c23846921.cointg(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)
end
function c23846921.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local res=0
if c:IsHasEffect(73206827) then
res=1-Duel.SelectOption(tp,60,61)
else res=Duel.TossCoin(tp,1) end
c23846921.arcanareg(c,res)
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
function c23846921.arcanareg(c,coin)
--coin effect
......@@ -58,10 +31,10 @@ function c23846921.arcanareg(c,coin)
e2:SetOperation(c23846921.thop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
c:RegisterFlagEffect(36690018,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
c:RegisterFlagEffect(FLAG_ID_ARCANA_COIN,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
end
function c23846921.skipcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and e:GetHandler():GetFlagEffectLabel(36690018)==1
return ep==tp and e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==1
end
function c23846921.skipcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,2,nil) end
......@@ -82,7 +55,7 @@ function c23846921.skipop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c23846921.thcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetFlagEffectLabel(36690018)==0
return ep~=tp and e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==0
end
function c23846921.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -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)
......
......@@ -56,10 +56,10 @@ function c30439101.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c30439101.cfilter,1,nil,tp)
end
function c30439101.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c30439101.disop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -12,7 +12,6 @@ function c30707994.initial_effect(c)
e1:SetOperation(c30707994.operation)
c:RegisterEffect(e1)
end
c30707994.toss_dice=true
function c30707994.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
......
......@@ -3,6 +3,7 @@
function c31863912.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DICE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_SPSUMMON)
......@@ -12,6 +13,7 @@ function c31863912.initial_effect(c)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(31863912,0))
e1:SetCategory(CATEGORY_DICE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
......@@ -20,7 +22,6 @@ function c31863912.initial_effect(c)
e2:SetLabel(1)
c:RegisterEffect(e2)
end
c31863912.toss_dice=true
function c31863912.cfilter(c,sp)
return c:IsFaceup() and c:IsSummonPlayer(sp)
end
......
......@@ -20,7 +20,6 @@ function c32015116.initial_effect(c)
e2:SetOperation(c32015116.rdop)
c:RegisterEffect(e2)
end
c32015116.toss_dice=true
function c32015116.rdcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
......
......@@ -10,7 +10,6 @@ function c3280747.initial_effect(c)
e1:SetOperation(c3280747.activate)
c:RegisterEffect(e1)
end
c3280747.toss_dice=true
function c3280747.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=6 end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,2)
......
......@@ -14,6 +14,7 @@ function c33114323.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0x34,0x34)
e2:SetCondition(c33114323.effcon)
......
......@@ -7,7 +7,7 @@ function c34568403.initial_effect(c)
e1:SetCategory(CATEGORY_COIN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c34568403.cointg)
e1:SetTarget(aux.ArcanaCoinTarget)
e1:SetOperation(c34568403.coinop)
c:RegisterEffect(e1)
local e2=e1:Clone()
......@@ -17,18 +17,20 @@ function c34568403.initial_effect(c)
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
c34568403.toss_coin=true
function c34568403.cointg(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)
end
function c34568403.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local res=0
if c:IsHasEffect(73206827) then
local toss=false
if Duel.IsPlayerAffectedByEffect(tp,73206827) then
res=1-Duel.SelectOption(tp,60,61)
else res=Duel.TossCoin(tp,1) end
else
res=Duel.TossCoin(tp,1)
toss=true
end
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if toss then
c:RegisterFlagEffect(FLAG_ID_REVERSAL_OF_FATE,RESET_EVENT+RESETS_STANDARD,0,1)
end
c34568403.arcanareg(c,res)
if res==0 then
Duel.GetControl(c,1-tp)
......@@ -46,11 +48,11 @@ function c34568403.arcanareg(c,coin)
e1:SetOperation(c34568403.spop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(36690018,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
c:RegisterFlagEffect(FLAG_ID_ARCANA_COIN,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
end
function c34568403.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffectLabel(36690018)==1 and c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE)
return c:GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==1 and c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE)
end
function c34568403.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
......
......@@ -11,7 +11,6 @@ function c3493058.initial_effect(c)
e1:SetOperation(c3493058.activate)
c:RegisterEffect(e1)
end
c3493058.toss_dice=true
function c3493058.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
......
......@@ -9,7 +9,6 @@ function c3549275.initial_effect(c)
e1:SetOperation(c3549275.operation)
c:RegisterEffect(e1)
end
c3549275.toss_dice=true
function c3549275.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,PLAYER_ALL,1)
......
......@@ -40,7 +40,6 @@ function c35606858.initial_effect(c)
e3:SetOperation(c35606858.dcop)
c:RegisterEffect(e3)
end
c35606858.toss_dice=true
function c35606858.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -26,7 +26,6 @@ function c35772782.initial_effect(c)
c:RegisterEffect(e2)
end
aux.xyz_number[35772782]=67
c35772782.toss_dice=true
function c35772782.dccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
......
......@@ -2,34 +2,7 @@
---@param c Card
function c35781051.initial_effect(c)
--coin
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(35781051,0))
e1:SetCategory(CATEGORY_COIN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c35781051.cointg)
e1:SetOperation(c35781051.coinop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
c35781051.toss_coin=true
function c35781051.cointg(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)
end
function c35781051.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local res=0
if c:IsHasEffect(73206827) then
res=1-Duel.SelectOption(tp,60,61)
else res=Duel.TossCoin(tp,1) end
c35781051.arcanareg(c,res)
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
function c35781051.arcanareg(c,coin)
--coin effect
......@@ -62,10 +35,10 @@ function c35781051.arcanareg(c,coin)
local e4=e3:Clone()
e4:SetCode(EVENT_MSET)
c:RegisterEffect(e4)
c:RegisterFlagEffect(36690018,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
c:RegisterFlagEffect(FLAG_ID_ARCANA_COIN,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
end
function c35781051.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetFlagEffectLabel(36690018)==1
return ep~=tp and e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==1
end
function c35781051.spfilter(c,e,tp)
return c:IsSetCard(0x5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -84,7 +57,7 @@ function c35781051.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c35781051.tgcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetFlagEffectLabel(36690018)==0
return ep~=tp and e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==0
end
function c35781051.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -14,12 +14,12 @@ function c35798491.initial_effect(c)
--disable and destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCategory(CATEGORY_DICE)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c35798491.disop)
c:RegisterEffect(e2)
end
c35798491.toss_dice=true
function c35798491.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -23,6 +23,7 @@ function c35975813.initial_effect(c)
--disable and destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCategory(CATEGORY_DICE)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetOperation(c35975813.disop)
......@@ -35,7 +36,6 @@ function c35975813.initial_effect(c)
e5:SetOperation(c35975813.disop2)
c:RegisterEffect(e5)
end
c35975813.toss_dice=true
function c35975813.exfilter(c)
return c:IsFaceup() and c:IsSetCard(0x45)
end
......
......@@ -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,7 @@ function c36690018.initial_effect(c)
c:RegisterEffect(e1)
end
function c36690018.filter(c)
return c:GetFlagEffect(36690018)~=0
return c:IsFaceup() and c:IsSetCard(0x5) and c:GetFlagEffect(FLAG_ID_REVERSAL_OF_FATE)~=0
end
function c36690018.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c36690018.filter(chkc) end
......@@ -21,8 +21,8 @@ function c36690018.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c36690018.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c36690018.filter(tc) then
local val=tc:GetFlagEffectLabel(36690018)
tc:SetFlagEffectLabel(36690018,1-val)
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetFlagEffect(FLAG_ID_REVERSAL_OF_FATE)~=0 and tc:GetFlagEffect(FLAG_ID_ARCANA_COIN)~=0 then
local val=tc:GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)
tc:SetFlagEffectLabel(FLAG_ID_ARCANA_COIN,1-val)
end
end
......@@ -11,7 +11,6 @@ function c36708764.initial_effect(c)
e1:SetOperation(c36708764.activate)
c:RegisterEffect(e1)
end
c36708764.toss_dice=true
function c36708764.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
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)
......
......@@ -24,7 +24,6 @@ function c38082437.initial_effect(c)
e2:SetOperation(c38082437.opd)
c:RegisterEffect(e2)
end
c38082437.toss_dice=true
function c38082437.cona(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAttackPos()
end
......
......@@ -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)
......
......@@ -10,7 +10,7 @@ function c38299233.initial_effect(c)
--roll and destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38299233,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetCategory(CATEGORY_DICE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
......@@ -20,7 +20,6 @@ function c38299233.initial_effect(c)
e2:SetOperation(c38299233.rdop)
c:RegisterEffect(e2)
end
c38299233.toss_dice=true
function c38299233.rdcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
......
......@@ -20,7 +20,7 @@ function c40364916.initial_effect(c)
--remove
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40364916,1))
e4:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e4:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_SZONE)
......@@ -69,6 +69,7 @@ function c40364916.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c40364916.tgfilter,tp,LOCATION_DECK,0,nil)
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0
and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(40364916,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
......
......@@ -110,18 +110,20 @@ end
function c40939228.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local fid=c:GetFieldID()
if c:IsRelateToEffect(e) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:GetOriginalCode()==id then
c:RegisterFlagEffect(40939228,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(fid)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetCondition(c40939228.retcon)
e1:SetOperation(c40939228.retop)
Duel.RegisterEffect(e1,tp)
if c:IsRelateToEffect(e) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
if c:GetOriginalCode()==id then
c:RegisterFlagEffect(40939228,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(fid)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetCondition(c40939228.retcon)
e1:SetOperation(c40939228.retop)
Duel.RegisterEffect(e1,tp)
end
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
......
......@@ -12,7 +12,6 @@ function c41139112.initial_effect(c)
e1:SetOperation(c41139112.activate)
c:RegisterEffect(e1)
end
c41139112.toss_dice=true
function c41139112.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
......
......@@ -22,7 +22,6 @@ function c42421606.initial_effect(c)
c:RegisterEffect(e2)
end
aux.xyz_number[42421606]=85
c42421606.toss_dice=true
function c42421606.efcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -12,7 +12,6 @@ function c43061293.initial_effect(c)
e1:SetOperation(c43061293.damop)
c:RegisterEffect(e1)
end
c43061293.toss_dice=true
function c43061293.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
......
......@@ -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)
......
......@@ -87,7 +87,7 @@ function c45112597.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete()
local cg=spg:Filter(Card.IsFacedown,nil)
if #cg>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(1-tp,cg)
end
end
end
......
......@@ -12,7 +12,6 @@ function c46303688.initial_effect(c)
e1:SetOperation(c46303688.activate)
c:RegisterEffect(e1)
end
c46303688.toss_dice=true
function c46303688.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,2)
......
......@@ -13,7 +13,7 @@ function c47292920.initial_effect(c)
c:RegisterEffect(e1)
end
function c47292920.cfilter(c)
return c:IsFaceup() and c.toss_dice
return c:IsFaceup() and c:IsEffectProperty(aux.EffectCategoryFilter(CATEGORY_DICE))
end
function c47292920.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c47292920.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
......@@ -28,8 +28,8 @@ function c47292920.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST)
end
function c47292920.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c.toss_dice and not c.toss_dice_in_pendulum_only
return c:IsType(TYPE_MONSTER) and c:IsEffectProperty(aux.MonsterEffectCategoryFilter(CATEGORY_DICE))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c47292920.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -14,8 +14,6 @@ function c47558785.initial_effect(c)
e1:SetOperation(c47558785.scop)
c:RegisterEffect(e1)
end
c47558785.toss_dice=true
c47558785.toss_dice_in_pendulum_only=true
function c47558785.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetLeftScale()>1 end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
......
......@@ -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 s.initial_effect(c)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
s.toss_dice=true
function s.dictg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
......
......@@ -21,7 +21,7 @@ function c5641251.initial_effect(c)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(5641251,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetCategory(CATEGORY_DICE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_CONFIRM)
e3:SetRange(LOCATION_SZONE)
......@@ -29,7 +29,6 @@ function c5641251.initial_effect(c)
e3:SetOperation(c5641251.lvlop)
c:RegisterEffect(e3)
end
c5641251.toss_dice=true
function c5641251.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
......
......@@ -14,13 +14,25 @@ function c56655675.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--gain effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c56655675.condition)
e2:SetOperation(c56655675.operation)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c56655675.condition)
e3:SetOperation(c56655675.operation)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c56655675.discon)
e3:SetCost(c56655675.discost)
e3:SetTarget(c56655675.distg)
e3:SetOperation(c56655675.disop)
c:RegisterEffect(e3)
end
function c56655675.cfilter(c)
......@@ -31,21 +43,11 @@ function c56655675.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function c56655675.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c56655675.discon)
e1:SetCost(c56655675.discost)
e1:SetTarget(c56655675.distg)
e1:SetOperation(c56655675.disop)
e1:SetReset(RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE)
e:GetHandler():RegisterEffect(e1)
e:GetHandler():RegisterFlagEffect(56655675,RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE,0,1)
end
function c56655675.discon(e,tp,eg,ep,ev,re,r,rp)
return re~=e and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
return e:GetHandler():GetFlagEffect(56655675)~=0
and re~=e and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c56655675.filter(c)
......
......@@ -19,16 +19,8 @@ function c5861892.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e2)
--coin
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(5861892,0))
e3:SetCategory(CATEGORY_COIN)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c5861892.cointg)
e3:SetOperation(c5861892.coinop)
c:RegisterEffect(e3)
aux.EnableArcanaCoin(c,EVENT_SPSUMMON_SUCCESS)
end
c5861892.toss_coin=true
function c5861892.spfilter(c)
return c:IsAbleToGraveAsCost()
end
......@@ -53,19 +45,6 @@ function c5861892.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c5861892.cointg(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)
end
function c5861892.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local res=0
if c:IsHasEffect(73206827) then
res=1-Duel.SelectOption(tp,60,61)
else res=Duel.TossCoin(tp,1) end
c5861892.arcanareg(c,res)
end
function c5861892.arcanareg(c,coin)
--coin effect
local e1=Effect.CreateEffect(c)
......@@ -92,11 +71,11 @@ function c5861892.arcanareg(c,coin)
e2:SetOperation(c5861892.negop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
c:RegisterFlagEffect(36690018,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
c:RegisterFlagEffect(FLAG_ID_ARCANA_COIN,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
end
function c5861892.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffectLabel(36690018)==1 and c:IsRelateToBattle()
return c:GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==1 and c:IsRelateToBattle()
and c:GetBattleTarget():IsLocation(LOCATION_GRAVE)
end
function c5861892.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -118,7 +97,7 @@ function c5861892.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsContains(c) then return false end
return c:GetFlagEffectLabel(36690018)==0 and (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER))
return c:GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==0 and (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER))
end
function c5861892.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -14,22 +14,8 @@ function s.initial_effect(c)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--coin
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_COIN)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(s.cointg)
e2:SetOperation(s.coinop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e4)
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
......@@ -50,19 +36,6 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function s.cointg(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)
end
function s.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local res=0
if c:IsHasEffect(73206827) then
res=1-Duel.SelectOption(tp,60,61)
else res=Duel.TossCoin(tp,1) end
s.arcanareg(c,res)
end
function s.arcanareg(c,coin)
--heads: optional destroy
local e1=Effect.CreateEffect(c)
......
......@@ -12,22 +12,8 @@ function c60953118.initial_effect(c)
e1:SetOperation(c60953118.damop)
c:RegisterEffect(e1)
--coin
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60953118,0))
e2:SetCategory(CATEGORY_COIN)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c60953118.cointg)
e2:SetOperation(c60953118.coinop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e4)
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
......@@ -44,19 +30,6 @@ function c60953118.damop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
Duel.RegisterEffect(e1,tp)
end
function c60953118.cointg(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)
end
function c60953118.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local res=0
if c:IsHasEffect(73206827) then
res=1-Duel.SelectOption(tp,60,61)
else res=Duel.TossCoin(tp,1) end
c60953118.arcanareg(c,res)
end
function c60953118.arcanareg(c,coin)
--coin effect
local e1=Effect.CreateEffect(c)
......@@ -73,11 +46,11 @@ function c60953118.arcanareg(c,coin)
e2:SetTargetRange(0,1)
e2:SetCondition(c60953118.rdcon2)
c:RegisterEffect(e2)
c:RegisterFlagEffect(36690018,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
c:RegisterFlagEffect(FLAG_ID_ARCANA_COIN,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
end
function c60953118.rdcon1(e)
return e:GetHandler():GetFlagEffectLabel(36690018)==1
return e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==1
end
function c60953118.rdcon2(e)
return e:GetHandler():GetFlagEffectLabel(36690018)==0
return e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==0
end
......@@ -2,34 +2,7 @@
---@param c Card
function c61175706.initial_effect(c)
--coin
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61175706,0))
e1:SetCategory(CATEGORY_COIN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c61175706.cointg)
e1:SetOperation(c61175706.coinop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
c61175706.toss_coin=true
function c61175706.cointg(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)
end
function c61175706.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local res=0
if c:IsHasEffect(73206827) then
res=1-Duel.SelectOption(tp,60,61)
else res=Duel.TossCoin(tp,1) end
c61175706.arcanareg(c,res)
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
function c61175706.arcanareg(c,coin)
--coin effect
......@@ -43,13 +16,13 @@ function c61175706.arcanareg(c,coin)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
--
c:RegisterFlagEffect(36690018,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
c:RegisterFlagEffect(FLAG_ID_ARCANA_COIN,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
end
function c61175706.atktg(e,c)
return c:IsSetCard(0x5)
end
function c61175706.atkval(e,c)
if e:GetHandler():GetFlagEffectLabel(36690018)==1 then
if e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==1 then
return 500
else return -500 end
end
......@@ -13,13 +13,13 @@ function c61370518.initial_effect(c)
c:RegisterEffect(e1)
--disable and destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DICE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c61370518.disop)
c:RegisterEffect(e2)
end
c61370518.toss_dice=true
function c61370518.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -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
......
......@@ -14,38 +14,11 @@ function c62892347.initial_effect(c)
e2:SetCondition(c62892347.poscon)
c:RegisterEffect(e2)
--coin
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(62892347,0))
e3:SetCategory(CATEGORY_COIN)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(c62892347.cointg)
e3:SetOperation(c62892347.coinop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e5)
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
function c62892347.cointg(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)
end
function c62892347.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local res=0
if c:IsHasEffect(73206827) then
res=1-Duel.SelectOption(tp,60,61)
else res=Duel.TossCoin(tp,1) end
c62892347.arcanareg(c,res)
end
function c62892347.arcanareg(c,coin)
--disable
local e1=Effect.CreateEffect(c)
......@@ -73,12 +46,12 @@ function c62892347.arcanareg(c,coin)
e3:SetTarget(c62892347.distg)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
c:RegisterFlagEffect(36690018,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
c:RegisterFlagEffect(FLAG_ID_ARCANA_COIN,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
end
function c62892347.distg(e,c)
local ec=e:GetHandler()
if c==ec or c:GetCardTargetCount()==0 then return false end
local val=ec:GetFlagEffectLabel(36690018)
local val=ec:GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)
if val==1 then
return c:GetControler()==ec:GetControler() and c:GetCardTarget():IsContains(ec)
else return c:GetControler()~=ec:GetControler() and c:GetCardTarget():IsContains(ec) end
......@@ -87,7 +60,7 @@ function c62892347.disop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
if not ec:IsRelateToEffect(re) then return end
local val=ec:GetFlagEffectLabel(36690018)
local val=ec:GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)
if (val==1 and rp==1-ec:GetControler()) or (val==0 and rp==ec:GetControler()) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsContains(ec) then return end
......
......@@ -11,7 +11,6 @@ function c62893810.initial_effect(c)
e1:SetOperation(c62893810.operation)
c:RegisterEffect(e1)
end
c62893810.toss_dice=true
function c62893810.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND)
if chk==0 then return g1:GetCount()~=0 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)
......
......@@ -22,7 +22,6 @@ function c69170403.initial_effect(c)
e2:SetOperation(c69170403.dcop)
c:RegisterEffect(e2)
end
c69170403.toss_dice=true
function c69170403.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
......
......@@ -19,16 +19,8 @@ function c69831560.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e2)
--coin
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(69831560,0))
e3:SetCategory(CATEGORY_COIN)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c69831560.cointg)
e3:SetOperation(c69831560.coinop)
c:RegisterEffect(e3)
aux.EnableArcanaCoin(c,EVENT_SPSUMMON_SUCCESS)
end
c69831560.toss_coin=true
function c69831560.spfilter(c)
return c:IsAbleToGraveAsCost()
end
......@@ -53,19 +45,6 @@ function c69831560.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function c69831560.cointg(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)
end
function c69831560.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local res=0
if c:IsHasEffect(73206827) then
res=1-Duel.SelectOption(tp,60,61)
else res=Duel.TossCoin(tp,1) end
c69831560.arcanareg(c,res)
end
function c69831560.arcanareg(c,coin)
--coin effect
local e1=Effect.CreateEffect(c)
......@@ -99,14 +78,14 @@ function c69831560.arcanareg(c,coin)
e4:SetReset(RESET_EVENT+RESET_OVERLAY+RESET_TOFIELD)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
c:RegisterFlagEffect(36690018,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
c:RegisterFlagEffect(FLAG_ID_ARCANA_COIN,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
end
function c69831560.macon(e)
return e:GetHandler():GetFlagEffectLabel(36690018)==1
return e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==1
end
function c69831560.poscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffectLabel(36690018)==1 and c:GetAttackAnnouncedCount()>=2
return c:GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==1 and c:GetAttackAnnouncedCount()>=2
end
function c69831560.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -121,7 +100,7 @@ function c69831560.posop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
function c69831560.desop1(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetFlagEffectLabel(36690018)==0 then
if e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)==0 then
e:SetLabel(1)
else e:SetLabel(0) end
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
......
......@@ -55,7 +55,6 @@ function c71459017.initial_effect(c)
e8:SetOperation(c71459017.diceop)
c:RegisterEffect(e8)
end
c71459017.toss_dice=true
function c71459017.fuslimit(e,c,sumtype)
return sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
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)
......
......@@ -13,6 +13,7 @@ function c72192100.initial_effect(c)
c:RegisterEffect(e1)
--disable and destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DICE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
......@@ -31,7 +32,6 @@ function c72192100.initial_effect(c)
e3:SetOperation(c72192100.spop)
c:RegisterEffect(e3)
end
c72192100.toss_dice=true
function c72192100.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -22,9 +22,9 @@ function c73206827.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(73206827)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x5))
e3:SetTargetRange(1,0)
e3:SetCondition(c73206827.effectcon)
c:RegisterEffect(e3)
--
......@@ -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
......@@ -61,8 +60,7 @@ end
function c73206827.reccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=eg:GetFirst()
return rc:IsRelateToBattle() and rc:IsSetCard(0x5) and rc:IsFaceup() and rc:IsControler(tp)
and (c:GetFlagEffect(73206828)==0 or c:IsHasEffect(EFFECT_CANNOT_DISABLE))
return c73206827.effectcon(e) and rc:IsRelateToBattle() and rc:IsSetCard(0x5) and rc:IsFaceup() and rc:IsControler(tp)
end
function c73206827.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -75,5 +73,7 @@ function c73206827.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c73206827.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
if d>0 then
Duel.Recover(p,d,REASON_EFFECT)
end
end
......@@ -13,6 +13,7 @@ function c73219648.initial_effect(c)
c:RegisterEffect(e1)
--disable and destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DICE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
......@@ -27,7 +28,6 @@ function c73219648.initial_effect(c)
e3:SetValue(c73219648.atktg)
c:RegisterEffect(e3)
end
c73219648.toss_dice=true
function c73219648.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -3,7 +3,7 @@
function c74137509.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -13,7 +13,6 @@ function c74137509.initial_effect(c)
e1:SetOperation(c74137509.activate)
c:RegisterEffect(e1)
end
c74137509.toss_dice=true
function c74137509.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
......
......@@ -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
......
......@@ -10,7 +10,7 @@ function c76895648.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(76895648,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DRAW)
e2:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE+CATEGORY_DRAW)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
......@@ -19,7 +19,6 @@ function c76895648.initial_effect(c)
e2:SetOperation(c76895648.operation)
c:RegisterEffect(e2)
end
c76895648.toss_dice=true
function c76895648.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
......
--モーターバイオレンス
---@param c Card
function c77672444.initial_effect(c)
aux.AddCodeList(c,82556059)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
......
......@@ -6,6 +6,7 @@ function c77994337.initial_effect(c)
--level
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(77994337,0))
e1:SetCategory(CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
......@@ -14,8 +15,6 @@ function c77994337.initial_effect(c)
e1:SetOperation(c77994337.lvop)
c:RegisterEffect(e1)
end
c77994337.toss_dice=true
c77994337.toss_dice_in_pendulum_only=true
function c77994337.lvfilter(c)
return c:IsFaceup() and c:GetLevel()>0
end
......
--モーターシェル
---@param c Card
function c78394032.initial_effect(c)
aux.AddCodeList(c,82556059)
--"Motor Token" Summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
......
......@@ -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
......
......@@ -7,7 +7,7 @@ function c82308875.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(82308875,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetCategory(CATEGORY_DICE|CATEGORY_ATKCHANGE|CATEGORY_DRAW|CATEGORY_SPECIAL_SUMMON|CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c82308875.cost)
......@@ -16,7 +16,6 @@ function c82308875.initial_effect(c)
c:RegisterEffect(e1)
end
aux.xyz_number[82308875]=7
c82308875.toss_dice=true
function c82308875.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
--デモニック・モーター・Ω
---@param c Card
function c82556058.initial_effect(c)
aux.AddCodeList(c,82556059)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(82556058,0))
......
......@@ -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
......
......@@ -8,7 +8,6 @@ function c83241722.initial_effect(c)
e1:SetOperation(c83241722.regop)
c:RegisterEffect(e1)
end
c83241722.toss_dice=true
function c83241722.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
......@@ -2,34 +2,7 @@
---@param c Card
function c8396952.initial_effect(c)
--coin
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8396952,0))
e1:SetCategory(CATEGORY_COIN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c8396952.cointg)
e1:SetOperation(c8396952.coinop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
c8396952.toss_coin=true
function c8396952.cointg(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)
end
function c8396952.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local res=0
if c:IsHasEffect(73206827) then
res=1-Duel.SelectOption(tp,60,61)
else res=Duel.TossCoin(tp,1) end
c8396952.arcanareg(c,res)
aux.EnableArcanaCoin(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS)
end
function c8396952.arcanareg(c,coin)
--disable effect
......@@ -40,12 +13,12 @@ function c8396952.arcanareg(c,coin)
e1:SetOperation(c8396952.speop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(36690018,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
c:RegisterFlagEffect(FLAG_ID_ARCANA_COIN,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
end
function c8396952.speop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsActiveType(TYPE_SPELL) or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local val=c:GetFlagEffectLabel(36690018)
local val=c:GetFlagEffectLabel(FLAG_ID_ARCANA_COIN)
if val==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -14,8 +14,6 @@ function c84046493.initial_effect(c)
e1:SetOperation(c84046493.scop)
c:RegisterEffect(e1)
end
c84046493.toss_dice=true
c84046493.toss_dice_in_pendulum_only=true
function c84046493.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetLeftScale()<10 end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
......
......@@ -13,7 +13,6 @@ function c84290642.initial_effect(c)
e1:SetOperation(c84290642.activate)
c:RegisterEffect(e1)
end
c84290642.toss_dice=true
function c84290642.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
......@@ -3,13 +3,13 @@
function c84397023.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c84397023.tg)
e1:SetOperation(c84397023.op)
c:RegisterEffect(e1)
end
c84397023.toss_dice=true
function c84397023.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,1,nil,TYPE_MONSTER) end
end
......
......@@ -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
......
......@@ -36,7 +36,6 @@ function c84813516.initial_effect(c)
e3:SetOperation(c84813516.thop)
c:RegisterEffect(e3)
end
c84813516.toss_dice=true
function c84813516.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
......
......@@ -22,7 +22,6 @@ function c85704698.initial_effect(c)
e2:SetOperation(c85704698.synop)
c:RegisterEffect(e2)
end
c85704698.toss_dice=true
function c85704698.filter(c,e,tp)
return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -14,6 +14,7 @@ function c8581705.initial_effect(c)
--disable and destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCategory(CATEGORY_DICE)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c8581705.disop)
......@@ -30,7 +31,6 @@ function c8581705.initial_effect(c)
e3:SetOperation(c8581705.atkop)
c:RegisterEffect(e3)
end
c8581705.toss_dice=true
function c8581705.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -27,7 +27,6 @@ function c86154370.initial_effect(c)
e2:SetOperation(c86154370.spop)
c:RegisterEffect(e2)
end
c86154370.toss_dice=true
c86154370.material_type=TYPE_SYNCHRO
function c86154370.sfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_SYNCHRO)
......
......@@ -11,6 +11,7 @@ function c86767655.initial_effect(c)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCategory(CATEGORY_DICE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,86767655)
......@@ -18,7 +19,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
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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