diff --git a/Server/src/main/content/global/skill/runecrafting/RuneCraftPulse.java b/Server/src/main/content/global/skill/runecrafting/RuneCraftPulse.java index 77e21b7f2..5006b52be 100644 --- a/Server/src/main/content/global/skill/runecrafting/RuneCraftPulse.java +++ b/Server/src/main/content/global/skill/runecrafting/RuneCraftPulse.java @@ -239,9 +239,39 @@ public final class RuneCraftPulse extends SkillPulse { } } - /** - * Method used to combine runes. - */ + /** + * Method used to combine runes. Snowscape custom: you get multiple combination runes per essence (the opposite rune cost scales to match the multiplier) + */ + private final void combine() { + final Item remove = node.getName().contains("talisman") ? node : talisman != null ? talisman.getTalisman() : Talisman.forName(Rune.forItem(node).name()).getTalisman(); + boolean imbued = hasSpellImbue(); + if (!imbued ? player.getInventory().remove(remove) : imbued) { + int essenceAmt = player.getInventory().getAmount(PURE_ESSENCE); + int multiplier = getMultiplier(altar.getRune()); + final Item rune = node.getName().contains("rune") ? Rune.forItem(node).getRune() : Rune.forName(Talisman.forItem(node).name()).getRune(); + for (int i = 0; i < essenceAmt; i++) { + int runeAmt = player.getInventory().getAmount(rune); + if (runeAmt > 0 && player.getInventory().remove(new Item(PURE_ESSENCE.getId(),1))) { + if (runeAmt < multiplier) { + multiplier = runeAmt; + } + player.getInventory().remove(new Item(rune.getId(), multiplier)); + if (RandomFunction.random(2) == 1 || hasBindingNecklace()) { + player.getInventory().add(new Item(combo.getRune().getId(), multiplier)); + player.getSkills().addExperience(Skills.RUNECRAFTING, combo.getExperience(), true); + } + } + } + if (hasBindingNecklace()) { + player.getEquipment().get(EquipmentContainer.SLOT_AMULET).setCharge(player.getEquipment().get(EquipmentContainer.SLOT_AMULET).getCharge() - 1); + if (1000 - player.getEquipment().get(EquipmentContainer.SLOT_AMULET).getCharge() > 14) { + player.getEquipment().remove(BINDING_NECKLACE, true); + player.getPacketDispatch().sendMessage("Your binding necklace crumbles into dust."); + } + } + } + } + /* Original function, replaced by snowscape custom above private final void combine() { final Item remove = node.getName().contains("talisman") ? node : talisman != null ? talisman.getTalisman() : Talisman.forName(Rune.forItem(node).name()).getTalisman(); boolean imbued = hasSpellImbue(); @@ -272,7 +302,7 @@ public final class RuneCraftPulse extends SkillPulse { } } } - +*/ /** * Method used to craft tablets. Custom for Snowscape */