Commit f7ddf1ac authored by salix5's avatar salix5
parent 65e9890e
...@@ -3834,13 +3834,13 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3834,13 +3834,13 @@ int32 field::process_battle_command(uint16 step) {
core.units.begin()->ptarget = 0; core.units.begin()->ptarget = 0;
card_set ing; card_set ing;
card_set ed; card_set ed;
if(core.attacker->is_status(STATUS_BATTLE_DESTROYED)) { if(core.attacker->is_status(STATUS_BATTLE_DESTROYED) && (core.attacker->current.reason & REASON_BATTLE)) {
raise_single_event(core.attack_target, 0, EVENT_BATTLE_DESTROYING, 0, core.attacker->current.reason, core.attack_target->current.controler, 0, 1); raise_single_event(core.attack_target, 0, EVENT_BATTLE_DESTROYING, 0, core.attacker->current.reason, core.attack_target->current.controler, 0, 1);
raise_single_event(core.attacker, 0, EVENT_BATTLE_DESTROYED, 0, core.attacker->current.reason, core.attack_target->current.controler, 0, 0); raise_single_event(core.attacker, 0, EVENT_BATTLE_DESTROYED, 0, core.attacker->current.reason, core.attack_target->current.controler, 0, 0);
ing.insert(core.attack_target); ing.insert(core.attack_target);
ed.insert(core.attacker); ed.insert(core.attacker);
} }
if(core.attack_target && core.attack_target->is_status(STATUS_BATTLE_DESTROYED)) { if(core.attack_target && core.attack_target->is_status(STATUS_BATTLE_DESTROYED) && (core.attack_target->current.reason & REASON_BATTLE)) {
raise_single_event(core.attacker, 0, EVENT_BATTLE_DESTROYING, 0, core.attack_target->current.reason, core.attacker->current.controler, 0, 0); raise_single_event(core.attacker, 0, EVENT_BATTLE_DESTROYING, 0, core.attack_target->current.reason, core.attacker->current.controler, 0, 0);
raise_single_event(core.attack_target, 0, EVENT_BATTLE_DESTROYED, 0, core.attack_target->current.reason, core.attacker->current.controler, 0, 1); raise_single_event(core.attack_target, 0, EVENT_BATTLE_DESTROYED, 0, core.attack_target->current.reason, core.attacker->current.controler, 0, 1);
ing.insert(core.attacker); ing.insert(core.attacker);
......
...@@ -12,8 +12,7 @@ function c11012887.initial_effect(c) ...@@ -12,8 +12,7 @@ function c11012887.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c11012887.condition(e,tp,eg,ep,ev,re,r,rp) function c11012887.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return e:GetHandler():IsRelateToBattle()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end end
function c11012887.filter(c,e,tp) function c11012887.filter(c,e,tp)
return c:IsSetCard(0x22) and c:IsAttackBelow(1700) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x22) and c:IsAttackBelow(1700) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -23,10 +23,8 @@ function c13521194.initial_effect(c) ...@@ -23,10 +23,8 @@ function c13521194.initial_effect(c)
end end
function c13521194.damcondition(e,tp,eg,ep,ev,re,r,rp) function c13521194.damcondition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local a=Duel.GetAttacker() local bc=c:GetBattleTarget()
local d=Duel.GetAttackTarget() return c:IsRelateToBattle() and bc and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
and ((c==a and d:GetLocation()==LOCATION_GRAVE) or (c==d and a:GetLocation()==LOCATION_GRAVE))
end 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
......
...@@ -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:IsReason(REASON_BATTLE) and bc:IsLocation(LOCATION_GRAVE) and c:IsChainAttackable(2,true) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) return bc and 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()
......
...@@ -12,7 +12,7 @@ function c57839750.initial_effect(c) ...@@ -12,7 +12,7 @@ function c57839750.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c57839750.condition(e,tp,eg,ep,ev,re,r,rp) function c57839750.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE)
end end
function c57839750.filter(c,e,tp) function c57839750.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_WATER) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_WATER)
......
...@@ -13,11 +13,8 @@ function c58820853.initial_effect(c) ...@@ -13,11 +13,8 @@ function c58820853.initial_effect(c)
end end
function c58820853.condition(e,tp,eg,ep,ev,re,r,rp) function c58820853.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local a=Duel.GetAttacker() local bc=c:GetBattleTarget()
local d=Duel.GetAttackTarget() return c:IsRelateToBattle() and bc and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
if a~=c then d=a end
return c:IsRelateToBattle() and c:IsFaceup()
and d and d:GetLocation()==LOCATION_GRAVE and d:IsType(TYPE_MONSTER)
end 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)
......
...@@ -12,7 +12,7 @@ function c60806437.initial_effect(c) ...@@ -12,7 +12,7 @@ function c60806437.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c60806437.condition(e,tp,eg,ep,ev,re,r,rp) function c60806437.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE)
end end
function c60806437.filter(c,e,tp) function c60806437.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_FIRE) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_FIRE)
......
...@@ -15,8 +15,7 @@ end ...@@ -15,8 +15,7 @@ end
function c80321197.spcon(e,tp,eg,ep,ev,re,r,rp) function c80321197.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end return c:IsRelateToBattle() and bc and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
return bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end 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())
......
...@@ -12,7 +12,7 @@ function c83011277.initial_effect(c) ...@@ -12,7 +12,7 @@ function c83011277.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c83011277.condition(e,tp,eg,ep,ev,re,r,rp) function c83011277.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE)
end end
function c83011277.filter(c,e,tp) function c83011277.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -12,7 +12,7 @@ function c84834865.initial_effect(c) ...@@ -12,7 +12,7 @@ function c84834865.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c84834865.condition(e,tp,eg,ep,ev,re,r,rp) function c84834865.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE)
end end
function c84834865.filter(c,e,tp) function c84834865.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -12,7 +12,7 @@ function c95956346.initial_effect(c) ...@@ -12,7 +12,7 @@ function c95956346.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c95956346.condition(e,tp,eg,ep,ev,re,r,rp) function c95956346.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE)
end end
function c95956346.filter(c,e,tp) function c95956346.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_LIGHT)
......
...@@ -12,7 +12,7 @@ function c97017120.initial_effect(c) ...@@ -12,7 +12,7 @@ function c97017120.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c97017120.condition(e,tp,eg,ep,ev,re,r,rp) function c97017120.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE)
end end
function c97017120.filter(c,e,tp) function c97017120.filter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_EARTH) return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_EARTH)
......
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