forked from frublox/dota_timer_assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
27 lines (17 loc) · 689 Bytes
/
test.py
File metadata and controls
27 lines (17 loc) · 689 Bytes
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
__author__ = 'Dan'
import dota_timer as dt
from threading import Thread
def run():
dt.HERO_DATA = dt.read_hero_data(dt.HERO_DATA_FILE)
hero_names = ['sven', 'pudge', 'witch doctor', 'wr', 'pugna']
dt.heroes = dt.get_heroes(hero_names, [dt.get_hero_id(name) for name in hero_names])
for name in hero_names:
dt.heroes[name]['cooldowns'] = [10]
dt.HOTKEYS = dt.read_hotkeys(dt.HOTKEYS_FILE)
dt.listen()
def cooldowns(name):
cooldown_time = dt.get_cooldown_time(name)
if dt.heroes[name]['has_scepter']:
assert cooldown_time in dt.heroes[name]['scepter_cooldowns']
else:
assert cooldown_time in dt.heroes[name]['cooldowns']