Commit 7dcbf8b7 authored by salix5's avatar salix5

battle destroying

parent db2b5d49
...@@ -34,13 +34,10 @@ function c17286057.initial_effect(c) ...@@ -34,13 +34,10 @@ function c17286057.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--chain attack --chain attack
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(17286057,1)) e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetCode(EFFECT_EXTRA_ATTACK)
e5:SetRange(LOCATION_MZONE) e5:SetValue(1)
e5:SetCountLimit(1)
e5:SetCode(EVENT_BATTLE_DESTROYING)
e5:SetCondition(c17286057.atcon) e5:SetCondition(c17286057.atcon)
e5:SetOperation(c17286057.atop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c17286057.hspcon(e,c) function c17286057.hspcon(e,c)
...@@ -84,23 +81,5 @@ function c17286057.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,23 +81,5 @@ function c17286057.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
function c17286057.atcon(e,tp,eg,ep,ev,re,r,rp) function c17286057.atcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and e:GetHandler():IsChainAttackable() return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c17286057.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetLabelObject(e1)
e2:SetOperation(aux.atrst)
e2:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e2,tp)
end end
...@@ -17,7 +17,7 @@ function c21313376.initial_effect(c) ...@@ -17,7 +17,7 @@ function c21313376.initial_effect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c21313376.descon) e2:SetCondition(aux.bdogcon)
e2:SetCost(c21313376.descost) e2:SetCost(c21313376.descost)
e2:SetTarget(c21313376.destg) e2:SetTarget(c21313376.destg)
e2:SetOperation(c21313376.desop) e2:SetOperation(c21313376.desop)
...@@ -27,11 +27,6 @@ c21313376.xyz_number=14 ...@@ -27,11 +27,6 @@ c21313376.xyz_number=14
function c21313376.refcon(e,re,val,r,rp,rc) function c21313376.refcon(e,re,val,r,rp,rc)
return bit.band(r,REASON_EFFECT)~=0 and rp~=e:GetHandlerPlayer() return bit.band(r,REASON_EFFECT)~=0 and rp~=e:GetHandlerPlayer()
end end
function c21313376.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function c21313376.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c21313376.descost(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
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -15,7 +15,7 @@ function c218704.initial_effect(c) ...@@ -15,7 +15,7 @@ function c218704.initial_effect(c)
e2:SetDescription(aux.Stringid(218704,0)) e2:SetDescription(aux.Stringid(218704,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c218704.skipcon) e2:SetCondition(aux.bdocon)
e2:SetOperation(c218704.skipop) e2:SetOperation(c218704.skipop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -33,10 +33,6 @@ function c218704.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -33,10 +33,6 @@ function c218704.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,c218704.spfilter,tp,LOCATION_GRAVE,0,2,2,nil) local g=Duel.SelectMatchingCard(tp,c218704.spfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c218704.skipcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c218704.skipop(e,tp,eg,ep,ev,re,r,rp) function c218704.skipop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -38,7 +38,7 @@ function c22093873.initial_effect(c) ...@@ -38,7 +38,7 @@ function c22093873.initial_effect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCode(EVENT_BATTLE_DESTROYING) e5:SetCode(EVENT_BATTLE_DESTROYING)
e5:SetCondition(c22093873.drcon) e5:SetCondition(aux.bdogcon)
e5:SetTarget(c22093873.drtg) e5:SetTarget(c22093873.drtg)
e5:SetOperation(c22093873.drop) e5:SetOperation(c22093873.drop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
...@@ -55,12 +55,6 @@ function c22093873.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,12 +55,6 @@ function c22093873.checkop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(22093873,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(22093873,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
e:GetLabelObject():SetLabel(fid) e:GetLabelObject():SetLabel(fid)
end end
function c22093873.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and c:IsFaceup()
and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and bc:IsReason(REASON_BATTLE)
end
function c22093873.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c22093873.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
......
...@@ -17,7 +17,7 @@ function c22160245.initial_effect(c) ...@@ -17,7 +17,7 @@ function c22160245.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c22160245.damcon) e2:SetCondition(aux.bdgcon)
e2:SetTarget(c22160245.damtg) e2:SetTarget(c22160245.damtg)
e2:SetOperation(c22160245.damop) e2:SetOperation(c22160245.damop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -30,11 +30,6 @@ end ...@@ -30,11 +30,6 @@ end
function c22160245.splimit(e,se,sp,st) function c22160245.splimit(e,se,sp,st)
return st==SUMMON_TYPE_FUSION+0x10 return st==SUMMON_TYPE_FUSION+0x10
end end
function c22160245.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function c22160245.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c22160245.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -55,7 +55,7 @@ function c22200403.initial_effect(c) ...@@ -55,7 +55,7 @@ function c22200403.initial_effect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_BATTLE_DESTROYING) e7:SetCode(EVENT_BATTLE_DESTROYING)
e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e7:SetCondition(c22200403.effcon) e7:SetCondition(c22200403.drcon1)
e7:SetTarget(c22200403.drtg) e7:SetTarget(c22200403.drtg)
e7:SetOperation(c22200403.drop) e7:SetOperation(c22200403.drop)
e7:SetLabel(4) e7:SetLabel(4)
...@@ -67,7 +67,7 @@ function c22200403.initial_effect(c) ...@@ -67,7 +67,7 @@ function c22200403.initial_effect(c)
e8:SetCode(EVENT_DESTROYED) e8:SetCode(EVENT_DESTROYED)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e8:SetRange(LOCATION_MZONE) e8:SetRange(LOCATION_MZONE)
e8:SetCondition(c22200403.drcon) e8:SetCondition(c22200403.drcon2)
e8:SetTarget(c22200403.drtg) e8:SetTarget(c22200403.drtg)
e8:SetOperation(c22200403.drop) e8:SetOperation(c22200403.drop)
e8:SetLabel(4) e8:SetLabel(4)
...@@ -96,6 +96,10 @@ function c22200403.atcon(e) ...@@ -96,6 +96,10 @@ function c22200403.atcon(e)
return c22200403.effcon(e) return c22200403.effcon(e)
and Duel.IsExistingMatchingCard(Card.IsAttackable,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(Card.IsAttackable,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end end
function c22200403.drcon1(e,tp,eg,ep,ev,re,r,rp)
return c22200403.effcon(e)
and e:GetHandler():IsRelateToBattle()
end
function c22200403.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c22200403.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
...@@ -106,7 +110,7 @@ function c22200403.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,7 +110,7 @@ function c22200403.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function c22200403.drcon(e,tp,eg,ep,ev,re,r,rp) function c22200403.drcon2(e,tp,eg,ep,ev,re,r,rp)
return c22200403.effcon(e) return c22200403.effcon(e)
and bit.band(r,REASON_EFFECT)~=0 and re:GetHandler()==e:GetHandler() and bit.band(r,REASON_EFFECT)~=0 and re:GetHandler()==e:GetHandler()
end end
...@@ -14,11 +14,7 @@ function c22377815.initial_effect(c) ...@@ -14,11 +14,7 @@ function c22377815.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c22377815.con(e,tp,eg,ep,ev,re,r,rp) function c22377815.con(e,tp,eg,ep,ev,re,r,rp)
if not aux.IsDualState(e) then return false end return aux.IsDualState(e) and bdogcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
return bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER)
end end
function c22377815.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c22377815.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -6,18 +6,11 @@ function c22587018.initial_effect(c) ...@@ -6,18 +6,11 @@ function c22587018.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCondition(c22587018.spcon) e1:SetCondition(aux.bdogcon)
e1:SetTarget(c22587018.sptg) e1:SetTarget(c22587018.sptg)
e1:SetOperation(c22587018.spop) e1:SetOperation(c22587018.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c22587018.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local t=Duel.GetAttackTarget()
if ev==1 then t=Duel.GetAttacker() end
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
return t:GetLocation()==LOCATION_GRAVE and t:IsType(TYPE_MONSTER)
end
function c22587018.filter(c,e,tp) function c22587018.filter(c,e,tp)
return c:IsCode(22587018) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(22587018) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
......
...@@ -41,7 +41,7 @@ function c23454876.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function c23454876.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function c23454876.damcon(e,tp,eg,ep,ev,re,r,rp) function c23454876.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,51960178) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,51960178) and aux.bdocon(e,tp,eg,ep,ev,re,r,rp)
end end
function c23454876.damcost(e,tp,eg,ep,ev,re,r,rp,chk) function c23454876.damcost(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
......
...@@ -47,14 +47,13 @@ end ...@@ -47,14 +47,13 @@ end
function c24104865.checkop2(e,tp,eg,ep,ev,re,r,rp) function c24104865.checkop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if e:GetLabelObject():GetLabel()==0 then return end if e:GetLabelObject():GetLabel()==0 then return end
local t=Duel.GetAttackTarget() local t=c:GetBattleTarget()
if t==c then t=Duel.GetAttacker() end
local g=e:GetLabelObject():GetLabelObject() local g=e:GetLabelObject():GetLabelObject()
if c:GetFieldID()~=e:GetLabel() then if c:GetFieldID()~=e:GetLabel() then
g:Clear() g:Clear()
e:SetLabel(c:GetFieldID()) e:SetLabel(c:GetFieldID())
end end
if c:IsRelateToBattle() and t:IsLocation(LOCATION_GRAVE) and t:IsReason(REASON_BATTLE) then if aux.bdgcon(e,tp,eg,ep,ev,re,r,rp) then
g:AddCard(t) g:AddCard(t)
t:RegisterFlagEffect(24104865,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1) t:RegisterFlagEffect(24104865,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE,0,1)
end end
......
...@@ -17,7 +17,7 @@ function c25366484.initial_effect(c) ...@@ -17,7 +17,7 @@ function c25366484.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c25366484.damcon) e2:SetCondition(aux.bdgcon)
e2:SetTarget(c25366484.damtg) e2:SetTarget(c25366484.damtg)
e2:SetOperation(c25366484.damop) e2:SetOperation(c25366484.damop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -33,11 +33,6 @@ end ...@@ -33,11 +33,6 @@ end
function c25366484.splimit(e,se,sp,st) function c25366484.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end end
function c25366484.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function c25366484.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c25366484.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local bc=e:GetHandler():GetBattleTarget() local bc=e:GetHandler():GetBattleTarget()
......
...@@ -26,7 +26,7 @@ function c25853045.initial_effect(c) ...@@ -26,7 +26,7 @@ function c25853045.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c25853045.descon) e3:SetCondition(aux.bdocon)
e3:SetTarget(c25853045.destg) e3:SetTarget(c25853045.destg)
e3:SetOperation(c25853045.desop) e3:SetOperation(c25853045.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -45,10 +45,6 @@ function c25853045.reptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,10 +45,6 @@ function c25853045.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
else return false end else return false end
end end
function c25853045.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c25853045.filter(c) function c25853045.filter(c)
return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
......
...@@ -25,11 +25,7 @@ function c2619149.initial_effect(c) ...@@ -25,11 +25,7 @@ function c2619149.initial_effect(c)
end end
function c2619149.scon(e,tp,eg,ep,ev,re,r,rp) function c2619149.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local a=Duel.GetAttacker() return c:GetFlagEffect(2619149)>0 and aux.bdogcon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return c:GetFlagEffect(2619149)>0
and ((c==a and d:GetLocation()==LOCATION_GRAVE and d:IsType(TYPE_MONSTER))
or (c==d and a:GetLocation()==LOCATION_GRAVE and a:IsType(TYPE_MONSTER)))
end end
function c2619149.sfilter(c) function c2619149.sfilter(c)
return c:IsSetCard(0x19) and c:IsAbleToHand() return c:IsSetCard(0x19) and c:IsAbleToHand()
......
...@@ -5,14 +5,10 @@ function c26669055.initial_effect(c) ...@@ -5,14 +5,10 @@ function c26669055.initial_effect(c)
e1:SetDescription(aux.Stringid(26669055,0)) e1:SetDescription(aux.Stringid(26669055,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c26669055.condition) e1:SetCondition(aux.bdocon)
e1:SetOperation(c26669055.operation) e1:SetOperation(c26669055.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c26669055.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c26669055.operation(e,tp,eg,ep,ev,re,r,rp) function c26669055.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -7,18 +7,12 @@ function c26704411.initial_effect(c) ...@@ -7,18 +7,12 @@ function c26704411.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c26704411.con) e1:SetCondition(aux.bdogcon)
e1:SetCost(c26704411.cost) e1:SetCost(c26704411.cost)
e1:SetTarget(c26704411.tg) e1:SetTarget(c26704411.tg)
e1:SetOperation(c26704411.op) e1:SetOperation(c26704411.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c26704411.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (c==a and d:IsLocation(LOCATION_GRAVE)) or (c==d and a:IsLocation(LOCATION_GRAVE))
end
function c26704411.costfilter(c) function c26704411.costfilter(c)
return c:IsSetCard(0x35) and c:IsDiscardable() return c:IsSetCard(0x35) and c:IsDiscardable()
end end
......
...@@ -12,11 +12,8 @@ function c26885836.initial_effect(c) ...@@ -12,11 +12,8 @@ function c26885836.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c26885836.eqcon(e,tp,eg,ep,ev,re,r,rp) function c26885836.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
e:SetLabelObject(tc) e:SetLabelObject(tc)
return tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) return aux.bdogcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c26885836.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) function c26885836.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsHasEffect(26885836) if chk==0 then return not e:GetHandler():IsHasEffect(26885836)
......
...@@ -13,12 +13,8 @@ function c26993374.initial_effect(c) ...@@ -13,12 +13,8 @@ function c26993374.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c26993374.tdcon(e,tp,eg,ep,ev,re,r,rp) function c26993374.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local t=Duel.GetAttackTarget()
if ev==1 then t=Duel.GetAttacker() end
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
e:SetLabelObject(t) e:SetLabelObject(t)
return t:GetLocation()==LOCATION_GRAVE and t:IsType(TYPE_MONSTER) return aux.bdogcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c26993374.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) function c26993374.tdcost(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
......
...@@ -7,18 +7,11 @@ function c27944249.initial_effect(c) ...@@ -7,18 +7,11 @@ function c27944249.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c27944249.condition) e1:SetCondition(aux.bdgcon)
e1:SetTarget(c27944249.target) e1:SetTarget(c27944249.target)
e1:SetOperation(c27944249.operation) e1:SetOperation(c27944249.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c27944249.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return c:IsRelateToBattle() and ((a==c and d:IsLocation(LOCATION_GRAVE) and d:IsType(TYPE_MONSTER))
or (d==c and a:IsLocation(LOCATION_GRAVE) and a:IsType(TYPE_MONSTER)))
end
function c27944249.filter(c,e,tp) function c27944249.filter(c,e,tp)
return c:IsLevelBelow(3) and c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(3) and c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
......
...@@ -7,18 +7,12 @@ function c282886.initial_effect(c) ...@@ -7,18 +7,12 @@ function c282886.initial_effect(c)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCountLimit(1,282886) e1:SetCountLimit(1,282886)
e1:SetCondition(c282886.spcon) e1:SetCondition(aux.bdogcon)
e1:SetCost(c282886.spcost) e1:SetCost(c282886.spcost)
e1:SetTarget(c282886.sptg) e1:SetTarget(c282886.sptg)
e1:SetOperation(c282886.spop) e1:SetOperation(c282886.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c282886.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and c:IsFaceup()
and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and bc:IsReason(REASON_BATTLE)
end
function c282886.cfilter(c) function c282886.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end 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