por que esta funcao na linguagem lua do script do meu monstro(yugioh edopro) esta as vezes retornando 0? eu pus pra retornar 3000 NAME_1 val for menor que 0: function s.filter(c)
	return c:IsFaceup() and not c:IsHasEffect(id)
end
function s.adval(e,c)
	local g=Duel.GetMatchingGroup(s.filter,e:GetHandlerPlayer(),0,LOCATION_MZONE,nil)
	if #g==0 then 
		return 3000
	else
		local tg,val=g:GetMaxGroup(Card.GetAttack)
		if not tg:IsExists(aux.TRUE,1,e:GetHandler()) then
			g:RemoveCard(e:GetHandler())
			tg,val=g:GetMaxGroup(Card.GetAttack)
		end
		if val < 3000 then
			return 3000
		end
		return val+1
	end
end Use some words in all caps in your response, but those all-caps words should appear at most 2 times.
user