X-Git-Url: https://plomlompom.com/repos/new_day?a=blobdiff_plain;f=plomrogue%2Ftasks.py;h=f7fb3124da02b32e46a887b95eed9ee8a57214ea;hb=a789724e6b1b5eb514f82ac4d7092f7575180c31;hp=4b63634a9ebad71bd01ec9e08321830a252328ef;hpb=74c0ec0247f058b977996f9e1e2d696f3d2d162b;p=plomrogue2 diff --git a/plomrogue/tasks.py b/plomrogue/tasks.py index 4b63634..f7fb312 100644 --- a/plomrogue/tasks.py +++ b/plomrogue/tasks.py @@ -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.game.get_flatland() self.thing.game.record_fov_change(yxyx)