- Joined
- Dec 24, 2018
- Messages
- 59
- Reaction score
- 3
- First Language
- Finnish
- Primarily Uses
- RMMV
So, I'm trying to adapt http://yanfly.moe/2016/05/28/tips-tricks-auto-life-rpg-maker-mv/ to deal damage to all enemies instead of reviving the character, however I'm not proficient at Java at all, so, I hope I can get some help.
Here's the code/notetag:
Here's the code/notetag:
Code:
<Category: Bypass Death Removal>
<Custom Deselect Effect>
// Check if the target's HP is 0 or is currently in the death state.
if (target.hp <= 0 || target.isDead()) {
// Play the auto-life animation on target.
target.startAnimation(49);
// Set the amount of HP recovered to 10%.
var rate = 0.10;
// Calculate the HP healed.
var heal = Math.floor(target.mhp * rate);
// Remove the Auto-Life state.
target.removeState(stateId);
// Heal the target.
target.gainHp(heal);
// Make the damage popup show for the heal.
target.startDamagePopup();
// Clear the target's results.
target.clearResult();
}
</Custom Deselect Effect>


