Commit 3a6aa2d8 authored by GuGu's avatar GuGu

Update c13052.lua

parent 6c90cc1f
Pipeline #31181 passed with stage
in 25 seconds
......@@ -15,7 +15,7 @@ function c13052.initial_effect(c)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c13052.condition2)
e3:SetTarget(c13052.target2)
e3:SetOperation(c13052.operation)
e3:SetOperation(c13052.activate)
c:RegisterEffect(e3)
--sol
local e2=Effect.CreateEffect(c)
......@@ -42,23 +42,21 @@ function c13052.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c13052.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c13052.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOnField() and re:IsActiveType(TYPE_MONSTER)
return re:GetHandler():IsOnField() and re:IsActiveType(TYPE_MONSTER) and re:GetHandlerPlayer()~=tp
end
function c13052.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return re:GetHandler():IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c13052.operation(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
local tg=re:GetHandler()
if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
end
function c13052.tgfilter(c)
return c:IsDestructable()
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