A skill I'm working on should do bonus damage for every stack of the agility debuff present on the target. I skimmed around the plugin's guide, but couldn't find anything that tells you have to use the current buff or debuff stacks in calculations. I saw an example of one in use, but I want to be sure I'm extrapolating correctly. Currently the damage formula reads as following:
(a.atk*2)+(b._debuffs(6)*10)-b.def
well i have something along this line for my own game but its not 1 skill its broken into 2 skills
1 to asorbe buffs from monsters that then turns into a new buff on the character
2nd skill then uses those stacks to incress its damage bassed on the # of stacks
if you want i can post them lol. longs your using yanflys Buff and States core
if (target.isStateAffected(stateId)) {
var stacks = target._states.filter(function(state) {
return state.id === stateId;
}).length;
damage += stacks * 50;
}
should work just change the ID to the ID of the state your looking for and you can change the damage multiplyed at the end to what you want this is assuming your using yanfly buff and state core aswell to add the stacks to the state as thats what this is checking for
also to clerify the damage at the end is multiplying by that number equal to the stacks so 2 stacks means 100damge 3 =150 and so on ontop the normal damage from the skill this way you can still use the skill regardless but customize it to your liking. If you would like to also change it at some point you could easily modify it to take all buffs or debuffs into count or just add 1 or 2 more to it
again as this is assuming your using the buff and state core you would put this in the note of the skill and use <Custom Apply Effect>
(a.atk*2) + Math.max(b._buffs[6]*-10, 0)-b.def
That formula should work.
No, that will do what you want - I was just checking because you mentioned it in the title then not during the thread. I wanted to make sure you knew how to do it.
Correct, effects happen after any hit is resolved.