Add Onward mode (trunk) - #3
Merged
Merged
Conversation
A new game type (GAME_TYPE_ONWARD, `-onward`, rc `type = onward`) that plays as a normal game except that death is a choice. When the player would die, they are asked "Continue in the dungeon at the cost of half your points (N points)?"; accepting reuses the Felid extra-life path (pending_revival -> revive()) so they get back up on the next turn at full HP and MP where they fell, unless the tile is lava or deep water. Felid lives are spent first because they are free. Every continue halves whatever the run ends up being worth, so a win without dying keeps the full score and a late death still costs far more than an early one. Continues are counted in you.props (no save-format change) and the scorefile carries onward=N on every Onward entry, and score lines read "points (D deaths)", D counting the death that ended the game. Onward never touches normal games: saves go to saves/onward/, and scores, logfile, milestones and bones get the -onward qualifier, the same way Sprint and Descent are kept apart. The mode is listed in the startup menu, -help, -gametypes-json (webtiles), games.d/base.yaml, the manual and options guide. The Felid revival tail in ouch.cc is factored into _schedule_revival() so both paths share it. catch2-tests/test_onward.cc pins the game-type switches (which all fall through `default:` silently), the halving and the xlog field.
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.
Adds Onward mode — a new game type (for trunk) where death is a choice: continue in the dungeon where you fell (full HP/MP) for half your score, rounding down what you keep. Felid extra lives are spent first. A death with fewer than 2 points is final ("Sorry, you don't even have the points to come back. Goodbye.").
-onwardqualifier); never touches normal games.N points (D deaths), D = paid continues + the final death.-help,-gametypes-json(webtiles),games.d/base.yaml, manual and options guide.catch2-tests/test_onward.cccovers the game-type switches, halving/round-down, the <2-points rule, and xlog round-trip — building and passing on this branch.https://claude.ai/code/session_012epLj7mVTpcFaVNi8C8iy3