Hello guys, thanks for the usual help.
So, i'm using visustella battle core to apply splash damage after an enemy is hit and is still alive with this code provided by @ATT_Turan in another thread:
It works perfectly if the target is still alive, but the problem is: if the targeted enemy dies, the splash damage doesn't happen and the battle is over (victory) even with other enemies alive! lol
I wanted to fix this but have been struggling a lot.
Appreciate the help, guys.
So, i'm using visustella battle core to apply splash damage after an enemy is hit and is still alive with this code provided by @ATT_Turan in another thread:
<JS Post-Damage>
for (let i=0; i<target.friendsUnit().aliveMembers().length; i++)
{
if (target.friendsUnit().aliveMembers()[i]!=target)
{
target.friendsUnit().aliveMembers()[i].gainHp(0-Math.round(value/2));
target.friendsUnit().aliveMembers()[i].startDamagePopup();
}
}
</JS Post-Damage>
It works perfectly if the target is still alive, but the problem is: if the targeted enemy dies, the splash damage doesn't happen and the battle is over (victory) even with other enemies alive! lol
I wanted to fix this but have been struggling a lot.
Appreciate the help, guys.