-
Notifications
You must be signed in to change notification settings - Fork 37
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
contracts: disallow join after battle ends #1118
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Overall, this pull request makes significant improvements to the battle system. It adds important checks to ensure the integrity of the game state, such as verifying army health, checking if armies are alive, and preventing joining ended battles. The changes also improve the handling of armies that might be stuck in ended battles. These additions will likely lead to a more robust and consistent gameplay experience. The code is well-structured and the new checks are placed logically within the existing flow. Good job on improving the system's reliability and preventing potential edge cases.
Thanks for using MentatBot. Give comments a 👍 or 👎 to help me improve!
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
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.
Are the changes to the deleting of the models pending the functionality in Dojo?
User description
battle_start
is called against an army that is still in battle and the battle has ended, the army is automatically forced to leave the old battle so that it can join the new onePR Type
Enhancement, Bug fix
Description
Changes walkthrough 📝
contracts.cairo
Disallow joining battles after they have ended and add health checks
contracts/src/systems/combat/contracts.cairo
battles.
a battle.