mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00: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()) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue