Lets say that i have a variable which has a value of 5, the higher the value of the variable the higher the chance of succes.
So how could i do something like this?:
function mission1() {
if (user_power < 5) {
//30% change of succes
} else if (user_power == 5) {
//50% change of succes
} else if (user_power > 5) {
//80% change of succes
}
Aucun commentaire:
Enregistrer un commentaire