Hi! In the game I'm making, there are about 20 different characters (as of right now). Some are warriors, others are mages, others are supports and the others are tanks. Now I want to make a bit of diversity amongst those tanks, not just taking hits and a bit of healing here and there. I was wondering if there's a way to make a skill that reflects X% damage taken by the skill's user. I think it'd be a skill that adds a status to that character for let's say 3 turns, but there seems to be no way of doing this. I've seen a plugin (Yanfly's element core, to be exact) that reflects damage of certain elements. I'm looking for a plugin that simply reflects a certain portion of taken damage. Let's say I'd want to make a skill that reflects 30% taken damage. The user would take let's say 200 damage, and he'd reflect 60 to whoever dealt damage to him... Please help! I really need this for one of the characters I'm trying to make, since he's going to be based around that damage reflect ability...
Reflect X% damage?
JS Plugin RequestsHave you tried searching for Thorn Mail effect? I did this in Ace and I would be surprised if there wasn't an equivalent in MV.
You are searching for a plugin so...
I've moved this thread to JS Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.
You are searching for a plugin so...
I've moved this thread to JS Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.
@Kes This is what it gives me. It tells me to copy paste this...
<Custom React Effect>
// Check to see if any physical damage is dealt.
if (value > 0 && this.isPhysical()) {
// Sets the Recoil Rate to 15%.
var rate = 0.15;
// Determines the amount of recoil damage dealt.
var recoil = value * rate;
// Sets the DEF bonus rate to 25%.
var rate = 0.25;
// Determines the amount of bonus damage dealt.
var bonus = target.def * rate;
// Rounds up the bonus damage and recoil damage.
var dmg = Math.ceil(bonus + recoil);
// Makes the attacker lose damage equal to the dmg variable.
user.gainHp(-1 * dmg);
// Check to see if the attacker is dead.
if (user.isDead()) {
// If the attacker is dead, make it collapse.
user.performCollapse();
}
}
</Custom React Effect>
I don't know if you know how it works, but would you know how to change how much damage % it reflects, and how to change/remove the defence part?
Even if you don't you've already helped me a ton, so thanks! 🙂
<Custom React Effect>
// Check to see if any physical damage is dealt.
if (value > 0 && this.isPhysical()) {
// Sets the Recoil Rate to 15%.
var rate = 0.15;
// Determines the amount of recoil damage dealt.
var recoil = value * rate;
// Sets the DEF bonus rate to 25%.
var rate = 0.25;
// Determines the amount of bonus damage dealt.
var bonus = target.def * rate;
// Rounds up the bonus damage and recoil damage.
var dmg = Math.ceil(bonus + recoil);
// Makes the attacker lose damage equal to the dmg variable.
user.gainHp(-1 * dmg);
// Check to see if the attacker is dead.
if (user.isDead()) {
// If the attacker is dead, make it collapse.
user.performCollapse();
}
}
</Custom React Effect>
I don't know if you know how it works, but would you know how to change how much damage % it reflects, and how to change/remove the defence part?
Even if you don't you've already helped me a ton, so thanks! 🙂
I don't know Javascript, but at the moment it looks like the damage is set as a percentage (15%). That's what the Recoil Rate is.
As for removing the defence part, what I would suggest is that where it has
// Sets the DEF bonus rate to 25%.
var rate = 0.25;
you just change the second line to
var rate = 0
As for removing the defence part, what I would suggest is that where it has
// Sets the DEF bonus rate to 25%.
var rate = 0.25;
you just change the second line to
var rate = 0
Yeah that seems logical. That was kind of a stupid question, but thanks for helping out bud!
Original thread: https://forums.rpgmakerweb.com/threads/reflect-x-damage.73897/