1
0
mirror of https://github.com/Klagarge/PokeHES.git synced 2025-07-07 17:01:10 +00:00

xp modification

This commit is contained in:
Fastium
2022-06-13 23:11:17 +02:00
parent b4a899bdcd
commit 744b160542
5 changed files with 27 additions and 20 deletions

View File

@ -6,24 +6,21 @@ import Entity.Enemy;
import Text.TextEnemy;
public class Battle {
TextEnemy textEnemy;
public TextEnemy textEnemy;
private int lineSpeech;
public int answer;
private int winPoint;
private int newXp;
public boolean screenBattleOn = true;
public Battle(Enemy enemy){
public Battle(Enemy e){
textEnemy = new TextEnemy("enemi"); // should be enemy.name
textEnemy.generateText();
lineSpeech = 0;
winPoint = 0;
newXp = 0;
System.out.println("lll : "+ getLine());
@ -46,7 +43,6 @@ public class Battle {
//get number current answer random
int currentAnswer = textEnemy.getCurrentData().get(attack)[answer];
System.out.println("current answer : " + currentAnswer);
//get the answer of the player
String answerPlayer = textEnemy.fightData.getAttack(currentAttack).getAnswer(currentAnswer);
@ -58,7 +54,9 @@ public class Battle {
//check the choice of the player
if(answerPlayer == trueAsnwer){
newXp += textEnemy.fightData.getAttack(currentAttack).getXp();
System.out.println("it's true !!!!");
}
else{
System.out.println("it's false !!!!");
@ -89,6 +87,8 @@ public class Battle {
public boolean getScreenBattleOn(){
return screenBattleOn;
}
public int getNewXp(){
return newXp;
}
}