# RMMVHelp, I need to set the minimum damage to 1

#### STARFALL

##### STARFALL
How could I make the minimum damage of all skils of my game to be 1.

#### Tiamat-86

##### old jrpg gamer
you could make every skill do an "if" check to see if would do damage or not.
MV formulas dont have a limit on the size so easy to do. (unlike VX which has a limit to formula size)
formulaA > 1 ? formulaA : 1

#### STARFALL

##### STARFALL
you could make every skill do an "if" check to see if would do damage or not.
MV formulas dont have a limit on the size so easy to do. (unlike VX which has a limit to formula size)
formulaA > 1 ? formulaA : 1
I'll be honest with you, I don't know how to implement that, if you could give me an example, I'd appreciate it,

#### 41728280

##### Veteran
+1 at the end of the damage formula

#### STARFALL

##### STARFALL
value = Math.floor(ArcanePotencial) +1;

do you think that's okay?

#### 41728280

##### Veteran
Don't know, i won't be that complicated
I just changed the damage formula to (a.atk * 4-b.def * 2) + 1
This format

#### ScorchedGround

##### Blizzards most disappointed fan
You could also do

Math.max(1, X)

For X just put your normal damage formula.
If the skill would do 0 damage, it will instead deal 1.

Example:
Math.max(1, a.atk * 4 - b.def * 2)

#### Wavelength

##### MSD Strong
All of these will work but only if you want the minimum damage to be 1 before things like elemental weaknesses/resistances, physical/magical damage rates, critical hit multipliers, etc. are applied.

If you want it applied afterwards, you'd need a plugin or at least a little "scriptlet". You'd probably want to apply it after damage is calculated but right before damage is actually applied to a battler's HP.

#### Tiamat-86

##### old jrpg gamer
1 note for all of these suggestions (including my own) and only realize this after reading wave's comment.
these will completely negate any kind of damage changed into healing.
like when using <absorb element: fire> from plugins

edit: almost all
+1 at the end of the damage formula
this 1 would still work with absorb element plugins

##### Veteran
MrTrivel make a plugin for it for minimum damage, so you can set it to 1 or higher if you want too.

#### STARFALL

##### STARFALL
Alright guys, I already found a solution using '' if '' as suggested by @Tiamat-86 and it worked.
This was my solution
var ArcanePotencial = ( user._criticalCount * 0.5) * ( user.mat * 3) - ( target.mdf * 2); if (ArcanePotencial < 1){ var ArcanePotencial = 1; } "

I'm not very knowledgeable about Js, mine was always the visual part of the games and this is the first time that I am making a game by myself, so I appreciate all your opinions and advice.

### Latest Profile Posts

--- Surprise Part 2 ---

F.Healer: Look,i'm the Cute White Ghost!
F.Mage: And,im the Scary Witch!
M.Archer: I'm The Handsome Vampire!
M.Fighter: AWOOOOOOO!!!
(Suddenly,The Electricity Is Turned Off. Then Turned On 10 Seconds Later)
Hero: (With Scream Mask & Bloody Knife) Hey,how about my Costume?
Entire Party: (Screaming Until Faint)

230 paths... roughly 250 light sources on the screen... One serious lag fiesta... But I finally got it all the screen at once. I guess I could have also just made an event to spawn each one in exactly the location I needed, but that's sooo much less fun.
A wee radio thing I made months and months and months ago. 2020 has felt like such a long year. Maybe made this before 2020.IDK anymore.

Made this one much more recently.