diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/GameLogic.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/GameLogic.java index 40e1ad3..7076816 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/GameLogic.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/GameLogic.java @@ -875,8 +875,8 @@ class GameLogic { for(EntityID id: state.turnOrder) { Character character = (Character)state.entities.findEntity(id); - if(character.mp.getValue() > maxMP) { - maxMP = character.mp.getValue(); + if(character.mp.getMax() > maxMP) { + maxMP = character.mp.getMax(); } } @@ -925,6 +925,11 @@ class GameLogic { ArrayList path = GameLogic.Bresenham4Connected(thanos.getPosition(), picked); int mp = thanos.mp.getValue(); + + if(mp <= 0) { + return result; + } + IntVector2 current = thanos.getPosition(); for(IntVector2 pos: path) { if(pos.equals(thanos.getPosition())) {