2022-06-10 19:33:24 +02:00
|
|
|
package Game;
|
|
|
|
|
2022-06-12 12:10:57 +02:00
|
|
|
import Entity.Enemy;
|
|
|
|
import Text.TextEnemy;
|
|
|
|
|
2022-06-10 19:33:24 +02:00
|
|
|
public class Battle {
|
|
|
|
|
2022-06-12 12:10:57 +02:00
|
|
|
private Enemy enemy;
|
|
|
|
|
|
|
|
TextEnemy textEnemy;
|
2022-06-12 14:26:02 +02:00
|
|
|
private int lineSpeech;
|
2022-06-12 12:10:57 +02:00
|
|
|
|
2022-06-12 14:26:02 +02:00
|
|
|
public int answer;
|
|
|
|
|
2022-06-12 12:10:57 +02:00
|
|
|
|
|
|
|
public Battle(Enemy enemy){
|
|
|
|
this.enemy = enemy;
|
|
|
|
textEnemy = new TextEnemy("enemi"); // should be enemy.name
|
|
|
|
textEnemy.generateText();
|
|
|
|
|
2022-06-12 14:26:02 +02:00
|
|
|
lineSpeech = 0;
|
|
|
|
answer = 0;
|
|
|
|
|
2022-06-12 12:10:57 +02:00
|
|
|
//initialize the first line
|
|
|
|
System.out.println("lll : "+ getLine());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void readNextLine(){
|
|
|
|
//change line
|
|
|
|
lineSpeech++;
|
2022-06-12 14:26:02 +02:00
|
|
|
|
2022-06-12 12:10:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public boolean getAttackOn(){
|
|
|
|
return textEnemy.lines.get(lineSpeech).attackOn;
|
|
|
|
}
|
2022-06-11 21:45:45 +02:00
|
|
|
|
2022-06-12 12:10:57 +02:00
|
|
|
public String getLine(){
|
|
|
|
return textEnemy.lines.get(lineSpeech).line;
|
|
|
|
}
|
2022-06-12 14:26:02 +02:00
|
|
|
|
|
|
|
public int getLineSpeech() {
|
|
|
|
return lineSpeech;
|
|
|
|
}
|
2022-06-11 21:45:45 +02:00
|
|
|
|
2022-06-10 19:33:24 +02:00
|
|
|
|
|
|
|
}
|