Skip to content

Add Onward mode (trunk) - #3

Merged
robertmeta merged 1 commit into
masterfrom
onward-trunk
Aug 31, 2026
Merged

Add Onward mode (trunk)#3
robertmeta merged 1 commit into
masterfrom
onward-trunk

Conversation

@robertmeta

Copy link
Copy Markdown
Contributor

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.").

  • Own save dir, scorefile, logfile, milestones and bones (-onward qualifier); never touches normal games.
  • Score lines read N points (D deaths), D = paid continues + the final death.
  • Listed in the startup menu, -help, -gametypes-json (webtiles), games.d/base.yaml, manual and options guide.
  • catch2-tests/test_onward.cc covers 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

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.
@robertmeta
robertmeta merged commit c837cdb into master Aug 31, 2026
10 of 102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant