I have a state that, when leaves, the target will receive the 200% of the damage dealt by the origin. This is works great, but if the HP is reduced to 0 by this way, the target doesn't die.
Code:
<JS On Add State>
target._tauntDmg = 0;
</JS On Add State>
<JS Pre-Damage as Target>
if (value > 0 && attacker === origin && this.isHpEffect()) {
target._tauntDmg += value;
}
</JS Pre-Damage as Target>
<JS On Expire State>
$gameTemp.requestAnimation([target], 56);
var dmg = Math.round(-2 * target._tauntDmg);
target.gainHp(dmg);
target.tauntDmg = 0;
target.startDamagePopup();
target.clearResult();
</JS On Expire State>