A skill that has a chance to self inflict status

Ticektvenn

Villager
Member
Joined
Apr 1, 2022
Messages
5
Reaction score
2
First Language
English
Primarily Uses
RMMV
I wanted to make a skill that damages the opponent. and then has a chance to give the user a status effect. How do you do that?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,839
Reaction score
6,654
First Language
English
Primarily Uses
RMMV
It is possible to do this in the damage formula. However, if your game ever uses the autobattle Trait or if this skill can go on an enemy, you shouldn't do it that way. For information on that, see:

The better way to implement this is with Yanfly's Skill Core. Give the skill the notetag:
Code:
<Post-Damage Eval>
if (Math.random()<.83)
    user.addState(X);
</Post-Damage Eval>

where X is the ID of your state (no leading zeros), and you supply whatever number you want on the line above. So this one has an 83% chance.
 

Ticektvenn

Villager
Member
Joined
Apr 1, 2022
Messages
5
Reaction score
2
First Language
English
Primarily Uses
RMMV
It is possible to do this in the damage formula. However, if your game ever uses the autobattle Trait or if this skill can go on an enemy, you shouldn't do it that way. For information on that, see:

The better way to implement this is with Yanfly's Skill Core. Give the skill the notetag:
Code:
<Post-Damage Eval>
if (Math.random()<.83)
    user.addState(X);
</Post-Damage Eval>

where X is the ID of your state (no leading zeros), and you supply whatever number you want on the line above. So this one has an 83% chance.
Thank you. I just tested it and it worked. Literally was looking at your posts for advice before you messaged me.
 

Latest Threads

Latest Posts

Latest Profile Posts

I am new here first day ,how to make a game for google play store on Android I am using android mobile .I don't have coding knowledge too .so what are steps to create a game on mobile Android I don't have PC or laptop .any suggestions or guide please .
Does anybody want to get weirded out? If so, I have a weird fact for them in the top comments.
Creating the mood, coloring, and lighting for this gonna need a big brain moment.1685936069202.png

Forum statistics

Threads
131,653
Messages
1,221,904
Members
173,399
Latest member
xuprmpau
Top