Skip to content
Snippets Groups Projects
Commit c3d8e6df authored by Thomas Glasper's avatar Thomas Glasper
Browse files

Fix bug that player is not dying

parent 0e2b81d3
No related branches found
No related tags found
No related merge requests found
......@@ -304,7 +304,6 @@ def combat(enemy):
if enemy.alive == False:
print("You defeated the " + enemy.name + "!\n")
player.gain_xp(enemy.level * 5)
player.current_room.cleared = True
break
# now calculate the enemies attack
......@@ -521,6 +520,11 @@ def main():
if player.alive == False:
break
if player.alive == False:
break
else:
player.current_room.cleared = True
# Show the menu with possible actions and ask the player
command = menu(player.current_room.exits, player.current_room.items, player.inventory)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment