mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Corrected iron-ore-smelting success rate
This commit is contained in:
parent
2be422e7da
commit
3982258500
2 changed files with 3 additions and 3 deletions
|
|
@ -204,7 +204,7 @@ public class SmeltingPulse extends SkillPulse<Item> {
|
|||
}
|
||||
return true;
|
||||
} else {
|
||||
return RandomFunction.getRandom(100) <= (player.getSkills().getLevel(Skills.SMITHING) >= 45 ? 80 : 50);
|
||||
return RandomFunction.nextBool();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ public class RandomFunction {
|
|||
* @param chance the 1/chance rate for the roll to succeed
|
||||
* @return true if you hit the roll, false otherwise
|
||||
*/
|
||||
public static boolean roll(int chance){
|
||||
public static boolean roll(int chance) {
|
||||
if (chance <= 1) return true;
|
||||
return random(chance + 1) == chance / 2;
|
||||
return random(chance) == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue