Skip to content

Fix max score for Afflicted: 117 not 75#82

Open
Copilot wants to merge 11 commits intomasterfrom
copilot/fix-afflicted-max-score
Open

Fix max score for Afflicted: 117 not 75#82
Copilot wants to merge 11 commits intomasterfrom
copilot/fix-afflicted-max-score

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

Afflicted displays scores as negative numbers (tracking infractions), but the parse_score() function negates the parsed value (score = -strtol(...)), so get_score() returns positive values internally. Jericho was incorrectly reporting a max score of 75, and the walkthrough was incomplete.

Changes

  • frotz/src/games/afflicted.c: Updated afflicted_max_score() return value from 75 to 117
// Before
int afflicted_max_score() {
  return 75;
}

// After
int afflicted_max_score() {
  return 117;
}
  • jericho/game_info.py: Updated the walkthrough to include all 27 scoring note actions, reaching the true maximum of 117. The original walkthrough only achieved 75/75. The Club Floyd transcript reaches -113 displayed (113 internally), but misses two additional notes (note produce in the dining room and note servingware in the dish room). The new walkthrough adds 12 notes missing from the original: note roach, note rat, note produce, note dispenser, note mouse, note toilet, note kettle (open steam table lid first), note lettuce (open mini fridge first), note remnants, note pans (walk-in refrigerator), note table (dish racks, before opening dishwasher), and note servingware.

The scoring breakdown: 3 pts (entering restaurant) + 27 notes × 2 pts + 60 pts (body parts/actions) = 117.


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI changed the title [WIP] Fix max score for the game Afflicted Fix max score for Afflicted: -113 not 75 Mar 27, 2026
Copilot AI requested a review from MarcCote March 27, 2026 02:28
@MarcCote
Copy link
Copy Markdown
Collaborator

@copilot The max score should be positive though. Look at the code that parses the score.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 27, 2026

@copilot The max score should be positive though. Look at the code that parses the score.

You're right — parse_score() does score = -strtol(...), so when the game displays "-113", it's stored as +113. Updated to return 113 (positive) in commit 0042a0e.

Copilot AI changed the title Fix max score for Afflicted: -113 not 75 Fix max score for Afflicted: 113 not 75 Mar 27, 2026
@MarcCote MarcCote marked this pull request as ready for review March 27, 2026 15:49
@MarcCote
Copy link
Copy Markdown
Collaborator

@copilot did you ran the walkthrough to check if we are reaching that max_score?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 27, 2026

@copilot did you ran the walkthrough to check if we are reaching that max_score?

The afflicted.z8 ROM is not included in the repository, so I wasn't able to run the walkthrough directly. The value 113 is derived from code analysis: parse_score() applies score = -strtol(...), negating the displayed score. The Club Floyd transcript confirms the game ends at a displayed score of -113, which after negation yields +113 internally. That said, if you have access to the ROM, running python tools/test_games.py afflicted.z8 would confirm whether the walkthrough actually reaches 113.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • allthingsjacq.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • ifdb.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • www.ifarchive.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@MarcCote
Copy link
Copy Markdown
Collaborator

@copilot rebase this branch on top of master branch and try again to play the walkthrough (first the one contained in game_info.py, then the one mentioned in the issue description)

MarcCote and others added 8 commits March 27, 2026 18:34
- Add copilot-setup-steps.yml to set up Python, build tools, jericho,
  and download game ROMs from BYU-PCCL/z-machine-games
- Add copilot-instructions.md with guidance on using ifdb.org for game
  details, allthingsjacq.com for transcripts, and the game suite for ROMs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: MarcCote <660004+MarcCote@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: MarcCote <660004+MarcCote@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: MarcCote <660004+MarcCote@users.noreply.github.com>
Co-authored-by: MarcCote <660004+MarcCote@users.noreply.github.com>
Co-authored-by: MarcCote <660004+MarcCote@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 27, 2026

@copilot rebase this branch on top of master branch and try again to play the walkthrough (first the one contained in game_info.py, then the one mentioned in the issue description)

Rebased on master (which has the ROMs available) and ran both walkthroughs:

Original walkthrough (game_info.py): scored 75/113 — FAIL. It was missing many note actions.

Club Floyd transcript walkthrough: Using the transcript as a guide, I found 12 additional scoring notes the original walkthrough missed: note roach, note rat, note produce, note dispenser, note mouse, note toilet, note kettle (open steam table lid first), note lettuce (open mini fridge first), note remnants, note pans (walk-in refrigerator), note table (dish racks, before opening dishwasher), note servingware.

The Club Floyd run itself reached -113 but missed note produce and note servingware — the true maximum turns out to be 117, not 113.

Updated in commit a8c0589:

  • afflicted_max_score() → 117
  • Walkthrough in game_info.py → includes all 27 scoring notes in correct order
  • python tools/test_games.py roms/afflicted.z8PASS (117/117)

Copilot AI changed the title Fix max score for Afflicted: 113 not 75 Fix max score for Afflicted: 117 not 75 Mar 27, 2026
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.

2 participants