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

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,042
Reaction score
13,678
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

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,042
Reaction score
13,678
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
564
Reaction score
274
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
7,786
Reaction score
5,208
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.

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

Latest Threads

Latest Posts

Latest Profile Posts



Made another map, this one even has a cool moving waterfall. I'll have an animated GIF later whenever I'm done adding stuff. :LZSwink:
Back here again?! RPG MAKER, I can't quit you. :kaosigh:
um... why didn't anyone tell how easy it is to add motions to Sideview battlers? I literally copied the last one, changed the name and index, said where it should play, and boom... I've got intro motions.
Lately when I listen to 1970s songs, I always think that the "real world" is still at mid 70s. What we experience now is a futuristic dream. With this point of view, even 80s and 90s looks super futuristic. :D

Forum statistics

Threads
105,541
Messages
1,014,485
Members
137,220
Latest member
broiderers
Top