mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Fix the Snapcaster Mage Repeal Test
The flashback ability was attempting to choose targets. That doesn’t really make sense since the Targets should be chosen by the actual spell being cast.
This commit is contained in:
parent
2cab391d74
commit
4427121a64
1 changed files with 3 additions and 1 deletions
|
@ -328,7 +328,9 @@ public abstract class AbilityImpl implements Ability {
|
||||||
if (sourceObject != null && !this.getAbilityType().equals(AbilityType.TRIGGERED)) { // triggered abilities check this already in playerImpl.triggerAbility
|
if (sourceObject != null && !this.getAbilityType().equals(AbilityType.TRIGGERED)) { // triggered abilities check this already in playerImpl.triggerAbility
|
||||||
sourceObject.adjustTargets(this, game);
|
sourceObject.adjustTargets(this, game);
|
||||||
}
|
}
|
||||||
if (mode.getTargets().size() > 0 && mode.getTargets().chooseTargets(getEffects().get(0).getOutcome(), this.controllerId, this, noMana, game) == false) {
|
// Flashback abilities haven't made the choices the underlying spell might need for targetting.
|
||||||
|
if (!(this instanceof FlashbackAbility) && mode.getTargets().size() > 0 && mode.getTargets().chooseTargets(
|
||||||
|
getEffects().get(0).getOutcome(), this.controllerId, this, noMana, game) == false) {
|
||||||
if ((variableManaCost != null || announceString != null) && !game.isSimulation()) {
|
if ((variableManaCost != null || announceString != null) && !game.isSimulation()) {
|
||||||
game.informPlayer(controller, (sourceObject != null ? sourceObject.getIdName() : "") + ": no valid targets with this value of X");
|
game.informPlayer(controller, (sourceObject != null ? sourceObject.getIdName() : "") + ": no valid targets with this value of X");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue