-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildings.py
158 lines (136 loc) · 6.04 KB
/
buildings.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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
class Barracks(object):
def __init__(self):
self.capacity = 6
self.trainingGround = {"traps":0.0, "soldiers":0.01, "towers":0.0, "treasure":0.10};
self.mapSize = 10
self.improvement = {"hp": 0.05, "attackSpeed": 0.05, "attack" : 0.05, "defence" : 0.05}
self.newAbilities = []
def __repr__(self):
return "%s with a capacity of %d. \nThe training ground probabilities are as follows: %s.\nThe probability of unit improvement is the following: %s.\nThe new abilities one can gain are %s."%(
type(self).__name__, self.capacity, str(self.trainingGround), str(self.improvement), str(self.newAbilities))
def train(self, army):
# Keep first [capacity] soldiers to train
armyToTrain = army[0:self.capacity]
# For each army soldier
for sCur in army:
pass
# TODO: implement
# Improve army through real game
# If roll is low enough
# apply improvemnts
class GladiatorPit(Barracks):
def __init__(self):
self.capacity = 6
self.trainingGround = {"traps":0.05, "soldiers":0.20, "towers":0.0, "treasure":0.10};
self.mapSize = 12
self.improvement = {"hp": 0.15, "attackSpeed": 0.10, "attack" : 0.10, "defence" : 0.05}
class GladiatorSchool(Barracks):
def __init__(self):
self.capacity = 12
self.trainingGround = {"traps":0.05, "soldiers":0.20, "towers":0.0, "treasure":0.10};
self.mapSize = 12
self.improvement = {"hp": 0.20, "attackSpeed": 0.10, "attack" : 0.10, "defence" : 0.05}
class GladiatorFort(Barracks):
def __init__(self):
self.capacity = 12
self.trainingGround = {"traps":0.05, "soldiers":0.20, "towers":0.0, "treasure":0.10};
self.mapSize = 15
self.improvement = {"hp": 0.25, "attackSpeed": 0.15, "attack" : 0.15, "defence" : 0.10,
"abilities" : 0.10}
self.newAbilities += ["DaggerThrownAttack"]
class TrainingPit(Barracks):
def __init__(self):
self.capacity = 6
self.trainingGround = {"traps":0.10, "soldiers":0.10, "towers":0.0, "treasure":0.10};
self.mapSize = 12
self.improvement = {"hp": 0.10, "attackSpeed": 0.10, "attack" : 0.10, "defence" : 0.10}
class TrainingGround(Barracks):
def __init__(self):
self.capacity = 12
self.trainingGround = {"traps":0.10, "soldiers":0.10, "towers":0.0, "treasure":0.10};
self.mapSize = 12
self.improvement = {"hp": 0.10, "attackSpeed": 0.10, "attack" : 0.10, "defence" : 0.10,
"abilities" : 0.10}
self.newAbilities += ["CriticalAttack"]
class TrainingFields(Barracks):
def __init__(self):
self.capacity = 12
self.trainingGround = {"traps":0.10, "soldiers":0.10, "towers":0.0, "treasure":0.10};
self.mapSize = 15
self.improvement = {"hp": 0.15, "attackSpeed": 0.15, "attack" : 0.15, "defence" : 0.15,
"abilities" : 0.15}
self.newAbilities += ["CriticalAttack"]
class TechnicalLab(Barracks):
def __init__(self):
self.capacity = 6
self.trainingGround = {"traps":0.10, "soldiers":0.10, "towers":0.0, "treasure":0.10};
self.mapSize = 10
self.improvement = {"hp": 0.05, "attackSpeed": 0.05, "attack" : 0.05, "defence" : 0.10,
"abilities" : 0.15}
self.newAbilities += ["BridgeGap", "MapLabyrinth", "DisableTrap"]
class TechnicalClass(Barracks):
def __init__(self):
self.capacity = 12
self.trainingGround = {"traps":0.10, "soldiers":0.10, "towers":0.0, "treasure":0.10};
self.mapSize = 12
self.improvement = {"hp": 0.05, "attackSpeed": 0.05, "attack" : 0.05, "defence" : 0.10,
"abilities" : 0.20}
self.newAbilities += ["BridgeGap", "MapLabyrinth", "DisableTrap"]
class TechnicalSchool(Barracks):
def __init__(self):
self.capacity = 12
self.trainingGround = {"traps":0.10, "soldiers":0.10, "towers":0.0, "treasure":0.10};
self.mapSize = 15
self.improvement = {"hp": 0.10, "attackSpeed": 0.10, "attack" : 0.10, "defence" : 0.10,
"abilities" : 0.25}
self.newAbilities += ["BridgeGap", "MapLabyrinth", "DisableTrap"]
class StrategyTent(Barracks):
def __init__(self):
self.capacity = 6
self.trainingGround = {"traps":0.10, "soldiers":0.10, "towers":0.10, "treasure":0.10};
self.mapSize = 10
self.improvement = {"hp": 0.05, "attackSpeed": 0.10, "attack" : 0.10, "defence" : 0.10,
"abilities" : 0.15}
self.newAbilities += ["Exhaust", "Slow"]
class StrategyClass(Barracks):
def __init__(self):
self.capacity = 12
self.trainingGround = {"traps":0.10, "soldiers":0.10, "towers":0.10, "treasure":0.10};
self.mapSize = 12
self.improvement = {"hp": 0.05, "attackSpeed": 0.10, "attack" : 0.10, "defence" : 0.10,
"abilities" : 0.20}
self.newAbilities += ["Exhaust", "Slow"]
class StrategySchool(Barracks):
def __init__(self):
self.capacity = 12
self.trainingGround = {"traps":0.15, "soldiers":0.15, "towers":0.15};
self.mapSize = 15
self.improvement = {"hp": 0.05, "attackSpeed": 0.15, "attack" : 0.15, "defence" : 0.15,
"abilities" : 0.25}
self.newAbilities += ["Exhaust", "Slow"]
class ArcheryTarget(Barracks):
def __init__(self):
self.capacity = 6
self.trainingGround = {"traps":0.00, "soldiers":0.10, "towers":0.10, "treasure":0.10};
self.mapSize = 10
self.improvement = {"hp": 0.05, "attackSpeed": 0.15, "attack" : 0.15, "defence" : 0.05,
"abilities" : 0.15}
self.newAbilities += ["BowAttack"]
class ArcheryRange(Barracks):
def __init__(self):
self.capacity = 6
self.trainingGround = {"traps":0.00, "soldiers":0.10, "towers":0.10, "treasure":0.10};
self.mapSize = 10
self.improvement = {"hp": 0.05, "attackSpeed": 0.15, "attack" : 0.15, "defence" : 0.05,
"abilities" : 0.15}
self.newAbilities += ["BowAttack", "CriticalAttack"]
class ArcherySchool(Barracks):
def __init__(self):
self.capacity = 6
self.trainingGround = {"traps":0.00, "soldiers":0.10, "towers":0.10, "treasure":0.10};
self.mapSize = 10
self.improvement = {"hp": 0.05, "attackSpeed": 0.15, "attack" : 0.15, "defence" : 0.05}
self.improvement = {"hp": 0.05, "attackSpeed": 0.15, "attack" : 0.15, "defence" : 0.05,
"abilities" : 0.25}
self.newAbilities += ["BowAttack", "CriticalAttack"]
# TODO: MageSchool