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) ...@@ -15,7 +15,7 @@ function c13052.initial_effect(c)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c13052.condition2) e3:SetCondition(c13052.condition2)
e3:SetTarget(c13052.target2) e3:SetTarget(c13052.target2)
e3:SetOperation(c13052.operation) e3:SetOperation(c13052.activate)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--sol --sol
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -42,23 +42,21 @@ function c13052.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -42,23 +42,21 @@ function c13052.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c13052.activate(e,tp,eg,ep,ev,re,r,rp) function c13052.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() 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) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
function c13052.condition2(e,tp,eg,ep,ev,re,r,rp) 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 end
function c13052.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13052.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end local tg=re:GetHandler()
if chk==0 then return re:GetHandler():IsDestructable() end if chkc then return chkc==tg end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
end Duel.SetTargetCard(tg)
function c13052.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end end
function c13052.tgfilter(c) function c13052.tgfilter(c)
return c:IsDestructable() return c:IsDestructable()
end 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