Darkbeetlebot

Villager
Member
Joined
Feb 25, 2016
Messages
17
Reaction score
2
First Language
English
Primarily Uses
So I'm trying to make a Coup de Grace attack where the damage dealt is only 1.1*attack under normal circumstances, but it jumps up to 10*attack if the enemy is under 20% HP. However, all of the formulas I've tried so far just do not work at all.

Using
Code:
if b.state?(20% hp weakness state); (extra damage formula); else; (Normal formula); end;
doesn't work: It either defaults to the normal formula, crashes, or deals 0 damage depending on how I word it.

The same thing happens with
Code:
if b.hp <= b.mhp/5; (extra damage formula); else; (normal formula); end;
It always deals 0 damage.

Substituting the if function for the question mark and colon doesn't do anything either.

It doesn't seem to be detecting whether the if statement is true or not. I am doing the tests in-game, and it doesn't seem to make a difference. I've also been trying to use Lunatic Damage, but with no actual results. Oddly, using only the notetags and LD for the formula makes it deal no damage no matter what I put in. It's starting to get on my last nerves. Has anyone got a tested and working custom formula for this simple task?
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
220
First Language
English
Primarily Uses
RMVXA
Try this setup:
Code:
b.hp_rate < 0.2 ? a.atk * 10 : a.atk * 1.1
 

Darkbeetlebot

Villager
Member
Joined
Feb 25, 2016
Messages
17
Reaction score
2
First Language
English
Primarily Uses
Try this setup:
Code:
b.hp_rate < 0.2 ? a.atk * 10 : a.atk * 1.1

That seemed to work for the most part. Unfortunately, it's about at the character limit. The full code ended up being:
Code:
b.hp_rate<=0.25?((1000-b.def)*a.atk*10/1000)-(b.def**0.9):((1000-b.def)*a.atk*1.1/1000)-(b.def**0.9)

I kind of feel stupid for not realizing hp_rate was a usable variable. Anyways, this is solved. Thanks for the solution!
 
Last edited:

Latest Threads

Latest Profile Posts

Sneak peak of my upcoming update! Who's holding her, you may ask? Find out tonight!
10.PNG
BCj
Finished another GUI! Turn indicator wasn't made by me.

ff981f8dc50b03cf58038c644334b454.jpg


3cb092fdc00087acfa0a190fd891f0ed.jpg
Added a small refining scene to my game.

It makes sense that you try to focus on the squishy mages at the back of the party first, right? If the mage can out-DPS the enemy DPS before the latter can kill the tank in front, the fight becomes boring.

Forum statistics

Threads
115,246
Messages
1,088,345
Members
149,847
Latest member
Diskidd
Top