Target spell abilities - fixed that it was playable in some non-playable use cases (example: Goblin Artisans)

This commit is contained in:
Oleg Agafonov 2024-09-18 18:24:35 +04:00
parent 8fa4405125
commit 91c1d1dc72

View file

@ -1,4 +1,3 @@
package mage.target; package mage.target;
import mage.abilities.Ability; import mage.abilities.Ability;
@ -110,7 +109,7 @@ public class TargetSpell extends TargetObject {
private boolean canBeChosen(StackObject stackObject, UUID sourceControllerId, Ability source, Game game) { private boolean canBeChosen(StackObject stackObject, UUID sourceControllerId, Ability source, Game game) {
return stackObject instanceof Spell return stackObject instanceof Spell
&& game.getState().getPlayersInRange(sourceControllerId, game).contains(stackObject.getControllerId()) && game.getState().getPlayersInRange(sourceControllerId, game).contains(stackObject.getControllerId())
&& filter.match(stackObject, sourceControllerId, source, game); && canTarget(sourceControllerId, stackObject.getId(), source, game);
} }
@Override @Override