-
Posts
1915 -
Joined
-
Last visited
-
Days Won
13
dannnex's Achievements
4k
Reputation
Single Status Update
-
I am about to do something no sharder has ever done before
use a code box
Spoilerplayer_inv = [] print('You wake up and find yourself in a near pitch-black room...') room = 1 light = 0 candle = 0 dresser = 0 while room == 1: room_description = 'You wake up and find yourself in a near pitch-black room...' player_input = input('>> ') #player commands: if player_input == '/help': print(''' /inventory - Display Player Inventory /description - Describe what you know about the room /reset - Restart Game /exit - Exit Game ''') continue if player_input == '/inventory' or player_input == '/inv': print(player_inv) continue if player_input == '/description' or player_input == '/desc': print(room_description) continue if player_input == '/reset': print('You wake up and find yourself in a near pitch-black room...') section = 1 if player_input == '/exit': exit() #possible player actions: if player_input.casefold().__contains__('look') or player_input.casefold().__contains__('observe'): if light == 0: room_description = 'It\'s too dark to see any details, but you appear to be in a bedroom. There is a shuttered window on the wall to your left, and a dresser next to the bed you were just asleep on.' print(room_description) continue if light == 1: room_description = '''You are in a sparesly furnished bedroom.''' print(room_description) continue if player_input.casefold().__contains__('dresser'): if dresser == 0: print('You examine the dresser and find a candle and box of matches.') player_inv.append('candle') player_inv.append('matches') dresser = 1 continue if dresser == 1: print('You already searched the dresser.') continue if player_input.casefold().__contains__('candle') and player_inv.__contains__('candle') and player_inv.__contains__('matches'): if candle == 0: print('You light the candle. The room is illuminated.') light = 1 continue if candle == 1: print('You put out the candle.') candle = 0 continue else: print('You can\'t do that right now.') continue
look i'm making a text adventure
wheeeeee
