bzzz bzzz

This commit is contained in:
Bonta-kun
2019-12-30 03:03:53 +01:00
parent 4281dcc619
commit fe307b1ac7
8 changed files with 22 additions and 4 deletions

View File

@@ -206,7 +206,18 @@ def generate_itempool(world, player):
world.get_location(location, player).event = True
world.get_location(location, player).locked = True
world.itempool += ItemFactory(pool, player)
beeweights = {0: {None: 100},
1: {None: 75, 'trap': 25},
2: {None: 40, 'trap': 40, 'bee': 20},
3: {'trap': 50, 'bee': 50},
4: {'trap': 100}}
def beemizer(item):
if world.beemizer[item.player] and not item.advancement and not item.priority and not item.type:
choice = random.choices(list(beeweights[world.beemizer[item.player]].keys()), weights=list(beeweights[world.beemizer[item.player]].values()))[0]
return item if not choice else ItemFactory("Bee Trap", player) if choice == 'trap' else ItemFactory("Bee", player)
return item
world.itempool += [beemizer(item) for item in ItemFactory(pool, player)]
world.lamps_needed_for_dark_rooms = lamps_needed_for_dark_rooms