magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.88k stars 767 forks source link

Spells shown as castable even when they can't be #8960

Open Alex-Vasile opened 2 years ago

Alex-Vasile commented 2 years ago

Say your opponent has a [[Void Winnower]] on the battlefield and you have a [[Jayemdae Tome]] in your hand and the mana to cast it.

The game highlights the Tome as castable. However, when you go to cast It you're told that you can't cast it because of the Winnower.

This isn't a great experience. Would be nicer if the card was not highlighted. And possibly given a hint similar to the hint given to it by Winnower for cards that can no longer block:

Screen Shot 2022-05-14 at 8 18 40 PM
github-actions[bot] commented 2 years ago

Void Winnower - (Gatherer) (Scryfall) (EDHREC)

{9} Creature — Eldrazi 11/9 Your opponents can't cast spells with even mana values. (Zero is even.) Your opponents can't block with creatures with even mana values.

Jayemdae Tome - (Gatherer) (Scryfall) (EDHREC)

{4} Artifact {4}, {T}: Draw a card.

Alex-Vasile commented 2 years ago

This is also true of activated ability, but not under all circumstances.

For example. Pithing Needling a creature will result in it showing as activatable, but will provide you with a pop up after trying to activate saying that you can't do it. Pithing Needle implements its ability using ContinuousRuleModifyingEffectImpl.

Cursed Totem on the other hand uses a RestrictionEffect to implement its (very similar) ability. (and even includes the hint showing why it's ability can't be activated).

Why are these two very similar abilities implemented/acting so differently?

akuma508 commented 2 years ago

Yorion, Sky Nomad has the same problem. Suggest is castable from hand, then dont have enough mana.

JayDi85 commented 2 months ago

[[Yorion, Sky Nomad]]

github-actions[bot] commented 2 months ago

Yorion, Sky Nomad - (Gatherer) (Scryfall) (EDHREC)

{3}{W/U}{W/U} Legendary Creature — Bird Serpent 4/5 Companion — Your starting deck contains at least twenty cards more than the minimum deck size. (If this card is your chosen companion, you may put it into your hand from outside the game for {3} as a sorcery.) Flying When Yorion enters, exile any number of other nonland permanents you own and control. Return those cards to the battlefield at the beginning of the next end step.

JayDi85 commented 2 months ago

Wrongly playable activated abilities fixed in #10642. But spell abilities still affected by preventedByRuleModification effects -- you will see such cards as playable but will catch game message on click.