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 Profile Posts

Government : "Hehehe~ I will spread lies that the earth is round so that I could sell globes~"
Anyone here managed to never burn out on programming? My current limit is 3 months(6-8 hours per day, 7 days per week, 50 hour programming week on average), and then I just have to take a break, sometimes lasting few days(with at most 2 hours on programming per day). I've been always like this so far, so I admire those who can always be so passionate on programming :)

Forum statistics

Threads
99,655
Messages
967,741
Members
131,338
Latest member
Vattitheminish
Top