--Raziel, Prodigy of the Silent Star local m=97569822 function c97569822.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xd0a1),4,2) c:EnableReviveLimit() --equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(97569822,0)) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(c97569822.condition) e1:SetTarget(c97569822.target) e1:SetOperation(c97569822.operation) c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(97569822,0)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCost(c97569822.cost1) e2:SetTarget(c97569822.target1) e2:SetOperation(c97569822.operation1) c:RegisterEffect(e2) end function c97569822.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) end function c97569822.filter(c,e,tp,ec) return c:IsSetCard(0xd0a2) and c:IsCanBeEffectTarget(e) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec) end function c97569822.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c97569822.filter(chkc,e,tp,e:GetHandler()) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c97569822.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) end local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local g=Duel.GetMatchingGroup(c97569822.filter,tp,LOCATION_GRAVE,0,nil,e,tp,e:GetHandler()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g1=g:Select(tp,1,1,nil) g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) if ft>1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(97569822,3)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g2=g:Select(tp,1,1,nil) g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode()) g1:Merge(g2) if ft>2 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(97569822,3)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) g2=g:Select(tp,1,1,nil) g1:Merge(g2) end end Duel.SetTargetCard(g1) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,g1:GetCount(),0,0) end function c97569822.operation(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) if ft