diff --git a/src/Game/Battle.java b/src/Game/Battle.java index 7bc172f..246f3b2 100644 --- a/src/Game/Battle.java +++ b/src/Game/Battle.java @@ -96,6 +96,7 @@ public class Battle { xpPlayer += xp; //remove pv enemy pvEnemy -= xp; + if(pvEnemy<0) pvEnemy =0; } diff --git a/src/Main/PokeMudry.java b/src/Main/PokeMudry.java index bfeae4e..a6a8b15 100644 --- a/src/Main/PokeMudry.java +++ b/src/Main/PokeMudry.java @@ -48,7 +48,7 @@ public class PokeMudry extends PortableApplication { // add player, create and add all enemies in entities entities.add((Entity) sp.p); enemies.add(new Enemy("Gloeckner", 1, 7, "lumberjack_sheet32", "21N307", 600, "allemand", Direction.RIGHT)); - enemies.add(new Enemy("Nicollier", 4, 2, "lumberjack_sheet32", "21N308", 1600, "mathematique", Direction.LEFT)); + enemies.add(new Enemy("Nicollier", 4, 2, "lumberjack_sheet32", "21N308", 20, "mathematique", Direction.LEFT)); enemies.add(new Enemy("Mudry", 5, 11, "lumberjack_sheet32", "21N304", 700, "informatique", Direction.DOWN)); enemies.add(new Enemy("Ellert", 1, 4, "lumberjack_sheet32", "23N215", 300, "physique", Direction.RIGHT)); enemies.add(new Enemy("Bianchi", 1, 3, "lumberjack_sheet32", "23N308", 1200, "electricite", Direction.RIGHT)); @@ -77,7 +77,7 @@ public class PokeMudry extends PortableApplication { } //end of the game - if(sp.p.getPv() <= 0 && !onEndScreen) { + if((sp.p.getPv() <= 0 || sp.p.getXp() >= sp.p.getXpMax() ) && !onEndScreen ) { g.zoom(1); g.resetCamera(); sp.se = sp.screenManager.getScreenEnd(); diff --git a/src/Screen/ScreenBattle.java b/src/Screen/ScreenBattle.java index 3fb10d9..c03d240 100644 --- a/src/Screen/ScreenBattle.java +++ b/src/Screen/ScreenBattle.java @@ -84,7 +84,7 @@ public class ScreenBattle extends RenderingScreen{ //dialog if(b == null) return; if(b.getLine() == null) return; - g.drawString(15, 260 ,b.getLine() , unbuntuRegularBlack); + g.drawString(15, 260, b.getLine(), unbuntuRegularBlack); } @@ -93,7 +93,7 @@ public class ScreenBattle extends RenderingScreen{ //draw image g.drawPicture(Settings.SIDE - (192/2), Settings.SIDE-240/2, enemyImg); //draw pv - g.drawString(350, Settings.SIDE - 15 , "PV : " + b.pvEnemy + " / " + b.e.getPvInit(), unbuntuRegularWhite); + g.drawString(300, Settings.SIDE - 15 , "PV : " + b.pvEnemy + " / " + b.e.getPvInit(), unbuntuRegularWhite); }