97404a56 by Barry

Added bugfix for mobs and requirements for install.

1 parent 9f3f498e
...@@ -41,9 +41,13 @@ def run_mobs(players, mud): ...@@ -41,9 +41,13 @@ def run_mobs(players, mud):
41 print(player) 41 print(player)
42 print('checking actions in room: ' + player['room']) 42 print('checking actions in room: ' + player['room'])
43 room_monsters = utils.load_object_from_file('rooms/{}_monsters.json'.format(player['room'])) 43 room_monsters = utils.load_object_from_file('rooms/{}_monsters.json'.format(player['room']))
44 if not room_monsters:
45 continue
44 for mon_name, monster in room_monsters.items(): 46 for mon_name, monster in room_monsters.items():
45 print(mon_name) 47 print(mon_name)
46 monster_template = utils.load_object_from_file('mobs/{}.json'.format(mon_name)) 48 monster_template = utils.load_object_from_file('mobs/{}.json'.format(mon_name))
49 if not monster_template:
50 continue
47 print(monster) 51 print(monster)
48 for active_monster in monster['active']: 52 for active_monster in monster['active']:
49 if active_monster['action'] == "attack" and active_monster['target'] == player['name']: 53 if active_monster['action'] == "attack" and active_monster['target'] == player['name']:
......
1 ecdsa==0.13
2 esptool==2.3.1
3 future==0.16.0
4 iso8601==0.1.12
5 psutil==5.4.5
6 pyaes==1.6.1
7 pyserial==3.4
8 PyYAML==3.12