Self-Inflicted Status-Effect Skills

Hello!

I took a search on the forums but was unable to find anything regarding this topic (or maybe I'm just blind?). Skills like in Pokemon that do large-scale damage but have negative drawbacks is what I speak of. I'm trying to make a skill hit hard but have a relatively high chance (75%) to inflict the "stun" effect on the user...a kind of "Hey, you can use this awesome skill...but be careful with it, cause you have a chance of causing a stun to yourself!" I can't seem to figure out how to make it work, as I've no idea how to add status effects to the formula bar...help...!

Many thanks in advance for help on this. And if there is a place on the forums that I've missed with such relevant info, could I please be linked to it for future reference? Again, thank you! =D
Hello!

I took a search on the forums but was unable to find anything regarding this topic (or maybe I'm just blind?). Skills like in Pokemon that do large-scale damage but have negative drawbacks is what I speak of. I'm trying to make a skill hit hard but have a relatively high chance (75%) to inflict the "stun" effect on the user...a kind of "Hey, you can use this awesome skill...but be careful with it, cause you have a chance of causing a stun to yourself!" I can't seem to figure out how to make it work, as I've no idea how to add status effects to the formula bar...help...!

Many thanks in advance for help on this. And if there is a place on the forums that I've missed with such relevant info, could I please be linked to it for future reference? Again, thank you! =D

Well you either have to have it call a common event or use a script.

Calling a common event should do the trick just fine though. put in the command/dmg, and enemy target first for the skill, then have it call a common even to dmg/give a state to the char with the skill.
you can do (all this on the damage formula)


a.add_state(state_id);damage_formula


or since you want it 75% only


a.add_state(state_id) if rand(100) < 75;damage_formula


or if it errors or does not work


if rand(100) < 75;a.add_state(state_id);end;damage_formula
Oh, Engr. Shana! It worked like a charm! You have saved me! The masses will forever sing songs of your glory and praise your name! In short, thank you so very much! =D

Original thread: https://forums.rpgmakerweb.com/threads/self-inflicted-status-effect-skills.23658/