CW spell restrictions

This commit is contained in:
dam 2026-02-18 22:50:30 +02:00
parent 1f505efa26
commit 4650568aa9
No known key found for this signature in database
GPG key ID: 4AF4E722399663FB
2 changed files with 12 additions and 0 deletions

View file

@ -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)
}

View file

@ -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)) {