--Uzziel, Tamer of the Silent Star function c97569824.initial_effect(c) c:SetUniqueOnField(1,0,97569824) --synchro summon aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),aux.NonTuner(Card.IsSetCard,0xd0a1),1) c:EnableReviveLimit() --equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(97569824,0)) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(c97569824.condition) e1:SetTarget(c97569824.target) e1:SetOperation(c97569824.operation) c:RegisterEffect(e1) --tohand local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCondition(c97569824.regcon) e2:SetOperation(c97569824.regop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(97569824,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_PHASE+PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(c97569824.thcon) e3:SetTarget(c97569824.thtg) e3:SetOperation(c97569824.thop) c:RegisterEffect(e3) end function c97569824.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end function c97569824.filter(c,ec) return c:IsSetCard(0xd0a2) and c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) end function c97569824.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c97569824.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end function c97569824.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end local c=e:GetHandler() if c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectMatchingCard(tp,c97569824.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c) local tc=g:GetFirst() if tc then Duel.Equip(tp,tc,c,true) end end function c97569824.regcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) end function c97569824.regop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RegisterFlagEffect(97569824,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) end function c97569824.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(997569824)~=0 end function c97569824.thfilter(c) return (c:IsSetCard(0xd0a1) or c:IsSetCard(0xd0a2)) and c:IsAbleToHand() end function c97569824.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c97569824.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c97569824.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c97569824.thfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end