Help: Conditional damage formula on crit...

Novic

Warper
Member
Joined
Sep 15, 2020
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
I'd like to be able to use a different damage formula for a given skill if it crits. I recall once seeing something along the lines of
Code:
a.result.isCritical()
but I have a sneaking suspicion that only applies to VXAce.

Currently my formula looks like this:

Code:
if (b.enemyId() === 8) $gameSwitches.setValue(10,true); if (b.enemyId() === 1 && a.result.isCritical()) a.atk * 100 - b.def * 2 else a.atk * 4 - b.def * 2

(The first if statement is unrelated and is only included for the sake of completeness.)

I spent some hours now searching for an answer and have come up dry. Is there a way to accomplish this in MV?
 

Rugman

Veteran
Veteran
Joined
Jun 11, 2020
Messages
169
Reaction score
43
First Language
English
Primarily Uses
RMMV
I don’t know if checking for criticals is possible but you could use a random number to represent your criticals and just not use the defaul critical system.

Math.floor(Math.random()*10) Would return a number 0-9.
 

Novic

Warper
Member
Joined
Sep 15, 2020
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
I don’t know if checking for criticals is possible but you could use a random number to represent your criticals and just not use the defaul critical system.

Math.floor(Math.random()*10) Would return a number 0-9.

Thanks for the suggestion. I can think of a lot of interesting applications for that. In addition, after a good deal more searching, I also managed to find this post which has given me a good deal of direction as well. Not sure that it's completely solved my problem, but progress is progress and the more options the better. Thanks again!
 

Latest Threads

Latest Profile Posts

I added footstep sounds to our content that I posted in a previous thread. I was unable to edit the post, so if you're interested, see below.

DOWNLOAD LINK

I've started working on rpg maker again, and I can see a lot of improvement from when I was 13. I still have a long way to go, but I'm proud that I've gotten this far.
Animated Title screen is by SharkerrBlue(SB)
I am using the Nightmare Land pack.
I just can't walk to the store for lunch without walking past people smoking. It not only smells bad, it's probably poisoning me. I'm afraid I'll eventually have to be hospitalized. I can't take another path because there's too much traffic and drivers in the plaza are reckless sometimes. I almost got run over once, even after looking both ways.
RyanYe wrote on whtdragon's profile.
Your art works about Wyrvens and Dragons are sooooooooo cooooooooool~! I like them so bad
Can you create more? like Archangels, Devils, Titans, Cyclops!!
My valentine cutscene is now available on itch.io and you can get the "source code" as well, feel free to check it out!

The game page on itch can be found at:

Forum statistics

Threads
108,795
Messages
1,039,549
Members
141,245
Latest member
feedtalefour
Top