[Yanfly]Additional Elemental Damage suggestion

raincoat

Villager
Member
Joined
Sep 27, 2017
Messages
5
Reaction score
1
First Language
english
Primarily Uses
RMMV
I use this Yanfly plugin tips & tricks to recreate "Enfire" in my game and it works well.
Enfire Tips & Tricks

But i want more of it and it's a bit complicated. I'll explain one by one.

I create "Freeze" state that take twice fire damage and remove itself when get hit by fire element.
This is the code for "Freeze".
<Custom React Effect>
if (this.item().damage.elementId === 2 && this.isHpEffect() && value > 0) {
target.removeState(240);
}
</Custom React Effect>
Case 1.
1.Use skill "Fire", which inflict fire elemental damage to target with "Freeze" state.
2.Target take twice fire damage and "Freeze" state gone as I intend.

Case 2.
1.Use skill to gain buff called "Ignition" that cause "Slash" skill to have an additional fire damage when land on target like "Enfire" skill as i mention above.
2.Use skill "Slash", which inflict none elemental damage to target with "Freeze" state. And with buff "Ignition"...
- This skill gain addition damage to target fire elemental rate and take twice damage in this part as I intend.
- Target didn't lose "Freeze" state because "Slash" skill have didn't inflict fire elemental damage in the first place.

This is the code for "Ignition"
<Custom Apply Effect>
user.setStateCounter(stateId, 'IGNITE');
</Custom Apply Effect>

<Custom Confirm Effect>
if (this.isSkill() && user.currentAction().item().id === 3) {
var elementId = 2;
var baseDamage = user.mat-target.mdf;
if (baseDamage <= 1)
baseDamage = 1;
var damage = Math.ceil(target.elementRate(elementId) * baseDamage);
var result = JsonEx.makeDeepCopy(target._result);
target.clearResult();
target.startAnimation(316);
target.gainHp(-damage);
target.startDamagePopup();
if (target.isDead()) {
target.performCollapse();
}
target.clearResult();
target._result = result;
}
</Custom Confirm Effect>
This is where i need help. I want to make "Ignition" buff addition damage can apply as fire elemental.
I want to know can it be done in my case? Or there's another solution that can archive this.

Thanks in advance.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top