X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=plomrogue%2Ftasks.py;h=68f3269c04738ee8f44e785453f5c50fb8e2f713;hb=5a75ab241a01d23babfd01e85835f16ec4907cb8;hp=4b63634a9ebad71bd01ec9e08321830a252328ef;hpb=74c0ec0247f058b977996f9e1e2d696f3d2d162b;p=plomrogue2 diff --git a/plomrogue/tasks.py b/plomrogue/tasks.py index 4b63634..68f3269 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.thing.game.get_flatland() self.thing.game.record_fov_change(yxyx)