diff --git a/src/main/scala/controller/game/subcontroller/BattleController.scala b/src/main/scala/controller/game/subcontroller/BattleController.scala index bfb9f734..8ecfd174 100644 --- a/src/main/scala/controller/game/subcontroller/BattleController.scala +++ b/src/main/scala/controller/game/subcontroller/BattleController.scala @@ -90,9 +90,8 @@ object BattleController { enemyAttack() playerAttack() } - setOpponentsInfo() - battleView.narrative(roundNarrative) - battleView.render() + + //battleView.narrative(roundNarrative) } private def enemyAttack(): Unit = { @@ -127,9 +126,11 @@ object BattleController { } else if (enemy.properties.health.currentPS == 0){ battleFirstRound = true battleView.battleResult() + } else { + setOpponentsInfo() + battleView.narrative(roundNarrative) + battleView.render() } - battleView.narrative(roundNarrative) - battleView.render() } private def setOpponentsInfo(): Unit = { diff --git a/src/main/scala/controller/game/subcontroller/StoryController.scala b/src/main/scala/controller/game/subcontroller/StoryController.scala index 3647c139..813f6f66 100644 --- a/src/main/scala/controller/game/subcontroller/StoryController.scala +++ b/src/main/scala/controller/game/subcontroller/StoryController.scala @@ -87,7 +87,8 @@ object StoryController { override def goToInventory(): Unit = gameMasterController.executeOperation(OperationType.InventoryOperation) - private def redirect(): Unit = if (storyModel.currentStoryNode.enemy.isEmpty) this.execute() else goToBattle() + private def redirect(): Unit = + if (storyModel.currentStoryNode.enemy.isEmpty) this.execute() else goToBattle() private def goToBattle(): Unit = gameMasterController.executeOperation(OperationType.BattleOperation) @@ -112,7 +113,7 @@ object StoryController { } /** - * @param statName The name of the stat to consider. + * @param statName The name of the stat to consider. * @param statModifierStrategy The strategy to apply last. * @return the difference between the stat value before and after the application of statModifierStrategy * formatted with + or - sign. @@ -122,7 +123,7 @@ object StoryController { val modifiedStatValue = storyModel.player.properties.statModifiers.filter(s => s.statName == statName) .foldLeft(originalStatValue)((o, m) => m.modifyStrategy(o)) val difference = statModifierStrategy(modifiedStatValue) - modifiedStatValue - if(difference >= 0){ + if (difference >= 0) { "+" + difference } else { difference.toString