Commit cf73cea0 authored by DailyShana's avatar DailyShana

fix

parent c1f1cf3b
...@@ -4,18 +4,25 @@ function c57882509.initial_effect(c) ...@@ -4,18 +4,25 @@ function c57882509.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c57882509.condition)
e1:SetTarget(c57882509.target) e1:SetTarget(c57882509.target)
e1:SetOperation(c57882509.activate) e1:SetOperation(c57882509.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c57882509.target(e,tp,eg,ep,ev,re,r,rp,chk) function c57882509.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c57882509.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if chk==0 then return tc:IsOnField() end if chkc then return chkc==tc end
tc:CreateEffectRelation(e) if chk==0 then return tc and tc:IsOnField() and tc:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tc)
end end
function c57882509.activate(e,tp,eg,ep,ev,re,r,rp) function c57882509.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -12,7 +12,8 @@ function c70074904.initial_effect(c) ...@@ -12,7 +12,8 @@ function c70074904.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c70074904.condition(e,tp,eg,ep,ev,re,r,rp) function c70074904.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) local c=e:GetHandler()
return c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsStatus(STATUS_OPPO_BATTLE)
end end
function c70074904.target(e,tp,eg,ep,ev,re,r,rp,chk) function c70074904.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
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