From 410fd689961433f05cadb1a0b8052870ca6a8f5d Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Mon, 18 Mar 2019 06:10:08 +0400 Subject: [PATCH] Fixed that triggered abilities shows cancel button in target definition; --- Mage/src/main/java/mage/abilities/AbilityImpl.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/AbilityImpl.java b/Mage/src/main/java/mage/abilities/AbilityImpl.java index 49b06d14483..e00b0049769 100644 --- a/Mage/src/main/java/mage/abilities/AbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/AbilityImpl.java @@ -325,15 +325,9 @@ public abstract class AbilityImpl implements Ability { } if (!getTargets().isEmpty()) { Outcome outcome = getEffects().isEmpty() ? Outcome.Detriment : getEffects().get(0).getOutcome(); - // can be cancel by user - if (getTargets().chooseTargets(outcome, this.controllerId, this, noMana, game, true) == false) { - /* - if ((variableManaCost != null) || (announceString != null && !announceString.isEmpty())) { - // ?debug message? - game.informPlayer(controller, (sourceObject != null ? sourceObject.getIdName() : "") + ": no valid targets"); - } - */ - // when activation of ability is canceled during target selection + // only activated abilities can be canceled by user (not triggered) + if (!getTargets().chooseTargets(outcome, this.controllerId, this, noMana, game, this instanceof ActivatedAbility)) { + // was canceled during targer selection return false; } }