-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
biome.py
47 lines (37 loc) · 1.56 KB
/
biome.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import random
import room
class Biome(object):
def __init__(self, name: str, room_tags: list[str], enemy_tags: dict):
self.name = name
self.room_tags = room_tags
self.enemy_tags = enemy_tags
def get_random_room(self, depth: int) -> room.Room:
candidates = []
for tag in self.room_tags:
candidates.append(random.choice(room.rooms[tag][1]))
if depth >= 21:
candidates.append(random.choice(room.rooms[tag][21]))
return random.choice(candidates)
@staticmethod
def get_tutorial_room_by_depth(depth: int):
return room.rooms['basic'][1][depth - 1]
biomes = {
'generic': Biome('generic',
['basic'],
{
1: ['slime', 'scarab', 'spider'],
21: [],
}),
'infernal': Biome('infernal',
['infernal'],
{
1: ['imp', 'bomb', 'ash_devil', 'damned_soul'],
21: ['cinder_demon', 'lust_demon'],
}),
# Arcane - golems, animated workers (picks, carts, etc.), electric weak
# Necromantic - undead workers, undead overseers, fire weak
# Eldritch - weird angles, impossible loops, moving corridors, horrors (dust, insects), earth weak
# Verdant - damp, mossy, simians, exotic birds - map only
# Ancestral - ruins, evidence of civilization, ghosts, feral former domestic animals - map only
# Clockwork - gears, steam, mechanical robots - map only
}