Commit feffa004 authored by GuGu's avatar GuGu

Update c25068.lua

parent 40c45352
Pipeline #32945 passed with stage
in 9 seconds
...@@ -48,19 +48,22 @@ function c25068.initial_effect(c) ...@@ -48,19 +48,22 @@ function c25068.initial_effect(c)
c25068.global_check=true c25068.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED) ge1:SetCode(EVENT_BATTLE_DESTROYED)
ge1:SetOperation(c25068.checkop) ge1:SetOperation(c25068.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function c25068.egfilter(c)
local d=c:GetBattleTarget()
return d and d:IsLocation(LOCATION_MZONE)
end
function c25068.checkop(e,tp,eg,ep,ev,re,r,rp) function c25068.checkop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local tg=eg:Filter(c25068.egfilter,nil)
local at=Duel.GetAttackTarget() local tc=tg:GetFirst()
local tc while tc do
if at and at:IsStatus(STATUS_BATTLE_DESTROYED) then tc=a end tc:GetBattleTarget():RegisterFlagEffect(25068,RESET_EVENT+0x1fe0000,0,1)
if a:IsStatus(STATUS_BATTLE_DESTROYED) then tc=at end tc=tg:GetNext()
if a:IsStatus(STATUS_BATTLE_DESTROYED) and at:IsStatus(STATUS_BATTLE_DESTROYED) then return end end
if tc then tc:RegisterFlagEffect(25068,RESET_EVENT+0x1fe0000,0,0) end
end end
function c25068.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c25068.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() 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