Commit 6506bcf9 authored by mercury233's avatar mercury233 Committed by GitHub

add Auxiliary.bpcon and Auxiliary.dscon (#1339)

parent 8891dea0
......@@ -18,7 +18,7 @@ function c111280.cfilter(c)
end
function c111280.condition(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c111280.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
return ct>0 and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return ct>0 and aux.dscon()
end
function c111280.filter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK)
......
......@@ -7,14 +7,11 @@ function c11224934.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c11224934.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c11224934.target)
e1:SetOperation(c11224934.activate)
c:RegisterEffect(e1)
end
function c11224934.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c11224934.filter(c)
return c:IsFaceup() and c:GetOverlayCount()~=0
end
......
......@@ -7,14 +7,11 @@ function c11228035.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c11228035.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c11228035.target)
e1:SetOperation(c11228035.activate)
c:RegisterEffect(e1)
end
function c11228035.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c11228035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsType(TYPE_XYZ) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,TYPE_XYZ)
......
......@@ -7,14 +7,11 @@ function c11264180.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c11264180.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c11264180.target)
e1:SetOperation(c11264180.activate)
c:RegisterEffect(e1)
end
function c11264180.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c11264180.filter(c)
return c:IsFaceup() and c:IsSetCard(0x27)
end
......
......@@ -68,5 +68,5 @@ function c12219047.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c12219047.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x10db)
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
and aux.dscon()
end
......@@ -7,7 +7,7 @@ function c12503902.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c12503902.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c12503902.target)
e1:SetOperation(c12503902.operation)
c:RegisterEffect(e1)
......@@ -34,9 +34,6 @@ end
function c12503902.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c12503902.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c12503902.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
......
......@@ -7,14 +7,11 @@ function c126218.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c126218.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c126218.target)
e1:SetOperation(c126218.activate)
c:RegisterEffect(e1)
end
function c126218.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
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
end
......
......@@ -7,14 +7,11 @@ function c12940613.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c12940613.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c12940613.target)
e1:SetOperation(c12940613.activate)
c:RegisterEffect(e1)
end
function c12940613.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c12940613.filter(c)
return c:IsFaceup() and c:IsSetCard(0x71)
end
......
......@@ -8,7 +8,7 @@ function c13317419.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,13317419)
e1:SetCondition(c13317419.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c13317419.cost)
e1:SetTarget(c13317419.target)
e1:SetOperation(c13317419.operation)
......@@ -27,9 +27,6 @@ function c13317419.initial_effect(c)
e2:SetOperation(c13317419.desop)
c:RegisterEffect(e2)
end
function c13317419.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c13317419.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
......
......@@ -7,14 +7,11 @@ function c13611090.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c13611090.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c13611090.target)
e1:SetOperation(c13611090.activate)
c:RegisterEffect(e1)
end
function c13611090.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c13611090.filter(c)
return c:IsFaceup() and c:IsSetCard(0xd0)
end
......
......@@ -10,7 +10,7 @@ function c14124483.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,14124483)
e1:SetCondition(c14124483.atkcon)
e1:SetCondition(aux.dscon)
e1:SetCost(c14124483.atkcost1)
e1:SetTarget(c14124483.atktg)
e1:SetOperation(c14124483.atkop1)
......@@ -25,14 +25,11 @@ function c14124483.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCountLimit(1,14124484)
e2:SetCondition(c14124483.atkcon)
e2:SetCondition(aux.dscon)
e2:SetTarget(c14124483.atkcost2)
e2:SetOperation(c14124483.atkop2)
c:RegisterEffect(e2)
end
function c14124483.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c14124483.atkcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
......
......@@ -6,7 +6,7 @@ function c14393464.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c14393464.condition)
e1:SetCondition(aux.dscon)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
......@@ -31,9 +31,6 @@ function c14393464.initial_effect(c)
e3:SetOperation(c14393464.desop)
c:RegisterEffect(e3)
end
function c14393464.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c14393464.atktg(e,c)
return c:IsRace(RACE_CYBERSE)
end
......
......@@ -7,14 +7,11 @@ function c14731897.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c14731897.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c14731897.target)
e1:SetOperation(c14731897.activate)
c:RegisterEffect(e1)
end
function c14731897.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c14731897.filter(c)
return c:IsFaceup() and c:IsDefenseAbove(0)
end
......
......@@ -7,15 +7,12 @@ function c15471265.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c15471265.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c15471265.cost)
e1:SetTarget(c15471265.target)
e1:SetOperation(c15471265.activate)
c:RegisterEffect(e1)
end
function c15471265.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c15471265.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
......
......@@ -7,14 +7,11 @@ function c16430187.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c16430187.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c16430187.target)
e1:SetOperation(c16430187.activate)
c:RegisterEffect(e1)
end
function c16430187.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c16430187.filter(c)
return c:IsFaceup() and c:IsDefenseAbove(0)
end
......
......@@ -14,7 +14,7 @@ function c16708652.initial_effect(c)
end
function c16708652.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
end
function c16708652.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() and c:IsSetCard(0x11)
......
......@@ -7,14 +7,11 @@ function c1689516.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c1689516.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c1689516.target)
e1:SetOperation(c1689516.activate)
c:RegisterEffect(e1)
end
function c1689516.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c1689516.filter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST)
end
......
......@@ -7,14 +7,11 @@ function c17814387.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c17814387.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c17814387.target)
e1:SetOperation(c17814387.activate)
c:RegisterEffect(e1)
end
function c17814387.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c17814387.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -7,7 +7,7 @@ function c18096222.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c18096222.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c18096222.cost)
e1:SetTarget(c18096222.target)
e1:SetOperation(c18096222.operation)
......@@ -23,9 +23,6 @@ function c18096222.initial_effect(c)
e2:SetOperation(c18096222.daop)
c:RegisterEffect(e2)
end
function c18096222.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c18096222.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
......
......@@ -7,14 +7,11 @@ function c18190572.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c18190572.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c18190572.target)
e1:SetOperation(c18190572.activate)
c:RegisterEffect(e1)
end
function c18190572.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c18190572.filter(c)
return c:IsFaceup() and c:IsDefenseAbove(0)
end
......
......@@ -8,7 +8,7 @@ function c18563744.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c18563744.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c18563744.target)
e1:SetOperation(c18563744.activate)
c:RegisterEffect(e1)
......@@ -23,9 +23,6 @@ function c18563744.initial_effect(c)
e2:SetOperation(c18563744.thop)
c:RegisterEffect(e2)
end
function c18563744.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c18563744.filter(c)
return c:IsSetCard(0xe7) and c:IsFaceup()
end
......
......@@ -9,7 +9,7 @@ function c19254117.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,19254117+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c19254117.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c19254117.target)
e1:SetOperation(c19254117.activate)
c:RegisterEffect(e1)
......@@ -26,9 +26,6 @@ function c19254117.initial_effect(c)
e2:SetOperation(c19254117.tgop)
c:RegisterEffect(e2)
end
function c19254117.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c19254117.filter(c)
return c:IsFaceup() and c:IsDefenseAbove(0)
end
......@@ -72,8 +69,7 @@ function c19254117.ddop(e,tp,eg,ep,ev,re,r,rp)
e:Reset()
end
function c19254117.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
return Duel.GetTurnPlayer()~=tp and aux.bpcon()
end
function c19254117.tgfilter(c)
return c:GetFlagEffect(19254117)==0
......
......@@ -52,7 +52,7 @@ function c20137754.tgop(e,tp,eg,ep,ev,re,r,rp)
end
function c20137754.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(20137754)>0
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
and aux.dscon()
end
function c20137754.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)>0 end
......
......@@ -10,7 +10,7 @@ function c20318029.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e1:SetCountLimit(1,20318029)
e1:SetCondition(c20318029.atkcon)
e1:SetCondition(aux.dscon)
e1:SetCost(c20318029.atkcost)
e1:SetTarget(c20318029.atktg)
e1:SetOperation(c20318029.atkop)
......@@ -32,9 +32,6 @@ function c20318029.initial_effect(c)
e3:SetCondition(c20318029.thcon)
c:RegisterEffect(e3)
end
function c20318029.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c20318029.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
......
......@@ -23,7 +23,7 @@ function c20419926.initial_effect(c)
end
function c20419926.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
end
function c20419926.costfilter(c)
return c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackAbove(1) and c:IsAbleToRemoveAsCost()
......
......@@ -7,7 +7,7 @@ function c20501450.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c20501450.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c20501450.cost)
e1:SetTarget(c20501450.target)
e1:SetOperation(c20501450.activate)
......@@ -39,9 +39,6 @@ function c20501450.clear(e,tp,eg,ep,ev,re,r,rp)
c20501450[0]=0
c20501450[1]=0
end
function c20501450.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c20501450.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c20501450[tp]<2 end
end
......
......@@ -7,15 +7,12 @@ function c21350571.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c21350571.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c21350571.cost)
e1:SetTarget(c21350571.target)
e1:SetOperation(c21350571.operation)
c:RegisterEffect(e1)
end
function c21350571.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c21350571.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
......
......@@ -6,7 +6,7 @@ function c22359980.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DAMAGE_STEP)
e1:SetCondition(c22359980.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c22359980.target)
e1:SetOperation(c22359980.operation)
c:RegisterEffect(e1)
......@@ -42,9 +42,6 @@ function c22359980.initial_effect(c)
e4:SetOperation(c22359980.mtop)
c:RegisterEffect(e4)
end
function c22359980.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c22359980.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:GetLabelObject():Clear()
......
......@@ -7,14 +7,11 @@ function c23171610.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c23171610.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c23171610.target)
e1:SetOperation(c23171610.activate)
c:RegisterEffect(e1)
end
function c23171610.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c23171610.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
......
......@@ -28,7 +28,7 @@ function c23603403.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c23603403.atkcon)
e3:SetCondition(aux.dscon)
e3:SetCost(c23603403.atkcost)
e3:SetTarget(c23603403.atktg)
e3:SetOperation(c23603403.atkop)
......@@ -63,9 +63,6 @@ function c23603403.valcheck(e,c)
e:GetLabelObject():SetLabel(0)
end
end
function c23603403.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c23603403.atkcost(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)
......
......@@ -7,7 +7,7 @@ function c2376209.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c2376209.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c2376209.target)
e1:SetOperation(c2376209.operation)
c:RegisterEffect(e1)
......@@ -23,9 +23,6 @@ function c2376209.initial_effect(c)
e2:SetOperation(c2376209.spop)
c:RegisterEffect(e2)
end
function c2376209.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c2376209.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -41,7 +41,7 @@ function c23790299.initial_effect(c)
end
function c23790299.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
end
function c23790299.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -8,14 +8,11 @@ function c24920410.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24920410+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c24920410.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c24920410.target)
e1:SetOperation(c24920410.activate)
c:RegisterEffect(e1)
end
function c24920410.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c24920410.filter(c)
return c:IsFaceup() and c:IsSetCard(0x58)
end
......
......@@ -7,14 +7,11 @@ function c25005816.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c25005816.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c25005816.target)
e1:SetOperation(c25005816.activate)
c:RegisterEffect(e1)
end
function c25005816.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c25005816.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -7,16 +7,13 @@ function c25435080.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c25435080.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c25435080.cost)
e1:SetTarget(c25435080.target)
e1:SetOperation(c25435080.activate)
e1:SetLabel(0)
c:RegisterEffect(e1)
end
function c25435080.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c25435080.cfilter(c,tp)
return c:IsSetCard(0x33) and Duel.IsExistingTarget(c25435080.tfilter,tp,LOCATION_MZONE,0,1,c)
end
......
......@@ -6,7 +6,7 @@ function c25704359.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c25704359.condition)
e1:SetCondition(aux.dscon)
c:RegisterEffect(e1)
--indestructable
local e2=Effect.CreateEffect(c)
......@@ -40,9 +40,6 @@ function c25704359.initial_effect(c)
e4:SetOperation(c25704359.spop)
c:RegisterEffect(e4)
end
function c25704359.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c25704359.atktg(e,c)
return c:IsSetCard(0xc0) and Duel.GetAttacker()==c
end
......
......@@ -7,14 +7,11 @@ function c25789292.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c25789292.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c25789292.target)
e1:SetOperation(c25789292.activate)
c:RegisterEffect(e1)
end
function c25789292.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c25789292.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -7,15 +7,12 @@ function c259314.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c259314.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c259314.cost)
e1:SetTarget(c259314.target)
e1:SetOperation(c259314.operation)
c:RegisterEffect(e1)
end
function c259314.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c259314.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
......
......@@ -29,7 +29,7 @@ function c26773909.checkop(e,tp,eg,ep,ev,re,r,rp)
end
function c26773909.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
end
function c26773909.filter(c,lp)
return c:IsFaceup() and c:IsAttackBelow(lp) and c:GetFlagEffect(26773909)==0
......
......@@ -7,7 +7,7 @@ function c27012990.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c27012990.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c27012990.cost)
e1:SetTarget(c27012990.target)
e1:SetOperation(c27012990.activate)
......@@ -19,9 +19,6 @@ function c27012990.initial_effect(c)
e2:SetCondition(c27012990.handcon)
c:RegisterEffect(e2)
end
function c27012990.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c27012990.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
......
......@@ -7,15 +7,12 @@ function c27207573.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c27207573.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c27207573.cost)
e1:SetTarget(c27207573.target)
e1:SetOperation(c27207573.activate)
c:RegisterEffect(e1)
end
function c27207573.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c27207573.cfilter(c)
return c:IsSetCard(0x100a) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
......
......@@ -18,7 +18,7 @@ function c27240101.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c27240101.indcon)
e2:SetCondition(aux.bpcon)
e2:SetCost(c27240101.indcost)
e2:SetOperation(c27240101.indop)
c:RegisterEffect(e2)
......@@ -26,9 +26,6 @@ end
function c27240101.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c27240101.indcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c27240101.indcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
......
......@@ -7,14 +7,11 @@ function c27243130.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c27243130.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c27243130.target)
e1:SetOperation(c27243130.activate)
c:RegisterEffect(e1)
end
function c27243130.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c27243130.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -8,15 +8,12 @@ function c27331568.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,27331568+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c27331568.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c27331568.cost)
e1:SetTarget(c27331568.target)
e1:SetOperation(c27331568.activate)
c:RegisterEffect(e1)
end
function c27331568.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c27331568.cfilter(c,tp)
return c:IsSetCard(0x2093) and c:IsType(TYPE_RITUAL) and c:IsLevelAbove(1)
and Duel.IsExistingTarget(c27331568.filter,tp,LOCATION_MZONE,0,1,c)
......
......@@ -5,7 +5,7 @@ function c27541563.initial_effect(c)
e1:SetDescription(aux.Stringid(27541563,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c27541563.condition)
e1:SetCondition(aux.dscon)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
......@@ -38,9 +38,6 @@ function c27541563.initial_effect(c)
e5:SetValue(c27541563.effectfilter)
c:RegisterEffect(e5)
end
function c27541563.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c27541563.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
......
......@@ -13,7 +13,7 @@ function c27660735.initial_effect(c)
c:RegisterEffect(e1)
end
function c27660735.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
return Duel.GetTurnPlayer()~=tp and aux.bpcon()
end
function c27660735.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetAttacker() then Duel.NegateAttack()
......
......@@ -16,7 +16,7 @@ function c28325165.cfilter(c)
return c:IsSetCard(0xcd) and c:IsType(TYPE_MONSTER)
end
function c28325165.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return aux.dscon()
and Duel.IsExistingMatchingCard(c28325165.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c28325165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -7,7 +7,7 @@ function c29267084.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c29267084.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c29267084.target)
e1:SetOperation(c29267084.operation)
c:RegisterEffect(e1)
......@@ -35,9 +35,6 @@ function c29267084.initial_effect(c)
e5:SetOperation(c29267084.desop)
c:RegisterEffect(e5)
end
function c29267084.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c29267084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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
......
......@@ -33,8 +33,7 @@ function c29307554.checkop(e,tp,eg,ep,ev,re,r,rp)
if p2 then Duel.RegisterFlagEffect(1,29307554,RESET_PHASE+PHASE_END,0,1) end
end
function c29307554.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,29307554)~=0 and Duel.GetTurnPlayer()==tp
and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
return Duel.GetFlagEffect(tp,29307554)~=0 and Duel.GetTurnPlayer()==tp and aux.bpcon()
end
function c29307554.filter(c)
return c:IsFaceup() and c:IsLevelAbove(8) and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0
......
......@@ -7,14 +7,11 @@ function c30123142.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c30123142.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c30123142.target)
e1:SetOperation(c30123142.activate)
c:RegisterEffect(e1)
end
function c30123142.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c30123142.filter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:GetMaterialCount()~=0
end
......
......@@ -13,7 +13,7 @@ function c30757127.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,30757127)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e1:SetCondition(c30757127.atkcon)
e1:SetCondition(aux.dscon)
e1:SetCost(c30757127.atkcost)
e1:SetTarget(c30757127.atktg)
e1:SetOperation(c30757127.atkop)
......@@ -23,9 +23,6 @@ c30757127.material_setcode=0xc008
function c30757127.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsFusionType(TYPE_EFFECT)
end
function c30757127.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c30757127.cfilter(c,tp)
return c:IsDiscardable() and Duel.IsExistingMatchingCard(c30757127.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c)
end
......
......@@ -7,14 +7,11 @@ function c30845999.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c30845999.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c30845999.target)
e1:SetOperation(c30845999.activate)
c:RegisterEffect(e1)
end
function c30845999.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c30845999.filter(c)
return c:IsFaceup() and c:IsSetCard(0xaa) and c:IsSummonType(SUMMON_TYPE_NORMAL)
end
......
......@@ -45,7 +45,7 @@ function c3134857.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c3134857.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) and Duel.IsPlayerAffectedByEffect(tp,90351981)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c3134857.tdfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck()
......
......@@ -7,7 +7,7 @@ function c31472884.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c31472884.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c31472884.cost)
e1:SetTarget(c31472884.target)
e1:SetOperation(c31472884.activate)
......@@ -27,9 +27,6 @@ function c31472884.check(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tc:GetControler(),31472884,RESET_PHASE+PHASE_END,0,1)
end
end
function c31472884.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c31472884.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable() and c:GetAttack()>=0 and c:GetDefense()>=0
and Duel.IsExistingTarget(c31472884.tgfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c)
......
......@@ -21,7 +21,7 @@ function c31833038.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetHintTiming(TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e3:SetCountLimit(1)
e3:SetCondition(c31833038.atkcon)
e3:SetCondition(aux.dscon)
e3:SetTarget(c31833038.atktg)
e3:SetOperation(c31833038.atkop)
c:RegisterEffect(e3)
......@@ -38,9 +38,6 @@ end
function c31833038.efilter1(e,re,rp)
return re:IsActiveType(TYPE_MONSTER)
end
function c31833038.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c31833038.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -7,14 +7,11 @@ function c3244563.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c3244563.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c3244563.target)
e1:SetOperation(c3244563.activate)
c:RegisterEffect(e1)
end
function c3244563.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c3244563.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -44,7 +44,7 @@ function c32615065.ffilter(c)
end
function c32615065.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
and aux.dscon()
end
function c32615065.atkfilter(c)
return c:IsFaceup() and c:GetAttack()>0
......
......@@ -9,7 +9,7 @@ function c33314479.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,33314479)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c33314479.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c33314479.cost)
e1:SetOperation(c33314479.operation)
c:RegisterEffect(e1)
......@@ -25,9 +25,6 @@ function c33314479.initial_effect(c)
e2:SetOperation(c33314479.spop)
c:RegisterEffect(e2)
end
function c33314479.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c33314479.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable()
end
......
......@@ -6,7 +6,7 @@ function c33665663.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c33665663.condition)
e1:SetCondition(aux.dscon)
e1:SetOperation(c33665663.activate)
c:RegisterEffect(e1)
--atkup
......@@ -19,9 +19,6 @@ function c33665663.initial_effect(c)
e2:SetValue(300)
c:RegisterEffect(e2)
end
function c33665663.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c33665663.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -7,7 +7,7 @@ function c34815282.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c34815282.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c34815282.target)
e1:SetOperation(c34815282.operation)
c:RegisterEffect(e1)
......@@ -32,9 +32,6 @@ function c34815282.initial_effect(c)
e4:SetValue(-1)
c:RegisterEffect(e4)
end
function c34815282.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c34815282.filter(c)
return c:IsFaceup() and c:GetBaseAttack()>1000 and c:GetLevel()>0
end
......
......@@ -17,7 +17,7 @@ function c35330871.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1)
e2:SetCondition(c35330871.atkcon)
e2:SetCondition(aux.dscon)
e2:SetCost(c35330871.atkcost)
e2:SetTarget(c35330871.atktg)
e2:SetOperation(c35330871.atkop)
......@@ -33,9 +33,6 @@ function c35330871.initial_effect(c)
e3:SetOperation(c35330871.tgop)
c:RegisterEffect(e3)
end
function c35330871.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c35330871.cfilter(c)
return c:IsSetCard(0xb1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
......
......@@ -10,7 +10,7 @@ function c35394356.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_ATTACK+TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,35394356)
e1:SetCondition(c35394356.atkcon)
e1:SetCondition(aux.dscon)
e1:SetCost(c35394356.atkcost)
e1:SetTarget(c35394356.atktg)
e1:SetOperation(c35394356.atkop)
......@@ -26,9 +26,6 @@ function c35394356.initial_effect(c)
e2:SetOperation(c35394356.rop)
c:RegisterEffect(e2)
end
function c35394356.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c35394356.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
......
......@@ -4,7 +4,7 @@ function c35498188.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c35498188.condition)
e1:SetCondition(aux.bpcon)
e1:SetCost(c35498188.cost)
e1:SetTarget(c35498188.target)
e1:SetOperation(c35498188.activate)
......@@ -20,9 +20,6 @@ function c35498188.initial_effect(c)
e2:SetOperation(c35498188.setop)
c:RegisterEffect(e2)
end
function c35498188.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c35498188.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
......@@ -10,7 +10,7 @@ function c35818851.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,35818851)
e1:SetCondition(c35818851.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c35818851.cost)
e1:SetOperation(c35818851.operation)
c:RegisterEffect(e1)
......@@ -26,9 +26,6 @@ function c35818851.initial_effect(c)
e2:SetOperation(c35818851.thop)
c:RegisterEffect(e2)
end
function c35818851.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c35818851.cfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost()
end
......
......@@ -13,15 +13,12 @@ function c36076683.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c36076683.atkcon)
e1:SetCondition(aux.dscon)
e1:SetCost(c36076683.atkcost)
e1:SetOperation(c36076683.atkop)
c:RegisterEffect(e1)
end
c36076683.xyz_number=73
function c36076683.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c36076683.atkcost(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)
......
......@@ -15,7 +15,7 @@ function c36197902.initial_effect(c)
e2:SetLabel(0)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCountLimit(1,36197902)
e2:SetCondition(c36197902.atkcon)
e2:SetCondition(aux.dscon)
e2:SetCost(c36197902.atkcost)
e2:SetTarget(c36197902.atktg)
e2:SetOperation(c36197902.atkop)
......@@ -35,9 +35,6 @@ function c36197902.initial_effect(c)
e3:SetOperation(c36197902.spop)
c:RegisterEffect(e3)
end
function c36197902.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c36197902.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
......
......@@ -7,15 +7,12 @@ function c36247316.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c36247316.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c36247316.cost)
e1:SetTarget(c36247316.target)
e1:SetOperation(c36247316.activate)
c:RegisterEffect(e1)
end
function c36247316.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c36247316.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
......
......@@ -29,7 +29,7 @@ function c36956512.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1)
e3:SetCondition(c36956512.atkcon)
e3:SetCondition(aux.dscon)
e3:SetCost(c36956512.atkcost)
e3:SetTarget(c36956512.atktg)
e3:SetOperation(c36956512.atkop)
......@@ -57,9 +57,6 @@ function c36956512.spcon2(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c36956512.cfilter,tp,0,LOCATION_MZONE,1,nil)
end
function c36956512.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c36956512.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x37,3,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x37,3,REASON_COST)
......
......@@ -7,15 +7,12 @@ function c37390589.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c37390589.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c37390589.cost)
e1:SetTarget(c37390589.target)
e1:SetOperation(c37390589.operation)
c:RegisterEffect(e1)
end
function c37390589.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c37390589.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(9)
......
......@@ -6,7 +6,7 @@ function c37436476.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c37436476.condition)
e1:SetCondition(aux.dscon)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
......@@ -18,9 +18,6 @@ function c37436476.initial_effect(c)
e2:SetValue(c37436476.val)
c:RegisterEffect(e2)
end
function c37436476.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c37436476.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39)*100
end
......@@ -11,7 +11,7 @@ function c3758046.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,3758046)
e1:SetCondition(c3758046.con)
e1:SetCondition(aux.bpcon)
e1:SetCost(c3758046.cost)
e1:SetOperation(c3758046.operation)
c:RegisterEffect(e1)
......@@ -28,9 +28,6 @@ function c3758046.initial_effect(c)
e2:SetOperation(c3758046.thop)
c:RegisterEffect(e2)
end
function c3758046.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c3758046.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)
......
......@@ -6,7 +6,7 @@ function c38143903.initial_effect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e0:SetCondition(c38143903.condition)
e0:SetCondition(aux.dscon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(38143903,1))
......@@ -26,9 +26,6 @@ function c38143903.initial_effect(c)
c:RegisterEffect(e2)
end
c38143903.toss_coin=true
function c38143903.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
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)
......
......@@ -7,15 +7,12 @@ function c38643567.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c38643567.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c38643567.cost)
e1:SetTarget(c38643567.target)
e1:SetOperation(c38643567.operation)
c:RegisterEffect(e1)
end
function c38643567.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c38643567.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
......
......@@ -29,7 +29,7 @@ function c38695361.initial_effect(c)
end
function c38695361.atkcon1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
end
function c38695361.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
......
......@@ -32,7 +32,7 @@ function c4055337.atkcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c4055337.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) and Duel.IsPlayerAffectedByEffect(tp,90351981)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c4055337.tgfilter(c)
return c:IsFaceup()
......
......@@ -21,7 +21,7 @@ function c40945356.initial_effect(c)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(c40945356.condition2)
e2:SetCondition(aux.dscon)
e2:SetCost(c40945356.cost)
e2:SetTarget(c40945356.target2)
e2:SetOperation(c40945356.operation2)
......@@ -61,9 +61,6 @@ end
function c40945356.indtg(e,c)
return c:IsSetCard(0x61) or (c:IsSetCard(0x2b) and c:IsType(TYPE_MONSTER))
end
function c40945356.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c40945356.filter(c)
return c:IsFaceup() and c:IsSetCard(0x2b)
end
......
......@@ -7,15 +7,12 @@ function c41398771.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c41398771.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c41398771.cost)
e1:SetTarget(c41398771.target)
e1:SetOperation(c41398771.activate)
c:RegisterEffect(e1)
end
function c41398771.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c41398771.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
......@@ -10,7 +10,7 @@ function c42055234.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,42055234)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c42055234.atkcon)
e1:SetCondition(aux.dscon)
e1:SetCost(c42055234.atkcost)
e1:SetTarget(c42055234.atktg)
e1:SetOperation(c42055234.atkop)
......@@ -36,9 +36,6 @@ function c42055234.initial_effect(c)
e3:SetOperation(c42055234.spop)
c:RegisterEffect(e3)
end
function c42055234.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c42055234.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
......
......@@ -7,7 +7,7 @@ function c42233477.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c42233477.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c42233477.target)
e1:SetOperation(c42233477.activate)
c:RegisterEffect(e1)
......@@ -34,9 +34,6 @@ function c42233477.initial_effect(c)
e4:SetValue(LOCATION_HAND)
c:RegisterEffect(e4)
end
function c42233477.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c42233477.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
......
......@@ -7,14 +7,11 @@ function c42793609.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c42793609.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c42793609.target)
e1:SetOperation(c42793609.operation)
c:RegisterEffect(e1)
end
function c42793609.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c42793609.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
......
......@@ -7,7 +7,7 @@ function c43405287.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c43405287.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c43405287.cost)
e1:SetTarget(c43405287.target)
e1:SetOperation(c43405287.operation)
......@@ -25,9 +25,6 @@ function c43405287.initial_effect(c)
e2:SetOperation(c43405287.damop)
c:RegisterEffect(e2)
end
function c43405287.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c43405287.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
......
......@@ -7,14 +7,11 @@ function c44209392.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c44209392.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c44209392.target)
e1:SetOperation(c44209392.activate)
c:RegisterEffect(e1)
end
function c44209392.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c44209392.filter(c)
return c:IsFaceup() and c:IsDefenseAbove(0)
end
......
......@@ -21,7 +21,7 @@ function c4474060.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetCondition(c4474060.atkcon)
e3:SetCondition(aux.dscon)
e3:SetCost(c4474060.atkcost)
e3:SetTarget(c4474060.atktg)
e3:SetOperation(c4474060.atkop)
......@@ -44,9 +44,6 @@ end
function c4474060.stop(e,tp,eg,ep,ev,re,r,rp)
Duel.SortDecktop(tp,1-tp,3)
end
function c4474060.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c4474060.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
......
......@@ -7,7 +7,7 @@ function c44920699.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c44920699.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c44920699.target)
e1:SetOperation(c44920699.activate)
c:RegisterEffect(e1)
......@@ -21,9 +21,6 @@ function c44920699.initial_effect(c)
e3:SetValue(300)
c:RegisterEffect(e3)
end
function c44920699.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c44920699.filter(c)
return c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR)
end
......
......@@ -31,7 +31,7 @@ function c46724542.lcheck(g,lc)
end
function c46724542.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) and e:GetHandler():GetAttackAnnouncedCount()<1
and aux.dscon() and e:GetHandler():GetAttackAnnouncedCount()<1
end
function c46724542.filter(c)
return c:IsFaceup() and c:IsAttackAbove(2100) and c:IsRace(RACE_MACHINE)
......
......@@ -21,7 +21,7 @@ function c46895036.initial_effect(c)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c46895036.condition)
e2:SetCondition(aux.dscon)
e2:SetCost(c46895036.cost)
e2:SetTarget(c46895036.target)
e2:SetOperation(c46895036.operation)
......@@ -43,9 +43,6 @@ end
function c46895036.atkval(e,c)
return Duel.GetMatchingGroupCount(c46895036.atkfilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*200
end
function c46895036.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c46895036.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)
......
......@@ -7,7 +7,7 @@ function c47598941.initial_effect(c)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e0:SetHintTiming(TIMING_DAMAGE_STEP)
e0:SetCondition(c47598941.condition)
e0:SetCondition(aux.dscon)
c:RegisterEffect(e0)
--set p
local e2=Effect.CreateEffect(c)
......@@ -34,9 +34,6 @@ function c47598941.initial_effect(c)
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
end
function c47598941.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c47598941.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_PZONE) and c:GetPreviousControler()==tp
end
......
......@@ -6,7 +6,7 @@ function c47819246.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c47819246.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c47819246.cost)
e1:SetTarget(c47819246.target)
e1:SetOperation(c47819246.operation)
......@@ -34,9 +34,6 @@ function c47819246.initial_effect(c)
e4:SetOperation(c47819246.mtop)
c:RegisterEffect(e4)
end
function c47819246.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c47819246.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
......
......@@ -25,7 +25,7 @@ function c4786063.initial_effect(c)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCondition(c4786063.condition)
e3:SetCondition(aux.dscon)
e3:SetCost(c4786063.cost)
e3:SetTarget(c4786063.target)
e3:SetOperation(c4786063.operation)
......@@ -62,9 +62,6 @@ end
function c4786063.eqlimit(e,c)
return c:IsSetCard(0x9a)
end
function c4786063.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c4786063.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
......
......@@ -83,7 +83,7 @@ function c47946130.negop(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c47946130.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsAttack(c:GetBaseAttack()) and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return not c:IsAttack(c:GetBaseAttack()) and aux.dscon()
end
function c47946130.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -5,14 +5,11 @@ function c48422921.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c48422921.condition)
e1:SetCondition(aux.bpcon)
e1:SetTarget(c48422921.target)
e1:SetOperation(c48422921.operation)
c:RegisterEffect(e1)
end
function c48422921.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c48422921.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -13,7 +13,7 @@ function c4906301.initial_effect(c)
c:RegisterEffect(e1)
end
function c4906301.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
return Duel.GetTurnPlayer()~=tp and aux.bpcon()
end
function c4906301.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetAttacker() then Duel.NegateAttack()
......
......@@ -6,7 +6,7 @@ function c49082032.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE+TIMING_DAMAGE_STEP)
e1:SetCondition(c49082032.condition)
e1:SetCondition(aux.dscon)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
......@@ -31,9 +31,6 @@ function c49082032.initial_effect(c)
e3:SetOperation(c49082032.spop)
c:RegisterEffect(e3)
end
function c49082032.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c49082032.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
......
......@@ -7,15 +7,12 @@ function c49204190.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c49204190.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c49204190.cost)
e1:SetTarget(c49204190.target)
e1:SetOperation(c49204190.activate)
c:RegisterEffect(e1)
end
function c49204190.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c49204190.cfilter(c)
return c:GetAttack()>0 and c:IsDiscardable()
end
......
......@@ -23,7 +23,7 @@ function c49221191.ovfilter(c)
return c:IsFaceup() and c:IsCode(65676461)
end
function c49221191.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=1000 and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return Duel.GetLP(tp)<=1000 and aux.dscon()
end
function c49221191.rfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
......
......@@ -7,14 +7,11 @@ function c49267971.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c49267971.condition)
e1:SetCondition(aux.dscon)
e1:SetTarget(c49267971.target)
e1:SetOperation(c49267971.activate)
c:RegisterEffect(e1)
end
function c49267971.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c49267971.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_DEFENSE)
......
......@@ -13,7 +13,7 @@ function c50260683.initial_effect(c)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c50260683.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c50260683.cost)
e1:SetTarget(c50260683.target)
e1:SetOperation(c50260683.operation)
......@@ -31,9 +31,6 @@ function c50260683.initial_effect(c)
c:RegisterEffect(e2)
end
c50260683.xyz_number=36
function c50260683.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c50260683.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)
......
......@@ -7,15 +7,12 @@ function c5052212.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c5052212.condition)
e1:SetCondition(aux.dscon)
e1:SetCost(c5052212.cost)
e1:SetTarget(c5052212.target)
e1:SetOperation(c5052212.activate)
c:RegisterEffect(e1)
end
function c5052212.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c5052212.cfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost()
end
......
......@@ -24,7 +24,7 @@ function c50608164.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetCountLimit(1)
e3:SetCondition(c50608164.condition)
e3:SetCondition(aux.dscon)
e3:SetCost(c50608164.cost)
e3:SetTarget(c50608164.target)
e3:SetOperation(c50608164.operation)
......@@ -33,9 +33,6 @@ end
function c50608164.val(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*500
end
function c50608164.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c50608164.cfilter(c)
return c:IsSetCard(0x8) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
......
......@@ -29,7 +29,7 @@ function c50903514.initial_effect(c)
end
function c50903514.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
end
function c50903514.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
......
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.
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.
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.
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.
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.
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.
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