Corrected iron-ore-smelting success rate

This commit is contained in:
Player Name 2024-10-06 13:06:07 +00:00 committed by Ryan
parent 2be422e7da
commit 3982258500
2 changed files with 3 additions and 3 deletions

View file

@ -204,7 +204,7 @@ public class SmeltingPulse extends SkillPulse<Item> {
} }
return true; return true;
} else { } else {
return RandomFunction.getRandom(100) <= (player.getSkills().getLevel(Skills.SMITHING) >= 45 ? 80 : 50); return RandomFunction.nextBool();
} }
} }
return true; return true;

View file

@ -51,7 +51,7 @@ public class RandomFunction {
*/ */
public static boolean roll(int chance) { public static boolean roll(int chance) {
if (chance <= 1) return true; if (chance <= 1) return true;
return random(chance + 1) == chance / 2; return random(chance) == 1;
} }
/** /**