I'm trying to create a variable mana capacity system, and so far have this rough code:
<Calculate InternalName="Calc" ValueOwner="player">
<Expression><![CDATA[[GetMana] - [Capacitance]]></Expression>
</Calculate>
<Calculate InternalName="Value" ValueOwner="player">
<Expression><![CDATA[[Calc] > 0]]></Expression>
</Calculate> OR
if (calc < 0)
{calc = 0}
I don't know how to do a value check.
<ModType>Resource</ModType>
<Attribute>Mana</Attribute>
<PerTurn>1</PerTurn>
<Calculate InternalName="Value" ValueOwner="player">
<Expression><![CDATA[[-Calc]]]></Expression>
</Calculate>
Hopefully, this would check the current mana against the maximum, and dump any excess, if I can check that the calc is a positive number. But I have no idea where this code would go where it would be run at the end of every turn. Can anyone help?