--Universe Union Dragon local s,id=GetID() function s.initial_effect(c) --pendulum summon Pendulum.AddProcedure(c,false) --fusion summon c:EnableReviveLimit() Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x25E),2) --dmg and destroy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) 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) --place in pendulum zone local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_DESTROYED) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCondition(s.pencon) e2:SetTarget(s.pentg) e2:SetOperation(s.penop) c:RegisterEffect(e2) 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 Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,s.thfilter,tp,0,LOCATION_MZONE,1,1,nil) local d=g:GetFirst():GetAttack() Duel.SetTargetPlayer(1-tp) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,d) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) if tc and tc:IsRelateToEffect(e) and Duel.Damage(p,tc:GetAttack(),REASON_EFFECT) then Duel.Destroy(tc, REASON_DESTROY) end end -- place in pendulum zone functions --s.pendulum_level = 4 function s.pencon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() end function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end end function s.penop(e,tp,eg,ep,ev,re,r,rp) if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end end