diff --git a/Server/src/main/content/global/skill/runecrafting/Rune.java b/Server/src/main/content/global/skill/runecrafting/Rune.java index 7736c579b..78bd327b9 100644 --- a/Server/src/main/content/global/skill/runecrafting/Rune.java +++ b/Server/src/main/content/global/skill/runecrafting/Rune.java @@ -10,10 +10,10 @@ import core.game.node.item.Item; */ public enum Rune { AIR(Runes.AIR_RUNE.transform(), 1, 5, new int[] { 1, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110 }), - MIND(Runes.MIND_RUNE.transform(), 2, 5.5, new int[] { 1, 14, 28, 42, 56, 70, 84, 98, 112 }), - WATER(Runes.WATER_RUNE.transform(), 5, 6, new int[] { 1, 19, 38, 57, 76, 95, 114 }), - EARTH(Runes.EARTH_RUNE.transform(), 9, 6.5, new int[] { 1, 26, 52, 78, 104 }), - FIRE(Runes.FIRE_RUNE.transform(), 14, 7, new int[] { 1, 35, 70, 105 }), + MIND(Runes.MIND_RUNE.transform(), 2, 5, new int[] { 1, 14, 28, 42, 56, 70, 84, 98, 112 }), + WATER(Runes.WATER_RUNE.transform(), 1, 5, new int[] { 1, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110 }), + EARTH(Runes.EARTH_RUNE.transform(), 1, 5, new int[] { 1, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110 }), + FIRE(Runes.FIRE_RUNE.transform(), 1, 7, new int[] { 1, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110 }), BODY(Runes.BODY_RUNE.transform(), 20, 7.5, new int[] { 1, 46, 92, 138 }), COSMIC(Runes.COSMIC_RUNE.transform(), 27, 8, new int[] { 1, 59, 118 }), CHAOS(Runes.CHAOS_RUNE.transform(), 35, 8.5, new int[] { 1, 74, 148 }), @@ -22,7 +22,7 @@ public enum Rune { LAW(Runes.LAW_RUNE.transform(), 54, 9.5, new int[] { 1, 110, }), DEATH(Runes.DEATH_RUNE.transform(), 65, 10, new int[] { 1, 131 }), BLOOD(Runes.BLOOD_RUNE.transform(), 77, 10.5, new int[] { 1, 154 }), - SOUL(Runes.SOUL_RUNE.transform(), 90, 11); + SOUL(Runes.SOUL_RUNE.transform(), 90, 11, new int[] { 1, 179 }); /** * Constructs a new {@code Rune} {@code Object}. diff --git a/Server/src/main/content/global/skill/runecrafting/RuneCraftPulse.java b/Server/src/main/content/global/skill/runecrafting/RuneCraftPulse.java index a3bc80b5f..4781983fb 100644 --- a/Server/src/main/content/global/skill/runecrafting/RuneCraftPulse.java +++ b/Server/src/main/content/global/skill/runecrafting/RuneCraftPulse.java @@ -150,7 +150,7 @@ public final class RuneCraftPulse extends SkillPulse { talisman = t; } } - player.lock(4); + player.lock(2); return true; } @@ -163,13 +163,17 @@ public final class RuneCraftPulse extends SkillPulse { @Override public boolean reward() { + setDelay(5); if (!combination) { - craftTablet(); - craft(); + if (amountInInventory(player, SOFT_CLAY.getId()) > 0) { + craftTablet(); + } else { + craft(); + } } else { combine(); } - return true; + return false; } private static final int[][] OuraniaTable = { //https://x.com/JagexAsh/status/1312893446395506688/photo/1 @@ -191,8 +195,10 @@ public final class RuneCraftPulse extends SkillPulse { */ private void craft() { final Item item = getEssenceItem(); - int amount = player.getInventory().getAmount(item); + //int amount = player.getInventory().getAmount(item); + int amount = 2; if (altar.isOurania()) { + amount = 1; if (removeItem(player, item, Container.INVENTORY)) { sendMessage(player, "You bind the temple's power into runes."); player.incrementAttribute("/save:" + STATS_BASE + ":" + STATS_RC, amount); @@ -213,15 +219,15 @@ public final class RuneCraftPulse extends SkillPulse { break; } } - rewardXP(player, Skills.RUNECRAFTING, rune.getExperience() * 2); - addItemOrDrop(player, rune.getRune().getId(), 1); + rewardXP(player, Skills.RUNECRAFTING, rune.getExperience() * 4); + addItemOrDrop(player, rune.getRune().getId(), getMultiplier(rune)); } } } else { int total = 0; for(int j = 0; j < amount; j++) { // since getMultiplier is stochastic, roll `amount` independent copies - total += getMultiplier(); + total += getMultiplier(rune); } if (removeItem(player, item, Container.INVENTORY)) { @@ -244,7 +250,8 @@ public final class RuneCraftPulse extends SkillPulse { player.getAchievementDiaryManager().finishTask(player, DiaryType.KARAMJA, 2, 3); } // Craft 196 or more air runes simultaneously - if (altar == Altar.AIR && total >= 196) { + //Snowscape: since runecrafting is one essence at a time, you can't craft 196 at once. So just trigger when level 66 is reached. + if (altar == Altar.AIR && getDynLevel(player, Skills.RUNECRAFTING) >= 66) { player.getAchievementDiaryManager().finishTask(player, DiaryType.FALADOR, 2, 2); } // Craft a water rune at the Water Altar @@ -264,25 +271,31 @@ public final class RuneCraftPulse extends SkillPulse { boolean imbued = hasSpellImbue(); if (!imbued ? removeItem(player, remove, Container.INVENTORY) : imbued) { int amount = 0; - int essenceAmt = player.getInventory().getAmount(PURE_ESSENCE); + //int essenceAmt = player.getInventory().getAmount(PURE_ESSENCE); + int essenceAmt = 1; + int multiplier = getMultiplier(altar.getRune()) * 2; final Item rune = node.getName().contains("rune") ? Rune.forItem(node).getRune() : Rune.forName(Talisman.forItem(node).name()).getRune(); int runeAmt = player.getInventory().getAmount(rune); - amount = Math.min(essenceAmt, runeAmt); - if (removeItem(player, new Item(PURE_ESSENCE.getId(), amount), Container.INVENTORY) && removeItem(player, new Item(rune.getId(), amount), Container.INVENTORY)) { + amount = Math.min(multiplier, runeAmt); + if (removeItem(player, new Item(PURE_ESSENCE.getId(), essenceAmt), Container.INVENTORY) && removeItem(player, new Item(rune.getId(), amount), Container.INVENTORY)) { + rewardXP(player, Skills.RUNECRAFTING, combo.getExperience()); for (int i = 0; i < amount; i++) { if (RandomFunction.random(1, 3) == 1 || hasBindingNecklace()) { addItemOrDrop(player, combo.getRune().getId(), 1); - rewardXP(player, Skills.RUNECRAFTING, combo.getExperience()); + //rewardXP(player, Skills.RUNECRAFTING, combo.getExperience()); } } 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) { + if (1000 - player.getEquipment().get(EquipmentContainer.SLOT_AMULET).getCharge() >= 400) { if (player.getEquipment().remove(BINDING_NECKLACE, true)) { - sendMessage(player, "Your binding necklace crumbles into dust."); + sendMessage(player, "Your binding necklace crumbles into dust."); + playAudio(player, Sounds.DESTROY_OBJECT_2381); } } } + // Snowscape: adding the imbue effect after crafting so that a talisman isn't required for every essence + player.setAttribute("spell:imbue", GameWorld.getTicks() + 20); } } } @@ -291,7 +304,8 @@ public final class RuneCraftPulse extends SkillPulse { * Method used to craft tablets. Custom for Snowscape */ private final void craftTablet() { - int amount = player.getInventory().getAmount(new Item(1761)); + //int amount = player.getInventory().getAmount(new Item(1761)); + int amount = 1; Item clay = new Item(1761, amount); Item tablet = null; if (altar == Altar.AIR) { tablet = new Item(13599, amount); } @@ -331,15 +345,19 @@ public final class RuneCraftPulse extends SkillPulse { */ private Item getEssenceItem() { if (altar.isOurania() && amountInInventory(player, PURE_ESSENCE.getId()) > 0) { - return new Item(PURE_ESSENCE.getId(), amountInInventory(player, PURE_ESSENCE.getId())); + //return new Item(PURE_ESSENCE.getId(), amountInInventory(player, PURE_ESSENCE.getId())); + return new Item(PURE_ESSENCE.getId(), 1); } if (!rune.isNormal() && amountInInventory(player, PURE_ESSENCE.getId()) > 0) { - return new Item(PURE_ESSENCE.getId(), amountInInventory(player, PURE_ESSENCE.getId())); + //return new Item(PURE_ESSENCE.getId(), amountInInventory(player, PURE_ESSENCE.getId())); + return new Item(PURE_ESSENCE.getId(), 1); } if (rune.isNormal() && amountInInventory(player, RUNE_ESSENCE.getId()) > 0) { - return new Item(RUNE_ESSENCE.getId(), amountInInventory(player, RUNE_ESSENCE.getId())); + //return new Item(RUNE_ESSENCE.getId(), amountInInventory(player, RUNE_ESSENCE.getId())); + return new Item(RUNE_ESSENCE.getId(), 1); } - return new Item(PURE_ESSENCE.getId(), amountInInventory(player, PURE_ESSENCE.getId())); + //return new Item(PURE_ESSENCE.getId(), amountInInventory(player, PURE_ESSENCE.getId())); + return new Item(PURE_ESSENCE.getId(), 1); } /** @@ -347,10 +365,10 @@ public final class RuneCraftPulse extends SkillPulse { * * @return the amount. */ - public int getMultiplier() { - if (altar.isOurania()) { - return 1; - } + public int getMultiplier(Rune rune) { + //if (altar.isOurania()) { + // return 1; + //} int rcLevel = getDynLevel(player, Skills.RUNECRAFTING); int runecraftingFormulaRevision = ServerConstants.RUNECRAFTING_FORMULA_REVISION; boolean lumbridgeDiary = player.getAchievementDiaryManager().getDiary(DiaryType.LUMBRIDGE).isComplete(1);