aboutsummaryrefslogtreecommitdiff
path: root/internal/game/sys_safespot.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-24 20:58:25 -0400
committerhistoria <[not public]>2026-06-24 20:58:25 -0400
commit9d4b799db4868bcab291b83599ff088763cd4ed6 (patch)
tree252f0fcc779acf35243983d643d6399ee2e0cd0b /internal/game/sys_safespot.go
parentd25638d98fe63efdeab570ef77e6a6a97f2d7a60 (diff)
downloadthehouseoficarus-9d4b799db4868bcab291b83599ff088763cd4ed6.tar.gz
feat: new type of non-violent 'combat': work
Diffstat (limited to 'internal/game/sys_safespot.go')
-rw-r--r--internal/game/sys_safespot.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/game/sys_safespot.go b/internal/game/sys_safespot.go
index da999c0..44a8f9f 100644
--- a/internal/game/sys_safespot.go
+++ b/internal/game/sys_safespot.go
@@ -46,6 +46,13 @@ func blocksMob(maxBlockSize, mobSize string) bool {
return mob <= max
}
+// safespotBlocksHazard reports whether the player's active safespot shields them
+// from room hazard damage. Unlike mobs, hazard type does not matter: an active
+// safespot blocks ALL hazard damage, no safespot blocks none.
+func (g *Game) safespotBlocksHazard(p *player.Player) bool {
+ return g.isSafespotted(p.Name)
+}
+
func (g *Game) safespotBlocksMob(p *player.Player, mob *world.MobInstance) bool {
g.safespotMu.Lock()
ss, ok := g.safespotStates[p.Name]