Hello everyone. I was wondering if I could get some help with this script. I want to check after every battle is over if the party has a certain state on them. If they have the state I want to restore their hp back to a certain percentage. I currently have this.
$gameParty.battleMembers().forEach(function(actor)
{
if(actor.isStateAffected(62) === true){
var setHp = actor.mhp*75;
actor.gainHp(setHp);}
else if(actor.isStateAffected(63) === true){
actor.gainHp(actor.mhp*50);}
else if(actor.isStateAffected(64) === true){
actor.gainHp(actor.mhp*20);}
else{
actor.gainHp(actor.mhp);}
})
For some reason the player is always healed fully instead. I tried doing an if statement to check if the player has the correct state to allow a full heal but this still doesn't change anything
$gameParty.battleMembers().forEach(function(actor)
{
if(actor.isStateAffected(62) === true){
var setHp = actor.mhp*75;
actor.gainHp(setHp);}
else if(actor.isStateAffected(63) === true){
actor.gainHp(actor.mhp*50);}
else if(actor.isStateAffected(64) === true){
actor.gainHp(actor.mhp*20);}
else{
actor.gainHp(actor.mhp);}
})
For some reason the player is always healed fully instead. I tried doing an if statement to check if the player has the correct state to allow a full heal but this still doesn't change anything