X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=new%2Fplomrogue%2Ftasks.py;h=c54d0899b98ecb56ec2c4fe422ec357086951df2;hb=f5797c816396a105c0d72cc826c2cc2566f1478c;hp=6f2f1be9ee4397630059c35eece39ebd48bda99f;hpb=729e72408fa1c3180275ad3c0e6689143a0f2f38;p=plomrogue2-experiments diff --git a/new/plomrogue/tasks.py b/new/plomrogue/tasks.py index 6f2f1be..c54d089 100644 --- a/new/plomrogue/tasks.py +++ b/new/plomrogue/tasks.py @@ -37,6 +37,8 @@ class Task_MOVE(Task): def check(self): test_pos = self.thing.world.map_.move(self.thing.position, self.args[0]) + if test_pos is None: + raise GameError('would move outside map bounds') if self.thing.world.map_[test_pos] != '.': raise GameError('%s would move into illegal terrain' % self.thing.id_) for t in self.thing.world.things: