Skip to content

Commit

Permalink
funcao ataca_na_ordem melhorada
Browse files Browse the repository at this point in the history
  • Loading branch information
iagozag committed Jul 11, 2023
1 parent 91937d0 commit c73eec6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/combate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,8 @@ void Combate::ataca_na_ordem(Personagem * p, pair<unsigned,unsigned> op1, pair<u
} else{
try{
if(op2.second == 0) p->move();
else try{
p->ataque(op2.first, p->get_dado_dano(), {p_monstros.at(op2.second-1)});
} catch(mana_insuficiente_e){
else try{ p->ataque(op2.first, p->get_dado_dano(), {p_monstros.at(op2.second-1)});
} catch(mana_insuficiente_e){
cout<< "Mana insuficiente!!"<<endl;
} catch(furia_ja_ativa_e){
cout<< "Furia ja esta ativa insuficiente!!"<<endl;
Expand All @@ -250,7 +249,6 @@ void Combate::ataca_na_ordem(Personagem * p, pair<unsigned,unsigned> op1, pair<u
} catch(furia_ja_ativa_e){
cout<< "Furia ja esta ativa insuficiente!!"<<endl;
}
}

bool Combate::entra_combate(vector<Monstro *> monstros){
Heroi *h1 = _time.get_h1();
Expand Down

0 comments on commit c73eec6

Please sign in to comment.