mirror of
https://github.com/Klagarge/PokeHES.git
synced 2024-11-22 17:33:27 +00:00
fix last answer
This commit is contained in:
parent
20ff589d82
commit
ad7432ce02
@ -45,10 +45,9 @@ public class Battle {
|
||||
}
|
||||
|
||||
public void action(int answer){
|
||||
textEnemy.randomAnswer();
|
||||
|
||||
//the player is at the last question, the finish text must be displayed
|
||||
if(getLineSpeech() == 4){
|
||||
checkAnswer(answer);
|
||||
finishSpeech();
|
||||
}
|
||||
//the player is at the finish text and he must quit the battle
|
||||
@ -67,6 +66,8 @@ public class Battle {
|
||||
else{
|
||||
readNextLine();
|
||||
}
|
||||
|
||||
textEnemy.randomAnswer();
|
||||
}
|
||||
|
||||
//check the choice answer
|
||||
|
@ -115,12 +115,8 @@ public class ScreenBattle extends RenderingScreen{
|
||||
//add a rising front to have one impulsion
|
||||
if(PokeHES.risingFront){
|
||||
|
||||
if (c.keyStatus.get(Input.Keys.DOWN)){
|
||||
battle.cursor++;
|
||||
}
|
||||
else if (c.keyStatus.get(Input.Keys.UP)){
|
||||
battle.cursor--;
|
||||
}
|
||||
if (c.keyStatus.get(Input.Keys.DOWN)){ battle.cursor++; }
|
||||
else if (c.keyStatus.get(Input.Keys.UP)){ battle.cursor--; }
|
||||
|
||||
if (battle.cursor > 3) battle.cursor = 0;
|
||||
if (battle.cursor < 0) battle.cursor = 3;
|
||||
@ -128,7 +124,7 @@ public class ScreenBattle extends RenderingScreen{
|
||||
if( battle.getAttackOn() == false){ //the enemy is attacking
|
||||
if (c.keyStatus.get(Input.Keys.SPACE) || c.keyStatus.get(Input.Keys.A)){
|
||||
battle.action(-1);
|
||||
battle.cursor = 0;
|
||||
//battle.cursor = 0;
|
||||
}
|
||||
} else if(battle.getAttackOn() == true){ //the enemy is speaking
|
||||
if (c.keyStatus.get(Input.Keys.NUM_1) || c.keyStatus.get(Input.Keys.A) && b.cursor == 0){
|
||||
|
Loading…
Reference in New Issue
Block a user