private function autoataque($alvo) { $movimentos = $this->movimentoDisponivel(); if (in_array(MV_ATAQUE_NORMAL, $movimentos)) { $movimento = MV_ATAQUE_NORMAL; } else { return false; } $acoes = $this->acaoDisponivel(); if (count($acoes) > 0) { $index = array_rand($acoes); $acao = $acoes[$index]; } else { return false; } //var_dump($acao); if ($acao->nh >= 14) { $posicao = Sessao::pegarCorpoParteAleatoria(); } else { $posicao = CORPO_TRONCO; } //exit(); $this->atacar($alvo, $movimento, $acao->getAtaque(), $acao->getGolpe(), $posicao); }