--created by Slick, coded by Lyris --Stars Over Belgrade local s,id,o=GetID() function s.initial_effect(c) aux.AddCodeList(c,212111811) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:HOPT(true) e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e1:SetCondition(s.con) e1:SetCost(s.cost) e1:SetTarget(s.tg) e1:SetOperation(s.act) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetRange(LOCATION_GRAVE) e2:SetTarget(s.reptg) e2:SetOperation(s.repop) e2:SetValue(aux.TargetBoolFunction(s.rfilter)) c:RegisterEffect(e2) end function s.con(e,tp,eg,ep,ev,re,r,rp) return Duel.IsEnvironment(212111811,tp,LOCATION_FZONE) end function s.filter(c) return c:IsCode(212111811) and not c:IsPublic() and c:IsAbleToDeck() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() Duel.ConfirmCards(1-tp,tc) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PUBLIC) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(66) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) tc:RegisterEffect(e1) e:SetLabelObject(tc) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:IsCostChecked() and Duel.IsPlayerCanDraw(tp,3) end local tc=e:GetLabelObject() Duel.SetTargetCard(tc) Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) end function s.act(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then Duel.Draw(tp,3,REASON_EFFECT) end end function s.rfilter(c) return c:IsFaceupEx() and c:IsCode(212111811) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return eg:FilterCount(s.rfilter,nil)==1 and c:IsAbleToRemove() end return Duel.SelectEffectYesNo(tp,c,96) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) Duel.ConfirmCards(1-tp,eg:Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA+LOCATION_HAND)) end