mirror of
				https://github.com/Klagarge/PokeHES.git
				synced 2025-10-31 03:39:16 +00:00 
			
		
		
		
	with row done
This commit is contained in:
		| @@ -33,17 +33,13 @@ public class Battle { | ||||
|  | ||||
|     public void readNextLine(){ | ||||
|     //change line | ||||
|     System.out.println(textEnemy.lines.size()); | ||||
|     //System.out.println(textEnemy.lines.size()); | ||||
|         if(lineSpeech < 5){ | ||||
|             lineSpeech++; | ||||
|         } | ||||
|  | ||||
| 	} | ||||
|  | ||||
|     public void action(int answer){ | ||||
|         System.out.println("pv enemy : " +pvEnemy); | ||||
|         System.out.println("xp player : " + xpPlayer); | ||||
|         System.out.println("xp win " + newXp); | ||||
|  | ||||
|        //the player is at the last question, the finish text must be displayed | ||||
|         if(getLineSpeech() == 4){ | ||||
| @@ -98,10 +94,10 @@ public class Battle { | ||||
|     public void updatePlayerEnemy(int xp){ | ||||
|         //add xp for the player | ||||
|         xpPlayer += xp; | ||||
|         if(xpPlayer>6000) xpPlayer = 6000; | ||||
|         //remove pv enemy | ||||
|         pvEnemy -= xp; | ||||
|         if(pvEnemy<0) pvEnemy =0; | ||||
|          | ||||
|     } | ||||
|  | ||||
|     public void finishSpeech(){ | ||||
| @@ -158,4 +154,8 @@ public class Battle { | ||||
|     public void setPlayer(Player p){ | ||||
|         this.player = p; | ||||
|     } | ||||
|  | ||||
|     public void updateText(){ | ||||
|         if(e != null) textEnemy.generateText(cursor); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user