Creating an enemy that's only damaged by a critical hit

Status
Not open for further replies.
Joined
Feb 18, 2019
Messages
39
Reaction score
3
First Language
English
Primarily Uses
RMMV
Hi!

I'm planning to make an enemy that doesn't have much HP, but is immune to all forms of damage unless it's a critical hit. There's a skill I am making with increased critical hit chance, as well as a skill with a guaranteed critical hit. Any ideas?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,790
Reaction score
14,017
First Language
English
Primarily Uses
RMMV
Try this in the damage formula:

Code:
b.result().critical ? 100 : 0
 
Joined
Feb 18, 2019
Messages
39
Reaction score
3
First Language
English
Primarily Uses
RMMV
b.result().critical ? 100 : 0
Is there any way to apply this to an existing skill? Also, is there a way to make it so that it detects a specific enemy?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,790
Reaction score
14,017
First Language
English
Primarily Uses
RMMV
Put it in the damage formula for that skill.

What is meant to happen when it's NOT that enemy?
 
Joined
Feb 18, 2019
Messages
39
Reaction score
3
First Language
English
Primarily Uses
RMMV
Put it in the damage formula for that skill.

What is meant to happen when it's NOT that enemy?
Well, all attacks are supposed to work normally. However, when any kind of attack hits a certain foe, it doesn't deal any damage unless it's a critical hit. There are moves that will always be a critical hit as well as some having an increased crit chance so they're more meant to be a dangerous mid-game threat.
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
567
Reaction score
278
First Language
German
Primarily Uses
One way to modify it would be to introduce element rates into the formula, for example:

(original formula) * (b.result().critial ? 1 : b.elementRate(11))

This would multiply the damage with the targets affinity to element 11 for non-critical strikes while not changing the outcome of critical ones.
 
Joined
Feb 18, 2019
Messages
39
Reaction score
3
First Language
English
Primarily Uses
RMMV
One way to modify it would be to introduce element rates into the formula, for example:

(original formula) * (b.result().critial ? 1 : b.elementRate(11))

This would multiply the damage with the targets affinity to element 11 for non-critical strikes while not changing the outcome of critical ones.
This works, thank you.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,029
Reaction score
5,332
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

My new cutscene system makes it so much easier to add parallel stuff happening in the background, I can easily fill the whole screen with action.

I remember once when I was at Disney's Animal Kingdom and I got to dance with some of the cast members! It was so much fun! After the show my dad and I got frozen lemonade and some ice cream. It makes me feel better remembering the good things about my dad... maybe I will return to Orlando.
spending almost entire day to mod skyrim but it still couldn't run properly :(
My friend has become one with the glitter. @ImaginaryVillain, got any room in the Cult of the Sporkle?
I still cannot wrap my head around how to edit and use arrays in RPG Maker MV o_O

Forum statistics

Threads
107,717
Messages
1,031,635
Members
139,857
Latest member
ShadowGray
Top