Yanfly made a lot of useful Tips n Tricks videos, including how to make the Leech Seed skill from the Pokemon games. I'd like to make a skill in the same way, but have it leech MP instead of HP.
Yanfly's setup is this. First there's a skill, this skill is very simple and all it does is applying a state to the target. The state on the other hand has some special code snippet in it's note box to make it work (it also requires some of Yanfly's plugin).
Now, I don't really know JavaScript myself so even while everything is nicely commented (which helps a lot with understanding) I can't really say I'd know how to do what I'd like to do.
But I suspect this is could be super simple for someone who knows just a wee bit of JavaScript, so hopefully someone can help me out here.
I'd be very grateful.
Thanks for taking your time and reading all the way down here.
Yanfly's setup is this. First there's a skill, this skill is very simple and all it does is applying a state to the target. The state on the other hand has some special code snippet in it's note box to make it work (it also requires some of Yanfly's plugin).
Code:
<Custom Regenerate Effect>
// Check if the original caster isn't the target and that the original target is alive.
if (origin !== target && origin.isAlive()) {
// Determine the damage dealt.
var damage = target.hp / 8;
// Round up the damage.
damage = Math.ceil(damage);
// Cap the damage to 500.
damage = Math.min(500, damage);
// Play the healing animation on the original caster.
origin.startAnimation(46);
// Original caster gains HP.
origin.gainHp(damage);
// Show the HP gained.
origin.startDamagePopup();
// Clears the original caster's HP popup.
origin.clearResult();
// Play the poison animation on the target.
target.startAnimation(59);
// Damage the target's HP.
target.gainHp(-damage);
// Check if the target is dead.
if (target.isDead()) {
// If the target is dead, make it collapse.
target.performCollapse();
}
}
</Custom Regenerate Effect>
Now, I don't really know JavaScript myself so even while everything is nicely commented (which helps a lot with understanding) I can't really say I'd know how to do what I'd like to do.
But I suspect this is could be super simple for someone who knows just a wee bit of JavaScript, so hopefully someone can help me out here.
I'd be very grateful.
Thanks for taking your time and reading all the way down here.
