I think this goes here? My apologies if it doesn't.
Anyways, I'm using the Yanfly technique for stacking DOT, and the base stuff works in a fresh project, and then in my main project (yay!). But, I want to alter a few items, and the fresh project doesn't seem to like it (untested in my main project). I want each stack to do 1% of the target's max HP per turn, stacking up to 15 or 20 (currently unsure). I then want the stacks to decrease by 1 each turn (after damage calculation), and I want to have my Bandages (item) remove either 2 or 3 stacks (currently unsure). How would I do this? Thanks in advance!
Anyways, I'm using the Yanfly technique for stacking DOT, and the base stuff works in a fresh project, and then in my main project (yay!). But, I want to alter a few items, and the fresh project doesn't seem to like it (untested in my main project). I want each stack to do 1% of the target's max HP per turn, stacking up to 15 or 20 (currently unsure). I then want the stacks to decrease by 1 each turn (after damage calculation), and I want to have my Bandages (item) remove either 2 or 3 stacks (currently unsure). How would I do this? Thanks in advance!
Code:
<Custom Apply Effect>
target._stackingPoison = target._stackingPoison || 0;
target._stackingPoison += 1;
</Custom Apply Effect>
<Custom Remove Effect>
target._stackingPoison -= 1;
</Custom Remove Effect>
<Custom Regenerate Effect>
target._stackingPoison = target._stackingPoison || 1;
var stacks = Math.min(20, target._stackingPoison);
var damage = stacks * a.mHp * 0.01;
// Play poison animation on the target.
target.startAnimation(59);
// Target takes HP damage.
target.gainHp(-damage);
// Play the popup.
target.startDamagePopup();
// Clear the results.
target.clearResult();
// Check if the target is dead.
if (target.isDead()) {
// If the target is dead, make it collapse.
target.performCollapse();
}
</Custom Regenerate Effect>