Superglass Make has a 30% chance of yielding 2 molten glass.

This commit is contained in:
Avi Weinstock
2021-09-22 16:08:51 -04:00
parent 9c18af8f8d
commit 91657296dd
@@ -13,6 +13,7 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
/**
* The super glass make spell.
@@ -79,6 +80,11 @@ public class SuperglassMakeSpell extends MagicSpell {
if (hasSet(player, setIndex)) {
if (player.getInventory().remove(BUCKET_OF_SAND, SETS[setIndex])) {
player.getInventory().add(MOLTEN_GLASS);
// https://runescape.wiki/w/Superglass_Make?oldid=1970761
// "On average, each set will produce 1.30 pieces of molten glass"
if(RandomFunction.randomDouble(1.0) < 0.3) {
player.getInventory().add(MOLTEN_GLASS);
}
player.getSkills().addExperience(Skills.CRAFTING, 10, true);
}
}