diff --git a/Group_game/game.py b/Group_game/game.py index ddd7bcc8e8b80076d5e2c2790fbe9c2491d47cd9..47d75ba10e3712da4877fba29f3b24838b75bedd 100644 --- a/Group_game/game.py +++ b/Group_game/game.py @@ -16,6 +16,7 @@ global current_level gas_starttime = "" time_penalty = False + def list_of_items(items): time.sleep(0.1) new_list = "" @@ -381,7 +382,9 @@ def main(): if location_boileroom["valve_open"]: gastime = current_time - gas_starttime gastime_left = 180 - gastime.total_seconds() - if gastime_left < 0: + if time_penalty: + gastime_left = gastime_left - 300 + if gastime_left <= 0: print("OH NO! The floor was filled with gas and you died") break # Display game status (room description, inventory etc.) diff --git a/Group_game/items.py b/Group_game/items.py index 66f9a10a9f996c49c4b69cc47ce4bbcf8c59a50d..986086f937e578c078ecec1af720a1018569ff2f 100644 --- a/Group_game/items.py +++ b/Group_game/items.py @@ -12,7 +12,7 @@ item_safe = { "name": "a secure safe", - "description": "(no description)", + "description": "The safe seems to be locked, it looks like it needs a passcode to open it.", "pick-up": False, "open": False @@ -22,7 +22,7 @@ item_note = { "name": "a hidden note", - "description": "(no description)", + "description": "You read the note and it seems to have some sort of puzzle on it.", "pick-up": True } @@ -48,7 +48,7 @@ powered_torch = { "name": "a torch with batteries", - "description": "(no description)", + "description": "The torch is now functioning and able to light up dark areas.", "pick-up": True } @@ -58,7 +58,7 @@ item_diary = { "name": "a personal diary", - "description": "(no description)", + "description": "You've found a diary, you flip through some pages and read some interesting stories but you notice a note sticking out.", "pick-up": True, "open": False } @@ -67,7 +67,7 @@ item_screwdriver = { "name": "a screwdriver", - "description": "()", + "description": "You notice something shiny on the floor, it looks like a screwdriver, it may come in use later.", "pick-up": True } item_winebottle = { diff --git a/Group_game/leaderboard.py b/Group_game/leaderboard.py index 638b0c3bc7f04c04de2ae50197d393e327d16c90..8e001ee6f07ce61c01b0b7431a2af665a9801f47 100644 --- a/Group_game/leaderboard.py +++ b/Group_game/leaderboard.py @@ -69,10 +69,11 @@ def append_leaderboard(seconds_used,filename): #time_used = 20 minutes - time r userinput = userinput.lower() if userinput == 'yes': view_leaderboard(filename) + print('Returning back to the game...') elif userinput == 'no': print("Continuing back into the game...") - print('Returning back to the game...') + #Returns back to game.py -append_leaderboard(932, 'Times.csv') + diff --git a/Group_game/level_1.py b/Group_game/level_1.py index 64878c574c7e7d56c0a8b27501ec64107ec6d8a5..bf8fa2bdcbc1e11c4a439d9a89f840adc0b00586 100644 --- a/Group_game/level_1.py +++ b/Group_game/level_1.py @@ -18,16 +18,19 @@ def open_diary(room_items): def open_safe(room_items): print("To open this safe you need a passcode.") + time.sleep(0.8) print("Please enter the passcode.") passcode = input() if passcode == "042": print("THE PASSCODE WAS CORRECT!") + time.sleep(0.8) print("Inside the safe you found a pair of batteries.") time.sleep(0.8) room_items.append(item_batteries) item_safe.update({"open": True}) else: print("You try the code", passcode, "but the safe wouldn't open.") + time.sleep(0.8) print("TRY AGAIN.") time.sleep(0.8) @@ -64,15 +67,21 @@ def use_torch(room): time.sleep(0.8) else: print("You cannot do that") + time.sleep(0.4) def read_note(): if item_note in inventory: print("You read the note and notice a strange puzzle") + time.sleep(0.8) print("682 >> one digit is correct & well placed") + time.sleep(0.8) print("614 >> one digit is correct but wrong placed") + time.sleep(0.8) print("206 >> two numbers are correct but wrong placed") + time.sleep(0.8) print("738 >> nothing is correct") + time.sleep(0.8) print("870 >> one number is correct but wrong placed") time.sleep(5) else: diff --git a/Group_game/level_2.py b/Group_game/level_2.py index c28b77d4358d8925b45c09aafbfccf25c42a8632..69652a61416f29bef2450e2ff841a3b973656bbc 100644 --- a/Group_game/level_2.py +++ b/Group_game/level_2.py @@ -15,7 +15,9 @@ def drink_wine(): if counter < 1: time.sleep(1) print('You drink a glass of the wine, but have not got much closer to getting the clue.') + time.sleep(0.8) print('Would you like to drink another glass?') + time.sleep(0.8) print('YES or NO') more = str(input('> ')) if more == 'yes': @@ -27,7 +29,9 @@ def drink_wine(): time.sleep(1) print() print('You enjoy a second glass of wine, but can not see the bottom yet.') + time.sleep(0.8) print('Would you like to drink another glass?') + time.sleep(0.8) print('YES or NO') more = str(input('> ')) if more == 'yes': @@ -37,8 +41,14 @@ def drink_wine(): x = 2 else: time.sleep(1) - print() + print(".") + time.sleep(0.2) + print(".") + time.sleep(0.2) + print(".") + time.sleep(0.2) print('You pass out from too much alchohol consumption.') + time.sleep(0.8) print('You wake up 5 minutes later on the floor of the wine cellar.') time.sleep(1) print('...') @@ -53,10 +63,13 @@ def close_valve(): if location_boileroom["valve_open"]: location_boileroom["valve_open"] = False print("Well done! You stopped the leak!") + time.sleep(0.8) else: print("Valve is closed") + time.sleep(0.8) else: print("You need a screwdriver to close the valve") + time.sleep(0.8) @@ -66,10 +79,13 @@ def open_trapdoor(room): if key_card in inventory: trap_door["open"] = True else: + time.sleep(0.8) print("You need a key card to open the lock.") else: + time.sleep(0.8) print("The electrical lock requires batteries to open.") else: + time.sleep(0.8) print("Command isn't available in this room") @@ -82,6 +98,7 @@ def use_battery_lock(room): time.sleep(1) def gas_timer(timer): + time.sleep(0.8) current_time = datetime.now() time_taken = current_time - timer time_left = 180 - time_taken.total_seconds() diff --git a/Group_game/player.py b/Group_game/player.py index 51d27083afc3190398dc693f358f0bf1940fa609..e234b6c6bc15b6e8b34b6b171d6808712ce4809a 100644 --- a/Group_game/player.py +++ b/Group_game/player.py @@ -1,7 +1,7 @@ from items import * from map import * -inventory = [item_key] +inventory = [] # Start game at the centre current_room = locations["centre"]