RPG Maker Forums

In my game the highest MP you can have is 500, but the highest health is around the 10000 mark, so I'm hoping this can be modified to still have an 85% damage reduction, but only deal 5% of the reduced damage to MP.


How would I achieve this?


<Custom React Effect>


if (value > 0 && this.isHpEffect()) {


var mpDmg = Math.floor(value * 0.85);


mpDmg = Math.min(mpDmg, target.mp);


target.gainMp(-mpDmg);


value -= mpDmg;


}


</Custom React Effect>


*edit* Although it doesn't solve the code, I did find a Mana Shield plugin that can do the same thing.


https://alistairengine.wordpress.com/2015/11/01/alistair-plugins-mana-shield/


In the config I simply changed the "Default MP Ratio" to 20 instead of 1. Works for the full damage range until I'm out of MP.

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top