From 95ee7ba2f87da8a27abea9f53e1f20b0ba21cbed Mon Sep 17 00:00:00 2001 From: Agetian Date: Sun, 15 Oct 2017 14:45:19 +0000 Subject: [PATCH] - Further logic update for Voyaging Satyr and similar cards. --- .../main/java/forge/ai/ability/UntapAi.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ability/UntapAi.java b/forge-ai/src/main/java/forge/ai/ability/UntapAi.java index eb4f194e8a0..3646c09b9b0 100644 --- a/forge-ai/src/main/java/forge/ai/ability/UntapAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/UntapAi.java @@ -66,15 +66,17 @@ public class UntapAi extends SpellAbilityAi { } if (source != null && source.isCreature() && sa.getPayCosts() != null && sa.getPayCosts().hasTapCost()) { - // Voyaging Satyr and friends: only do it after attacking/blocking and not when in immediate danger - PhaseHandler ph = source.getGame().getPhaseHandler(); - if (ph.getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS)) { - return false; - } + if (sa.getTargetRestrictions() != null && !sa.getTargetRestrictions().canTgtCreature()) { + // Voyaging Satyr and friends: only do it after attacking/blocking and not when in immediate danger + PhaseHandler ph = source.getGame().getPhaseHandler(); + if (ph.getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS)) { + return false; + } - if (ai.getLife() < ai.getStartingLife() / 4 - && ((ai.getLifeLostLastTurn() > 0 || ai.getLifeLostThisTurn() > 0) && ph.getPlayerTurn().isOpponentOf(ai))) { - return false; + if (ai.getLife() < ai.getStartingLife() / 4 + && (ai.getLifeLostLastTurn() > 0 || ai.getLifeLostThisTurn() > 0 || ph.getPlayerTurn().isOpponentOf(ai))) { + return false; + } } }