Commit c28710cc authored by salix5's avatar salix5

battle destroy

parent 4199bf67
...@@ -6,7 +6,7 @@ function c13521194.initial_effect(c) ...@@ -6,7 +6,7 @@ function c13521194.initial_effect(c)
e1:SetCategory(CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DAMAGE)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCondition(c13521194.damcondition) e1:SetCondition(aux.bdcon1)
e1:SetTarget(c13521194.damtarget) e1:SetTarget(c13521194.damtarget)
e1:SetOperation(c13521194.damoperation) e1:SetOperation(c13521194.damoperation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -21,11 +21,6 @@ function c13521194.initial_effect(c) ...@@ -21,11 +21,6 @@ function c13521194.initial_effect(c)
e2:SetOperation(c13521194.spoperation) e2:SetOperation(c13521194.spoperation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c13521194.damcondition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function c13521194.damtarget(e,tp,eg,ep,ev,re,r,rp,chk) function c13521194.damtarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
......
...@@ -32,7 +32,7 @@ end ...@@ -32,7 +32,7 @@ end
function c21435914.atcon(e,tp,eg,ep,ev,re,r,rp) function c21435914.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:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and c:IsChainAttackable(2,true) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) return bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and c:IsChainAttackable(2,true) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
end end
function c21435914.atop(e,tp,eg,ep,ev,re,r,rp) function c21435914.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -6,16 +6,11 @@ function c58820853.initial_effect(c) ...@@ -6,16 +6,11 @@ function c58820853.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
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(c58820853.condition) e1:SetCondition(aux.bdcon1)
e1:SetTarget(c58820853.target) e1:SetTarget(c58820853.target)
e1:SetOperation(c58820853.operation) e1:SetOperation(c58820853.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c58820853.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function c58820853.filter(c,e,tp) function c58820853.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(1500) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
......
...@@ -8,15 +8,10 @@ function c80321197.initial_effect(c) ...@@ -8,15 +8,10 @@ function c80321197.initial_effect(c)
e1:SetDescription(aux.Stringid(80321197,0)) e1:SetDescription(aux.Stringid(80321197,0))
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCondition(c80321197.spcon) e1:SetCondition(aux.bdcon1)
e1:SetOperation(c80321197.spop) e1:SetOperation(c80321197.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c80321197.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function c80321197.spop(e,tp,eg,ep,ev,re,r,rp) function c80321197.spop(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)
......
...@@ -948,6 +948,13 @@ function Auxiliary.disfilter1(c) ...@@ -948,6 +948,13 @@ function Auxiliary.disfilter1(c)
or c:IsType(TYPE_TRAPMONSTER) or c:IsType(TYPE_TRAPMONSTER)
end end
function Auxiliary.atrst(e,tp,eg,ep,ev,re,r,rp) function Auxiliary.atrst(e,tp,eg,ep,ev,re,r,rp)
--reset of chain attack
local e1=e:GetLabelObject() local e1=e:GetLabelObject()
if eg:GetFirst()~=e1:GetHandler() then e1:Reset() end if eg:GetFirst()~=e1:GetHandler() then e1:Reset() end
end end
function Auxiliary.bdcon1(e,tp,eg,ep,ev,re,r,rp)
--condition of EVENT_BATTLE_DESTROYING + to_grave
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
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