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

Status
Not open for further replies.

LetsTryThatAgain

Villager
Member
Joined
Feb 18, 2019
Messages
26
Reaction score
2
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
39,141
Reaction score
12,414
First Language
English
Primarily Uses
RMMV
Try this in the damage formula:

Code:
b.result().critical ? 100 : 0
 

LetsTryThatAgain

Villager
Member
Joined
Feb 18, 2019
Messages
26
Reaction score
2
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
39,141
Reaction score
12,414
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?
 

LetsTryThatAgain

Villager
Member
Joined
Feb 18, 2019
Messages
26
Reaction score
2
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
559
Reaction score
272
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.
 

LetsTryThatAgain

Villager
Member
Joined
Feb 18, 2019
Messages
26
Reaction score
2
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
6,486
Reaction score
4,404
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 Profile Posts

Playtesting for Battle Castle is done, demo time for me was roughly 6 hours and 20 minutes. I'm going to pass it on to a few friends first, and after getting some feedback will be posting an official topic.
There's another Humble Bundle available now for RPG developer assets, this time focused somewhat more towards pixel art style games.
Ive got a long lost half uncle. Thats real cool.
I forget what is bumping rule in this forum. Is anyone know? Thank you.
BCj
Ew, why does my blogpost on the rpgmaker.net site look like a garbled mess? Are html codes disabled or something?

Forum statistics

Threads
97,909
Messages
947,782
Members
129,148
Latest member
lemminace
Top