aboutsummaryrefslogtreecommitdiff
path: root/internal/game/look_entities.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-25 19:37:20 -0400
committerhistoria <[not public]>2026-06-25 19:37:20 -0400
commitc55d0e4150b23f2c5c9f96bbc3d4dc2fc6dbaa36 (patch)
treed1c02acea2b4c8d0f672c1539cfdb373b6272ed0 /internal/game/look_entities.go
parent068ce514ea3eebdc42b595c631b4b00ce4594577 (diff)
downloadthehouseoficarus-c55d0e4150b23f2c5c9f96bbc3d4dc2fc6dbaa36.tar.gz
feat: yaml conversation trees more robust
Diffstat (limited to 'internal/game/look_entities.go')
-rw-r--r--internal/game/look_entities.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/game/look_entities.go b/internal/game/look_entities.go
index f9412d4..915317f 100644
--- a/internal/game/look_entities.go
+++ b/internal/game/look_entities.go
@@ -59,9 +59,14 @@ func (g *Game) showRoomMobs(sess *net.Session, p *player.Player, room *world.Roo
if m.Protected {
mobColor = "protected_mob"
}
- mobLevel := mobCombatLevel(m)
- levelStr := g.levelColorize(sess, playerLevel, mobLevel, fmt.Sprintf("(level %d)", mobLevel))
- lines = append(lines, fmt.Sprintf("%s %s%s%s", g.colorize(sess, mobColor, displayName), levelStr, hp, desc))
+ var levelStr string
+ if m.Protected {
+ levelStr = ""
+ } else {
+ mobLevel := mobCombatLevel(m)
+ levelStr = " " + g.levelColorize(sess, playerLevel, mobLevel, fmt.Sprintf("(level %d)", mobLevel))
+ }
+ lines = append(lines, fmt.Sprintf("%s%s%s%s", g.colorize(sess, mobColor, displayName), levelStr, hp, desc))
}
return lines
}