mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 16:42:41 +00:00
Camp: reject (not downgrade) sub-par camps; map: show visited path
Camp rest rules:
• Standard camp now rejects an uncleared room with a clear message
instead of silently downgrading to rough — let the player make the
call rather than spending supplies on a worse rest they didn't pick.
• campLocationCheck treats a room with a resolved (non-active) combat
session as cleared, so the natural "just killed, not yet advanced"
pause still qualifies for a standard camp.
• Reword fortified-camp gating + babysit help to "zone boss defeated"
(cache sites aren't a thing yet) so the requirement isn't misleading.
Map: renderVisitedPath adds a 1-indexed breadcrumb of visited rooms to
!expedition map, so players can reference rooms by index (e.g. !revisit 2).
(cherry picked from commit a38fc77eed888e9790c7a7cff24369b98910b43e)
This commit is contained in:
@@ -172,6 +172,28 @@ func nodeGlyph(n ZoneNode) string {
|
||||
return "·"
|
||||
}
|
||||
|
||||
// renderVisitedPath renders a one-line numbered breadcrumb of the
|
||||
// player's path so they can reference rooms by index (e.g. !revisit 2).
|
||||
// Numbers are 1-indexed to match every other surface ("Room 2/7", etc.).
|
||||
func renderVisitedPath(g ZoneGraph, run *DungeonRun) string {
|
||||
if run == nil || len(run.VisitedNodes) == 0 {
|
||||
return ""
|
||||
}
|
||||
parts := make([]string, 0, len(run.VisitedNodes))
|
||||
for i, nodeID := range run.VisitedNodes {
|
||||
glyph := "·"
|
||||
if n, ok := g.Nodes[nodeID]; ok {
|
||||
glyph = nodeGlyph(n)
|
||||
}
|
||||
mark := "✓"
|
||||
if nodeID == run.CurrentNode {
|
||||
mark = "▶"
|
||||
}
|
||||
parts = append(parts, fmt.Sprintf("[%d]%s%s", i+1, glyph, mark))
|
||||
}
|
||||
return strings.Join(parts, " → ")
|
||||
}
|
||||
|
||||
// debugDump (test-only crutch) prints the raw column layout. Currently
|
||||
// unused outside potential debugging — kept off the unused-warning list
|
||||
// by routing fmt through it.
|
||||
|
||||
Reference in New Issue
Block a user