Hello!
I am trying to make the stockpile skill from here to increase the user's maxHP temporarily by a flat amount, let's say 5.
I have it working that whenever I use the skill, it does increase hte maxHP, but it goes beyond the stockpile's stack counter which is 3 as default.
This is what I have so far. I couldn't find anyone who is using these stacking skills + increasing a stat.
I would also like to know how to increase a skill DMG by a flat amount using the same stockpile skill.
Thank you!
I am trying to make the stockpile skill from here to increase the user's maxHP temporarily by a flat amount, let's say 5.
I have it working that whenever I use the skill, it does increase hte maxHP, but it goes beyond the stockpile's stack counter which is 3 as default.
Code:
<Custom Apply Effect>
// Default the stockpile stacks to 0.
user._stockpile = user._stockpile || 0;
// Increase the stockpile stack by 1
user._stockpile += 1;
// Cap the stockpile stack at 3
user._stockpile = Math.min(user._stockpile, 3);
// Update the state counter for the stockpile stack
user.setStateCounter(stateId, user._stockpile);
var boost = 5;
user.addParam(0, boost); // mhp up
user.gainHp(boost); // hp up
</Custom Apply Effect>
<Custom Remove Effect>
// Set the user's stockpile stack to 0
user._stockpile = 0;
// Update the state counter for the stockpile stack
user.setStateCounter(stateId, user._stockpile);
var boost = 5;
user.gainHp(-boost); // hp down
user.addParam(0, -boost); // mhp down
</Custom Remove Effect>
This is what I have so far. I couldn't find anyone who is using these stacking skills + increasing a stat.
I would also like to know how to increase a skill DMG by a flat amount using the same stockpile skill.
Thank you!