From 9666676766bf21364f4fc4d0d1d336e72f2a91b4 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Tue, 6 Oct 2026 12:57:23 -0400 Subject: refactor: split casino.go, dedup helpers, remove audit docs --- internal/game/act_steal.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/game/act_steal.go') diff --git a/internal/game/act_steal.go b/internal/game/act_steal.go index 7df400b..50c83ee 100644 --- a/internal/game/act_steal.go +++ b/internal/game/act_steal.go @@ -146,6 +146,12 @@ func (g *Game) resolveStealTarget(p *player.Player, input string) (targetType st }) if len(matchingMobs) > 0 { + // Out-of-range 1-based selectors are no-target, matching findMob. The + // previous fallthrough silently stole from the first mob for a single + // candidate and reported "nothing here" only for 2+ candidates. + if instanceIdx >= 0 && instanceIdx >= len(matchingMobs) { + return "", nil, nil, "There's nothing here to steal from." + } uniqueDefs := make(map[string]bool) for _, m := range matchingMobs { uniqueDefs[m.DefID] = true -- cgit v1.2.3