mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* AI: fixed that computer can cancel "target player or planeswalker" spells on bad effects (can't choose himself);
This commit is contained in:
parent
ff54141e97
commit
55f2893fc4
2 changed files with 13 additions and 8 deletions
|
|
@ -329,8 +329,9 @@ public abstract class AbilityImpl implements Ability {
|
|||
}
|
||||
if (!getTargets().isEmpty()) {
|
||||
Outcome outcome = getEffects().getOutcome(this);
|
||||
// only activated abilities can be canceled by user (not triggered)
|
||||
if (!getTargets().chooseTargets(outcome, this.controllerId, this, noMana, game, this instanceof ActivatedAbility)) {
|
||||
// only activated abilities can be canceled by human user (not triggered)
|
||||
boolean canCancel = this instanceof ActivatedAbility && controller.isHuman();
|
||||
if (!getTargets().chooseTargets(outcome, this.controllerId, this, noMana, game, canCancel)) {
|
||||
// was canceled during targer selection
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue