Fix boss spawn bitmap conflict at (25,25)#25
Merged
thogard785 merged 2 commits intomainfrom Jul 11, 2025
Merged
Conversation
When a player occupies index 1 and a boss tries to spawn at the same location, the game would revert with InvalidLocationBitmap(2, 2). This fix checks both player and monster bitmaps before attempting boss spawn. If a player occupies the boss index, no boss spawns rather than reverting. Changes: - Check combined bitmap (players + monsters) for boss index availability - Return (0, false) when player occupies boss slot instead of reverting - Maintain existing behavior when monster already exists at boss index
The test was asserting that characters must survive combat, but death is also a valid combat resolution. Updated test to handle both outcomes properly.
c590900 to
f8421aa
Compare
Contributor
|
While the description of the problem's solution is innaccurate, this does fix the bug. The previous version was erroneously checking Will merge this to also update the test. |
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
Problem
When a player occupies index 1 and attempts to move to location (25,25), the game would revert with
InvalidLocationBitmap(2, 2). This happened because the boss spawn logic only checked the monster bitmap, not the player bitmap, before attempting to spawn a boss at the reserved index.Solution
Modified
_checkForAggroinInstances.solto check both player and monster bitmaps before attempting boss spawn. If a player occupies the boss index, the function now returns(0, false)instead of attempting to spawn and reverting.Changes
Testing
testBitmapLogic()to verify the fix logicGas Impact
Minimal - adds one additional bitmap check only for boss spawn scenarios at specific coordinates.