implement Dragon class
This commit is contained in:
@@ -108,7 +108,8 @@ public class Main {
|
||||
while (player.isAlive() && enemy.isAlive()) {
|
||||
if (turn == 0) {
|
||||
turn = 1;
|
||||
System.out.println("choose your action:\n1.light attack 2.heavy attack 3.defend 4.heal 5.special ability");
|
||||
System.out.println("choose your action:\n1.light attack 2.heavy attack " +
|
||||
"3.defend 4.heal 5.special ability 6.flask");
|
||||
choice = sc.nextInt();
|
||||
switch (choice) {
|
||||
case 1:
|
||||
@@ -131,8 +132,15 @@ public class Main {
|
||||
player.specialAbility(enemy);
|
||||
if (player.isSuccessfulAction()) break;
|
||||
else {turn = 0; continue;}
|
||||
|
||||
case 6:
|
||||
player.getFlask().use(player);
|
||||
break;
|
||||
|
||||
default:
|
||||
System.out.println("invalid choice");
|
||||
turn = 0;
|
||||
continue;
|
||||
}
|
||||
System.out.println("[" + player.getClass().getSimpleName() + " - " + player.getHP() + "/" + player.getMaxHP()
|
||||
+ " HP | " + player.getMP() + "/" + player.getMaxMP() + " Mana" + "]");
|
||||
|
||||
Reference in New Issue
Block a user