Fixed that triggered abilities shows cancel button in target definition;
@@ -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;
}
}
