X-Git-Url: https://plomlompom.com/repos/?p=plomrogue2-experiments;a=blobdiff_plain;f=new%2Fplomrogue%2Ftasks.py;h=dfd22f7d50094d3732a327e370080e1085ef81ca;hp=c9ce45ed654f1aff64848c65f6b43167db3037c7;hb=0f7c3e5559d61d352ae529239e667e9da5e284fd;hpb=073618f45f297b21e90390be06cafcd430cd4d62 diff --git a/new/plomrogue/tasks.py b/new/plomrogue/tasks.py index c9ce45e..dfd22f7 100644 --- a/new/plomrogue/tasks.py +++ b/new/plomrogue/tasks.py @@ -41,8 +41,8 @@ class Task_MOVE(Task): 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: - if t.blocking and t.position == test_pos: + for t in self.thing.world.things_at_pos(test_pos): + if t.blocking: raise GameError('%s would move into other thing' % self.thing.id_) def do(self):