2021-12-01 19:25:02 +01:00
|
|
|
--Universe Union Dragon
|
|
|
|
|
local s,id=GetID()
|
|
|
|
|
function s.initial_effect(c)
|
|
|
|
|
--pendulum summon
|
|
|
|
|
Pendulum.AddProcedure(c,false)
|
2021-12-04 15:40:15 +01:00
|
|
|
--fusion summon
|
2021-12-03 20:22:46 +01:00
|
|
|
c:EnableReviveLimit()
|
2021-12-04 15:40:15 +01:00
|
|
|
Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x25E),2)
|
2021-12-15 19:05:48 +01:00
|
|
|
--tohand
|
2021-12-12 17:03:38 +01:00
|
|
|
local e1=Effect.CreateEffect(c)
|
|
|
|
|
e1:SetDescription(aux.Stringid(id,0))
|
|
|
|
|
e1:SetCategory(CATEGORY_DAMAGE)
|
2021-12-15 19:05:48 +01:00
|
|
|
e1:SetType(EFFECT_TYPE_IGNITION)
|
2021-12-12 17:03:38 +01:00
|
|
|
e1:SetCode(EVENT_FREE_CHAIN)
|
|
|
|
|
e1:SetRange(LOCATION_MZONE)
|
|
|
|
|
e1:SetCountLimit(1,id)
|
|
|
|
|
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
|
|
|
|
|
e1:SetTarget(s.thtg)
|
|
|
|
|
e1:SetOperation(s.thop)
|
|
|
|
|
c:RegisterEffect(e1)
|
|
|
|
|
end
|
|
|
|
|
--damage effect
|
|
|
|
|
function s.thfilter(c)
|
|
|
|
|
return c:IsFaceup() and c:IsAttackAbove(1)
|
|
|
|
|
end
|
|
|
|
|
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
|
|
|
|
|
if chkc then return chkc:IsControler(1-tp) and s.thfilter(chkc) end
|
|
|
|
|
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,0,LOCATION_MZONE,1,nil) end
|
2021-12-13 19:04:25 +01:00
|
|
|
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
|
2021-12-12 17:03:38 +01:00
|
|
|
local g=Duel.SelectTarget(tp,s.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
|
|
|
|
|
local d=g:GetFirst():GetAttack()
|
2021-12-15 19:05:48 +01:00
|
|
|
Duel.SetTargetPlayer(1-tp)
|
2021-12-12 17:03:38 +01:00
|
|
|
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,d)
|
|
|
|
|
end
|
|
|
|
|
function s.thop(e,tp,eg,ep,ev,re,r,rp)
|
2021-12-15 19:05:48 +01:00
|
|
|
local tc=Duel.GetFirstTarget()
|
2021-12-12 17:03:38 +01:00
|
|
|
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
|
|
|
|
|
if tc and tc:IsRelateToEffect(e) and Duel.Damage(p,tc:GetAttack(),REASON_EFFECT) then
|
2021-12-13 19:04:25 +01:00
|
|
|
Duel.Destroy(tc, REASON_DESTROY)
|
2021-12-12 17:03:38 +01:00
|
|
|
end
|
2021-12-04 15:40:15 +01:00
|
|
|
end
|