I am looking for a way to give Actor's a chance to revive, but not have the same apply to enemies.
By using Yanfly's Buffs and States Core, I was able to make it so there was a 5% chance of revival after 3 turns of being Knocked Out (State 1). If you were not revived in those 3 turns, you will Die (State 2).
Code:
<Custom Leave Effect>
var chanceDie = Math.random();
if (chanceDie < 0.95)) {
target.addState(2);
}
</Custom Leave Effect>However, I don't want this to apply to Enemies, only Actors. However, no matter how I seem to write the custom script, it just doesn't seem to work.
I am open to using any of Yanfly's plugins.
Link to plugin referenced earlier: http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/