I am trying to create a boss that functions in a different way to others. Instead of taking damage relative to the strength of each attack, it loses a single hit point every time it is hit. Thus, the player simply has to deal as many hits per turn as possible, regardless of how strong they are.
I have tried modifying Yanfly's script for Kingdom Hearts' Second Chance skill to reset the boss' HP to 1 less than its current HP every time it is hit, but it doesn't seem to work. Here's what I have at the moment:
<Custom React Effect>
if ($gameParty.inBattle()) {
target._secondChance = target.hp > 1;
}
</Custom React Effect>
<Custom Respond Effect>
if ($gameParty.inBattle() && target._secondChance) {
target.startAnimation(5);
target.setHp(target.hp - 1);
}
</Custom Respond Effect>
Does anyone know where I'm going wrong? If anyone can think of a code that works, I would greatly appreciate it.
I have tried modifying Yanfly's script for Kingdom Hearts' Second Chance skill to reset the boss' HP to 1 less than its current HP every time it is hit, but it doesn't seem to work. Here's what I have at the moment:
<Custom React Effect>
if ($gameParty.inBattle()) {
target._secondChance = target.hp > 1;
}
</Custom React Effect>
<Custom Respond Effect>
if ($gameParty.inBattle() && target._secondChance) {
target.startAnimation(5);
target.setHp(target.hp - 1);
}
</Custom Respond Effect>
Does anyone know where I'm going wrong? If anyone can think of a code that works, I would greatly appreciate it.