Don't try to Melee entities that don't block movement

This commit is contained in:
Eryn Wells 2022-05-08 23:43:33 -07:00
parent 7d871e52a9
commit 17bad9fd4d

View file

@ -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))