Add debuff to actor upon using skill.

Hey everyone! Hope you're all doing well during these troublesome times. Quick question: When I use an attack, how can I add debuffs to the actor that used it? Example: Actor uses attack. After the attack his DEF M.DEF and AGL are lowered.
I've tried using the Effect box but that just aplies the debuffs to the enemy.

Stay safe!
Without plugins, I believe you could get it to call a common event that puts a state on the user.

Another thread about the same thing suggests that Yanfly's Action Begin/End plugin would also work via <End Action: Add State x>
You can put this in the damage formula:

Code:
a.addDebuff(id, turns); your_damage_formula_here

Debuff IDs are:

0: hp
1: mp
2: atk
3: def
4: mat
5: mdf
6: agi
7: luk

So, based on what you said you wanted lowered specifically (unsure about turns, so making it 3 turns):

Code:
a.addDebuff(3, 3); a.addDebuff(5, 3); a.addDebuff(6, 3); a.atk * 4 - b.def * 2

Edit:

Or, as mentioned above, you can use states to avoid the stacking mechanic:

Code:
a.addState(yourStateIdHere); a.atk * 4 - b.def * 2
Thank you KoalaFrenzy and Aesica!

Original thread: https://forums.rpgmakerweb.com/threads/add-debuff-to-actor-upon-using-skill.120190/