mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08: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) {
|
if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED) {
|
||||||
UUID attackingPlayer = game.getCombat().getAttackingPlayerId();
|
UUID attackingPlayer = game.getCombat().getAttackingPlayerId();
|
||||||
Set<MageObjectReference> attackingCreatures = getAttackedLastTurnCreatures(attackingPlayer);
|
Set<MageObjectReference> attackingCreatures = getAttackedThisTurnCreatures(attackingPlayer);
|
||||||
for (UUID attackerId : game.getCombat().getAttackers()) {
|
for (UUID attackerId : game.getCombat().getAttackers()) {
|
||||||
Permanent attacker = game.getPermanent(attackerId);
|
Permanent attacker = game.getPermanent(attackerId);
|
||||||
if (attacker != null) {
|
if (attacker != null) {
|
||||||
|
|
@ -100,6 +100,13 @@ public class AttackedLastTurnWatcher extends Watcher {
|
||||||
return new HashSet<>();
|
return new HashSet<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<MageObjectReference> getAttackedThisTurnCreatures(UUID combatPlayerId) {
|
||||||
|
if (attackedThisTurnCreatures.get(combatPlayerId) != null) {
|
||||||
|
return attackedThisTurnCreatures.get(combatPlayerId);
|
||||||
|
}
|
||||||
|
return new HashSet<>();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AttackedLastTurnWatcher copy() {
|
public AttackedLastTurnWatcher copy() {
|
||||||
return new AttackedLastTurnWatcher(this);
|
return new AttackedLastTurnWatcher(this);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue