mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fix for Giant Turtle/Halls of Mist watcher
This commit is contained in:
parent
58f5dd59b9
commit
ce3176adf2
1 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue