Skill that damages and also buffs the caster?

GoldSnafu

Raccoon tamer
Member
Joined
Dec 30, 2017
Messages
17
Reaction score
40
First Language
Spanish
Primarily Uses
RMMV
Hello everyone, good evening!
I'm having a certain problem with a skill formula. You see, I want to make a skill sort of like "Power-up Punch" in Pokémon, but for the love of God I can't make it work.

I not only cause 0 damage to the enemy, but also buff THEM and then get TPK'd lol

1600387778711.png

This is the formula I'm using, I have absolutely no idea if I'm doing it wrong or something, or if I should change anything.
I've been crying for six hours over this, I'd be very grateful if you could help me out!
Thank you!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
yes, the damage formula is wrong - you need to remove the < > around it as that breaks the code

and are you sure you want to use a division there? That will NOT work with the regular values as it reduces the damage to almost zero if reguar def values are used.
and third, if you really want division then you need to use parentehesis ( ) around its parts to tell the computer what is divided by what.
 

GoldSnafu

Raccoon tamer
Member
Joined
Dec 30, 2017
Messages
17
Reaction score
40
First Language
Spanish
Primarily Uses
RMMV
1600388827596.png

should it be like this, then?
Or how should I make it then if I don't add the division? I'm totally lost in here lol
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,635
Reaction score
5,116
First Language
English
Primarily Uses
RMVXA
No, that's wrong too. I believe the syntax you want in MV is:
a.addState(7); a.atk * 5 / (b.def * 2)

Note that a.atk * 5 / b.def * 2 is the same as a.atk * 10 / b.def, which is why we need the parentheses to double the Defense stat. Also note that addState is the way it's written in MV; add_state is the correct syntax for Ace and earlier.

Your formula will result in some pretty low values if battlers' ATK and DEF stats are anywhere near equal. For example, with 100 ATK and 80 DEF, the formula would evaluate to 500 / 160 = 3 damage.
 

GoldSnafu

Raccoon tamer
Member
Joined
Dec 30, 2017
Messages
17
Reaction score
40
First Language
Spanish
Primarily Uses
RMMV
No, that's wrong too. I believe the syntax you want in MV is:
a.addState(7); a.atk * 5 / (b.def * 2)

Note that a.atk * 5 / b.def * 2 is the same as a.atk * 10 / b.def, which is why we need the parentheses to double the Defense stat. Also note that addState is the way it's written in MV; add_state is the correct syntax for Ace and earlier.

Your formula will result in some pretty low values if battlers' ATK and DEF stats are anywhere near equal. For example, with 100 ATK and 80 DEF, the formula would evaluate to 500 / 160 = 3 damage.
Ohhh it did work now! Thank you so much! I'm new to doing events and stuff, I'm mostly oriented to graphic design and I made the maps and everything for the game, and left the wucky stuff for last lol

Thank you again and bless your souls. I will check on formula posts and try to learn how to properly make functional stuff
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top