--created by NTA, coded by Lyris local s,id=GetID() function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_ACTIVATE) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetCondition(function(e,tp) return Duel.GetTurnPlayer()~=tp end) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end function s.spfilter(c,e,tp) return aux.NOT(aux.exccon)(e) and c:IsSetCard(0x4578) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local tg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) if ft<1 or #tg<1 then return end if Duel.IsPlayerAffectedByEffect(tp,id) then ft=1 end local g=Duel.GetMatchingGroup(aux.AND(Card.IsCode,Card.IsAbleToHand),tp,LOCATION_DECK,0,nil,id) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if Duel.SpecialSummon(tg:Select(tp,ft,ft,nil),0,tp,tp,false,false,POS_FACEUP)==0 or not Duel.GetOperatedGroup():IsExists(Card.IsCode,1,nil,id//100-1) or #g<1 or not Duel.SelectYesNo(tp,aux.Stringid(id//100-1,7)) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil) Duel.BreakEffect() Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end