Skip to content

Commit

Permalink
Cambios en el vista
Browse files Browse the repository at this point in the history
  • Loading branch information
ander authored and ander committed May 15, 2023
1 parent 1b6cbf5 commit 809bcd8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Modelo/Bot.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private void ataquedeBot(){
Pokemon pokDefensa = ListaJugadores.getListaJugadores().buscarJugador(jugadorAtacado).getPokemon(pokAtacado);
if (!pokAtaque.haAtacado() && !pokAtaque.seHaDebilitado() && !pokDefensa.seHaDebilitado()) {
pokAtaque.haAtacadoYa(true);
CampoDeBatalla.getCampoBatalla().realizarAtaques(pokAtaque, pokDefensa);
CampoDeBatalla.getCampoBatalla().realizarAtaques(pokAtaque, pokDefensa);
CampoDeBatalla.getCampoBatalla().eliminarBatalla();
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/Modelo/Pokemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ else if(pPokemon.recibeAtaquePocoEfectivo(this.tipo)) {
}

this.estadoEuforia();
//if (pPokemon.haAtacadoEuforico) {
this.quitarEstadoEuforia(pPokemon);

//}

if (this.vida<0) {
this.vida = 0;
}
Expand Down
16 changes: 14 additions & 2 deletions src/Vista_Controlador/Panel_Pokemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ public void update(Observable arg0, Object arg1) { /*Este panel es solo para los
}
//double porcentajeEuforia = 0;
//porcentajeEuforia = ((double) turnosEuforiaActuales / (double) turnosEuforiaTotales);


//System.out.println("Ataque realizado");
Panel_Pokemons_Inf_ChargedAttack.setBackground(Color.GRAY);
if(vida==0) {
Expand All @@ -183,6 +181,20 @@ else if (arg1 instanceof boolean[]) {
progCharBar.setValue(0);
}
}
if (idJug != -1) { /*Para los bot*/
String ataqueS = lab_att.getText();
int ataque = Integer.parseInt(ataqueS);
String defensaS = lab_Def.getText();
int defensa = Integer.parseInt(defensaS);
if (ataque>=100 && defensa>=100) {
ataque = ataque -100;
defensa = defensa-100;
lab_att.setText(String.valueOf(ataque));
lab_Def.setText(String.valueOf(defensa));
progCharBar.setValue(0);
}
}

}
else if (arg1 instanceof String[]) {
String[] evArray = (String[]) arg1;
Expand Down

0 comments on commit 809bcd8

Please sign in to comment.