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)
c25068.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetCode(EVENT_BATTLE_DESTROYED)
ge1:SetOperation(c25068.checkop)
Duel.RegisterEffect(ge1,0)
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)
local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget()
local tc
if at and at:IsStatus(STATUS_BATTLE_DESTROYED) then tc=a end
if a:IsStatus(STATUS_BATTLE_DESTROYED) then tc=at end
if a:IsStatus(STATUS_BATTLE_DESTROYED) and at:IsStatus(STATUS_BATTLE_DESTROYED) then return end
if tc then tc:RegisterFlagEffect(25068,RESET_EVENT+0x1fe0000,0,0) end
local tg=eg:Filter(c25068.egfilter,nil)
local tc=tg:GetFirst()
while tc do
tc:GetBattleTarget():RegisterFlagEffect(25068,RESET_EVENT+0x1fe0000,0,1)
tc=tg:GetNext()
end
end
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
......
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