How to make a specific spell?

Hello,

For my game I am trying to create a spell that allows the user to become immune to death for 3 turns but then die afterwards. Is there a possible way to do this?

Thanks
several - you'll need a state to add immunity to death, that's easy. Then you need a counter for the turns and kill the actor when the immunity runs out.


This part can be done with troop events, but that would be a bit tricky - or you can use a script that chains states, activating the death state after the resist state runs out.


Tsukihime wrote such a script, but I don't have the link.
Two ways I might go about this:

1) Have the spell apply two states to the target.  One gives +900% Health Regen (I think you can do this with 9 separate HRG + 100% features) and State Resist to Death, and lasts 3 turns.  The other gives -900% Health Regen and lasts 4 (or more) turns.

2) Have the spell apply a state to the target that gives State Resist to Death and a Recovery Effect Rate of 0% for 3 turns, and also have it run a Common Event.  In the Common Event, use the Change HP command to reduce the target's HP by 999999 and allow Knockout.  (Since the Actor resists death, it will reduce their HP to 0, but not kill them yet.)  Since the target can't be healed while this state is on them, they will die as soon as the state wears off.
Though, you'd need to save the target into a variable from the damage formula so you can select it from the change hp command...

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-specific-spell.45422/