False Swipe Attack Formula?

I have a doubt, I want to make an attack with a "False Swipe" style, this attack will deal fixed damage (150 for example), but if that skill will kill the opponent it let it with 1 HP instead.

I was trying to lurk for a damage formula, but I didn't found it.

Thank you
I would imagine the damage formula would look something like this:

b.hp >= 151 ? 150 : b.hp - 1
I tested it and it works!!!! Thank you very much.
No problem.
Alternate formula: Math.min(150, b.hp - 1)

It gives you the smaller number between 150 and HP-1.
Alternate formula: Math.min(150, b.hp - 1)

It gives you the smaller number between 150 and HP-1.
Thanks, I'll save that formula too

Original thread: https://forums.rpgmakerweb.com/threads/false-swipe-attack-formula.138935/