remove "AttackedPlayerWhoAttackedYouLastTurn" condition

This commit is contained in:
Northmoc
2022-05-19 12:31:32 -04:00
parent 90e99f3f66
commit 2bcdfcd06b

View File

@@ -384,25 +384,6 @@ public abstract class Trigger extends TriggerReplacementBase {
this.getHostCard().getController(), this.getHostCard(), null)) {
return false;
}
} else if ("AttackedPlayerWhoAttackedYouLastTurn".equals(condition)) {
GameEntity attacked = (GameEntity) runParams.get(AbilityKey.Attacked);
if (attacked == null) {
// Check "Defender" too because once triggering objects are set on TriggerAttacks, the value of Attacked
// ends up being in Defender at that point.
attacked = (GameEntity) runParams.get(AbilityKey.DefendingPlayer);
}
Player attacker = this.getHostCard().getController();
boolean valid = false;
if (game.getPlayersAttackedLastTurn().containsKey(attacked)) {
if (game.getPlayersAttackedLastTurn().get(attacked).contains(attacker)) {
valid = true;
}
}
if (attacked == null || !valid) {
return false;
}
}
return true;
}