1
0
mirror of https://github.com/Klagarge/PokeHES.git synced 2024-11-23 01:43:28 +00:00

Merge pull request #41 from Klagarge:end-battle

ok end battle
This commit is contained in:
Fastium 2022-06-16 17:16:30 +02:00 committed by GitHub
commit a62a239579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,7 @@ public class Battle {
System.out.println("xp player : " + xpPlayer);
System.out.println("xp win " + newXp);
if(getLineSpeech() == 4){
FinishSpeech();
}
@ -52,11 +53,14 @@ public class Battle {
}
else if(0 < getLineSpeech() && getLineSpeech() < 4){
checkAnswer(answer);
if(pvEnemy <= 0){
FinishSpeech();
}
}
else{
readNextLine();
}
}
//check the choice answer
@ -98,16 +102,17 @@ public class Battle {
public void FinishSpeech(){
if(pvEnemy>0){
//alive (speechline = 6)
lineSpeech += 2;
lineSpeech = 6;
System.out.println("enemy alive");
}
else{
//dead (speechline = 5)
lineSpeech += 1;
lineSpeech = 5;
System.out.println("enemy dead");
}
}
public void finish(){
screenBattleOn = false;
}