From 45975356ff9a2f50ce29660c854ec501236cd639 Mon Sep 17 00:00:00 2001 From: Yazan Alaamer Date: Sat, 21 Jan 2023 00:14:46 +0100 Subject: [PATCH] create boss fight system --- src/main/java/game/StartDarkSoulsGame.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index 01400d4..a91d035 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/src/main/java/game/StartDarkSoulsGame.java @@ -34,6 +34,7 @@ public class StartDarkSoulsGame { int playerHP ; String position; String weapon; + int monsterHP; public StartDarkSoulsGame() { gui.Frame.setSize(800, 600); @@ -229,6 +230,15 @@ public class StartDarkSoulsGame { choice3.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 void actionPerformed(ActionEvent event) { @@ -282,6 +292,12 @@ public class StartDarkSoulsGame { case "c1": break; case "c2": crossRoad(); break; } + break; + case "fight": + switch(yourChoice) { + case "c1": break; + case "c2": crossRoad(); break; + } } }