Commit 0a0657aa authored by EerieCode's avatar EerieCode

Fixed "Follow Wing"

In the original script, after the target left the field, the card couldn't find the battle target and kept giving an error message. I've added a check to ensue this doesn't happen.
parent 6db9cdf8
...@@ -87,6 +87,7 @@ end ...@@ -87,6 +87,7 @@ end
function c42776855.atkcon(e,tp,eg,ep,ev,re,r,rp) function c42776855.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetFirstCardTarget() local tc=c:GetFirstCardTarget()
if not tc then return false end
local bc=tc:GetBattleTarget() local bc=tc:GetBattleTarget()
return tc and tc:IsLocation(LOCATION_MZONE) and bc and bc:IsFaceup() and bc:IsLocation(LOCATION_MZONE) and bc:IsLevelAbove(5) return tc and tc:IsLocation(LOCATION_MZONE) and bc and bc:IsFaceup() and bc:IsLocation(LOCATION_MZONE) and bc:IsLevelAbove(5)
end end
...@@ -98,6 +99,7 @@ function c42776855.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,6 +99,7 @@ function c42776855.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=c:GetFirstCardTarget() local tc=c:GetFirstCardTarget()
if not tc then return false end
local bc=tc:GetBattleTarget() local bc=tc:GetBattleTarget()
local atk=bc:GetBaseAttack() local atk=bc:GetBaseAttack()
if bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)~=0 and bc:IsType(TYPE_MONSTER) then if bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)~=0 and bc:IsType(TYPE_MONSTER) then
......
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