Browse Source

create boss fight system

master
Yazan Alaamer 2 years ago
parent
commit
45975356ff
  1. 16
      src/main/java/game/StartDarkSoulsGame.java

16
src/main/java/game/StartDarkSoulsGame.java

@ -34,6 +34,7 @@ public class StartDarkSoulsGame {
int playerHP ; int playerHP ;
String position; String position;
String weapon; String weapon;
int monsterHP;
public StartDarkSoulsGame() { public StartDarkSoulsGame() {
gui.Frame.setSize(800, 600); gui.Frame.setSize(800, 600);
@ -229,6 +230,15 @@ public class StartDarkSoulsGame {
choice3.setText(""); choice3.setText("");
choice4.setText(""); choice4.setText("");
} }
public void fight() { // commit 31 boss fight
position = "fight"; // commit 31 boss fight
mainTextArea.setText("Monster HP:"+ monsterHP + " \n"
+ " THE SOUl OF CINDER: Run for your life ASHEN ONE "); // commit 31 boss fight
choice1.setText("Attack"); // commit (31) west location
choice2.setText("Run for your live");// commit (31) west location
choice3.setText("");// commit (31) west location
choice4.setText("");// commit (31) west location
}
public class TitelScreenHandler implements ActionListener{ public class TitelScreenHandler implements ActionListener{
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
@ -282,6 +292,12 @@ public class StartDarkSoulsGame {
case "c1": break; case "c1": break;
case "c2": crossRoad(); break; case "c2": crossRoad(); break;
} }
break;
case "fight":
switch(yourChoice) {
case "c1": break;
case "c2": crossRoad(); break;
}
} }
} }

Loading…
Cancel
Save