--created & coded by Lyris --ローマ・キー・XXIV local s,id,o=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetOperation(s.lvup) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e2) local e3=e1:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetCode(EVENT_SUMMON_SUCCESS) e5:SetCost(s.cost) e5:SetTarget(s.target) e5:SetOperation(s.costop) c:RegisterEffect(e5) local e4=e5:Clone() e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) local e6=e5:Clone() e6:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e6) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end function s.lvup(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetValue(e:GetHandler():GetLevel()*2) e:GetHandler():RegisterEffect(e1) end function s.counterfilter(c) return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsSetCard(0xeeb) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xeeb) end function s.filter(c,e,tp) return c:IsSetCard(0xeeb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) end function s.costop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp),0,tp,tp,false,false,POS_FACEUP) end