-
Notifications
You must be signed in to change notification settings - Fork 2
Loads of fixes #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Loads of fixes #88
Conversation
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
This avoids tests polluting each other
Priority from 1 to 100, with 1 being highest
More end to end tests and avoid sleeps during rest site
Lots of errors when the user is given a choice of cards but has no valid choice, so it returns None. That None then gets treated like a card and throws errors or ends up in the player's hand.
Much simpler now
- When the player or enemy died, often the combat would continue, sometimes crashing because the target has negative health. - Slime splitting was also affected by this.
- Enemy buffs would accidentally buff the player - Debuffs were not respecting the passed-in target
This cleans up the combat loop to be easier to understand. We take a turn, then publish the END_OF_TURN, which causes enemies to take their turn. I think it would be better to make it more symmetrical -- like have each entity take a turn, but this works for now.
Priority from 1 to 100, with 1 being highest
- Use the new ModeShift - Use modulus to determine what turn we're on
- Moved the creation to the outside of the random choice. So instead of creating 3 enemies and then picking one, we pick one of the 3 classes and just create that one enemy. This avoids all the creation logic of the other (unused) bosses.
This avoids Havoc drawing Havoc from the draw pile infinitely.
vesper-arch
approved these changes
Dec 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i really have to start working on this again
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.
A Cornicopia of Fixes
This pull request introduces a large suite of improvements and refactorings aimed at making the combat flow more robust, the codebase more maintainable, and the gameplay more accurate. It also includes several bug fixes, performance optimizations, enhanced testing, and better handling of error conditions and edge cases. Below is a categorized summary of the major changes:
Combat Flow & Turn Management
END_OF_TURN
event before enemies act.in_combat
Attribute is Set (be020a9): Stabilizes state management by ensuring that thein_combat
flag correctly reflects current gameplay conditions.Card & Effect Mechanics
Performance & Resource Management
Error Handling & Assertions
Message Bus Enhancements
Testing Improvements
Miscellaneous