mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
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.
This commit is contained in:
parent
9e4442547d
commit
11158d5fa4
1 changed files with 3 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue