mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Fixed that triggered abilities shows cancel button in target definition;
This commit is contained in:
parent
ae00a74b4c
commit
410fd68996
1 changed files with 3 additions and 9 deletions
|
|
@ -325,15 +325,9 @@ public abstract class AbilityImpl implements Ability {
|
||||||
}
|
}
|
||||||
if (!getTargets().isEmpty()) {
|
if (!getTargets().isEmpty()) {
|
||||||
Outcome outcome = getEffects().isEmpty() ? Outcome.Detriment : getEffects().get(0).getOutcome();
|
Outcome outcome = getEffects().isEmpty() ? Outcome.Detriment : getEffects().get(0).getOutcome();
|
||||||
// can be cancel by user
|
// only activated abilities can be canceled by user (not triggered)
|
||||||
if (getTargets().chooseTargets(outcome, this.controllerId, this, noMana, game, true) == false) {
|
if (!getTargets().chooseTargets(outcome, this.controllerId, this, noMana, game, this instanceof ActivatedAbility)) {
|
||||||
/*
|
// was canceled during targer selection
|
||||||
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
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue