Fix for Giant Turtle/Halls of Mist watcher
@@ -81,7 +81,7 @@ public class AttackedLastTurnWatcher extends Watcher {
}
if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED) {
UUID attackingPlayer = game.getCombat().getAttackingPlayerId();
- Set<MageObjectReference> attackingCreatures = getAttackedLastTurnCreatures(attackingPlayer);
+ Set<MageObjectReference> attackingCreatures = getAttackedThisTurnCreatures(attackingPlayer);
for (UUID attackerId : game.getCombat().getAttackers()) {
Permanent attacker = game.getPermanent(attackerId);
if (attacker != null) {
@@ -100,6 +100,13 @@ public class AttackedLastTurnWatcher extends Watcher {
return new HashSet<>();
}
+ public Set<MageObjectReference> getAttackedThisTurnCreatures(UUID combatPlayerId) {
+ if (attackedThisTurnCreatures.get(combatPlayerId) != null) {
+ return attackedThisTurnCreatures.get(combatPlayerId);
+ }
+ return new HashSet<>();
+ }
+
@Override
public AttackedLastTurnWatcher copy() {
return new AttackedLastTurnWatcher(this);
