-- function c500313947.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(500313947,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_HAND) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCondition(c500313947.spcon) e1:SetTarget(c500313947.sptg) e1:SetOperation(c500313947.spop) c:RegisterEffect(e1) --lvchange local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(500313947,0)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,500313947) e2:SetTarget(c500313947.lvtg) e2:SetOperation(c500313947.lvop) c:RegisterEffect(e2) end function c500313947.spcon(e,tp,eg,ep,ev,re,r,rp) local ec=eg:GetFirst() return ec:IsControler(tp) and ec:IsLevelBelow(4) end function c500313947.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c500313947.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) c:CompleteProcedure() end end function c500313947.lvfilter(c,lv) local clv=c:GetLevel() return c:IsFaceup() and c:IsSetCard(0x85a) and clv>0 and clv~=lv end function c500313947.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c500313947.lvfilter(chkc,e:GetHandler():GetLevel()) end if chk==0 then return Duel.IsExistingTarget(c500313947.lvfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler():GetLevel()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,c500313947.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler():GetLevel()) end function c500313947.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) e1:SetReset(RESET_EVENT+RESET_PHASE+0x1fe0000+PHASE_END) c:RegisterEffect(e1) end end