TreasureMap can evaluate to False if its m value is 0 (obviously a bizzare state, but not impossible in our current logic).

pull/1330/head
jMyles 2020-01-18 01:09:48 -08:00
parent fb2f03e307
commit 9bb7ed91f3
1 changed files with 2 additions and 2 deletions

View File

@ -443,11 +443,11 @@ class Bob(Character):
self.log.info(self.banner)
def _pick_treasure_map(self, treasure_map=None, map_id=None):
if not treasure_map:
if treasure_map is None:
if map_id:
treasure_map = self.treasure_maps[map_id]
else:
raise ValueError("You need to pass either treasure_map or map_id.")
raise ValueError("You need to pass either treasure_map or map_id.")
elif map_id:
raise ValueError("Don't pass both treasure_map and map_id - pick one or the other.")
return treasure_map