Fixed bug in dark room. The mob currently has issues accepting exit locks

This commit is contained in:
Griatch 2015-02-22 14:07:42 +01:00
parent 56104d9a1d
commit 4e11b2b5b5
3 changed files with 2 additions and 6 deletions

View file

@ -301,14 +301,9 @@ class Mob(tut_objects.TutorialObject):
# no target found, look for an exit.
exits = [exi for exi in self.location.exits
if exi.access(self, "traverse")]
last_location = self.ndb.last_location
if exits:
# randomly pick an exit
exit = random.choice(self.location.exits)
if len(exits) > 1 and exit.destination == last_location:
# don't go back the same way we came if we
# can avoid it.
return
# move there.
self.move_to(exit.destination)
else: