Eval Collection: Road to Luck

Yep, that’s how I call this state in my game! ♥

Once per battle when the battler takes lethal damage, his HP are reduced to 1 instead of 0 and all other party members restore (a set amount of) HP (2000 in my case). This will only save the hero’s ass once per battle, though.


♦ YEP_BuffsStatesCore.js


♦ YEP_AutoPassiveStates.js

This state is best used as a passive state.


<Custom Battle Effect>
user.HasBeenSaved = 0
</Custom Battle Effect>

<Custom React Effect>
if (target.HasBeenSaved < 1 && value > target.hp) {
value = target.hp - 1;
target.HasBeenSaved = 1;
for (var i = 0; i < $gameParty._battleMembers.length; i++) {
var actor = $gameParty._battleMembers[i];
if (actor < 1) { continue };
if ($gameActors.actor(actor) === target) { continue };
</Custom React Effect>

Lines 9 to 17 are optional! If you decide to keep them your state will heal all the other heroes when it is triggered.
In Line 13 you can change which animation is displayed on the actors.
In Line 14 you can change how much HP is restored. If you intend to calculate something based on the actor’s stats, use “$gameActors.actor(actor)” as the variable. (Example: You want the state to heal 25% of the actor’s health instead of a flat 2000 HP. Then you’d use: “Math.floor($gameActors.actor(actor).mhp * 0.25)”



Write a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s