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,740
Reaction score
14,002
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,740
Reaction score
14,002
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,016
Reaction score
5,326
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

Hey guys! Good news!
I just released the Games from Brazil - Part 2 on my Youtube Channel! I am really happy that part 1 had 100 views and I hope more people will be interested to see the potencial of Brazilian Game Devs!
Effervesce Fallacy™ - Attract Mode (proto)
Almost to the finish line!... or the starting... since it's just the demo. :kaomad2:

Having problems with enemy/monster designs. :kaosigh:
While we prepare the official trailer, enjoy this kind-of-second teaser! ^^
-Ele

Forum statistics

Threads
107,569
Messages
1,030,627
Members
139,671
Latest member
WDRS
Top