home · contact · privacy
Make some things block movement, and others not.
[plomrogue2] / plomrogue / tasks.py
index 2c0c3fce395c05011a114b3227e01843f58640f2..e73b174a1fed351c03cf8c22bd791900e4f76cb9 100644 (file)
@@ -36,8 +36,9 @@ class Task_MOVE(Task):
         test_pos = self.get_move_target()
         if test_pos is None:
             raise PlayError('would move out of map')
-        elif test_pos in [t.position for t in self.thing.game.things]:
-            raise PlayError('would collide with other things')
+        elif test_pos in [t.position for t in self.thing.game.things
+                          if t.blocking]:
+            raise PlayError('blocked by other thing')
         elif self.thing.game.map[test_pos] != '.':
             raise PlayError('would move into illegal territory')