mirror of
https://github.com/prosolis/gogobee.git
synced 2026-09-14 10:51:09 +00:00
adventure: stop the log claiming a win it didn't see
Four things the review found, all of them the code telling a player something that isn't true. A run that walks into a dead end filed its ending as "cleared" whatever the caller said, so both the liveblog and the summary reported a clear for a party that merely ran out of map — and the end beat is first-writer-wins, so nothing later could take it back. It says "cleared" only for a boss now. The re-offer branches of babysit and resume returned a zero cost, so a player who was in fact charged read "0 coins" in the verdict. Both re-quote the price they actually took. And the realm-firsts reseed retired its one-shot job even when the read under it had failed, which on a transient fault at Init would have left the ledger mis-dated permanently. The read now says whether it worked, and the job stays open when it didn't. Claude-Session: https://claude.ai/code/session_012bxpQQJDjC1mTtLN3VVtBQ
This commit is contained in:
@@ -436,8 +436,19 @@ func completeRunAtNode(runID string, boss bool) error {
|
||||
if boss {
|
||||
bossI = 1
|
||||
}
|
||||
// Only a boss kill is a clear. This function also closes a non-boss
|
||||
// dead-end — the party simply ran out of map — and beatRunEnd is
|
||||
// first-writer-wins, so calling that "cleared" would put a lie in the
|
||||
// liveblog and the run summary that nothing downstream could correct.
|
||||
// "ended" is deliberately outside the {cleared,died,retreated,abandoned}
|
||||
// set: the prompt renderer already degrades an unknown outcome to a
|
||||
// neutral "the run ended", which is exactly what happened.
|
||||
if run, _ := getZoneRun(runID); run != nil {
|
||||
beatRunEnd(run, "cleared")
|
||||
outcome := "ended"
|
||||
if boss {
|
||||
outcome = "cleared"
|
||||
}
|
||||
beatRunEnd(run, outcome)
|
||||
}
|
||||
_, err := db.Get().Exec(`
|
||||
UPDATE dnd_zone_run
|
||||
|
||||
Reference in New Issue
Block a user