From 17bad9fd4d55fa81af669ce4b6371c1a105b43e6 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 8 May 2022 23:43:33 -0700 Subject: [PATCH] Don't try to Melee entities that don't block movement --- roguebasin/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roguebasin/actions.py b/roguebasin/actions.py index cc25a46..7f26917 100644 --- a/roguebasin/actions.py +++ b/roguebasin/actions.py @@ -162,7 +162,7 @@ class BumpAction(MoveAction): if not position_is_in_bounds or not position_is_walkable: return self.failure() - if entity_occupying_position: + if entity_occupying_position and entity_occupying_position.blocks_movement: return ActionResult(self, alternate=MeleeAction(self.actor, self.direction, entity_occupying_position)) return ActionResult(self, alternate=WalkAction(self.actor, self.direction))