mage icon indicating copy to clipboard operation
mage copied to clipboard

Companion in hand highlighted as if playable when 3 mana available, even if not enough to cast it

Open xenohedron opened this issue 1 year ago • 3 comments

Jegantha, the Wellspring as my companion.

On my third turn, I pay {3} to move it to my hand.

On my fourth turn, before I even play a fourth land, Jegantha is highlighted in hand as if it were playable. Clicking on it does nothing, so only a visual bug.

It appears to be related to the ability that functions from outside the game, as it shows as playable in hand if I have 3+ available mana, but with only 2 available mana it no longer shows as playable.

So I speculate that somewhere in the engine, Zone.OUTSIDE isn't being handled correctly for usable zone logic for playable check.

xenohedron avatar Aug 24 '24 19:08 xenohedron

I have noticed multiple times where things are highlighted as castable when they are not - usually when there is a mana source with restrictions.

For example, If I have Rosheen Meanderer onfield and available to tap, the {C}{C}{C}{C} it can create is included in any evaluation on what could be cast from hand - ignoring the fact that it cant be used to cast those cards (because that is not using it for an {X}).

tiera3 avatar Aug 26 '24 09:08 tiera3

things are highlighted as castable when they are not - usually when there is a mana source with restrictions

It’s by design — some mana restriction or replacement effects works after real cast/target only, so it’s impossible to predict a usage and game engine uses maximum possible mana for calculations (see getNetMana method). Current mana calculated only one time for all, not per permanent/card/ability. Available mana calculation is hard and cpu consumption process. I don’t think it’s ever will be used per ability.

JayDi85 avatar Aug 26 '24 11:08 JayDi85

The issue I opened has nothing to do with conditional mana. That's a separate topic, and as JayDi says, the engine is designed to be permissive about potential casting in such cases.

The issue here is that an ability that should only be active in Zone.OUTSIDE is considered as possible to activate from Zone.HAND.

xenohedron avatar Aug 27 '24 03:08 xenohedron