local cm,m,o=GetID()
function cm.initial_effect(c)
	vgf.VgCard(c)
	vgd.EffectTypeTrigger(c,m,nil,EFFECT_TYPE_SINGLE,EVENT_SPSUMMON_SUCCESS,cm.op,nil,cm.con)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
    local c=e:GetHandler()
    return not (c:IsSummonType(SUMMON_TYPE_RIDE) or c:IsSummonType(SUMMON_TYPE_SELFRIDE))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
    local ct=Duel.GetFlagEffectLabel(tp,FLAG_SPELL_COUNT_LIMIT)
    if vgf.GetValueType(ct)~="number" then Duel.RegisterFlagEffect(tp,FLAG_SPELL_COUNT_LIMIT,RESET_PHASE+PHASE_END,0,1,2)
	else Duel.RegisterFlagEffect(tp,FLAG_SPELL_COUNT_LIMIT,RESET_PHASE+PHASE_END,0,1,ct+1) end
end