X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7B%20card_id%20%7D%7D/static/git-favicon.png?a=blobdiff_plain;f=plomrogue%2Ftasks.py;h=f7fb3124da02b32e46a887b95eed9ee8a57214ea;hb=a789724e6b1b5eb514f82ac4d7092f7575180c31;hp=4b63634a9ebad71bd01ec9e08321830a252328ef;hpb=7fc75c298c5e54159bc86d5841ee9feab2fc64d0;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)