fix: fix turn count

This commit is contained in:
punchready 2021-07-02 15:39:21 +02:00
parent bacb6a65df
commit a7b0514bd8

View File

@ -873,7 +873,7 @@ public class GameLogic {
turns.add(id);
}else { // send empty turn for knocked out characters
result.add(new EventBuilder(EventType.TurnEvent)
.withTurnCount(state.turnOrder.size())
.withTurnCount(state.turnOrder.indexOf(id) + 1)
.withNextCharacter(id)
.buildGameEvent());
}
@ -950,7 +950,7 @@ public class GameLogic {
break;
}else { // again send empty turns for knocked out characters
result.add(new EventBuilder(EventType.TurnEvent)
.withTurnCount(state.turnOrder.size())
.withTurnCount(state.turnOrder.indexOf(id) + 1)
.withNextCharacter(id)
.buildGameEvent());
}
@ -1127,7 +1127,7 @@ public class GameLogic {
ArrayList<Event> result = new ArrayList<>();
result.add(new EventBuilder(EventType.TurnEvent)
.withTurnCount(state.turnOrder.size())
.withTurnCount(state.turnOrder.indexOf(thanos.id) + 1)
.withNextCharacter(thanos.id)
.buildGameEvent());