--Absolute Ritual Sorceress function c249001053.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c249001053.spcon) c:RegisterEffect(e1) --remove local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(91349449,0)) e3:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) e3:SetCost(c249001053.rmcost) e3:SetTarget(c249001053.rmtg) e3:SetOperation(c249001053.rmop) c:RegisterEffect(e3) end function c249001053.filter(c) return c:IsFaceup() and c:IsSetCard(0x225) and c:GetCode()~=249001053 end function c249001053.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c249001053.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function c249001053.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e:GetHandler():RegisterEffect(e1,true) end function c249001053.filter1(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToDeck() end function c249001053.filter2(c) return c:IsFaceup() and c:IsAbleToRemove() end function c249001053.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(c249001053.filter1,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingTarget(c249001053.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g1=Duel.SelectTarget(tp,c249001053.filter1,tp,LOCATION_REMOVED,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0) e:SetLabelObject(g1:GetFirst()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g2=Duel.SelectTarget(tp,c249001053.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g2,1,0,0) end function c249001053.rmop(e,tp,eg,ep,ev,re,r,rp) local tc1=e:GetLabelObject() local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc2=g:GetFirst() if tc1==tc2 then tc2=g:GetNext() end if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,2,REASON_EFFECT)~=0 then if tc2:IsFaceup() and tc2:IsRelateToEffect(e) then Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT) end end end