# False Swipe Attack Formula?

#### palom

##### Villager
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

#### CrocPirate

##### Veteran
I would imagine the damage formula would look something like this:

b.hp >= 151 ? 150 : b.hp - 1

#### palom

##### Villager
I tested it and it works!!!! Thank you very much.

No problem.

#### Nolonar

##### Veteran
Alternate formula: `Math.min(150, b.hp - 1)`

It gives you the smaller number between 150 and HP-1.

#### palom

##### Villager
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

### Latest Profile Posts

Uploaded a new Video today where I play Minecraft "The Bridge" please check it out & let me know what you think of it!
I normally only post these every 24 hours, but same-sex marriage is coming to Rune Factory 5 and I just wanted to share it with the world! https://www.xseedgames.com/2021/09/23/rune-factory-5-localization-blog-2/
Today was wild. In the day I worked in my project (and realized I have almost 100 hours wich is a happy surprise), and now i'm having to calm my boyfriend down because of chris pratt Mario.
hey pepe, why do you have a gun on your head? where is wojak?
Still alive! Totally did not finish in time for the Jam (boy that's late) but tl;dr of the last half a year is Work term -> Covid Lockdown -> Sick... again -> Full time Employment. Game stuff has been on hiatus but got a new graphics tablet so hopefully updates again soon. =D