How to increase state chances

masterkof

Veteran
Veteran
Joined
Nov 12, 2013
Messages
42
Reaction score
19
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
275
Reaction score
37
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
42
Reaction score
19
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

Yo Ho Ho... Time flies when you are having rum...

I'm rewatching Glee, just watched grilled cheesus.
Now I'm not sure if I'm hungry or I want to cry.
I just completed Ara Fell - completing the game unlocks an Epilogue. An interesting thing to possibly consider for my games.
I decided to try to make a mucha-styled artwork, and by now I've sunk more time in studies and sketches than I usually do in the whole thing. Fingers crossed it's worth it!
Since we have a lot of new faces, please be sure to read the forum rules under the Help tab at the top. Thanks!

Forum statistics

Threads
99,453
Messages
965,459
Members
131,063
Latest member
Quimey
Top