Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean applyPotentialStats() {
- final int chance = Math.max(100 - (potLevel * 10), 10);
- if (Math.round(Math.random() * 100) > chance) {
- return false;
- }
- int potChance = (int)(11*Math.random() + 1);
- if (potChance == 1 ) {
- patk += (short)(4*Math.random());
- pacc += (short)(7*Math.random());
- } else if (potChance == 2) {
- pmatk += (short)(4*Math.random());
- pstr += (short)(6*Math.random());
- } else if (potChance == 3) {
- pdex += (short)(8*Math.random());
- } else if (potChance == 4) {
- pluk += (short)(6*Math.random());
- pacc += (short)(7*Math.random());
- } else if (potChance == 5) {
- pint += (short)(6*Math.random());
- pstr += (short)(6*Math.random());
- } else if (potChance == 6) {
- patk += (short)(5*Math.random());
- } else if (potChance == 7) {
- pmatk += (short)(5*Math.random());
- } else if (potChance == 8) {
- pstr += (short)(8*Math.random());
- } else if (potChance == 9) {
- pluk += (short)(8*Math.random());
- } else if (potChance == 10) {
- pint += (short)(8*Math.random());
- } else if (potChance == 11) {
- pacc += (short)(15*Math.random());
- }
- loadPotentialStats();
- setPotLevel(potLevel + 1);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement