home · contact · privacy
Fix broken FLATTEN_SURROUNDINGS.
[plomrogue2] / plomrogue / tasks.py
index 4b63634a9ebad71bd01ec9e08321830a252328ef..68f3269c04738ee8f44e785453f5c50fb8e2f713 100644 (file)
@@ -34,10 +34,11 @@ class Task_MOVE(Task):
 
     def check(self):
         test_yxyx = self._get_move_target()
+        move_blockers = self.thing.game.get_movement_blockers()
         if test_yxyx in [t.position for t in self.thing.game.things
                          if t.blocking]:
             raise PlayError('blocked by other thing')
-        elif self.thing.game.maps[test_yxyx[0]][test_yxyx[1]] != '.':
+        elif self.thing.game.maps[test_yxyx[0]][test_yxyx[1]] in move_blockers:
             raise PlayError('blocked by impassable tile')
 
     def do(self):
@@ -77,7 +78,7 @@ class Task_FLATTEN_SURROUNDINGS(Task):
                     self.thing.position).values()):
             if not self.thing.game.can_do_tile_with_pw(*yxyx, self.args[0]):
                 continue
-            self.thing.game.maps[yxyx[0]][yxyx[1]] = '.'
+            self.thing.game.maps[yxyx[0]][yxyx[1]] = self.thing.game.get_flatland()
             self.thing.game.record_fov_change(yxyx)