palom

Villager
Member
Joined
Aug 23, 2017
Messages
10
Reaction score
0
First Language
spanish
Primarily Uses
RMVXA
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
Veteran
Joined
Sep 1, 2020
Messages
48
Reaction score
29
First Language
English
Primarily Uses
RMMZ
I would imagine the damage formula would look something like this:

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

palom

Villager
Member
Joined
Aug 23, 2017
Messages
10
Reaction score
0
First Language
spanish
Primarily Uses
RMVXA
I tested it and it works!!!! Thank you very much.
 

Nolonar

Veteran
Veteran
Joined
Feb 18, 2018
Messages
264
Reaction score
367
First Language
French, German
Primarily Uses
RMMZ
Alternate formula: Math.min(150, b.hp - 1)

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

palom

Villager
Member
Joined
Aug 23, 2017
Messages
10
Reaction score
0
First Language
spanish
Primarily Uses
RMVXA
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 Threads

Latest Posts

Latest Profile Posts

uglywolf wrote on Khulse's profile.
Hello.
The rules I makes pun about on your last thread is about "Verify Files" before anything else, if the stuff comes from STEAM. Which means, if it could be fixed with just that, there is no need to redownload the whole stuff.
But glad the reinstall worked, hope you enjoy it and your days too.
uh oh, I just tapped into a fresh, deep vein of nightmare fuel right here guys:
51F2AC5E-A605-446E-9439-D77AA6A0B0ED.pngAdded console to my content thread here
Sweet nostalgia. My fave Final Fantasy game.

Forum statistics

Threads
115,429
Messages
1,089,785
Members
150,185
Latest member
DarkPurplePrince
Top