magefree / mage

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

Game doesn't let some spells enter the stack despite having mana to cast them #6698

Open Zerrisx opened 4 years ago

Zerrisx commented 4 years ago

This is a thread for any spells that you are unable to cast despite having the mana to pay for them. Most of these will likely be spells with cost reductions where you can afford the reduced version but not the full version, or where your mana sources are somehow weird (conditional moxen, Channel, spirit guides, creatures that generate variable amounts of mana, etc).

If you're reporting a card with this kind of issue, please include a screenshot of the battlefield if possible - if not, list the spell you were trying to cast along with all the available mana sources you were trying to use to cast it.

See also: related issue #6684 for extended discussion. Old issue: #5150

Currently, the following have been reported:

Still Bugged:

Bugged Combos:

All of these will be very hard to calculate due the dynamic mana ability side effects or conditional combinations going on, and should probably remove hard stops if in play.

Fixed:

Coal Golem First: image

Dromar First: image

Hateful-Little-Bear commented 4 years ago

Having this problem with Tasigur, the Golden Fang. I can't attempt to use delve to cast him from command zone.

Screenshot (1)

LevelX2 commented 4 years ago

I would close all the duplicate tickets (as done with #6696).

Or should we let them open until the related problem is resolved? But because the needed changes are probably more general it's unneccessary work.

JayDi85 commented 4 years ago

@LevelX2 no needs to close original issues -- it's contains additional info and users can find it by default search until real fix (github searches in active issues by default). Just add related links to that post or wait Zerrisx (he can collect and update that list too). When you fix card then close all related issues from that post too.

My logic: if I can find active issues with card name/ability then problem isn't fixed yet in xmage. Single tasks are much easier to find than shared lists. As example: feedback topics -- I need to open every founded feedback list to find is it fixed or not: shot_200622_191313

Zerrisx commented 4 years ago

Should we also report cases of cards thinking they can be cast when they can't? Some of them might have good reason, but they could also be indicative of issues.

For example, Willbender thinks it can be cast at all times - including during my opponent's turn with no mana sources available. image

JayDi85 commented 4 years ago

Yes, report it too. Also you can report some potential bugged cards or combo that need to check. Just mark it as possibly bugged.

serokellcao commented 4 years ago

Wizard's Lightning doesn't work with Githu Lavarunner, but works with Burning Prophet.

Happened in one game, but not in another! Undefined behaviour is sad :(

Zerrisx commented 4 years ago

Wizard's Lightning doesn't work with Githu Lavarunner, but works with Burning Prophet.

Happened in one game, but not in another! Undefined behaviour is sad :(

Weird - both cards worked with the discount for me; was able to cast Wizard's Lightning with just one mountain and either one in play.

Terminus42 commented 4 years ago

First off sorry for not having a screenshot showing the exact game state.

Trying to cast Expansion // Explosion's Expansion part with two floating blue mana and without untapped lands consistently produces an issue for me. The spell doesn't begin casting, quite possibly because the game calculates the required amount of floating mana incorrectly.

LevelX2 commented 4 years ago

K'rrik, Son of Yawgmoth problem seems to be fixed, can't reproduce the problem.

Same for Torgaar, Famine Incarnate .

Zerrisx commented 4 years ago

K'rrik, Son of Yawgmoth problem seems to be fixed, can't reproduce the problem.

Same for Torgaar, Famine Incarnate .

Torgaar appears to be fixed.

K'rrik, however, seems reproducible enough to me testing after the latest commit:

image

SpikesCafe-google commented 4 years ago

I think this is probably related. Kaleidostone makes it think I can't cast any of the spells in my hand. If I tap the mana before casting the spell, it lets me cast them. If I have 5 lands untapped and could activate Kaleidostone, it also lets me cast them. On 1.4.44V0-beta17. Capture

Zerrisx commented 4 years ago

First off sorry for not having a screenshot showing the exact game state.

Trying to cast Expansion // Explosion's Expansion part with two floating blue mana and without untapped lands consistently produces an issue for me. The spell doesn't begin casting, quite possibly because the game calculates the required amount of floating mana incorrectly.

Can't reproduce this one.

I think this is probably related. Kaleidostone makes it think I can't cast any of the spells in my hand. If I tap the mana before casting the spell, it lets me cast them. If I have 5 lands untapped and could activate Kaleidostone, it also lets me cast them. On 1.4.44V0-beta17.

Yep, this one I can; adding to the list.

LevelX2 commented 4 years ago

The problem does also exist for all spells with the " offering" keyword. Card can only be cast if all mana is available in the normal way.

Zerrisx commented 4 years ago

The problem does also exist for all spells with the " offering" keyword. Card can only be cast if all mana is available in the normal way.

I swear I added that, but I think it got wiped out by somebody else's edit. Adding it again.

Zerrisx commented 3 years ago

Major categories that seem to have issues right now: Storage Lands/artifacts (fixed by 7ad7d5f), Mana Doublers (fixed by 8924988), Permanents that can tap other permanents to add mana like Birchlore Rangers (fixed by 81e5650), and cards that can remove counters or sacrifice permanents to add mana.

LevelX2 commented 3 years ago
* Deathrite Shaman - unable to cast Faithless Looting off a Deathrite Shaman with a plains in my graveyard

That ability is no mana ability (because of the target). So it would mean to scan all abilities (instead of now only mana abilities) during calculation of available mana calculation. Don't know if we should do that.

Zerrisx commented 3 years ago
* Deathrite Shaman - unable to cast Faithless Looting off a Deathrite Shaman with a plains in my graveyard

That ability is no mana ability (because of the target). So it would mean to scan all abilities (instead of now only mana abilities) during calculation of available mana calculation. Don't know if we should do that.

Oh right, I always forget that one's not a mana ability. Removing from the list.

Zerrisx commented 3 years ago

Finished going through all the mana abilities in my searches; added all the new ones I found to the list.

acabaca24 commented 3 years ago

Yesterday my opponent couldn't activate his Rishadan Port in my upkeep when he was given priority. His untapped lands were Rishadan Port and Thespian Stage, I'm pretty sure this is related to this issue, that's why I didn't open a new one. Hopefully I'm right.

Zerrisx commented 3 years ago

Yesterday my opponent couldn't activate his Rishadan Port in my upkeep when he was given priority. His untapped lands were Rishadan Port and Thespian Stage, I'm pretty sure this is related to this issue, that's why I didn't open a new one. Hopefully I'm right.

It could be, but I'd be a little surprised - most of these issues are due to bad cost-reduction or mana adding calculations, and Rishadan Port / Thespian's Stage don't have any of that. I'd suggest writing it up separately.

acabaca24 commented 3 years ago

Yesterday my opponent couldn't activate his Rishadan Port in my upkeep when he was given priority. His untapped lands were Rishadan Port and Thespian Stage, I'm pretty sure this is related to this issue, that's why I didn't open a new one. Hopefully I'm right.

It could be, but I'd be a little surprised - most of these issues are due to bad cost-reduction or mana adding calculations, and Rishadan Port / Thespian's Stage don't have any of that. I'd suggest writing it up separately.

Okay, I'll be doing that!

Zerrisx commented 3 years ago

I separated out the individual calculation card bugs from the combo bugs - most of the combos will be too complicated to reasonably calculate, so we should probably consider the cards involved as blank checks for the purposes of hard stops. i.e. if you have Kydele, Chosen of Kruphix in play, you are considered to have infinite {C} mana. Same for Treasonous Ogre and {R}, Skirge Familiar and {B}, Titan's Nest and {C} for colored non-X spells, and Pili-Pala for... I guess all colors of mana? Pili-Pala calculations are a mess.

Short version is: tapped permanents, cards in any zone, and life are all common side effects of mana abilities and could have any number of additional replacement effects affecting them, so other mana abilities that are conditional on those traits produce indeterminate amounts of mana.

LevelX2 commented 3 years ago
* Selvala, Explorer Returned - you should be able to cast spells that require up to G per player in the game from Selvala, but you can't cast a 1GG spell off a forest and Selvala in a two person game

Seems to work ok for me. You don't know if non land cards are revealed.

Zerrisx commented 3 years ago
* Selvala, Explorer Returned - you should be able to cast spells that require up to G per player in the game from Selvala, but you can't cast a 1GG spell off a forest and Selvala in a two person game

Seems to work ok for me. You don't know if non land cards are revealed.

So, Selvala, Explorer Returned is... weird. Specifically, you can put a spell (say, Channel) on the stack and declare that you intend to pay for it by tapping Selvala and revealing two creatures, one from each player's library, as a mana ability. You can do this even if you don't know that there's a creature on top of each deck. You can do it even if you explicitly do know that one of the two decks doesn't have a creature on top.

However, if you do this and as a result can't pay for the spell, the entire cast is undone (except the card draw, though that's not relevant to my point here). See this ruling on Selvala:

5/29/2014: If you activate Selvala’s ability while casting a spell, and you discover you can’t produce enough mana to pay that spell’s costs, the spell is reversed. The spell returns to whatever zone you were casting it from. You may reverse other mana abilities you activated while casting the spell, but Selvala’s ability can’t be reversed. Whatever mana that ability produced will be in your mana pool and each player will have drawn a card.

When does it matter that you can do this with the spell on the stack instead of before casting it?

For one, because of Panglacial Wurm, everybody's favorite rule-breaking card.

Example: if you have Panglacial Wurm on top of your library and five forests plus an evolving wilds in play, you can crack a fetchland, start searching your library, put Panglacial Wurm on the stack, then cast it by revealing the card below Panglacial Wurm and the top of your opponent's library. Since activating Selvala beforehand would result in drawing the Wurm, blind-activating like this is the only way to get the extra value off Panglacial Wurm, and MTG lets you do it. If your opponent doesn't have the creature you needed, whoops, let's just pretend you never did that.

Currently, XMage does not allow this blind activation. image