Buggy code:
public class Game { public static void main ( String [ ] args ) { Monster [ ] monster = new Monster [ 5 ] ; monster [ 0 ] = new Monster ( ) ; monster [ 1 ] = new Monster ( 100 , 18 , 0.8 ) ; monster [ 2 ] = new Monster ( 150 , 20 , 0.5 ) ; monster [ 3 ] = new Monster ( 210 , 10 , 0.9 ) ; monster [ 4 ] = new Monster ( 125 , 13 , 0.7 ) ; int monsterIndex = ( ( int ) ( ( Math . random ( ) ) * ( monster . length ) ) ) ; Monster opponent = monster [ monsterIndex ] ; System . out . println ( ( ( "Ein<seq2seq4repair_space>wildes<seq2seq4repair_space>Monster<seq2seq4repair_space>" + monsterIndex ) + "<seq2seq4repair_space>erscheint!" ) ) ; System . out . println ( opponent . toString ( ) ) ; <START_BUG> Player player = new Player ( 100 , 15 , 40 , 3 , 0.7 , 40 , 15 , 5 ) ; <END_BUG> int round = 1 ; Scanner sc = new Scanner ( System . in ) ; while ( ( ! ( player . isDefeated ( ) ) ) && ( ! ( opponent . isDefeated ( ) ) ) ) { System . out . println ( "---------------------------------" ) ; System . out . println ( ( "Runde<seq2seq4repair_space>" + round ) ) ; round ++ ; System . out . println ( player . toString ( ) ) ; System . out . println ( opponent . toString ( ) ) ; System . out . println ( "Welche<seq2seq4repair_space>Aktion<seq2seq4repair_space>soll<seq2seq4repair_space>ausgeführt<seq2seq4repair_space>werden?" ) ; System . out . println ( "1<seq2seq4repair_space>Angriff" ) ; System . out . println ( ( ( "2<seq2seq4repair_space>Item<seq2seq4repair_space>(" + ( player . getRemainingItemUses ( ) ) ) + ")" ) ) ; System . out . println ( "3<seq2seq4repair_space>Flucht" ) ; System . out . println ( "4<seq2seq4repair_space>Powerpille<seq2seq4repair_space>(25<seq2seq4repair_space>AP)" ) ; System . out . println ( "5<seq2seq4repair_space>Eisstrahl<seq2seq4repair_space>(35<seq2seq4repair_space>AP)" ) ; System . out . println ( "6<seq2seq4repair_space>Monster<seq2seq4repair_space>im<seq2seq4repair_space>Kreis<seq2seq4repair_space>drehen<seq2seq4repair_space>(20<seq2seq4repair_space>AP)" ) ; while ( true ) { String eingabe = sc . nextLine ( ) ; if ( eingabe . equals ( "1" ) ) { System . out . println ( "---------------------------------" ) ; System . out . println ( "Spieler<seq2seq4repair_space>greift<seq2seq4repair_space>das<seq2seq4repair_space>Monster<seq2seq4repair_space>an!" ) ; int monsterHp = player . attackMonster ( opponent ) ; if ( monsterHp == ( - 1 ) ) { System . out . println ( "Die<seq2seq4repair_space>Attacke<seq2seq4repair_space>ging<seq2seq4repair_space>daneben!" ) ; } else { System . out . println ( player . toString ( ) ) ; System . out . println ( opponent . toString ( ) ) ; } break ; } else { if ( eingabe . equals ( "2" ) ) { if ( player . heal ( ) ) { System . out . println ( "Heilung<seq2seq4repair_space>erfolgreich!" ) ; System . out . println ( player . toString ( ) ) ; } else { System . out . println ( "Keine<seq2seq4repair_space>Heiltraenke<seq2seq4repair_space>mehr<seq2seq4repair_space>uebrig!" ) ; } break ; } else { if ( eingabe . equals ( "3" ) ) { System . out . println ( "Feigling..." ) ; break ; } else { if ( eingabe . equals ( "4" ) ) { if ( ! ( player . enoughAp ( 25 ) ) ) { System . out . println ( "Nicht<seq2seq4repair_space>genug<seq2seq4repair_space>AP!" ) ; System . out . println ( "Neue<seq2seq4repair_space>Eingabe?" ) ; continue ; } else { if ( ( ! ( opponent . isAbilityActive ( ) ) ) && ( ! ( player . isAbilityActive ( ) ) ) ) { System . out . println ( "Spieler<seq2seq4repair_space>setzt<seq2seq4repair_space>eine<seq2seq4repair_space>Powerpille<seq2seq4repair_space>ein!" ) ; System . out . println ( ( ( "Die<seq2seq4repair_space>ATK<seq2seq4repair_space>des<seq2seq4repair_space>Spielers<seq2seq4repair_space>wurden<seq2seq4repair_space>um<seq2seq4repair_space>" + ( player . getBonusAtk ( ) ) ) + "<seq2seq4repair_space>erhöht." ) ) ; player . decreaseAp ( 25 ) ; player . takePowerPill ( ) ; break ; } else { System . out . println ( "Spieler<seq2seq4repair_space>hat<seq2seq4repair_space>bereits<seq2seq4repair_space>eine<seq2seq4repair_space>Faehigkeit<seq2seq4repair_space>aktiviert." ) ; System . out . println ( "Neue<seq2seq4repair_space>Eingabe?" ) ; continue ; } } } else { if ( eingabe . equals ( "5" ) ) { if ( ! ( player . enoughAp ( 35 ) ) ) { System . out . println ( "Nicht<seq2seq4repair_space>genug<seq2seq4repair_space>AP!" ) ; System . out . println ( "Neue<seq2seq4repair_space>Eingabe?" ) ; continue ; } else { if ( ( ! ( opponent . isAbilityActive ( ) ) ) && ( ! ( player . isAbilityActive ( ) ) ) ) { System . out . println ( "Spieler<seq2seq4repair_space>friert<seq2seq4repair_space>das<seq2seq4repair_space>Monster<seq2seq4repair_space>ein!" ) ; player . decreaseAp ( 35 ) ; opponent . freeze ( ) ; break ; } else { System . out . println ( "Spieler<seq2seq4repair_space>hat<seq2seq4repair_space>bereits<seq2seq4repair_space>eine<seq2seq4repair_space>Faehigkeit<seq2seq4repair_space>aktiviert." ) ; System . out . println ( "Neue<seq2seq4repair_space>Eingabe?" ) ; continue ; } } } else { if ( eingabe . equals ( "6" ) ) { if ( ! ( player . enoughAp ( 20 ) ) ) { System . out . println ( "Nicht<seq2seq4repair_space>genug<seq2seq4repair_space>AP!" ) ; System . out . println ( "Neue<seq2seq4repair_space>Eingabe?" ) ; continue ; } else { if ( ( ! ( opponent . isAbilityActive ( ) ) ) && ( ! ( player . isAbilityActive ( ) ) ) ) { System . out . println ( "Spieler<seq2seq4repair_space>dreht<seq2seq4repair_space>das<seq2seq4repair_space>Monster<seq2seq4repair_space>im<seq2seq4repair_space>Kreis!<seq2seq4repair_space>Dem<seq2seq4repair_space>Monster<seq2seq4repair_space>ist<seq2seq4repair_space>schwindelig!" ) ; System . out . println ( ( ( "Die<seq2seq4repair_space>Genauigkeit<seq2seq4repair_space>des<seq2seq4repair_space>Monsters<seq2seq4repair_space>wurde<seq2seq4repair_space>um<seq2seq4repair_space>" + ( opponent . getDecreasedHitPoints ( ) ) ) + "<seq2seq4repair_space>verringert." ) ) ; player . decreaseAp ( 20 ) ; opponent . hasDecreasedHitChance ( 0.4 ) ; break ; } else { System . out . println ( "Spieler<seq2seq4repair_space>hat<seq2seq4repair_space>bereits<seq2seq4repair_space>eine<seq2seq4repair_space>Faehigkeit<seq2seq4repair_space>aktiviert." ) ; System . out . println ( "Neue<seq2seq4repair_space>Eingabe?" ) ; continue ; } } } } } } } System . out . println ( "Keine<seq2seq4repair_space>gültige<seq2seq4repair_space>Eingabe!" ) ; System . out . println ( "Neue<seq2seq4repair_space>Eingabe?" ) ; } } if ( ! ( opponent . isDefeated ( ) ) ) { System . out . println ( "Drücke<seq2seq4repair_space>Enter!" ) ;

Fix:
Player player = new Player ( 100 , 15 , 40 , 3 , 0.7 , 40 , 40 , 7 ) ;