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,838
Reaction score
14,031
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,838
Reaction score
14,031
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,034
Reaction score
5,335
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 Profile Posts

Hey everyone, we know that the edit bar is missing. We're working on it. You can talk about it in the announcement here: https://forums.rpgmakerweb.com/index.php?threads/forum-errors-missing-edit-bar-etc.132715/
So, explain why we can no longer use BBC code or smilies in our posts? This sparks much sadness...
Are we now stuck with WYSIWYG ? I cannot revert back my posts to good old raw text ?
I'm wondering if I may be putting too many things into one map. A story, within a story, within a story . . . it's fun, but I can't shake the feeling that it may be better to scrap some of it, and use it for another map. I'm not sure what to do.

Forum statistics

Threads
107,792
Messages
1,032,232
Members
139,938
Latest member
scorpiys
Top