Fix bug with undefined variable
This commit is contained in:
parent
46590de8ab
commit
11785cd534
1 changed files with 17 additions and 13 deletions
|
|
@ -382,8 +382,11 @@ class Friendly(Pet):
|
|||
self.do_action()
|
||||
|
||||
def do_action(self):
|
||||
# Do something based on the highest friendly level is the same area!
|
||||
# Do something based on the highest friendly level is the same
|
||||
# area!
|
||||
msg = None
|
||||
(level, chars) = self.friendly_reaction()
|
||||
if chars and len(chars) > 0:
|
||||
focus = random.choice(chars)
|
||||
|
||||
if level == Reaction.SCARED:
|
||||
|
|
@ -395,7 +398,8 @@ class Friendly(Pet):
|
|||
elif level == Reaction.FRIENDLY:
|
||||
msg = choices(self.db.friendly_actions)
|
||||
else:
|
||||
# If we have an ecstatic message, use it otherwise, grab the friendly:
|
||||
# If we have an ecstatic message, use it otherwise,
|
||||
# grab the friendly:
|
||||
msg = choices(self.db.ecstatic_actions or self.db.friendly_actions)
|
||||
|
||||
if msg and msg not in self.db.last_actions:
|
||||
|
|
|
|||
Loading…
Reference in a new issue