Fixed bug in dark room. The mob currently has issues accepting exit locks
This commit is contained in:
parent
56104d9a1d
commit
4e11b2b5b5
3 changed files with 2 additions and 6 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue