--Dustflaw Summoner function c89217833.initial_effect(c) --ritual level local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_RITUAL_LEVEL) e1:SetValue(c89217833.rlevel) c:RegisterEffect(e1) --place local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(89217833,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,89217833) e2:SetCost(c89217833.cost) e2:SetTarget(c89217833.target) e2:SetOperation(c89217833.operation) c:RegisterEffect(e2) end function c89217833.rlevel(e,c) local lv=e:GetHandler():GetLevel() if c:IsSetCard(0xff15) then local clv=c:GetLevel() return lv*65536+clv else return lv end end function c89217833.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsDiscardable() end Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) end function c89217833.filter(c) return c:IsSetCard(0xff15) and bit.band(c:GetType(),0x81)==0x81 and not c:IsForbidden() end function c89217833.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c89217833.filter,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end end function c89217833.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c89217833.filter),tp,LOCATION_DECK,0,1,1,nil) local tc=g:GetFirst() if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+0x1fc0000) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) tc:RegisterEffect(e1) end end