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,431
Reaction score
7,712
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 Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,472
Members
137,822
Latest member
madelbylz
Top