function c1553030.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(1553030,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1,1553030) e1:SetRange(LOCATION_MZONE) e1:SetCost(c1553030.ct) e1:SetTarget(c1553030.tg) e1:SetOperation(c1553030.op) c:RegisterEffect(e1) --tuner local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(1553030,1)) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,1553030+1) e2:SetCost(c1553030.cost) e2:SetTarget(c1553030.target) e2:SetOperation(c1553030.operation) c:RegisterEffect(e2) end function c1553030.costfilter(c) return c:IsSetCard(0xFA0) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() end function c1553030.ct(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c1553030.costfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,c1553030.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function c1553030.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local t={} local i=1 local p=1 local lv=e:GetHandler():GetLevel() for i=2,5 do if lv~=i then t[p]=i p=p+1 end end t[p]=nil Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1553030,2)) e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t))) end function c1553030.op(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(e:GetLabel()) e1:SetReset(RESET_EVENT+0x1fe0000) c:RegisterEffect(e1) end end function c1553030.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function c1553030.filter(c) return c:IsFaceup() and c:IsSetCard(0xFA0) and not c:IsType(TYPE_TUNER) end function c1553030.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1553030.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c1553030.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,c1553030.filter,tp,LOCATION_MZONE,0,1,1,nil) end function c1553030.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) e1:SetReset(RESET_EVENT+0x1fe0000) tc:RegisterEffect(e1) end end