-
Notifications
You must be signed in to change notification settings - Fork 0
/
classes.py
346 lines (299 loc) · 11.9 KB
/
classes.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
class Raid:
def __init__(self):
self.team = {}
self.roles = [0,0,0]
def add(self,player):
if isinstance(player,list):
for p in player:
self.add(p)
return
if player.spec in self.team:
speclist = self.team.get(player.spec)
speclist.append(player)
self.team.update({player.spec:speclist})
else:
self.team.update({player.spec:[player]})
if player.role == 'Tank':
self.roles[0] += 1
if player.role == 'Healer':
self.roles[1] += 1
if player.role == 'DPS':
self.roles[2] += 1
def remove(self,player):
if player.spec in self.team:
speclist = self.team.get(player.spec)
if player in speclist:
speclist.remove(player)
self.team.update({player.spec:speclist})
else: raise ValueError('Cannot find: ' + player + '.')
else: raise ValueError('Cannot find: ' + player + '.')
def get(self,speclist):
if speclist in self.team:
return self.team.get(speclist)
else: raise ValueError('Raid team does not contain: ' + speclist + '.')
def getAll(self):
getAll = []
for speclist in self.team:
for player in self.team.get(speclist):
getAll.append(player)
return getAll
def getAllNames(self):
getAll = []
for speclist in self.team:
for player in self.team.get(speclist):
getAll.append(player.name)
return getAll
def getCds(self):
getCds = {}
for speclist in self.team:
for player in self.team.get(speclist):
for cd in player.cds:
if cd in getCds:
value = getCds.get(cd)
value += 1
getCds.update({cd:value})
else:
getCds.update({cd:1})
return getCds
class Havoc:
def __init__(self,name,Netherwalk=False,staticTimer=True,dynamicTimer=True,nameTime=False,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'Havoc'
self.role = 'DPS'
self.cds = {'Darkness':180}
if Netherwalk==True:
self.cds.update({'Netherwalk':120})
self.classes = 'Demon Hunter'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class Mage:
def __init__(self,name,Frost=False,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'Fire/Arcane'
if Frost==True:
self.spec = 'Frost'
self.role = 'DPS'
self.cds = {'Ice Block':240}
if Frost==True:
self.cds.update({'Cold Snap':300})
self.classes = 'Mage'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class Rogue:
def __init__(self,name,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'Asn/Out/Sub'
self.role = 'DPS'
self.cds = {'Cloak of Shadows':120}
self.classes = 'Rogue'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class Hunter:
def __init__(self,name,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'BM/MM/Surv'
self.role = 'DPS'
self.cds = {'Aspect of the Turtle':180}
self.classes = 'Hunter'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class Balance:
def __init__(self,name,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'Balance'
self.role = 'DPS'
self.cds = {'Innervate':180}
self.classes = 'Druid'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class RestoDruid:
def __init__(self,name,TranqTalent=False,Flourish=True,Tree=True,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'RestoDruid'
self.role = 'Healer'
self.cds = {'Innervate':180,'Tranquility':180,'Ironbark':60}
if TranqTalent==True:
self.cds.update({'Innervate':120})
if Flourish==True:
self.cds.update({'Flourish':90})
self.classes = 'Druid'
if Tree==True:
self.cds.update({'Tree of Life':180})
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class Mistweaver:
def __init__(self,name,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'Mistweaver'
self.role = 'Healer'
self.cds = {'Revival':180,'Life Cocoon':120}
self.classes = 'Monk'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class HolyPally:
def __init__(self,name,Visions=True,HolyAvenger=True,Unbreakable=False,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'HolyPally'
self.role = 'Healer'
self.cds = {'Avenging Wrath':120,'Aura Mastery':180,
'Blessing of Sacrifice':120,'Divine Shield':300,'Blessing of Protection':300}
if Visions==True:
self.cds.update({'Avenging Wrath':100})
if HolyAvenger==True:
self.cds.update({'Holy Avenger':90})
if Unbreakable==True:
self.cds.update({'Divine Shield':210})
self.classes = 'Paladin'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class Pally:
def __init__(self,name,Tank=False,Unbreakable=False,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'Ret Pally'
self.role = 'DPS'
if Tank==True:
self.spec = 'Prot Pally'
self.role = 'Tank'
self.cds = {'Divine Shield':300,'Blessing of Protection':300}
if Tank==True:
self.cds.update({'Blessing of Sacrifice':120,'Ardent Defender':120})
if Unbreakable==True:
self.cds.update({'Divine Shield':210})
self.classes = 'Paladin'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class Discipline:
def __init__(self,name,Evang=True,Luminous=False,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'Discipline'
self.role = 'Healer'
self.cds = {'Rapture':90,'Shadowfiend':180,'Power Word: Barrier':180,
'Pain Suppression':180,'Leap of Faith':90}
if Luminous==True:
del self.cds['Power Word: Barrier']
self.cds.update({'Luminous Barrier':180})
if Evang==True:
self.cds.update({'Evangelism':90})
self.classes = 'Priest'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class HolyPriest:
def __init__(self,name,Salv=True,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'HolyPriest'
self.role = 'Healer'
self.cds = {'Divine Hymn':180,'Symbol of Hope':300,
'Guardian Spirit':180,'Leap of Faith':90}
if Salv==True:
self.cds.update({'Holy Word: Salvation':300})
self.classes = 'Priest'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class ShadowPriest:
def __init__(self,name,Sanlayn=False,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'ShadowPriest'
self.role = 'DPS'
self.cds = {'Vampiric Embrace':120,'Leap of Faith':90}
if Sanlayn==True:
self.cds.update({'Vampiric Embrace':75})
self.classes = 'Priest'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class RestoSham:
def __init__(self,name,Ascendance=False,WindRush=False,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'RestoSham'
self.role = 'Healer'
self.cds = {'Spirit Link Totem':180,'Healing Tide Totem':180}
if Ascendance==True:
self.cds.update({'Ascendance':180})
if WindRush==True:
self.cds.update({'Wind Rush':120})
self.classes = 'Shaman'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class DPSSham:
def __init__(self,name,WindRush=False,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
self.spec = 'DPSSham'
self.role = 'DPS'
self.cds = {}
if WindRush==True:
self.cds.update({'Wind Rush':120})
self.classes = 'Shaman'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr
class Warrior:
def __init__(self,name,Tank=False,staticTimer=True,dynamicTimer=True,nameTime=True,abbr=True):
if isinstance(name,str):
self.name = name
else: raise TypeError('Name must be String.')
if Tank==False:
self.spec = 'Fury/Arms'
self.role = 'DPS'
else:
self.spec = 'ProtWarr'
self.role = 'Tank'
self.cds = {'Rallying Cry':180}
self.classes = 'Warrior'
self.staticTimer = staticTimer
self.dynamicTimer = dynamicTimer
self.nameTime = nameTime
self.abbr = abbr