From 9292634f2f8d71a53879ff07e1330c671b207d51 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 6 Jul 2026 23:05:04 -0400 Subject: feat: split the concept of hidden and impassable exits. add player_flag for discovered hidden exits. --- internal/game/look_target.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'internal/game/look_target.go') diff --git a/internal/game/look_target.go b/internal/game/look_target.go index bf130be..ead38a7 100644 --- a/internal/game/look_target.go +++ b/internal/game/look_target.go @@ -26,6 +26,18 @@ func (g *Game) doLookTarget(sess *net.Session, input string) { sess.WriteLine("You can't see anything that way.") return } + if !p.GodMode && exitDef.AlwaysBlocked { + msg := exitDef.BlockedMessage + if msg == "" { + msg = fmt.Sprintf("The way %s is impassable.", exitDir) + } + sess.WriteLine(msg) + return + } + if exitDef.Hidden && !g.exitDiscovered(p, p.RoomID, exitDir) { + sess.WriteLine("You can't see anything that way.") + return + } if exitDef.Condition != nil && !g.checkCondition(sess, exitDef.Condition) { if !p.GodMode { msg := exitDef.BlockedMessage -- cgit v1.2.3