Added bugfix for mobs and requirements for install.
Showing
2 changed files
with
12 additions
and
0 deletions
... | @@ -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']: | ... | ... |
-
Please register or sign in to post a comment