Repository navigation
Enhance The Sunken Crown with new mechanics, content, and refactoring - #2
Merged
Merged
Conversation
…iptions, monster encounters, atmospheric events, command responses, explanatory text, throne room special text, and gate resolution text.
…s and specific monster interactions
…st plan - Created issue-09-context.md detailing the Bound King encounter, including global variables, SUBs, and game mechanics. - Created issue-10-context.md outlining the Gate sequence, including constants, global variables, and game flow. - Added final-acceptance-test.md to verify the complete game functionality, covering startup, navigation, combat, inventory, and cross-system interactions.
…These files contained operational details for game mechanics, including global variables, subroutine logic, and exit states for various game scenarios. The removal is part of a cleanup process as the project progresses towards finalization.
…and documentation
… CLAMP, MAX, and MIN
…update STRING$ tests for expected output
…andling; add tests for error cases
…for various cases
… tests for various cases
…r behavior; enhance error handling descriptions
…missing parentheses and invalid types
…INT for integer conversion
- Updated SetGlobalStatement to include optional Index and ColIndex for 1D and 2D array assignments. - Modified Evaluator to handle both scalar and array assignments, including error handling for out-of-bounds indices and type mismatches. - Enhanced Parser to correctly parse array indices in SET GLOBAL statements. - Added comprehensive unit tests for 1D and 2D array assignments, including edge cases for out-of-bounds access and undeclared names.
…sed on room visit status
…enhance narrative on first entry
… combat encounters
- Issue 5: Implement combat system enhancements, including monster states and combat flags. - Issue 6: Introduce inventory management with overburdened states and loot shuffling. - Issue 7: Add atmospheric events and zombie mechanics, modifying combat interactions. - Issue 8: Integrate traps and riddles, including riddle-solving mechanics and room interactions. - Issue 9: Finalize the Bound King boss fight, including narrative updates and end state handling. - Issue 10: Complete game flow with gate mechanics, win/loss conditions, and end screen statistics. - General: Update global variables, reset logic, and improve command handling throughout the game.
- Changed local variable assignments to global for monsterAlive, visited, and exitHidden in various subs across multiple issues. - Updated InitMonsters and InitExits subs to use SET GLOBAL for initializing room exits and monster states. - Adjusted HandleFight and EnterRoom subs to ensure proper tracking of room visits and monster states using global variables. - Ensured consistency in variable handling across the codebase for better state management.
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.
This pull request updates the SharpBASIC documentation and sample programs to reflect new language features, clarify existing behavior, and provide additional examples. The most significant changes include expanded documentation on global array mutation with
SET GLOBAL, new built-in functions, improved identifier rules, and enhanced sample code demonstrating these features.Language and Runtime Behavior Updates
LET arr[i] = valueinside a subroutine can only write to arrays declared in the current scope, and writing to global arrays inside subs must useSET GLOBAL arr[i] = value. Examples and error conditions are now included. [1] [2] [3] [4] [5]MID,LEFT, and `RIGHT now perform bounds checking and produce clean runtime errors, instead of crashing. [1] [2]Built-in Functions and Statements
CINT,STRING,ASC,MAX,MIN, andCLAMP`. Updated the list of built-in functions and provided descriptions and examples for each. [1] [2] [3]SLEEP(ms).string-utilities.sbxto demonstrate usage ofASCand `STRING, including round-trip conversions and variable counts.arrays.sbxto demonstrateSET GLOBALwith 1D and 2D arrays from within subroutines.Documentation and Samples Organization
capstone/README.mdin preparation for future content.These changes provide clearer guidance for SharpBASIC users, ensure the documentation matches the current interpreter behavior, and enrich the sample programs with practical demonstrations of new and updated features.