diff options
Diffstat (limited to 'internal/game/act_steal.go')
| -rw-r--r-- | internal/game/act_steal.go | 6 |
1 files changed, 6 insertions, 0 deletions
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 |
