Fix Combat Calligrapher. Closes #9979 (#9980)

This commit is contained in:
Grath 2023-02-14 07:10:20 -05:00 committed by GitHub
parent 18fe2edc8a
commit 5664492b32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,7 +82,9 @@ class CombatCalligrapherTriggeredAbility extends TriggeredAbilityImpl {
public boolean checkTrigger(GameEvent event, Game game) {
Player attacker = game.getPlayer(event.getPlayerId());
Player defender = game.getPlayer(event.getTargetId());
if (!game.getOpponents(getControllerId()).contains(attacker.getId())
// Do not trigger if opponent is out of range (not visible as opponent to controller, and not the controller)
// or if the person being attacked is not an opponent of the controller.
if ((!game.getOpponents(getControllerId()).contains(attacker.getId()) && attacker.getId() != getControllerId())
|| !game.getOpponents(getControllerId()).contains(defender.getId())) {
return false;
}