Commit cfe3e23f authored by nekrozar's avatar nekrozar Committed by DailyShana

fix Black Luster Soldier - Envoy of the Beginning and so on (#669)

parent c78b0b7d
...@@ -45,7 +45,7 @@ function c10032958.reg(c,opt) ...@@ -45,7 +45,7 @@ function c10032958.reg(c,opt)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10032958,2)) e1:SetDescription(aux.Stringid(10032958,2))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLED) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c10032958.atcon) e1:SetCondition(c10032958.atcon)
e1:SetOperation(c10032958.atop) e1:SetOperation(c10032958.atop)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+0x1ff0000)
...@@ -66,9 +66,7 @@ function c10032958.reg(c,opt) ...@@ -66,9 +66,7 @@ function c10032958.reg(c,opt)
end end
end end
function c10032958.atcon(e,tp,eg,ep,ev,re,r,rp) function c10032958.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsChainAttackable()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE)
end end
function c10032958.atop(e,tp,eg,ep,ev,re,r,rp) function c10032958.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
...@@ -12,7 +12,7 @@ function c17313545.initial_effect(c) ...@@ -12,7 +12,7 @@ function c17313545.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17313545,0)) e2:SetDescription(aux.Stringid(17313545,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c17313545.atcon) e2:SetCondition(c17313545.atcon)
e2:SetOperation(c17313545.atop) e2:SetOperation(c17313545.atop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -22,9 +22,8 @@ function c17313545.distg(e,c) ...@@ -22,9 +22,8 @@ function c17313545.distg(e,c)
end end
function c17313545.atcon(e,tp,eg,ep,ev,re,r,rp) function c17313545.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() return aux.bdcon(e,tp,eg,ep,ev,re,r,rp) and c:IsChainAttackable()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:GetBattleTarget():IsAttribute(ATTRIBUTE_LIGHT)
and bc:IsAttribute(ATTRIBUTE_LIGHT)
end end
function c17313545.atop(e,tp,eg,ep,ev,re,r,rp) function c17313545.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
...@@ -11,7 +11,7 @@ function c23118924.initial_effect(c) ...@@ -11,7 +11,7 @@ function c23118924.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(23118924,0)) e2:SetDescription(aux.Stringid(23118924,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c23118924.atcon) e2:SetCondition(c23118924.atcon)
e2:SetOperation(c23118924.atop) e2:SetOperation(c23118924.atop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -40,10 +40,8 @@ function c23118924.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,10 +40,8 @@ function c23118924.disop(e,tp,eg,ep,ev,re,r,rp)
bc:RegisterEffect(e2) bc:RegisterEffect(e2)
end end
function c23118924.atcon(e,tp,eg,ep,ev,re,r,rp) function c23118924.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsChainAttackable()
local bc=c:GetBattleTarget() and Duel.IsExistingMatchingCard(c23118924.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WIND)
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE)
and not c:IsDisabled() and Duel.IsExistingMatchingCard(c23118924.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WIND)
end end
function c23118924.atop(e,tp,eg,ep,ev,re,r,rp) function c23118924.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
...@@ -13,7 +13,7 @@ function c30314994.initial_effect(c) ...@@ -13,7 +13,7 @@ function c30314994.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30314994,0)) e2:SetDescription(aux.Stringid(30314994,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c30314994.atcon) e2:SetCondition(c30314994.atcon)
e2:SetOperation(c30314994.atop) e2:SetOperation(c30314994.atop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -27,8 +27,8 @@ end ...@@ -27,8 +27,8 @@ end
function c30314994.atcon(e,tp,eg,ep,ev,re,r,rp) function c30314994.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE) return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsChainAttackable()
and not c:IsDisabled() and Duel.IsExistingMatchingCard(c30314994.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WIND) and Duel.IsExistingMatchingCard(c30314994.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WIND)
end end
function c30314994.atop(e,tp,eg,ep,ev,re,r,rp) function c30314994.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
...@@ -16,7 +16,7 @@ function c35638627.initial_effect(c) ...@@ -16,7 +16,7 @@ function c35638627.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(35638627,0)) e3:SetDescription(aux.Stringid(35638627,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED) e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c35638627.atcon) e3:SetCondition(c35638627.atcon)
e3:SetOperation(c35638627.atop) e3:SetOperation(c35638627.atop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -39,9 +39,7 @@ function c35638627.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,9 +39,7 @@ function c35638627.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c35638627.atcon(e,tp,eg,ep,ev,re,r,rp) function c35638627.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsChainAttackable()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE)
end end
function c35638627.atop(e,tp,eg,ep,ev,re,r,rp) function c35638627.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
...@@ -5,15 +5,13 @@ function c46427957.initial_effect(c) ...@@ -5,15 +5,13 @@ function c46427957.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(46427957,0)) e1:SetDescription(aux.Stringid(46427957,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLED) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c46427957.atcon) e1:SetCondition(c46427957.atcon)
e1:SetOperation(c46427957.atop) e1:SetOperation(c46427957.atop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c46427957.atcon(e,tp,eg,ep,ev,re,r,rp) function c46427957.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsChainAttackable()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE)
end end
function c46427957.atop(e,tp,eg,ep,ev,re,r,rp) function c46427957.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
...@@ -18,7 +18,7 @@ function c49202331.initial_effect(c) ...@@ -18,7 +18,7 @@ function c49202331.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49202331,1)) e2:SetDescription(aux.Stringid(49202331,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c49202331.atcon) e2:SetCondition(c49202331.atcon)
e2:SetCost(c49202331.atcost) e2:SetCost(c49202331.atcost)
...@@ -46,9 +46,8 @@ function c49202331.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,9 +46,8 @@ function c49202331.damop(e,tp,eg,ep,ev,re,r,rp)
end end
function c49202331.atcon(e,tp,eg,ep,ev,re,r,rp) function c49202331.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() return aux.bdcon(e,tp,eg,ep,ev,re,r,rp) and c:IsChainAttackable()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,3814632)
and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,3814632)
end end
function c49202331.atcost(e,tp,eg,ep,ev,re,r,rp,chk) function c49202331.atcost(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
......
...@@ -4,16 +4,15 @@ function c62315111.initial_effect(c) ...@@ -4,16 +4,15 @@ function c62315111.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62315111,0)) e1:SetDescription(aux.Stringid(62315111,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLED) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c62315111.atcon) e1:SetCondition(c62315111.atcon)
e1:SetOperation(c62315111.atop) e1:SetOperation(c62315111.atop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c62315111.atcon(e,tp,eg,ep,ev,re,r,rp) function c62315111.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() return aux.bdcon(e,tp,eg,ep,ev,re,r,rp) and c:IsChainAttackable()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:GetBattleTarget():GetCounter(0x100e)>0
and bc:GetCounter(0x100e)>0
end end
function c62315111.atop(e,tp,eg,ep,ev,re,r,rp) function c62315111.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
...@@ -12,7 +12,7 @@ function c65260293.initial_effect(c) ...@@ -12,7 +12,7 @@ function c65260293.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65260293,0)) e2:SetDescription(aux.Stringid(65260293,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c65260293.atcon) e2:SetCondition(c65260293.atcon)
e2:SetOperation(c65260293.atop) e2:SetOperation(c65260293.atop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -24,10 +24,8 @@ function c65260293.ctlcon(e) ...@@ -24,10 +24,8 @@ function c65260293.ctlcon(e)
return Duel.IsExistingMatchingCard(c65260293.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WATER) return Duel.IsExistingMatchingCard(c65260293.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WATER)
end end
function c65260293.atcon(e,tp,eg,ep,ev,re,r,rp) function c65260293.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsChainAttackable()
local bc=c:GetBattleTarget() and Duel.IsExistingMatchingCard(c65260293.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WIND)
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE)
and not c:IsDisabled() and Duel.IsExistingMatchingCard(c65260293.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WIND)
end end
function c65260293.atop(e,tp,eg,ep,ev,re,r,rp) function c65260293.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
...@@ -27,7 +27,7 @@ function c72989439.initial_effect(c) ...@@ -27,7 +27,7 @@ function c72989439.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(72989439,2)) e3:SetDescription(aux.Stringid(72989439,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED) e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c72989439.atcon) e3:SetCondition(c72989439.atcon)
e3:SetOperation(c72989439.atop) e3:SetOperation(c72989439.atop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -76,9 +76,8 @@ function c72989439.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,9 +76,8 @@ function c72989439.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
function c72989439.atcon(e,tp,eg,ep,ev,re,r,rp) function c72989439.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() return Duel.GetAttacker()==c and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and c:GetFlagEffect(72989439)==0
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:GetFlagEffect(72989439)==0 and c:IsChainAttackable()
and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE)
end end
function c72989439.atop(e,tp,eg,ep,ev,re,r,rp) function c72989439.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
...@@ -14,7 +14,7 @@ function c80367387.initial_effect(c) ...@@ -14,7 +14,7 @@ function c80367387.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(80367387,3)) e2:SetDescription(aux.Stringid(80367387,3))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c80367387.atcon) e2:SetCondition(c80367387.atcon)
e2:SetOperation(c80367387.atop) e2:SetOperation(c80367387.atop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -60,9 +60,7 @@ function c80367387.mtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,9 +60,7 @@ function c80367387.mtop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c80367387.atcon(e,tp,eg,ep,ev,re,r,rp) function c80367387.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsChainAttackable()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() and c:IsStatus(STATUS_OPPO_BATTLE)
end end
function c80367387.atop(e,tp,eg,ep,ev,re,r,rp) function c80367387.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
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