[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

This is on the Amazon page for the FF7 Remake: 'If you get the game early, please think of others and don't spoil it for them. Please don't post videos or screenshots of the game until it is officially on sale on April 10.'
Gave my avatar an update, stay safe, people!
I'm currently available for hire for scripting (and perhaps other things).
Also, don't worry, the Advanced Minimap plugin is a work in progress.
Hallelujah! Work is getting stricter on humans in the store.
Day 3 of mapping... at least the whole game its just one location :3 (Still taking forever...)

Forum statistics

Threads
95,622
Messages
930,499
Members
125,929
Latest member
RitBro
Top