Snow land is colorless, isn't it? In the sense that it can be paid by mana of any color? You just have to control enough untapped snow lands or have enough snow mana in your mana pool? (
Sorry, but snow mana was before my time...)
If that's right, then it could probably be done by using a variant of my waste mana, such as on
Kozilek, the Great Distortion.
You'd need the ability to use a function to combine and check the total number of untapped snow lands (if it's not possible for snow lands to produce multiple mana, then this will be much easier, but I don't know the possibility/impossibility of that) and mana from snow permanents in your mana pool. Use a generic cost block to check if it can be paid and to pay it.
{S}:
- Code: Select all
<COST type="Generic">
<PREREQUISITE>
return CW_Mana_CanPaySnowMana("{2}{S}")
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
CW_Mana_PaySnowMana("{2}{S}")
</RESOLUTION_TIME_ACTION>
</COST>
Of course, those function don't exist yet, you'd need to make them.
This might be best done with a manager for tracking the mana that can currently be paid. Whenever a snow-mana producer enters a state in which it can produce mana, use a continuous action on layer 1 to increment a PlayerDC register. Whenever a snow permanent produces mana manually, capture that mana token in a chest, and set up a CA to stay active for as long as the mana token exists/is untapped.
On a manager token, on layer 0, reset the PlayerDC register to 0. On layer 2, set a second PlayerDC register to whatever the first register is. (This makes sure even things checking on layers 0 and 1 can see the amount of snow mana available.)
Once that's done, just make snow mana producers like normal, but make sure they create the manager, and make sure they have that code for incrementing the register on layer 1. Now, you've got a PlayerDC register containing the amount of snow mana that can currently be paid.
That means all that's left to do is code the functions mentioned above, which will be a pretty simple task. All they need to do is count the number of
symbols in the input string, store that number, replace each of them with
, and make sure the player can pay this new cost and that their PlayerDC register is >= the number of
symbols found.
For the latter function, it's the same process, but then also calling oPlayer:PayManaCost(sNormalizedCost).
Keep in mind there's a helpful function in CW_DC.LOL for getting a PlayerDC chest and creating it if it doesn't exist. This will be really helpful since all of these will need to do that.
CW_DC_PlayerDC(iRegister{, oPlayer = EffectController()})
Just provide a constant for iRegister which you register in the PlayerDC section of the CW_CONSTANTS.LOL file. It'll return the chest at that register, inside which you can use registers 0 and 1 for the above-mentioned PlayerDC registers (which are actually sub-registers, but whatever).
This will NOT work precisely right. The issue is that the player could decide to pay the mana cost portion of this (which doesn't contain any information at that point about snow mana) with any mana they have available. If they pay it without using their snow lands, then those snow lands would still be registered as usable for the next snow-mana-requiring ability. The solution to this is... complicated. If it's even possible. Basically, you'd need to track the number of snow-mana-producers they have, and increment/decrement that based on how many snow-mana-symbols have been paid. This would never naturally reset on its own, and would need to track it indefinitely. But that can wait for a working prototype.