Hello,
I'm trying to set up a spell that deals health damage, but if the target has mana left (more than 0). the spell will first try to deplete that mana and then move on to deal damage to health.
At the moment this is done by just setting b.mp to a specified value in the damage formula, but this leads to some messy game messages.
In particular if the target has more mp than the amount of damage the spell would do, the game treats it as if the spell didn't do any damage.
To clean this up I want to make my spell 1 (that deals hp damage) force the character to cast a second spell that deals damage to mp.
(the amount can be stored in a global variable easily enough)
But I'm having trouble getting my character to actually cast that spell.
I'm currently using this bit of code to try and make my character to cast the second spell (spell 6)
a.force_action(6, -2)
But all it does is make the character repeat spell 1, that is supposed to trigger the second spell.
Clearly I'm doing something wrong here.
Is there anyone who could help?