adventure game - shaneno12/MTEC2280 GitHub Wiki

inventory

import sys import random import playerInv import inventory

playerInv = "I" or "inventory"

print("to see items click 'I' or 'inventory'")

if (playerInv == "I" or playerInv == "inventory"): inventory = Inventory(apple,grapes) inventory.add_item(apple) inventory.add_item(Item) inventory.print_items(apple, grapes) inventory = {'': {''},

for name, item in inventory.items(): print "apple, grapes" listItems = ["apple, grapes"]

while(True):

command = input("Input something: ")

command = command.strip()

if(command == "exit"): break

command = command.capitalize()

#print(type(command)) print(command)

count = listItems.count(command)

print("Number of " + str(command) + " in list: " + str(count)) print ("exit")


3/2/2016 - code

print("you're walking around with your partner")

print("you notice something in the alley")

time.sleep(2)

print("1. Go check it out" "2. keep walking")

if(playerResp == "1"):

print("you find a man on his back, in the middle of the Alley.")

time.sleep(1)

print("1. turn him around" "2. leave him " ) playerResp = input("")

if(playerResp == "2"):

print("your partner smell something burning down the alley") time.sleep(3)

print("Partner: we should go check it out")

time.sleep(1)

print("your partner running down the alley")

print("you follow him")

time.sleep(3)

print("you find a man on his back, in the middle of the Alley.")

time.sleep(1)

print("1. turn him around" "2. leave him " ) if(playerResp == "1"):

print("you turn the man around")

time.sleep(1)

print("You: he burned on half of his face!")

print("you turn to you partner, but he is throwing up on the side")

print("1. examine the body" "2.leave him, this is to much work") if(playerResp == "2"):

time.sleep(1)

print("your partner stop you and look at the body")

print("partner: we should check the body, to see if their any evidence")

time.sleep(3)

print("You: okay fine")

print("1. examine the body" "2.leave him, this is to much work") if(playerResp == "1"):

print("you two are examining the body")

print("you find that he has nothing on him, but a burn mark to his face.")

time.sleep(3)

print("1. carry him to the Doctor " "2. tell your partner to carry him ") if(playerResp == "2"):

print("you try to walk away, but your partner stop you")

print("partner: we have to do this. It's our job!")

print("You: All the work...")

print("Partner: No! we must do this!")

print("You: . . . ")

time.sleep(3)

print("1. Carry him together " "2. tell your partner to carry him ") if(playerResp == "1"):

print("you and your partner are going to the doctor place...") if(playerResp == "2"):

print("you are watching your partner carry the burned man body...")

print("you're smiling at his miserably expression") area ()

print("you arrive at the Doctor area")

print("1. Knock on door")

time.sleep(3)

if(playerResp == "1"):

print("Doctor answer the door")

print("Doctor: What has happened?")

print("You: Doctor we need your help!, Please!")

print("Doctor: Bring him in, set him on the table")

print("you go in and set him on the table.")

print("Doctor: Please stand back!")

print("1. Watch the Doctor" "2. step out")