--[[ Dread Bastille - Rondo Bastiglia dell'Angoscia - Rondò Card Author: Swag Scripted by: XGlitchy30 ]] local s,id=GetID() function s.initial_effect(c) --[[You cannot Special Summon monsters during the turn you activate and resolve the following effect, except Rock monsters. You can discard this card; Special Summon 1 "Dread Bastille" monster from your Deck, except "Dread Bastille - Rondo".]] local e1=Effect.CreateEffect(c) e1:Desc(0) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:HOPT() e1:SetCost(s.spscost) e1:SetTarget(s.spstg) e1:SetOperation(s.spsop) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(_c) return _c:IsRace(RACE_ROCK) end) --[[You can banish 1 other "Dread Bastille" card from your GY; Special Summon this card from your GY, but banish it if it leaves the field.]] local e2=Effect.CreateEffect(c) e2:Desc(2) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:HOPT() e2:SetCost(s.spcost) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) --[[If this card is Special Summoned: You can target 1 card in your opponent's GY; banish it.]] local e3=Effect.CreateEffect(c) e3:Desc(3) e3:SetCategory(CATEGORY_REMOVE) e3:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY|EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:HOPT() e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) end --E1 function s.spscost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsDiscardable() and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET|EFFECT_FLAG_CLIENT_HINT|EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(function(_,c) return not c:IsRace(RACE_ROCK) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) return c:IsSetCard(ARCHE_DREAD_BASTILLE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.spstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExists(false,s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spsop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetMZoneCount(tp)>0 then local g=Duel.Select(HINTMSG_SPSUMMON,false,tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end end --E2 function s.cfilter(c,tp) return c:IsSetCard(ARCHE_DREAD_BASTILLE) and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExists(false,s.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end local g=Duel.Select(HINTMSG_REMOVE,false,tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return (e:IsCostChecked() or Duel.GetLocationCount(tp,LOCATION_MZONE)>0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetCardOperationInfo(c,CATEGORY_SPECIAL_SUMMON) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToChain() then Duel.SpecialSummonRedirect(e,c,0,tp,tp,false,false,POS_FACEUP) end end --E3 function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsInGY() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end if chk==0 then return Duel.IsExists(true,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end local g=Duel.Select(HINTMSG_REMOVE,true,tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) Duel.SetCardOperationInfo(g,CATEGORY_REMOVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToChain() then Duel.Banish(tc) end end