aboutsummaryrefslogtreecommitdiff
path: root/internal/game/sys_safespot.go
diff options
context:
space:
mode:
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]