--Steinitz's Comeback --Script by XGlitchy30 function c25386878.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --draw local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(25386878,0)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetRange(LOCATION_SZONE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCountLimit(1,25386878) e2:SetTarget(c25386878.drtg) e2:SetOperation(c25386878.draw) c:RegisterEffect(e2) --banish backrow local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(25386878,1)) e3:SetCategory(CATEGORY_REMOVE) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetRange(LOCATION_SZONE) e3:SetCode(EVENT_FREE_CHAIN) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) e3:SetCost(c25386878.rmcost) e3:SetTarget(c25386878.rmtg) e3:SetOperation(c25386878.rmop) c:RegisterEffect(e3) end --filters function c25386878.drfilter(c) return c:IsSetCard(0x63d0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() end function c25386878.rmfilter(c,tp) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(c25386878.scfilter,tp,LOCATION_DECK,0,1,nil) end function c25386878.scfilter(c) return c:IsSetCard(0x63d0) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() end --draw function c25386878.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.IsExistingMatchingCard(c25386878.drfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end Duel.SetTargetPlayer(tp) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) end function c25386878.draw(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(p,c25386878.drfilter,p,LOCATION_HAND+LOCATION_GRAVE,0,1,5,nil) if g:GetCount()>0 then local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.ShuffleDeck(p) Duel.BreakEffect() Duel.Draw(p,ct-1,REASON_EFFECT) end end --banish backrow function c25386878.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsFaceup() and e:GetHandler():IsAbleToGraveAsCost() end Duel.SendtoGrave(e:GetHandler(),REASON_COST) end function c25386878.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c25386878.rmfilter(chkc,tp) end if chk==0 then return Duel.IsExistingTarget(c25386878.rmfilter,tp,0,LOCATION_ONFIELD,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,c25386878.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function c25386878.rmop(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(c25386878.scfilter,tp,LOCATION_DECK,0,1,nil) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c25386878.scfilter,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 end end