MV State that reduces damage to 1HP per hit

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 think you could use a Custom React Effect to modify the incoming damage before it gets applied?

<Custom React Effect> if (value > 0) value = 1; </Custom React Effect>
caethyril's solution is the easy way to correctly do this.

As a quick note, any time you post code you should always use the CODE tags (the </> on the icon bar). Otherwise indentations get lost and some characters won't display properly. So, to give a bit of explanation on your original code:
if ($gameParty.inBattle()) {
if ($gameParty.inBattle() && target._secondChance) {
Checking for $gameParty.inBattle() is pointless. These notetags only get looked at when an action is being resolved...and an action can only resolve during battle. So inbattle() will never not return true.

<Custom Respond Effect>
...
target.setHp(target.hp - 1);
This is the incorrect notetag to use. Custom Respond happens after damage has been dealt. So you're taking the original damage from the attack, then taking away another one.
I think you could use a Custom React Effect to modify the incoming damage before it gets applied?

<Custom React Effect> if (value > 0) value = 1; </Custom React Effect>

Thanks! Works a treat once I put the animation sequence in.

Original thread: https://forums.rpgmakerweb.com/threads/state-that-reduces-damage-to-1hp-per-hit.151338/