-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenemies.py
More file actions
133 lines (112 loc) · 2.41 KB
/
Copy pathenemies.py
File metadata and controls
133 lines (112 loc) · 2.41 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
ENEMIES = {
"rat": {
"name": "Rat",
"hp": 20,
"max_hp": 20,
"attack": 5,
"defense": 1,
"xp": 10,
},
"goblin": {
"name": "Goblin",
"hp": 40,
"max_hp": 40,
"attack": 10,
"defense": 3,
"xp": 10,
"drops": ["corridor_key"]
},
"spider": {
"name": "Spider",
"hp": 50,
"max_hp": 50,
"attack": 15,
"defense": 3,
"xp": 30,
},
"skeleton": {
"name": "Skeleton",
"hp": 60,
"max_hp": 60,
"attack": 15,
"defense": 5,
"xp": 30,
"drops": ["crypt_key"]
},
"zombie": {
"name": "Zombie",
"hp": 80,
"max_hp": 80,
"attack": 20,
"defense": 10,
"xp": 50,
},
"witch": {
"name": "Witch",
"hp": 80,
"max_hp": 80,
"attack": 20,
"defense": 15,
"xp": 70,
"drops": ["tower_key"]
},
"wizard": {
"name": "Wizard",
"hp": 120,
"max_hp": 120,
"attack": 20,
"defense": 15,
"xp": 100,
"drops": ["library_key"]
},
"stone_golem": {
"name": "Stone Golem",
"hp": 150,
"max_hp": 150,
"attack": 35,
"defense": 20,
"xp": 150,
"drops": ["study_key", "pyramid_key"]
}
}
MINI_BOSSES = {
"demon": {
"name": "Demon",
"hp": 200,
"max_hp": 200,
"attack": 40,
"defense": 25,
"xp": 150,
"drops": ["legendary_key", "boss_key"]
}
}
BOSS = {
"name": "The Lord",
"hp": 500,
"max_hp": 500,
"attack": 50,
"defense": 30,
"xp": 500,
}
SPAWNS = {
"Entrance": [("rat", False)],
"Entrance/Storage": [("goblin", False)],
"Entrance/Garden": [("spider", False)],
"Corridor": [("skeleton", False)],
"Crypt": [("zombie", False)],
"Crypt/Ancient_Tomb": [("witch", False)],
"Wizard_Tower": [("wizard", False)],
"Wizard_Tower/Library": [("stone_golem", False)],
"Pyramid": [("demon", True)]
}
def get_enemy(enemy_id):
if enemy_id in ENEMIES:
enemy = ENEMIES.get(enemy_id).copy()
elif enemy_id in MINI_BOSSES:
enemy = MINI_BOSSES.get(enemy_id).copy()
else:
enemy = None
return enemy
def get_enemies_for_room(room):
enemies = SPAWNS.get(room, [])
return enemies