--Level Kingdom function c249001196.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(86997073,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_FZONE) e2:SetTarget(c249001196.target) e2:SetOperation(c249001196.operation) c:RegisterEffect(e2) --act limit local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_CHAINING) e3:SetRange(LOCATION_FZONE) e3:SetOperation(c249001196.chainop) c:RegisterEffect(e3) --atk up local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_UPDATE_ATTACK) e4:SetRange(LOCATION_FZONE) e4:SetTargetRange(LOCATION_MZONE,0) e4:SetCondition(c249001196.atkcon) e4:SetTarget(c249001196.atktg) e4:SetValue(c249001196.atkval) c:RegisterEffect(e4) end function c249001196.filter(c,e,sp) return c:IsSetCard(0x41) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end function c249001196.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c249001196.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function c249001196.operation(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) local g=Duel.SelectMatchingCard(tp,c249001196.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function c249001196.chainop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() if rc:IsSetCard(0x41) and re:IsActiveType(TYPE_MONSTER) then Duel.SetChainLimit(c249001196.chainlm) end end function c249001196.chainlm(e,rp,tp) return tp==rp end function c249001196.atkcon(e) return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() end function c249001196.atktg(e,c) return c==Duel.GetAttacker() and c:IsSetCard(0x41) end function c249001196.atkval(e,c) local d=Duel.GetAttackTarget() if c:GetAttack()