Commit b84b75a7 authored by salix5's avatar salix5

PHASE_BATTLE_START

parent b44a5b70
...@@ -10,7 +10,7 @@ function c15552258.initial_effect(c) ...@@ -10,7 +10,7 @@ function c15552258.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c15552258.condition(e,tp,eg,ep,ev,re,r,rp) function c15552258.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.GetCurrentPhase()==PHASE_BATTLE return tp~=Duel.GetTurnPlayer() and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c15552258.activate(e,tp,eg,ep,ev,re,r,rp) function c15552258.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
......
...@@ -13,7 +13,7 @@ function c19763315.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -13,7 +13,7 @@ function c19763315.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_BP_TWICE) e1:SetCode(EFFECT_BP_TWICE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
if Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE then if Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) then
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c19763315.bpcon) e1:SetCondition(c19763315.bpcon)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2) e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2)
......
...@@ -11,7 +11,7 @@ function c26509612.initial_effect(c) ...@@ -11,7 +11,7 @@ function c26509612.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c26509612.condition(e,tp,eg,ep,ev,re,r,rp) function c26509612.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c26509612.filter1(c) function c26509612.filter1(c)
return c:IsFaceup() and c:IsCode(74711057) return c:IsFaceup() and c:IsCode(74711057)
......
...@@ -13,7 +13,7 @@ function c27660735.initial_effect(c) ...@@ -13,7 +13,7 @@ function c27660735.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c27660735.condition(e,tp,eg,ep,ev,re,r,rp) function c27660735.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE) return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
end end
function c27660735.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c27660735.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
...@@ -34,7 +34,7 @@ function c29307554.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function c29307554.checkop(e,tp,eg,ep,ev,re,r,rp)
end end
function c29307554.condition(e,tp,eg,ep,ev,re,r,rp) function c29307554.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,29307554)~=0 and Duel.GetTurnPlayer()==tp return Duel.GetFlagEffect(tp,29307554)~=0 and Duel.GetTurnPlayer()==tp
and (Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE) and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
end end
function c29307554.filter(c) function c29307554.filter(c)
return c:IsFaceup() and c:IsLevelAbove(8) and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 return c:IsFaceup() and c:IsLevelAbove(8) and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0
......
...@@ -13,7 +13,7 @@ function c34710660.initial_effect(c) ...@@ -13,7 +13,7 @@ function c34710660.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c34710660.condition(e,tp,eg,ep,ev,re,r,rp) function c34710660.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c34710660.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c34710660.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
...@@ -21,7 +21,7 @@ function c37055344.initial_effect(c) ...@@ -21,7 +21,7 @@ function c37055344.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c37055344.condition(e,tp,eg,ep,ev,re,r,rp) function c37055344.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c37055344.filter1(c) function c37055344.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x8d) and c:IsCanTurnSet() return c:IsFaceup() and c:IsSetCard(0x8d) and c:IsCanTurnSet()
...@@ -44,7 +44,7 @@ function c37055344.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -44,7 +44,7 @@ function c37055344.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsExistingTarget(c37055344.filter1,tp,LOCATION_MZONE,0,1,nil) local b1=Duel.IsExistingTarget(c37055344.filter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c37055344.filter2,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c37055344.filter2,tp,0,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingTarget(c37055344.filter3,tp,LOCATION_MZONE,0,1,nil) local b2=Duel.IsExistingTarget(c37055344.filter3,tp,LOCATION_MZONE,0,1,nil)
if Duel.GetCurrentPhase()==PHASE_BATTLE if (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
and (b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(37055344,3)) then and (b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(37055344,3)) then
local op=0 local op=0
if b1 and b2 then if b1 and b2 then
......
...@@ -29,7 +29,7 @@ function c3758046.initial_effect(c) ...@@ -29,7 +29,7 @@ function c3758046.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c3758046.con(e,tp,eg,ep,ev,re,r,rp) function c3758046.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c3758046.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
...@@ -46,7 +46,7 @@ function c4239451.adop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function c4239451.adop1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c4239451.adcon2(e,tp,eg,ep,ev,re,r,rp) function c4239451.adcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.GetCurrentChain()==0 return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and Duel.GetCurrentChain()==0
end end
function c4239451.adtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4239451.adtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
......
...@@ -53,7 +53,7 @@ function c4290468.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function c4290468.atkop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
function c4290468.dacon(e,tp,eg,ep,ev,re,r,rp) function c4290468.dacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE and e:GetHandler():GetAttackedGroupCount()~=0 return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and e:GetHandler():GetAttackedGroupCount()~=0
and Duel.GetAttacker()==nil and Duel.GetCurrentChain()==0 and Duel.GetAttacker()==nil and Duel.GetCurrentChain()==0
end end
function c4290468.dacost(e,tp,eg,ep,ev,re,r,rp,chk) function c4290468.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -41,7 +41,7 @@ function c44035031.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function c44035031.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c44035031.poscon(e,tp,eg,ep,ev,re,r,rp) function c44035031.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c44035031.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c44035031.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefencePos() end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefencePos() end
......
...@@ -70,7 +70,7 @@ function c47819246.atkval(e,c) ...@@ -70,7 +70,7 @@ function c47819246.atkval(e,c)
return c:GetRank()*100 return c:GetRank()*100
end end
function c47819246.mtcon(e,tp,eg,ep,ev,re,r,rp) function c47819246.mtcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsType(TYPE_EQUIP) and Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE return e:GetHandler():IsType(TYPE_EQUIP) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c47819246.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) function c47819246.mtcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -11,7 +11,7 @@ function c48422921.initial_effect(c) ...@@ -11,7 +11,7 @@ function c48422921.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c48422921.condition(e,tp,eg,ep,ev,re,r,rp) function c48422921.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c48422921.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
......
...@@ -13,7 +13,7 @@ function c4906301.initial_effect(c) ...@@ -13,7 +13,7 @@ function c4906301.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c4906301.condition(e,tp,eg,ep,ev,re,r,rp) function c4906301.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE) return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
end end
function c4906301.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c4906301.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
...@@ -47,7 +47,7 @@ function c51865604.spfilter(c,e,tp) ...@@ -47,7 +47,7 @@ function c51865604.spfilter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e)
end end
function c51865604.spcon(e,tp,eg,ep,ev,re,r,rp) function c51865604.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE and eg:IsExists(c51865604.spfilter,1,nil,e,tp) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and eg:IsExists(c51865604.spfilter,1,nil,e,tp)
end end
function c51865604.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c51865604.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
...@@ -54,7 +54,7 @@ function c52085072.antarget(e,c) ...@@ -54,7 +54,7 @@ function c52085072.antarget(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
end end
function c52085072.btcon(e,tp,eg,ep,ev,re,r,rp) function c52085072.btcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE and not e:GetHandler():IsStatus(STATUS_CHAINING) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and not e:GetHandler():IsStatus(STATUS_CHAINING)
and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler())
end end
function c52085072.btcfilter(c) function c52085072.btcfilter(c)
......
...@@ -18,7 +18,7 @@ function c57069605.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +18,7 @@ function c57069605.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_SKIP_BP) e1:SetCode(EFFECT_SKIP_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
if Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE then if Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) then
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c57069605.skipcon) e1:SetCondition(c57069605.skipcon)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2) e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2)
......
...@@ -28,7 +28,7 @@ function c59546797.initial_effect(c) ...@@ -28,7 +28,7 @@ function c59546797.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c59546797.spcon(e,tp,eg,ep,ev,re,r,rp) function c59546797.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE and not Duel.CheckTiming(TIMING_BATTLE_START+TIMING_BATTLE_END) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and not Duel.CheckTiming(TIMING_BATTLE_START+TIMING_BATTLE_END)
end end
function c59546797.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c59546797.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -20,7 +20,7 @@ c59627393.xyz_number=105 ...@@ -20,7 +20,7 @@ c59627393.xyz_number=105
function c59627393.condition(e,tp,eg,ep,ev,re,r,rp) function c59627393.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
return Duel.GetCurrentPhase()==PHASE_BATTLE and at and ((a:IsControler(tp) and a:IsOnField() and a:IsSetCard(0x84)) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and at and ((a:IsControler(tp) and a:IsOnField() and a:IsSetCard(0x84))
or (at:IsControler(tp) and at:IsOnField() and at:IsFaceup() and at:IsSetCard(0x84))) or (at:IsControler(tp) and at:IsOnField() and at:IsFaceup() and at:IsSetCard(0x84)))
end end
function c59627393.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c59627393.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -98,7 +98,7 @@ function c60992364.eqlimit(e,c) ...@@ -98,7 +98,7 @@ function c60992364.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
function c60992364.atcon(e,tp,eg,ep,ev,re,r,rp) function c60992364.atcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.GetCurrentChain()==0 return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and Duel.GetCurrentChain()==0
end end
function c60992364.atcost(e,tp,eg,ep,ev,re,r,rp,chk) function c60992364.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
...@@ -12,7 +12,7 @@ function c62878208.initial_effect(c) ...@@ -12,7 +12,7 @@ function c62878208.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c62878208.eqcon(e,tp,eg,ep,ev,re,r,rp) function c62878208.eqcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c62878208.filter1(c,e,tp) function c62878208.filter1(c,e,tp)
local ec=c:GetEquipTarget() local ec=c:GetEquipTarget()
......
...@@ -18,7 +18,7 @@ end ...@@ -18,7 +18,7 @@ end
function c64268668.atkcon(e,tp,eg,ep,ev,re,r,rp) function c64268668.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return Duel.GetCurrentPhase()==PHASE_BATTLE return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
and ((a and a:IsControler(tp) and a:IsFaceup() and a:IsCode(64268668)) and ((a and a:IsControler(tp) and a:IsFaceup() and a:IsCode(64268668))
or (d and d:IsControler(tp) and d:IsFaceup() and d:IsCode(64268668))) or (d and d:IsControler(tp) and d:IsFaceup() and d:IsCode(64268668)))
end end
......
...@@ -20,7 +20,7 @@ function c67381587.initial_effect(c) ...@@ -20,7 +20,7 @@ function c67381587.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c67381587.condition(e,tp,eg,ep,ev,re,r,rp) function c67381587.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
and Duel.IsExistingMatchingCard(Card.IsPosition,tp,LOCATION_MZONE,0,2,nil,POS_FACEDOWN_DEFENCE) and Duel.IsExistingMatchingCard(Card.IsPosition,tp,LOCATION_MZONE,0,2,nil,POS_FACEDOWN_DEFENCE)
end end
function c67381587.activate(e,tp,eg,ep,ev,re,r,rp) function c67381587.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -14,7 +14,7 @@ function c67957315.initial_effect(c) ...@@ -14,7 +14,7 @@ function c67957315.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c67957315.adcon(e,tp,eg,ep,ev,re,r,rp) function c67957315.adcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.GetCurrentChain()==0 return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and Duel.GetCurrentChain()==0
and (e:GetHandler()==Duel.GetAttacker() or e:GetHandler()==Duel.GetAttackTarget()) and (e:GetHandler()==Duel.GetAttacker() or e:GetHandler()==Duel.GetAttackTarget())
end end
function c67957315.cfilter(c) function c67957315.cfilter(c)
......
...@@ -56,7 +56,7 @@ function c68819554.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c68819554.negop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c68819554.damcon(e,tp,eg,ep,ev,re,r,rp) function c68819554.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c68819554.damop(e,tp,eg,ep,ev,re,r,rp) function c68819554.damop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -11,7 +11,7 @@ function c71417170.initial_effect(c) ...@@ -11,7 +11,7 @@ function c71417170.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71417170.condition(e,tp,eg,ep,ev,re,r,rp) function c71417170.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c71417170.target(e,tp,eg,ep,ev,re,r,rp,chk) function c71417170.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefencePos,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefencePos,tp,0,LOCATION_MZONE,1,nil) end
......
...@@ -25,7 +25,7 @@ function c72053645.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function c72053645.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_BP_TWICE) e1:SetCode(EFFECT_BP_TWICE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE then if Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) then
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c72053645.bpcon) e1:SetCondition(c72053645.bpcon)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,2) e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,2)
......
...@@ -21,7 +21,7 @@ end ...@@ -21,7 +21,7 @@ end
function c79205581.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c79205581.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) if Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.SelectYesNo(tp,aux.Stringid(79205581,1)) then and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and Duel.SelectYesNo(tp,aux.Stringid(79205581,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
...@@ -35,7 +35,7 @@ function c79205581.operation1(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function c79205581.operation1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c79205581.condition2(e,tp,eg,ep,ev,re,r,rp) function c79205581.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE and not e:GetHandler():IsStatus(STATUS_CHAINING) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and not e:GetHandler():IsStatus(STATUS_CHAINING)
end end
function c79205581.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c79205581.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
......
...@@ -38,7 +38,7 @@ function c81167171.clear(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c81167171.clear(e,tp,eg,ep,ev,re,r,rp)
c81167171[1]=false c81167171[1]=false
end end
function c81167171.condition(e,tp,eg,ep,ev,re,r,rp) function c81167171.condition(e,tp,eg,ep,ev,re,r,rp)
return c81167171[tp] and Duel.GetCurrentPhase()==PHASE_BATTLE return c81167171[tp] and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c81167171.activate(e,tp,eg,ep,ev,re,r,rp) function c81167171.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -12,7 +12,7 @@ function c81210420.initial_effect(c) ...@@ -12,7 +12,7 @@ function c81210420.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c81210420.condition(e,tp,eg,ep,ev,re,r,rp) function c81210420.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c81210420.filter(c) function c81210420.filter(c)
return not c:IsType(TYPE_TOKEN) return not c:IsType(TYPE_TOKEN)
......
...@@ -10,7 +10,7 @@ function c86778566.initial_effect(c) ...@@ -10,7 +10,7 @@ function c86778566.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c86778566.condition(e,tp,eg,ep,ev,re,r,rp) function c86778566.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c86778566.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86778566.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chkc then return chkc:IsLocation(LOCATION_MZONE) end
......
...@@ -13,7 +13,7 @@ function c87567063.initial_effect(c) ...@@ -13,7 +13,7 @@ function c87567063.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c87567063.condition(e,tp,eg,ep,ev,re,r,rp) function c87567063.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c87567063.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c87567063.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:IsControlerCanBeChanged() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end
......
...@@ -15,7 +15,7 @@ function c88305978.initial_effect(c) ...@@ -15,7 +15,7 @@ function c88305978.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c88305978.condition(e,tp,eg,ep,ev,re,r,rp) function c88305978.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end end
function c88305978.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c88305978.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -61,7 +61,7 @@ function c88482761.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function c88482761.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c88482761.atkcon(e,tp,eg,ep,ev,re,r,rp) function c88482761.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
and not Duel.CheckTiming(TIMING_BATTLE_START+TIMING_BATTLE_END) and not Duel.CheckTiming(TIMING_BATTLE_START+TIMING_BATTLE_END)
end end
function c88482761.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c88482761.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -12,7 +12,7 @@ function c8964854.initial_effect(c) ...@@ -12,7 +12,7 @@ function c8964854.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c8964854.condition(e,tp,eg,ep,ev,re,r,rp) function c8964854.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c8964854.filter(c,e,tp) function c8964854.filter(c,e,tp)
return c:GetAttackAnnouncedCount()>0 and Duel.IsExistingMatchingCard(c8964854.eqfilter,tp,LOCATION_SZONE,0,1,nil,e,tp,c) return c:GetAttackAnnouncedCount()>0 and Duel.IsExistingMatchingCard(c8964854.eqfilter,tp,LOCATION_SZONE,0,1,nil,e,tp,c)
......
...@@ -11,7 +11,7 @@ function c89914395.initial_effect(c) ...@@ -11,7 +11,7 @@ function c89914395.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c89914395.condition(e,tp,eg,ep,ev,re,r,rp) function c89914395.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() or Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c89914395.filter(c) function c89914395.filter(c)
return c:IsFaceup() and c:IsSetCard(0x4b) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) return c:IsFaceup() and c:IsSetCard(0x4b) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
......
...@@ -12,7 +12,7 @@ function c91677585.initial_effect(c) ...@@ -12,7 +12,7 @@ function c91677585.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c91677585.condition(e,tp,eg,ep,ev,re,r,rp) function c91677585.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c91677585.filter(c) function c91677585.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
......
...@@ -24,7 +24,7 @@ function c9365703.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,7 +24,7 @@ function c9365703.sumop(e,tp,eg,ep,ev,re,r,rp)
end end
function c9365703.dacon(e,tp,eg,ep,ev,re,r,rp) function c9365703.dacon(e,tp,eg,ep,ev,re,r,rp)
if Duel.CheckTiming(TIMING_BATTLE_START) or Duel.CheckTiming(TIMING_BATTLE_END) then return false end if Duel.CheckTiming(TIMING_BATTLE_START) or Duel.CheckTiming(TIMING_BATTLE_END) then return false end
return Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.GetCurrentChain()==0 return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and Duel.GetCurrentChain()==0
and e:GetHandler():GetFlagEffect(9365703)~=0 and e:GetHandler():GetFlagEffect(9365703)~=0
end end
function c9365703.daop(e,tp,eg,ep,ev,re,r,rp) function c9365703.daop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -32,7 +32,7 @@ function c93717133.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -32,7 +32,7 @@ function c93717133.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c93717133.rmcon(e,tp,eg,ep,ev,re,r,rp) function c93717133.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE and not e:GetHandler():IsStatus(STATUS_CHAINING) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and not e:GetHandler():IsStatus(STATUS_CHAINING)
end end
function c93717133.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c93717133.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -12,7 +12,7 @@ function c94634433.initial_effect(c) ...@@ -12,7 +12,7 @@ function c94634433.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c94634433.sccon(e,tp,eg,ep,ev,re,r,rp) function c94634433.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c94634433.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function c94634433.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
......
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
c98585345.lvdncount=1 c98585345.lvdncount=1
c98585345.lvdn={33776734} c98585345.lvdn={33776734}
function c98585345.descon(e,tp,eg,ep,ev,re,r,rp) function c98585345.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
function c98585345.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c98585345.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment