Fix Priest party-sanc gate reading char.base.tier twice#95
Open
rodarvus wants to merge 1 commit into
Open
Conversation
In affoff() the gate that decides whether a high-level Priest should recast party sanctuary instead of plain sanctuary computed totalLevel as tier+tier, because playerLevel was being read from char.base.tier. That made totalLevel always tiny (2-18) and the >= 121 check always false, leaving the party-sanc branch as dead code. Read char.base.level for playerLevel so totalLevel is level+tier as the surrounding logic expects. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In
SpellupRecast/Hadar_Spellups.xml, theaffoff()function has logic that recasts party sanctuary instead of plain sanctuary for high-level Priests when Sanctuary (sn 71) wears off. The gate that enables that path computestotalLevel = playerLevel + playerTierand checkstotalLevel >= 121.playerLevelwas being read fromchar.base.tierinstead ofchar.base.level, sototalLevelwas effectivelytier + tier. That is always far below 121 for any reasonable character, which made the entire Priest party-sanc branch dead code in practice — plain sanctuary would be recast instead of party sanctuary regardless of the player's level.This one-line change reads
char.base.levelforplayerLevelso the gate behaves as the surrounding code clearly intends.Before
After
Test plan
level + tier >= 121, let plain Sanctuary (sn 71) drop and confirm the plugin sendscast 'party sanctuary'(verified live in MUSHclient).🤖 Generated with Claude Code