-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwaves.py
93 lines (77 loc) · 1.94 KB
/
waves.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
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
import random
from enemies import *
class Wave:
def __init__(self, wave_no=0, wave_text=""):
self.wave_no = wave_no
self.wave_text = wave_text
self.enemy_list = {}
self.enemies = []
self.chance_to_drop = 1
self.enemy_speed_multiplier = 1.0
self.spawn_frequency = 1000
self.current_enemy = 0
def build_enemy_list(self):
for enemy, amount in self.enemy_list.items():
for i in range(amount):
self.enemies.append(enemy)
random.shuffle(self.enemies)
BOSS_TEST = False
"""
ALL WAVES
"""
ALL_WAVES = []
if not BOSS_TEST:
"""
Wave 1
"""
WAVE1 = Wave(1, "Welcome")
WAVE1.enemy_list = {EasyEnemy: 30}
WAVE1.chance_to_drop = 0
WAVE1.spawn_frequency = 1000
WAVE1.build_enemy_list()
ALL_WAVES.append(WAVE1)
"""
Wave 2
"""
WAVE2 = Wave(2, "Getting Started")
WAVE2.enemy_list = {EasyEnemy: 20, MediumEnemy: 3}
WAVE2.chance_to_drop = 1
WAVE2.spawn_frequency = 500
WAVE2.enemy_speed_multiplier = 1.1
WAVE2.build_enemy_list()
ALL_WAVES.append(WAVE2)
"""
Wave 3
"""
WAVE3 = Wave(3, "Let's Go")
WAVE3.enemy_list = {EasyEnemy: 30, MediumEnemy: 10, HardEnemy: 5}
WAVE2.spawn_frequency = 400
WAVE3.chance_to_drop = 0
WAVE3.build_enemy_list()
ALL_WAVES.append(WAVE3)
"""
Wave 4
"""
WAVE4 = Wave(4, "Bring it on")
WAVE4.enemy_list = {EasyEnemy: 10, MediumEnemy: 10, HardEnemy: 2}
WAVE4.chance_to_drop = 1
WAVE4.build_enemy_list()
ALL_WAVES.append(WAVE4)
"""
Wave 5
"""
WAVE5 = Wave(5, "BLAT")
WAVE5.enemy_list = {EasyEnemy: 100}
WAVE5.chance_to_drop = 1
WAVE5.spawn_frequency = 20
WAVE5.build_enemy_list()
ALL_WAVES.append(WAVE5)
"""
Wave 6
"""
WAVE6 = Wave(4, "BOSS")
WAVE6.enemy_list = {Boss: 1}
WAVE6.spawn_frequency = 400
WAVE6.chance_to_drop = 1
WAVE6.build_enemy_list()
ALL_WAVES.append(WAVE6)