diff --git a/Group_game/game.py b/Group_game/game.py index 15cfca493e25da2c42a4f9e6aea00e7d292966d2..074a00ba2c625c4404bd26fe0f921e428ff080dd 100644 --- a/Group_game/game.py +++ b/Group_game/game.py @@ -130,6 +130,8 @@ def print_menu(exits, room_items, inv_items): time.sleep(0.2) if current_room==trap_door and item_batteries in inventory: print("USE BATTERIES for LOCK to place the batteries in the electrical lock") + if current_room==trap_door and item_lock["batteries"] == True: + print("OPEN TRAP DOOR to open the trap door and exit out of it") print("What do you want to do?") @@ -263,6 +265,8 @@ def execute_command(command): open_diary(current_room["items"]) elif command[1] == "safe": open_safe(current_room["items"]) + elif command[1] == "trap door": + open_trapdoor() else: print("open what?") diff --git a/Group_game/level_2.py b/Group_game/level_2.py index ffca4286e878a39ffa3bca51fdcd94a847ab0fa5..cda677ba7f56272ef605ba099ec82f8754bbd829 100644 --- a/Group_game/level_2.py +++ b/Group_game/level_2.py @@ -62,7 +62,7 @@ def close_valve(): def open_trapdoor(): if current_room == trap_door: if item_lock["batteries"]: - if item_keycard in inventory: + if key_card in inventory: trap_door["open"] = True else: print("You need a key card to open the lock")