How to increase state chances

masterkof

Veteran
Veteran
Joined
Nov 12, 2013
Messages
59
Reaction score
25
First Language
english
Primarily Uses
I am looking for a plugin that can help me increases chances of applying a states.

Example I got a skill call fire. The fire skill can apply a state "burning" which has 10% chance of occurring.

Lets say I equipped a fire wand.
I need help a plugin that helps me to increase "burning" from 10% chance to 30% chance.
 

Icenick

Veteran
Veteran
Joined
Mar 28, 2012
Messages
410
Reaction score
61
First Language
English
Primarily Uses
Im not sure a plugin but I do something similar for my game. Using Yanfly Skill Core you can do the same. Post-Damage Eval or After Eval.

Code:
var burnchance = 0.1;
if (user.isStateAffected(firewand)) {
var burnchance = 0.3;
}
if (Math.random() < psnchance) {
b.addState(burn);}
You add this to each skill that has a chance to add a state. If you have multiple gear then it might become a problem, havent tested it but I think you can just do:
Code:
var burnchance = 0.1;                     // 10% base chance to burn
if (user.isStateAffected(firewand)) {      // Fire wand equipped using passive states   
var burnchance += 0.2;}                   // Adds 20% chance to var burnchance
if (user.isStateAffected(flamearmor)) {   // Flame armor equipped
var burnchance += 0.3;}                   // Adds 30% chance
if (Math.random() < burnchance) {         // Checks if RNG result is sucessful
b.addState(burn);}                        // 1/10 will burn w/gear will be 6/10
 

masterkof

Veteran
Veteran
Joined
Nov 12, 2013
Messages
59
Reaction score
25
First Language
english
Primarily Uses
Thanks for your help
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,096
Members
137,587
Latest member
Usagiis
Top