Skip to content

Commit

Permalink
Cambios en el código
Browse files Browse the repository at this point in the history
  • Loading branch information
ander authored and ander committed May 18, 2023
1 parent 9284719 commit f010b56
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/Modelo/CampoDeBatalla.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,9 @@ public boolean sePuedeAtacar(int nPok, int nJug) {
}
if(batalla[0]!=null && batalla[1]!=null) {
//si ambos pokemons son aptos, entra
if (!batalla[0].haAtacado() && !batalla[0].seHaDebilitado() && !batalla[1].seHaDebilitado()) {
//si el pokemon atacante no ha atacado y ninguno esta debilitado -> ataca
realizarAtaques(batalla[0], batalla[1]);
eliminarBatalla();
sePuedeAtacar=true;
}
else
{
//si el pokemon ha atacado con anterioridad, reestablece los valores
eliminarBatalla();
}
}
sePuedeAtacar = realizarAtaques(batalla[0], batalla[1]);
eliminarBatalla();
}
this.terminarTurno(jugadorAtacante);

setChanged();
Expand Down

0 comments on commit f010b56

Please sign in to comment.