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 d55ae8d..623e788 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/GameLogic.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/gamelogic/GameLogic.java @@ -709,8 +709,13 @@ public class GameLogic { Character character = ((Character)state.entities.findEntity(id)); - if(character.hp.getValue() > 0){ + if(character.isAlive()){ alive.add(id); + }else { // send empty turn for knocked out characters + result.add(new EventBuilder(EventType.TurnEvent) + .withTurnCount(state.turnOrder.size()) + .withNextCharacter(id) + .buildGameEvent()); } if(character.inventory.getFreeSlots() == 0) { // no slots => has all infinity stones @@ -779,6 +784,11 @@ public class GameLogic { if(id.type == EntityType.NPC || revived.contains(id) || ((Character)state.entities.findEntity(id)).hp.getValue() > 0){ state.activeCharacter = id; break; + }else { // again send empty turns for knocked out characters + result.add(new EventBuilder(EventType.TurnEvent) + .withTurnCount(state.turnOrder.size()) + .withNextCharacter(id) + .buildGameEvent()); } }