From 11158d5fa4cea8e271a2442bffd75cd4bf4191da Mon Sep 17 00:00:00 2001 From: Nathaniel Brandes Date: Tue, 17 May 2016 00:59:53 -0700 Subject: [PATCH] Fix casting spell with no cost. Ancestral visions should now correctly not be castable with Jace, Telepath Unbound and be castable for free with Sins of the Past and its ilk. --- Mage/src/main/java/mage/players/PlayerImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index 4e8b113f851..39aa8162124 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -1314,6 +1314,9 @@ public abstract class PlayerImpl implements Player, Serializable { if (zone != Zone.BATTLEFIELD && game.getContinuousEffects().asThough(object.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, this.getId(), game)) { for (Ability ability : object.getAbilities()) { if (canUse || ability.getAbilityType().equals(AbilityType.SPECIAL_ACTION)) { + if (ability.getManaCosts().isEmpty() && ability.getCosts().isEmpty() && ability instanceof SpellAbility && !(ability.getSourceId() == getCastSourceIdWithAlternateMana())) { + continue; // You can't play spells that have no costs, unless you can play them without paying their mana costs + } ability.setControllerId(this.getId()); if (ability instanceof ActivatedAbility && ability.getZone().match(Zone.HAND) && ((ActivatedAbility) ability).canActivate(playerId, game)) {