Implement Energy System - Player energy depletes when fishing and restores when sleeping #36
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.
Implements a complete energy system for the FishE game as requested in issue #X. Players now have an energy meter that adds strategic resource management to the fishing gameplay.
Changes Made
Core Energy Mechanics:
UI Updates:
Data Persistence:
Testing:
Example Gameplay
Screenshot
The energy system adds meaningful resource management while preserving the game's existing feel. Players must now balance fishing activities with rest, making sleep a strategic choice rather than just a time advancement mechanism.
Files Changed:
src/player/player.py- Added energy attributesrc/player/playerJsonReaderWriter.py- Energy serialization supportsrc/ui/userInterface.py- Energy display in status barsrc/location/docks.py- Energy consumption and low-energy preventionsrc/location/home.py- Energy restoration when sleepingschemas/player.json- Schema updates for energy validationAll 61 tests pass, ensuring the energy system works correctly while maintaining existing functionality.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.