-
Notifications
You must be signed in to change notification settings - Fork 184
/
update_quality.py
32 lines (29 loc) · 1.19 KB
/
update_quality.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
def update_quality(awards):
for award in awards:
if award.name != 'Blue First' and award.name != 'Blue Compare':
if award.quality > 0:
if award.name != 'Blue Distinction Plus':
award.quality -= 1
else:
if award.quality < 50:
award.quality += 1
if award.name == 'Blue Compare':
if award.expires_in < 11:
if award.quality < 50:
award.quality += 1
if award.expires_in < 6:
if award.quality < 50:
award.quality += 1
if award.name != 'Blue Distinction Plus':
award.expires_in -= 1
if award.expires_in < 0:
if award.name != 'Blue First':
if award.name != 'Blue Compare':
if award.quality > 0:
if award.name != 'Blue Distinction Plus':
award.quality -= 1
else:
award.quality = award.quality - award.quality
else:
if award.quality < 50:
award.quality += 1