Create Zombie States that damage affected battlers when they were to heal HP. – ARP_ZombieState.js

タイトル
Create Zombie States that damage affected battlers when they were to heal HP.
作者名
ヘルプ
Please report any bugs you find to 'atreyo.ray[at]gmail.com'
You don't need to credit me to use this plugin.
You can use it on free or commercial games.
You're free to modify it to suit your needs.
----------------------------------------------------------------------------
INTRODUCTION
----------------------------------------------------------------------------
This plugin allows you to create "zombie" states that causes battlers
afflicted with it to receive damage instead of healing when they are
targeted by skills or items that recover hp.

That also includes the EX-Parameter HP Regeneration. Usually, when it's set
to a positive value, the battler will restore HP at the end of the turn.
With this plugin, if the battler has a positive HP regeneneration AND
a zombie state, it will take damage instead. Please note that when it has a
negative HP Regeneration (like the Poison State), it will still work
normally.

-- -- -- -- --
If you want to make a zombified battler immune to death skills (i.e., skills
that cause instant death), use the following in your skill damage formula:

if(b.isStateAffected(ID)){ 0 } else { FORMULA }

change:
ID - the ID of the zombie state
FORMULA - the damage formula.

Since this an instant death skill, you should probably have as FORMULA:
b.mhp
But make sure you set variance to 0%. Also, battlers that are guarding will
resist death in this case. So, if you don't want it, just make FORMULA a
real big number.

If you want your skill to just have a chance to work, change it on
Invocation - Success.

Using a skill that applies Knockout state (ID 1) on a zombified battler
will still kill it.

Now, if you have more than one zombie state in your game, just add between
the 'if brackets':
|| b.isStateAffected(ID)
for each other zombie state. For example;
if(b.isStateAffected(ID1) || b.isStateAffected(ID2)){ 0 } else { FORMULA }


-- -- -- -- --
Alistair has already released a plugin that allows zombie states.
You can get it here:
http://forums.rpgmakerweb.com/index.php?/topic/49767-zombievampiric-state
It has more features than this plugin, but when my plugin was released
(November 30th, 2015), Alistair's plugin wouldn't work with HP Regeneration.
You could ask Alistair to implement this function on his plugin, and he's
free to copy my code if he wants.

There's also GammaVD's:
http://forums.rpgmakerweb.com/index.php?/topic/48458-state-scripts

Make sure you check those (or any other) before to see which one suits you
best.

----------------------------------------------------------------------------
INSTRUCTIONS
----------------------------------------------------------------------------
Place this plugin BELOW any others that change battle flow.

Please note that this plugin overwrites two methods:
Game_Action.prototype.evalDamageFormula
Game_Battler.prototype.regenerateHp
So, it's not compatible with any other plugins that do the same.

-------
Notetag
-------
Inside a state note:

<zombify>

To turn this state into a "zombie state".
パラメータ
( なし )
ライセンス表記
You can use it on free or commercial games.

紹介ページ https://forums.rpgmakerweb.com/index.php?threads/zombie-state.51904/