RMMV [Buffs and States Core]Skill that consumes debuff stacks to deal bonus damage

KaitlynKitty

Regular
Regular
Joined
Apr 6, 2021
Messages
176
Reaction score
60
First Language
English
Primarily Uses
RMMV
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
 

Tray

Regular
Regular
Joined
Sep 7, 2018
Messages
50
Reaction score
10
First Language
English
Primarily Uses
RMMV
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
 

KaitlynKitty

Regular
Regular
Joined
Apr 6, 2021
Messages
176
Reaction score
60
First Language
English
Primarily Uses
RMMV
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
I just need to know the function that returns the value of debuffs.
 

Tray

Regular
Regular
Joined
Sep 7, 2018
Messages
50
Reaction score
10
First Language
English
Primarily Uses
RMMV
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>
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,218
Reaction score
9,180
First Language
English
Primarily Uses
RMMV
should work just change the ID to the ID of the state your looking for
The OP is not looking for a state, she's talking about debuffs.

@KaitlynKitty - your thread title and your post say two different things. Your title mentions "consuming" the debuffs, which means they'd be gone after the attack resolves. Do you want that? Or do you just want to incorporate them into the damage calculation?
 

KaitlynKitty

Regular
Regular
Joined
Apr 6, 2021
Messages
176
Reaction score
60
First Language
English
Primarily Uses
RMMV
The OP is not looking for a state, she's talking about debuffs.

@KaitlynKitty - your thread title and your post say two different things. Your title mentions "consuming" the debuffs, which means they'd be gone after the attack resolves. Do you want that? Or do you just want to incorporate them into the damage calculation?
The consumption is a separate function(or rather consumption has two aspects, and I'm only asking for how to implement the other), because it would be inefficient to implement the removal of the debuff in the damage formula. Far better to just use built in remove debuff, unless that will only remove one stack?
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,218
Reaction score
9,180
First Language
English
Primarily Uses
RMMV
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.
 

KaitlynKitty

Regular
Regular
Joined
Apr 6, 2021
Messages
176
Reaction score
60
First Language
English
Primarily Uses
RMMV
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.
Just to be sure, the damage formula calculates first, and then triggers the other effects, right? If it removes the debuff first, that would cause issues.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,218
Reaction score
9,180
First Language
English
Primarily Uses
RMMV
Correct, effects happen after any hit is resolved.
 

Latest Threads

Latest Profile Posts

Was sick with a fever... slowly getting better.
I HATE SEOs! I do not want to add Reddit to every single search in order to find helpful content posted by actual humans.
bandicam 2023-10-02 09-53-18-106.png
Yanka is one of my dearly loved characters. And not only because she can perform the look of "puss in boots")))) Spy, infiltrator, kind-hearted with a soft spot for one Crimson Knight.
Just completed another cutscene. Huge one for the story. I'm so enthusiastic about where this game is going.
Man, the enemies in the new Sonic Frontiers update are totally roided up. I wanted a little more difficulty myself, but Sonic Team turned the dial a bit too far.

At least the new tracks for roaming Ouranos Island as Amy, Knuckles, and Tails slap hard.

Forum statistics

Threads
134,985
Messages
1,252,621
Members
177,880
Latest member
titek21
Top