From 4650568aa984e116d01911f244427538dbec4056 Mon Sep 17 00:00:00 2001 From: dam <27978131-real_damighty@users.noreply.gitlab.com> Date: Wed, 18 Feb 2026 22:50:30 +0200 Subject: [PATCH] CW spell restrictions --- .../content/global/skill/magic/lunar/LunarListeners.kt | 8 ++++++++ .../content/global/skill/magic/modern/ModernListeners.kt | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt b/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt index 8d70f99cb..4efb4ba1a 100644 --- a/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt +++ b/Server/src/main/content/global/skill/magic/lunar/LunarListeners.kt @@ -74,6 +74,10 @@ class LunarListeners : SpellListener("lunar"), Commands { // Level 68 onCast(Lunar.CURE_OTHER, PLAYER) { player, node -> requires(player, 68, arrayOf(Item(Items.ASTRAL_RUNE_9075, 1), Item(Items.LAW_RUNE_563), Item(Items.EARTH_RUNE_557, 10))) + if (player.zoneMonitor.isInZone("CastleWarsGame")) { + player.sendMessage("You can't use Cure Other in Castle Wars!") + return@onCast + } node?.let { cureOther(player, node) } } @@ -134,6 +138,10 @@ class LunarListeners : SpellListener("lunar"), Commands { // Level 74 onCast(Lunar.CURE_GROUP, NONE) { player, _ -> requires(player, 74, arrayOf(Item(Items.ASTRAL_RUNE_9075, 2), Item(Items.LAW_RUNE_563, 2), Item(Items.COSMIC_RUNE_564, 2))) + if (player.zoneMonitor.isInZone("CastleWarsGame")) { + player.sendMessage("You can't use Cure Group in Castle Wars!") + return@onCast + } cureGroup(player) } diff --git a/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt b/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt index 777beee18..6dcabf5bc 100644 --- a/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt +++ b/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt @@ -234,6 +234,10 @@ class ModernListeners : SpellListener("modern"){ player.sendMessage("You can only alch items from the cupboards!") return false } + if (player.zoneMonitor.isInZone("CastleWarsGame")) { + player.sendMessage("You can't use alchemy spells in Castle Wars!") + return false + } val coins = Item(995, item.definition.getAlchemyValue(high)) if (item.amount > 1 && coins.amount > 0 && !player.inventory.hasSpaceFor(coins)) {