What is supposed to happen is this:
At turn 0, the state 'Leech' is inflicted on the boss, who is enemy #8
Each turn, 5% of the entire party's HP is taken and absorbed by the boss, using this scriptlet in the troop event
a=0
$game_party.members.each{|actor|
#if actor.state?(77)
b=(actor.hp*5/100)
actor.hp-=b
a+=b
#end
}
$game_troop.members[0].hp += a
I know that the state is being successfully applied, because there is a text announcement and the boss has the icon showing on it.
However, the HP is being absorbed by enemy #1
I know this because it keeps resurrecting.
Obviously I need to be more specific in that bit of coding about which enemy is to benefit, but I cannot see where and how. Could anyone help out?
Thank you.
At turn 0, the state 'Leech' is inflicted on the boss, who is enemy #8
Each turn, 5% of the entire party's HP is taken and absorbed by the boss, using this scriptlet in the troop event
a=0
$game_party.members.each{|actor|
#if actor.state?(77)
b=(actor.hp*5/100)
actor.hp-=b
a+=b
#end
}
$game_troop.members[0].hp += a
I know that the state is being successfully applied, because there is a text announcement and the boss has the icon showing on it.
However, the HP is being absorbed by enemy #1
I know this because it keeps resurrecting.
Obviously I need to be more specific in that bit of coding about which enemy is to benefit, but I cannot see where and how. Could anyone help out?
Thank you.