I created the following passive effect:
The idea is that if anyone's below 30% HP at the end of the user's turn, all of them will be healed up to 50% HP. It works, but I'm worried that it's too powerful, and my attempts to make it more balanced just break it. Does it need to be balanced, or should I just leave it as is?
Code:
<Custom Regenerate Effect>
var group = user.friendsUnit().aliveMembers();
//Go through all party members
for (var i = 0; i < group.length; i++){
var ally = group[i];
var ally_currentHp = ally.hp;
var healThreshold = Math.floor(ally.mhp * 0.3);
//Check if the ally exists and is at or below 30% HP
if (ally && ally_currentHp <= healThreshold){
//Restore each ally's HP to 50%
var recovery = Math.floor(ally.mhp / 2);
ally.gainHp(recovery - ally.hp);
}
}
</Custom Regenerate Effect>
The idea is that if anyone's below 30% HP at the end of the user's turn, all of them will be healed up to 50% HP. It works, but I'm worried that it's too powerful, and my attempts to make it more balanced just break it. Does it need to be balanced, or should I just leave it as is?