handlers: mission energy cost, level-up, and battle drops - #42
Open
Seltraeh wants to merge 1 commit into
Open
Conversation
Moves MissionStart and MissionEnd onto real data. MissionStart takes the energy cost from mission_mst keyed on the requested mission id instead of a fixed value, and reads the mission id from its nested position in the request rather than the top level, where it was never present. MissionEnd credits the per-mission zel and karma from the battle result, applies level-ups by per-level chunk subtraction, and refills energy to the new level's cap on ding. Dropped units are credited through addUserUnit and dropped items through addUserItem, which drives both the obtained-unit animation and the first-encounter encyclopedia unlock. Battle wave content is still the captured mission-10 enemy set; the wave headers are keyed off the requested mission so the client renders and plays correctly, but loading per-mission waves from mission_mst remains outstanding.
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.
handlers: mission energy cost, level-up, and battle drops
Branch:
split/13-mission-flowBase:
devMerge position: 13 of 13
Final PR. Moves
MissionStart/MissionEndonto real data.What's included
MissionStarttakes the energy cost frommission_mstkeyed on the requested mission id instead of a fixed value. It also reads the mission id from its nested position in the request rather than the top level, where it was never present — the previous fallback made every mission launch as mission 10.MissionEndcredits per-mission zel and karma from the battle result, applies level-ups by per-level chunk subtraction, and refills energy to the new level's cap on ding. Dropped units go throughaddUserUnitand dropped items throughaddUserItem, driving both the obtained-unit animation and the first-encounter encyclopedia unlock.Known incomplete
Battle wave content is still the captured mission-10 enemy set. The wave headers are keyed off the requested mission so the client renders and plays correctly, but loading per-mission waves from
mission_mstremains outstanding and is the obvious next task.Verification
Start a mission: correct energy deducted. Complete it: rewards credited, level-up animation plays once without cascading, drops appear.