diff options
Diffstat (limited to 'internal/game/sys_safespot.go')
| -rw-r--r-- | internal/game/sys_safespot.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/game/sys_safespot.go b/internal/game/sys_safespot.go index b0e94c2..da999c0 100644 --- a/internal/game/sys_safespot.go +++ b/internal/game/sys_safespot.go @@ -121,6 +121,7 @@ func (g *Game) activateSafespot(sess *net.Session, p *player.Player, ss *Safespo msg = fmt.Sprintf("You crouch behind the %s, using it as cover.", objDef.Name) } sess.WriteLine(g.colorize(sess, "combat_info", msg)) + g.writePrompt(sess) } func (g *Game) safespotMaintenance(sess *net.Session, p *player.Player, ss *SafespotState) { @@ -150,11 +151,7 @@ func (g *Game) safespotMaintenance(sess *net.Session, p *player.Player, ss *Safe } if cfg.UnsafeChance > 0 && rand.Float64() < cfg.UnsafeChance { - alert := p.OptionString("safespot_alert") g.forceLeaveSafespot(sess, p, ss, "You slip and are no longer covered!") - if alert != "" { - sess.WriteLine(color.ExpandTags(g.colorMode(sess), alert)) - } return } @@ -283,6 +280,10 @@ func (g *Game) forceLeaveSafespot(sess *net.Session, p *player.Player, ss *Safes if reason != "" { sess.WriteLine(reason) + alert := p.OptionString("safespot_alert") + if alert != "" { + sess.WriteLine(color.ExpandTags(g.colorMode(sess), alert)) + } } p.ActionState = nil } |
