fix EmergenSequence not taking play land events into account

This commit is contained in:
Ingmar Goudt 2021-07-25 00:28:03 +02:00
parent 1e4f3524a9
commit 736e659e34

View file

@ -104,8 +104,9 @@ class EmergentSequenceWatcher extends Watcher {
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD
&& ((EntersTheBattlefieldEvent) event).getTarget().isLand(game)) {
if (event.getType() == GameEvent.EventType.PLAY_LAND ||
(event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD
&& ((EntersTheBattlefieldEvent) event).getTarget().isLand(game))) {
playerMap.compute(event.getPlayerId(), (u, i) -> i == null ? 1 : Integer.sum(i, 1));
}
}