Beispiel #1
0
def enter(the_player):

    the_player.location = 'Street with a tree'
    the_player.directions = ['Shorter street', 'Suburb Junction']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:

        print "You're back at %s." % the_player.location
        print "The tree is still standing there"
        print "so nothing's changed."

    else:
        the_player.visited.append(the_player.location)

        print "You come to another street, again it's"
        print "very suburbish but you take a note"
        print "of an oak tree on side of the road."
        print "This street ends with a left turn."

    while True:
        action = prompt.standard(the_player)

        if action == "shorter street":
            return 'Suburb 4'
        elif action == "suburb junction" or action == "junction":
            return 'Suburb Junction'
        elif 'tree' in action:
            print "You come to the tree and see W + D carved into it."
        else:
            custom_error.errortype(3)
Beispiel #2
0
def enter(the_player):

    the_player.location = 'A very long street'
    the_player.directions = ['Suburbs', 'Street with small houses']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:

        print "You're back at %s." % the_player.location
    else:
        the_player.visited.append(the_player.location)

        print "Nothing special about this street"
        print "except that it's really long."
        print "When you get to the end you"
        print "get a familiar sight in front of you."

    while True:
        action = prompt.standard(the_player)

        if action == "suburbs":
            return 'Suburbs'
        elif action == "street with small houses" or 'small houses' in action:
            return 'Street with small houses'
        else:
            custom_error.errortype(3)
Beispiel #3
0
def enter(the_player):

	the_player.location = 'Longer street'
	the_player.directions = ['Another street','Row of houses']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s." % the_player.location
		print "You still hear the dog barking."
	else:
		the_player.visited.append(the_player.location)

		print "Just another street."
		print "There is a street with row of houses ahead."
		print "On your right there's a patch of flowers"
		print "that isn't on other lawns."
		print "You hear barking from afar."


	while True:
		action = prompt.standard(the_player)

		if action == "another street":
			return 'Suburb 1'
		elif 'row' in action or 'houses' in action:
			return 'Suburb 5'
		elif action == "patch of flowers" or action == "flower":
			print "You smell the flowers. They smell nice."
			print "You look inside the house where the flowers"
			print "are but there's nothing special about it."
		else:
			custom_error.errortype(3)
Beispiel #4
0
def enter(the_player):

	the_player.location = 'Street with a tree'
	the_player.directions = ['Shorter street','Suburb Junction']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s." % the_player.location
		print "The tree is still standing there"
		print "so nothing's changed."

	else:
		the_player.visited.append(the_player.location)

		print "You come to another street, again it's"
		print "very suburbish but you take a note"
		print "of an oak tree on side of the road."
		print "This street ends with a left turn."


	while True:
		action = prompt.standard(the_player)

		if action == "shorter street":
			return 'Suburb 4'
		elif action == "suburb junction" or action == "junction":
			return 'Suburb Junction'
		elif 'tree' in action:
			print "You come to the tree and see W + D carved into it."
		else:
			custom_error.errortype(3)
def enter(the_player):

	the_player.location = 'Street with small houses'
	the_player.directions = ['Suburb Junction','A very long street']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s." % the_player.location
	else:
		the_player.visited.append(the_player.location)

		print "You come to street that has a lot"
		print "of small houses on both sides."
		print "It's uncanny how similar they are."
		print "There's a long street coming up ahead, Junction"
		print "behind you."

	while True:
		action = prompt.standard(the_player)

		if action == "suburb junction" or action == "junction":
			return 'Suburb Junction'
		elif action == "a very long street" or 'long' in action:
			return 'A very long street'
		else:
			custom_error.errortype(3)
Beispiel #6
0
def enter(the_player):

	the_player.location = 'Regular street'
	the_player.directions = ['Suburbs','Shorter street']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s." % the_player.location
	else:
		the_player.visited.append(the_player.location)

		print "Just another street with rows of houses."
		print "There is basically same street up ahead"
		print "but a little shorter."


	while True:
		action = prompt.standard(the_player)

		if action == "suburbs":
			return 'Suburbs'
		elif action == "shorter street":
			return 'Suburb 4'
def enter(the_player):

	the_player.location = 'A very long street'
	the_player.directions = ['Suburbs','Street with small houses']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s." % the_player.location
	else:
		the_player.visited.append(the_player.location)

		print "Nothing special about this street"
		print "except that it's really long."
		print "When you get to the end you"
		print "get a familiar sight in front of you."

	while True:
		action = prompt.standard(the_player)

		if action == "suburbs":
			return 'Suburbs'
		elif action == "street with small houses" or 'small houses' in action:
			return 'Street with small houses'
		else:
			custom_error.errortype(3)
Beispiel #8
0
def enter(the_player):

    the_player.location = 'Street with large mansion'

    if 'Wanda' in the_player.visited:
        the_player.directions = ['Suburb Junction', 'Wanda\'s house']
    else:
        the_player.directions = ['Suburb Junction', 'Mansion']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:

        print "You're back at %s." % the_player.location
    else:
        the_player.visited.append(the_player.location)

        print "Dog barking gets louder and you can"
        print "tell the sound is coming from a large"
        print "house at the end of the street."

    while True:
        action = prompt.standard(the_player)

        if action == "suburb junction" or action == "junction":
            return 'Suburb Junction'
        elif 'house' in action or 'mansion' in action:
            return 'Wandas House'
        else:
            custom_error.errortype(3)
Beispiel #9
0
def enter(the_player):

    the_player.location = 'Regular street'
    the_player.directions = ['Suburbs', 'Shorter street']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:

        print "You're back at %s." % the_player.location
    else:
        the_player.visited.append(the_player.location)

        print "Just another street with rows of houses."
        print "There is basically same street up ahead"
        print "but a little shorter."

    while True:
        action = prompt.standard(the_player)

        if action == "suburbs":
            return 'Suburbs'
        elif action == "shorter street":
            return 'Suburb 4'
Beispiel #10
0
def enter(the_player):

	the_player.location = 'Foreman Ave'
	the_player.directions = ['Junction','Commercial Building', 'Car barricade']
	glass = random.randint(1,4)

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:
		print "You're back at %s." % the_player.location
		print "There are waste containers on the side"
		print "of the road."
		print "Building with broken shop window is next to them."

	else:
		the_player.visited.append(the_player.location)

		print "You come to wide street with various shops"
		print "on each side and garbage everywhere."
		print "There are seven green waste containers on the right"
		print "side of the road that are stuffed"
		print "with various things."
		print "You see a commercial building, probably a shop"
		print "with broken front shop window."
		print "The street ends with a huge barricade made out of"
		print "cars."

	while True:

		action = prompt.standard(the_player)

		if action == "junction":
			return 'Junction'
		elif 'waste' in action or 'container' in action:
			container(the_player)
		elif 'window' in action or 'commercial' in action or 'building' in action:
			if glass == 1:
				death.type(12,the_player)
			else:
				print "You lose balance while stepping to the shop,"
				print "you almost impale yourself on glass shrapnel."
				print "Don't try that again!"
				score.calculate(the_player,'glass')
		elif 'cars' in action or 'barricade' in action or 'car' in action:

			print "You try to climb the car barricade but"
			print "you fail, falling to the ground."
	
			if 'car barricade' not in the_player.visited:
				encounter = fight.Encounter(the_player,'random')
				print "Somehow, a zombie crawls from one of the cars."
				
				custom_error.errortype(4)
				encounter.start(the_player)
				the_player.visited.append('car barricade')
			else:
				pass
		else:
			custom_error.errortype(3)
Beispiel #11
0
def enter(the_player):

	the_player.location = 'Shorter street'
	the_player.directions = ['Regular street','Street with a tree','House with pirate flag']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s." % the_player.location
		print "There's the house with the pirate flag."
	else:
		the_player.visited.append(the_player.location)

		print "The street is very similar to the one"
		print "You came from, except that you notice"
		print "there's a pirate flag on one of the"
		print "houses."
		print "You hear a distant dog bark."
		print "Up ahead you see that there's a tree"
		print "in next street."


	while True:
		action = prompt.standard(the_player)

		if action == "regular street":
			return 'Suburb 2'
		elif action == "street with a tree" or 'tree' in action:
			return 'Suburb 6'
		elif 'pirate' in action or 'flag' in action:
			return 'House with pirate flag'
		else:
			custom_error.errortype(3)
Beispiel #12
0
def enter(the_player):

	the_player.location = 'Warehouse'
	the_player.directions = ['Motor Shop']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:
		print "You're back at the warehouse of B&D Motor shop."

	else:
		the_player.visited.append(the_player.location)

		print "The door says 'Warehouse' and you"
		print "carefully approach it and open it."
		print "Inside is a large area that was intended"
		print "as a storage facility."
		print "You see multiple columns of shelves"
		print "with letters and numbers on them."

	while True:
		
		print "\nYou stand in front of the shelves, behind you"
		print "is a door leading to %s." % the_player.directions[0]
		
		action = prompt.standard(the_player)

		if action == "shelf" or action == "shelves":
			shelf(the_player)
		elif action == "motor" or action == "motor shop":
			return 'Motor Shop'
		else:
			custom_error.errortype(3)
Beispiel #13
0
def enter(the_player):

	the_player.location = 'Street with large mansion'

	if 'Wanda' in the_player.visited:
		the_player.directions = ['Suburb Junction','Wanda\'s house']
	else:
		the_player.directions = ['Suburb Junction','Mansion']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s." % the_player.location
	else:
		the_player.visited.append(the_player.location)

		print "Dog barking gets louder and you can"
		print "tell the sound is coming from a large"
		print "house at the end of the street."

	while True:
		action = prompt.standard(the_player)

		if action == "suburb junction" or action == "junction":
			return 'Suburb Junction'
		elif 'house' in action or 'mansion' in action:
			return 'Wandas House'
		else:
			custom_error.errortype(3)
Beispiel #14
0
def enter(the_player):

	the_player.location = 'Row of houses'
	the_player.directions = ['Longer street','Suburb Junction']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s." % the_player.location
	else:
		the_player.visited.append(the_player.location)

		print "Just another street with rows of houses."
		print "This street ends with a right turn."


	while True:
		action = prompt.standard(the_player)

		if action == "longer street":
			return 'Suburb 3'
		elif action == "suburb junction" or 'junction' in action:
			return 'Suburb Junction'
		else:
			custom_error.errortype(3)
Beispiel #15
0
def enter(the_player):

    the_player.location = 'Longer street'
    the_player.directions = ['Another street', 'Row of houses']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:

        print "You're back at %s." % the_player.location
        print "You still hear the dog barking."
    else:
        the_player.visited.append(the_player.location)

        print "Just another street."
        print "There is a street with row of houses ahead."
        print "On your right there's a patch of flowers"
        print "that isn't on other lawns."
        print "You hear barking from afar."

    while True:
        action = prompt.standard(the_player)

        if action == "another street":
            return 'Suburb 1'
        elif 'row' in action or 'houses' in action:
            return 'Suburb 5'
        elif action == "patch of flowers" or action == "flower":
            print "You smell the flowers. They smell nice."
            print "You look inside the house where the flowers"
            print "are but there's nothing special about it."
        else:
            custom_error.errortype(3)
Beispiel #16
0
def enter(the_player):

    the_player.location = 'Row of houses'
    the_player.directions = ['Longer street', 'Suburb Junction']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:

        print "You're back at %s." % the_player.location
    else:
        the_player.visited.append(the_player.location)

        print "Just another street with rows of houses."
        print "This street ends with a right turn."

    while True:
        action = prompt.standard(the_player)

        if action == "longer street":
            return 'Suburb 3'
        elif action == "suburb junction" or 'junction' in action:
            return 'Suburb Junction'
        else:
            custom_error.errortype(3)
Beispiel #17
0
def enter(the_player):

	the_player.location = 'Another street'
	the_player.directions = ['Suburbs','Longer street']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s." % the_player.location
	else:
		the_player.visited.append(the_player.location)

		print "Just another street with rows of houses."
		print "Only difference is a slightly more"
		print "red mailbox next to one of the houses."
		print "There is a longer street up ahead."


	while True:
		action = prompt.standard(the_player)

		if action == "suburbs":
			return 'Suburbs'
		elif action == "longer street":
			return 'Suburb 3'
		elif action == "red mailbox" or action == "mailbox":
			print "You inspect the house but nothing of"
			print "interest is inside."
		else:
			custom_error.errortype(3)
Beispiel #18
0
def enter(the_player):

    the_player.location = 'Another street'
    the_player.directions = ['Suburbs', 'Longer street']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:

        print "You're back at %s." % the_player.location
    else:
        the_player.visited.append(the_player.location)

        print "Just another street with rows of houses."
        print "Only difference is a slightly more"
        print "red mailbox next to one of the houses."
        print "There is a longer street up ahead."

    while True:
        action = prompt.standard(the_player)

        if action == "suburbs":
            return 'Suburbs'
        elif action == "longer street":
            return 'Suburb 3'
        elif action == "red mailbox" or action == "mailbox":
            print "You inspect the house but nothing of"
            print "interest is inside."
        else:
            custom_error.errortype(3)
Beispiel #19
0
def enter(the_player):

	the_player.location = 'House with pirate flag'

	if the_player.location in the_player.visited and 'dog in pirate house' in the_player.visited:
		the_player.directions = ['Shorter street','Room with dead dog','Kitchen','Basement']
	elif the_player.location in the_player.visited and 'dog in pirate house' not in the_player.visited:
		the_player.directions = ['Shorter street','Left door','Right door','Stairs']
	else:
		the_player.directions = ['Shorter street','Left Door','Kitchen','Stairs']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s." % the_player.location
		print "There's a %s on your left, %s on your right" % (the_player.directions[1], the_player.directions[2])
		print "and stairs leading to %s." % the_player.directions[3]
	else:
		the_player.visited.append(the_player.location)

		print "It smells really bad in here. From where"
		print "you stand you see two doors, one on the"
		print "right and one on the left."
		print "You hear loud barking coming from behind"
		print "the left door."
		print "There are stairs leading down at the end"
		print "of the hall."
		print "Door behind you leads out to the street."


	while True:
		action = prompt.standard(the_player)

		if action == "shorter street" or 'shorter' in action or 'out' in action:
			return 'Suburb 4'
		elif 'left' in action or 'dog' in action:
			if 'dog in pirate house' not in the_player.visited:
				print "You open the wooden doors and angry dog jumps at you!"

				encounter = fight.Encounter(the_player,'infected dog')
				encounter.start(the_player)
				the_player.visited.append('dog in pirate house')

				print "There is nothing interesting in that room so you go out."
			else:
				print "Nothing here just the dead dog. You return to the hall."
		elif 'stairs' in action or 'basement' in action:
			return 'Basement'
		elif 'right' in action or 'kitchen' in action:
			return 'Kitchen'
		else:
			custom_error.errortype(3)
Beispiel #20
0
def enter(the_player):

	the_player.location = 'Apartment'
	the_player.directions = ['Curling Street']

	print "\nLocation: ", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:
		print "You've been here already. It's your old"
		print "apartment."

	elif not the_player.location in the_player.visited:
		the_player.visited.append(the_player.location)
		print "You wake up at your old apartment."
		print "All the food and water is gone"
		print "and you know you've been postponing"
		print "your leave."
		print "The cupboard in the kitchen seems empty."
		print "You can go out to %s." % the_player.directions[0]

	else:
		pass


	while True:
		action = prompt.standard(the_player)

		if action == 'curling street' and not the_player.directions[0] in the_player.visited:
			print "You take courage and step out of your apartment."
			score.calculate(the_player, 'out of the house')
			break

		elif action == 'curling street' and the_player.directions[0] in the_player.visited:
			break

		elif action == 'cupboard' and not 'chocolate bar' in the_player.inventory.keys():
			print "You take a look once again, scanning"
			print "through empty packaging..."
			print "You find a chocolate bar!"

			the_player.inventory['chocolate bar'] = 1
			score.calculate(the_player, 'chocolate bar')

		elif action == 'cupboard':
			print "You search cupboard again but it's empty."

		else:
			pass

	return 'Curling Street'


	
Beispiel #21
0
def enter(the_player):

	the_player.location = 'March Street'
	the_player.directions = ['Junction','Old building','Harrington River']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You come back to %s. You've been here before." % the_player.location
		print "Old building is on your left side, ahead is Junction"
		print "of Curling Street"

		if 'charlie sleepover' in the_player.visited:
			print "You hear a very distant noise, probably coming"
			print "from Junction of Curling Street."
		else:
			pass

	else:
		the_player.visited.append(the_player.location)

		print "You leave junction of Curling Street behind"
		print "and turn right to %s." % the_player.location
		print "You see something moving towards you and feel"
		print "uneasiness and chill in your spine."

		encounter = fight.Encounter(the_player, 'child zombie')
		encounter.start(the_player)

		print "You successfully killed the enemy. Now you can safely"
		print "look around."
		print "Just by the sidewalk is an old building with grey walls."
		print "It is a three story building and there's a little light"
		print "coming out of the top window."
		print "Most of the windows, especially in ground floor are boarded up."
		print "If you continue walking you will end up near Harrington River."
		print "You can also turn back to Junction of Curling Street."

	while True:
		action = prompt.standard(the_player)

		if action == "junction":
			return 'Junction'
		elif action == "old building":
			return 'Old Building'
		elif action == "harrington river":
			return 'Harrington River'
		else:
			custom_error.errortype(3)
Beispiel #22
0
def enter(the_player):

    the_player.location = 'Kitchen'

    the_player.directions = ['Hallway of the house']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:
        print "You're back at %s." % the_player.location
        print "There are several shelves and four cupboards"
        print "above the sink."

    else:
        the_player.visited.append(the_player.location)

        print "You step into a kitchen. It looks like"
        print "it's been raided."

        if 'Wanda' in the_player.visited:
            print "Wanda: 'We've been here before with"
            print "Dave to get some food.'"
        else:
            pass

        print "There are several shelves and four cupboards"
        print "above the sink."

    cupboard = 1

    while True:

        action = prompt.standard(the_player)

        if 'house' in action or 'out' in action or 'hallway' in action:
            return 'House with pirate flag'
        elif 'cupboard' in action:
            print "You search one of the cupboards..."
            cupboard = cupboard + 1
            if cupboard == 4 and 'gun' in the_player.inventory.keys():
                print "You find some bullets for the gun!"
                the_player.inventory['gun'] = the_player.inventory['gun'] + 5
                score.calculate(the_player, 'bullets')
            else:
                print "...and nothing. Maybe try looking in the other one?"
        elif 'shelves' in action or 'shelf' in action:
            print "Nothing in the shelves."
        else:
            custom_error.errortype(3)
Beispiel #23
0
def enter(the_player):

    the_player.location = 'Suburb Junction'

    if 'Wanda' in the_player.visited:
        the_player.directions = [
            'Street with a tree', 'Row of houses', 'Street with small houses',
            'Wanda\'s house street'
        ]

    else:
        the_player.directions = [
            'Street with a tree', 'Row of houses', 'Street with small houses',
            'Street with large mansion'
        ]

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:

        print "You're back at %s." % the_player.location
        print "Everything looks normal here."
    else:
        the_player.visited.append(the_player.location)

        print "You enter a junction with the same houses"
        print "around. You can go to:"
        print "%s." % ','.join(the_player.directions)
        print "You're not sure where to go but you hear"
        print "louder dog barking from the direction"
        print "of Street with a large mansion."

    while True:
        action = prompt.standard(the_player)

        if action == "street with a tree" or 'tree' in action:
            return 'Suburb 6'
        elif action == "row of houses" or 'row' in action:
            return 'Suburb 5'
        elif action == "street with small houses" or 'small houses' in action:
            return 'Small houses'
        elif action == "street with large mansion" or 'mansion' in action or 'wanda' in action:
            return 'Cherry trees'
        else:
            custom_error.errortype(3)
def enter(the_player):

	the_player.location = 'Suburb Junction'

	if 'Wanda' in the_player.visited:
		the_player.directions = ['Street with a tree',
								'Row of houses',
								'Street with small houses',
								'Wanda\'s house street']

	else:
		the_player.directions = ['Street with a tree',
								'Row of houses',
								'Street with small houses',
								'Street with large mansion']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s." % the_player.location
		print "Everything looks normal here."
	else:
		the_player.visited.append(the_player.location)

		print "You enter a junction with the same houses"
		print "around. You can go to:"
		print "%s." % ','.join(the_player.directions)
		print "You're not sure where to go but you hear"
		print "louder dog barking from the direction"
		print "of Street with a large mansion."

	while True:
		action = prompt.standard(the_player)

		if action == "street with a tree" or 'tree' in action:
			return 'Suburb 6'
		elif action == "row of houses" or 'row' in action:
			return 'Suburb 5'
		elif action == "street with small houses" or 'small houses' in action:
			return 'Small houses'
		elif action == "street with large mansion" or 'mansion' in action or 'wanda' in action:
			return 'Cherry trees'
		else:
			custom_error.errortype(3)
Beispiel #25
0
def enter(the_player):

	the_player.location = 'Restroom'
	the_player.directions = ['Maintenance room']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:
		print "At restroom again."

	else:
		the_player.visited.append(the_player.location)

		print "You're in very little room with toilet"
		print "and sink in it. It is pretty crammed in"
		print "here."

	if 'broom' in the_player.inventory.keys():
		print "The door behind you lead back to %s." % the_player.directions[0]

	elif 'broom' not in the_player.inventory.keys():
		print "There's an old broom with steel handle"
		print "leaning on the wall."


	while True:
		

		action = prompt.standard(the_player)

		if action == "maintenance room" or action == "maintenance" or 'out' in action:
			return 'Maintenance room'
		elif "broom" in action:
			if 'broom' not in the_player.inventory.keys():
				print "You take the broom, it looks like it might"
				print "be useful for something."

				the_player.inventory['broom'] = 1
			else:
				print "You already have the broom."
		elif 'toilet' in action:
			print "You don't feel like going."
		else:
			custom_error.errortype(3)
Beispiel #26
0
def enter(the_player):

    the_player.location = 'Restroom'
    the_player.directions = ['Maintenance room']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:
        print "At restroom again."

    else:
        the_player.visited.append(the_player.location)

        print "You're in very little room with toilet"
        print "and sink in it. It is pretty crammed in"
        print "here."

    if 'broom' in the_player.inventory.keys():
        print "The door behind you lead back to %s." % the_player.directions[0]

    elif 'broom' not in the_player.inventory.keys():
        print "There's an old broom with steel handle"
        print "leaning on the wall."

    while True:

        action = prompt.standard(the_player)

        if action == "maintenance room" or action == "maintenance" or 'out' in action:
            return 'Maintenance room'
        elif "broom" in action:
            if 'broom' not in the_player.inventory.keys():
                print "You take the broom, it looks like it might"
                print "be useful for something."

                the_player.inventory['broom'] = 1
            else:
                print "You already have the broom."
        elif 'toilet' in action:
            print "You don't feel like going."
        else:
            custom_error.errortype(3)
def enter(the_player):

    the_player.location = 'Harrington River'
    the_player.directions = ['March Street', 'Marina', 'Bridge']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:
        print "You're back at %s." % the_player.location

    else:
        the_player.visited.append(the_player.location)
        print "The March Street ends abruptly with a large"
        print "parking lot in front of Harrington River."
        print "There is a wooden bridge that overarches the river"
        print "so you can keep going."
        print "A narrow stairwell-like path leads to river's"
        print "edge where small marina is located along"
        print "with couple of boats."

    while True:

        action = prompt.standard(the_player)

        if "bridge" in action:
            print "You step on the bridge and hear loud"
            print "cracking beneath your feet."

            bridge_prompt = raw_input("Continue? Y/N > ").lower()

            if bridge_prompt == "y":
                death.type(11, the_player)
            else:
                pass

        elif 'stairs' in action or 'path' in action or 'marina' in action:
            return 'Marina'
        elif action == "march street":
            return 'March Street'
        else:
            custom_error.errortype(3)
Beispiel #28
0
def enter(the_player):

    the_player.location = 'Basement'

    the_player.directions = ['Hallway of the house']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:
        if 'flashlight' in the_player.inventory.keys():
            print "Back in the %s." % the_player.location
            print "Heaps of junk everywhere."
        elif 'flashlight' not in the_player.inventory.keys():
            print "You're back at %s but it's still dark here."
            print "You can't see anything."

    else:
        the_player.visited.append(the_player.location)

        if 'flashlight' in the_player.inventory.keys():
            print "Thankfully you have flashlight with you"
            print "so you turn it on."
            print "You're in some kind of a basement that"
            print "has brick walls. It's very humid here."
            print "There's a lot of junk laying around."

        elif 'flashlight' not in the_player.inventory.keys():
            print "You step into the darkness and listen for"
            print "a while. It's silent and very humid in here"
            print "but also no light available."

    while True:

        action = prompt.standard(the_player)

        if 'house' in action or 'out' in action or 'hallway' in action:
            return 'House with pirate flag'
        elif 'junk' in action:
            junk(the_player)
        else:
            custom_error.errortype(3)
Beispiel #29
0
def enter(the_player):

	the_player.location = 'Marina'
	if 'Wanda' in the_player.visited:
		the_player.directions = ['Harrington River','Wanda\'s boat']
	else:
		the_player.directions = ['Harrington River','Yellow boat']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:
		print "You're back at %s." % the_player.location
		print "You see two smaller boats and %s." % the_player.directions[1]

	else:
		the_player.visited.append(the_player.location)

		print "You come to little Marina and notice two small"
		print "boats with paddle and larger yellow boat."

		if 'Wanda' in the_player.visited:
			print "Wanda: 'That yellow boat is the one!'"
		else:
			pass


	while True:

		action = prompt.standard(the_player)

		if action == "river" or action == "harrington river":
			return 'Harrington River'
		elif 'yellow' in action or 'boat' in action or 'wanda\'s boat' in action:
			return 'Wanda\'s boat'
		elif action == "small boat" or action == "small boats":
			print "One of the small boats is half-sunken and the other"
			print "looks crappy too. There are also no paddles."
		else:
			custom_error.errortype(3)
def enter(the_player):

	the_player.location = '22nd Street'
	the_player.directions = ['Junction','Suburbs']

	print "\nLocation:", the_player.location
	print "-" * 30

	chance_of_encounter = random.randint(0,1)

	if chance_of_encounter == 1:
		print "You hear growling... Looks like"
		print "an enemy stumbled upon you.\n"
		encounter = fight.Encounter(the_player,'random')
		encounter.start(the_player)
		random.seed(chance_of_encounter)
	else:
		pass

	if the_player.location in the_player.visited:

		print "Your at %s again." % the_player.location

	else:
		the_player.visited.append(the_player.location)
		
		print "You come to %s, it looks empty here." % the_player.location
		print "If you continue going forward, you'll"
		print "reach Suburbs of Welton."


	while True:
		action = prompt.standard(the_player)

		if action == "suburbs":
			return 'Suburbs'
		elif action == "junction":
			return 'Junction'
		else:
			custom_error.errortype(3)
Beispiel #31
0
def enter(the_player):

    the_player.location = 'Marina'
    if 'Wanda' in the_player.visited:
        the_player.directions = ['Harrington River', 'Wanda\'s boat']
    else:
        the_player.directions = ['Harrington River', 'Yellow boat']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:
        print "You're back at %s." % the_player.location
        print "You see two smaller boats and %s." % the_player.directions[1]

    else:
        the_player.visited.append(the_player.location)

        print "You come to little Marina and notice two small"
        print "boats with paddle and larger yellow boat."

        if 'Wanda' in the_player.visited:
            print "Wanda: 'That yellow boat is the one!'"
        else:
            pass

    while True:

        action = prompt.standard(the_player)

        if action == "river" or action == "harrington river":
            return 'Harrington River'
        elif 'yellow' in action or 'boat' in action or 'wanda\'s boat' in action:
            return 'Wanda\'s boat'
        elif action == "small boat" or action == "small boats":
            print "One of the small boats is half-sunken and the other"
            print "looks crappy too. There are also no paddles."
        else:
            custom_error.errortype(3)
def enter(the_player):

    the_player.location = '22nd Street'
    the_player.directions = ['Junction', 'Suburbs']

    print "\nLocation:", the_player.location
    print "-" * 30

    chance_of_encounter = random.randint(0, 1)

    if chance_of_encounter == 1:
        print "You hear growling... Looks like"
        print "an enemy stumbled upon you.\n"
        encounter = fight.Encounter(the_player, 'random')
        encounter.start(the_player)
        random.seed(chance_of_encounter)
    else:
        pass

    if the_player.location in the_player.visited:

        print "Your at %s again." % the_player.location

    else:
        the_player.visited.append(the_player.location)

        print "You come to %s, it looks empty here." % the_player.location
        print "If you continue going forward, you'll"
        print "reach Suburbs of Welton."

    while True:
        action = prompt.standard(the_player)

        if action == "suburbs":
            return 'Suburbs'
        elif action == "junction":
            return 'Junction'
        else:
            custom_error.errortype(3)
Beispiel #33
0
def enter(the_player):

	the_player.location = 'Suburbs'
	the_player.directions = ['22nd Street','Left','Right']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You've reached %s, you're standing in" % the_player.location
		print "one of the front streets."

	else:
		the_player.visited.append(the_player.location)

		print "Few minutes later you arrive to Welton"
		print "suburbs. The street you're on forks"
		print "into two roads (left and right)."
		print "In the distance you see many other roads"
		print "but everything looks so similiar."
		print "All the houses are same size and all"
		print "the lawns are green."
		print "Where do you go?"


	while True:
		action = prompt.standard(the_player)

		if action == "22nd street":
			return '22nd Street'
		elif action == "left":
			return 'Suburb 1'
		elif action == "right":
			return 'Suburb 2'
		else:
			custom_error.errortype(3)
def enter(the_player):

	the_player.location = 'Old Building (second floor)'
	the_player.directions = ['Old Building (first floor)']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		charlie_greets = [
		'looking good','missed you',"haven't seen you for a while",
		'nice ass','nice outside?']

		print "You come back to %s." % the_player.location
		print "'Hey there %s, %s!' Charlie screams." % (the_player.name, random.choice(charlie_greets))

		if 'Wanda' in the_player.visited:
			print "Good day to you too, Wanda. Sorry about Dave."

	else:
		the_player.visited.append(the_player.location)

		print "You slowly and carefully climb to second"
		print "floor. You see the source of light now."
		print "It's a small candle under the window."
		print "You see sleeping bag near it and"
		print "empty food cans around."
		print "Someone lives here, evidently."

		custom_error.errortype(4)

		if 'Wanda' in the_player.visited:
			print "Old grey man appears out of nowhere."
			print "'Wanda, wh-wh-what you doin here?' he says."
			print "'I came here to get our stuff' she replies."
			print "\n'Me and Dave were here few days earlier"
			print "and we had a plan to get out of Welton.'"
			print "Old man looks into the ground, his eyes"
			print "fixed on his feet."

			custom_error.errortype(4)

			print "'Listen... sorry if you feel offended, I just"
			print "wanted to keep Dave around, in case something..."
			print "I don't know... changed.'"
			print "\nWanda: 'It's okay Charlie. Don't sweat it..."
			print "We ended it. Just few moments ago. I know"
			print "he wouldn't want a life like that'"
			print "Charlie: 'Oh.. OK. You can stay for today"
			print "if you need the rest':"

			while True:
				rest = str(raw_input("Y/N > ")).lower()
				the_player.visited.append('charlie sleepover')

				if rest == "y":
					the_player.hitpoints = the_player.max_hitpoints
					print "You feel good after good rest. You have %.1f hitpoints now." % the_player.hitpoints
					break
				elif rest == "n":
					break
				else:
					custom_error.errortype(5)

			custom_error.errortype(4)
			print "Charlie: 'OK, your stuff is down in the lobby."
			print "I think you're gonna need this.'"
			print "He handles you a flashlight."

			if 'flashlight' in the_player.inventory.keys():
				pass
			else:
				the_player.inventory['flashlight'] = 1



		else:
			charlie_check = random.randint(0,1)
			if charlie_check == 0:
				print "You feel something hard landing on your head"
				print "and almost lose conscience."
				charlie_hit = random.uniform(0.1,1.0)
				the_player.hitpoints = the_player.hitpoints - charlie_hit

				if the_player.hitpoints <= 0:
					death.type(6)
				else:
					print "You lose %.1f hitpoints." % charlie_hit
					custom_error.errortype(4)

			elif charlie_check == 1:
				print "You see something approaching fast in"
				print "your peripheral vision."
				print "You manage to roll a feet away and stand"
				print "on your feet."

				score.calculate(the_player, 'charlie hit')

			print "You see old grey man in front of you."
			print "He was definitely hiding in the dark corner"
			print "across the candle."
			print "'Howdy there, I'm awfully sorry for that!"
			print "I thought it was Dave, he snapped that"
			print "rope last week and I had to fight him.'"

			end_conversation = False

			while end_conversation == False:
				print "\n'Heard some noise, is he allright?'\n"
				print "1. Yes"
				print "2. No"
				
				answer = prompt.conversation()

				if answer == 1:
					print "'Good, good, he's a good boy."
					print "He used to work for me in my restaurant."
					print "I know he's different now...."
					print "But I keep him around, as a warning"
					print "and to keep me safe."
					print "I know it's strange, don't judge me.'"
					
					break

				elif answer == 2:

					while end_conversation == False:
		
						print "'No? What did you do to him?!'"
						print "1. The rope snapped, I just defended myself."
						print "2. I killed that f****r!"
					
						answer2 = prompt.conversation()

						if answer2 == 1:
							print "'Oh...' Looks like old man is about to cry."
							print "I kind of got attached to him, even when"
							print "he became different, y'know..."
							print "Nevermind...'"
							
							end_conversation = True

						elif answer2 == 2:
							print "'What!!! You... I'm gonna f****n ~#^@#$...'"
							print "Old man pulls a huge shotgun out of his"
							print "coat."
							death.type(8, the_player)

						else:
							custom_error.errortype(1)

				else:
					custom_error.errortype(1)

			print "'Hey there, my name's Charlie. What's yours?'"

			custom_error.errortype(4)

			print "'%s' you mumble." % the_player.name
			print "\nYou hear Charlie's story, about his pizza place"
			print "and life he had before."
			print "You talked for a while and he offered you to stay"
			print "for the night: 'I saw a pack of 'em from the window."
			print "Wouldn't be safe for you to wander around at night.'\n"
			print "You agree and wake up late next day."

			custom_error.errortype(4)

			hp_to_heal = the_player.max_hitpoints - the_player.hitpoints
			the_player.hitpoints = the_player.hitpoints + hp_to_heal
			the_player.visited.append('charlie sleepover')

			print "You gain %.1f hitpoints from good night sleep.\n" % hp_to_heal
			print "'Listen, %s, by the way you wouldn't have some candy" % the_player.name
			print "on you or something?'"
			print "I might have a flashlight to trade...'"


	while True:
		action = prompt.standard(the_player)

		if "first floor" in action:
			return 'Old Building (first floor)'
		elif "chocolate" in action and 'Wanda' in the_player.visited:
			print "Charlie: 'No thanks.'"
		elif action == "chocolate" and 'flashlight' in the_player.inventory.keys() or action == "chocolate bar" and 'flashlight' in the_player.inventory.keys():
			print "Sorry, I don't have anything else to trade."
		elif action == "chocolate" or action == "chocolate bar" and the_player.inventory['chocolate bar'] >= 1:
			the_player.inventory['chocolate bar'] = the_player.inventory['chocolate bar'] - 1
			the_player.inventory['flashlight'] = 1
			print "Charlie: 'Great! Here you go, you might have a good use for it!'"
			print "He gives you working flashlight"
			score.calculate(the_player, 'flashlight')
		elif action == "chocolate" or action == "chocolate bar" and the_player.inventory['chocolate bar'] == 0:
			print "You don't have any chocolate bar to give to Charlie."
		else:
			custom_error.errortype(3)
def enter(the_player):
    the_player.location = 'Curling Street'
    the_player.directions = ['Apartment', 'Junction']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited and 'charlie sleepover' in the_player.visited and 'Wanda' in the_player.visited:
        print "\nThe whole Curling St. is swarmed with a herd of zombies."
        print "Wanda: 'Tss.. be careful."
        print "Here's the plan: I'm gonna sneak onto other side"
        print "and distract them."
        print "Meanwhile get in the shop and look for the motor - it should"
        print "have label 'K5-22TS' on it. It's pretty heavy so you might need"
        print "something to move it around."
        print "We'll meet back at Junction once you're done but be quick!'"

        score.calculate(the_player, 'wanda decoy')

        print "\nWanda sneaks behind the cars and gets about 30m away from you."
        print "'Come on, you fuckers!' she screams. The herd starts moving towards"
        print "her. You hope she'll be fine."
        print "'B&D Motors' is ahead, you carefully sneak into the shop..."

        custom_error.errortype(4)

        return 'Motor Shop'

    elif the_player.location in the_player.visited and 'charlie sleepover' in the_player.visited:
        print "You try to step carefully, hiding behind close by dumpster."
        print "Unfortunately you step on broken glass and the"
        print "swarm starts to navigate towards you..."

        custom_error.errortype(4)

        while True:
            encounter = fight.Encounter(the_player, 'zombie male')
            encounter.start(the_player)
            print "As you finished one zombie, another one approaches."
            print "Time to get ready..."

            custom_error.errortype(4)

    elif 'motor' in the_player.inventory.keys(
    ) and 'Wanda' in the_player.visited:
        print "Wanda: 'We already got what we need, let's just go"
        print "the herd might move back here again.'"
        return 'Junction'

    elif the_player.location in the_player.visited:

        if 'gun' in the_player.inventory.keys():
            pass

        else:
            print "There is still a policeman lying on the floor."
            pass

        print "You're in %s again." % the_player.location
        print "You've been here before."

        pass

    else:

        the_player.visited.append(the_player.location)

        print "You walk out of your apartment."
        print "You are on %s, it's a large street" % the_player.location
        print "with junction at the end."
        print "There are corpses everywhere, all of them"
        print "are dead and didn't turn."
        print "Most of them probably commited suicide."
        print "You notice a corpse of policeman few meters from you."

    while True:
        if the_player.hitpoints <= 0:
            death.type(3, the_player)
        else:
            pass

        action = prompt.standard(the_player)

        if action == "apartment":
            return the_player.directions[0]
            break
        elif action == "policeman" and not 'gun' in the_player.inventory.keys(
        ):
            bullets = random.randint(5, 10)
            the_player.inventory['gun'] = bullets
            print "You take the gun which has %d bullets in it." % bullets
            get_score = score.calculate(the_player, 'gun')
        elif action == "policeman":
            print "You already searched the policeman."
        elif action == "junction":
            return 'Junction'
        else:
            custom_error.errortype(3)
def enter(the_player):
	the_player.location = 'Curling Street'
	the_player.directions = ['Apartment','Junction']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited and 'charlie sleepover' in the_player.visited and 'Wanda' in the_player.visited:
		print "\nThe whole Curling St. is swarmed with a herd of zombies."
		print "Wanda: 'Tss.. be careful."
		print "Here's the plan: I'm gonna sneak onto other side"
		print "and distract them."
		print "Meanwhile get in the shop and look for the motor - it should"
		print "have label 'K5-22TS' on it. It's pretty heavy so you might need"
		print "something to move it around."
		print "We'll meet back at Junction once you're done but be quick!'"

		score.calculate(the_player,'wanda decoy')
		
		print "\nWanda sneaks behind the cars and gets about 30m away from you."
		print "'Come on, you fuckers!' she screams. The herd starts moving towards"
		print "her. You hope she'll be fine."
		print "'B&D Motors' is ahead, you carefully sneak into the shop..."

		custom_error.errortype(4)

		return 'Motor Shop'

	elif the_player.location in the_player.visited and 'charlie sleepover' in the_player.visited:
		print "You try to step carefully, hiding behind close by dumpster."
		print "Unfortunately you step on broken glass and the"
		print "swarm starts to navigate towards you..."

		custom_error.errortype(4)

		while True:
			encounter = fight.Encounter(the_player, 'zombie male')
			encounter.start(the_player)
			print "As you finished one zombie, another one approaches."
			print "Time to get ready..."

			custom_error.errortype(4)

	elif 'motor' in the_player.inventory.keys() and 'Wanda' in the_player.visited:
		print "Wanda: 'We already got what we need, let's just go"
		print "the herd might move back here again.'"
		return 'Junction'

	elif the_player.location in the_player.visited:

		if 'gun' in the_player.inventory.keys():
			pass		

		else:
			print "There is still a policeman lying on the floor."
			pass
	
		print "You're in %s again." % the_player.location
		print "You've been here before."

		pass		
	
	else:

		the_player.visited.append(the_player.location)

		print "You walk out of your apartment."
		print "You are on %s, it's a large street" % the_player.location
		print "with junction at the end."
		print "There are corpses everywhere, all of them"
		print "are dead and didn't turn."
		print "Most of them probably commited suicide."
		print "You notice a corpse of policeman few meters from you."
	
	while True:
		if the_player.hitpoints <= 0:
			death.type(3, the_player)
		else:
			pass

		action = prompt.standard(the_player)

		if action == "apartment":
			return the_player.directions[0]
			break
		elif action == "policeman" and not 'gun' in the_player.inventory.keys():
			bullets = random.randint(5,10)
			the_player.inventory['gun'] = bullets
			print "You take the gun which has %d bullets in it." % bullets
			get_score = score.calculate(the_player, 'gun')
		elif action == "policeman":
			print "You already searched the policeman."
		elif action == "junction":
			return 'Junction'
		else:
			custom_error.errortype(3)
Beispiel #37
0
def enter(the_player):

    the_player.location = 'Old Building'
    the_player.directions = ['March Street', 'Old Building (first floor)']

    print "\nLocation:", the_player.location
    print "-" * 30

    num_of_tries = 4

    if the_player.location in the_player.visited and 'flashlight' in the_player.inventory.keys(
    ):
        print "You turn on the flashlight. Suddenly you can see all"
        print "the dead bodies in the room."

        if 'first time flash light' in the_player.visited:
            print "You see the trunk."

        else:
            the_player.visited.append('first time flash light')
            score.calculate(the_player, 'turn on lights')

            print "Apart from the horrendous scene you notice a large trunk"
            print "in the back of the room."
            print "You come closer to open it but discover that"
            print "it has a mechanical lock on it with three"
            print "cylinders with number on them."
            print "The trunk has letters 'AK' crudely painted on it."

            if 'Wanda' in the_player.visited:
                print "\nWanda: 'That trunk is where our stuff should be.'"

    elif the_player.location in the_player.visited:

        print "You are at the lobby of %s again. It's dark here." % the_player.location

    else:
        the_player.visited.append(the_player.location)

        print "It's very dark inside and the smell is horrible."
        print "You can't see anything but you see a little"
        print "light coming from the other side of the lobby."
        print "You see some stairs leading up to first floor."

        if 'Wanda' in the_player.visited:
            print "\nWanda: 'This is it, this is the building. The stuff"
            print "must be somewhere here.'"

    while True:
        action = prompt.standard(the_player)

        if action == "march street" or 'out' in action:
            return 'March Street'
        elif action == "stairs" or action == "first floor":
            return 'Old Building (first floor)'
        elif action == "trunk" and not 'map' in the_player.inventory.keys():

            if 'Wanda' in the_player.visited:
                print "\n'The code is 498 but be careful"
                print "because you only have few tries."
                print "There's a special poison needle"
                print "to avoid hassling with the lock'"
            else:
                pass

            while True:
                if num_of_tries != 0:
                    try:
                        passcode = int(
                            raw_input(
                                "Enter three digits, '000' to go away > "))
                        num_of_tries = num_of_tries - 1
                    except ValueError:
                        print "Put three numbers only"
                    if passcode == 000:
                        break
                    elif passcode == 498:
                        the_player.inventory['boat key'] = 1
                        score.calculate(the_player, 'key')

                        print "You find some junk inside but most importantly,"
                        print "the key for the boat is there. It is squared-shaped"
                        print "and kind of unique."

                        if 'Wanda' in the_player.visited:
                            print "Wanda: 'We got the key! Let's go.'"
                        else:
                            pass
                        break
                    else:
                        print "It's still locked."
                else:
                    death.type(9, the_player)

        else:
            custom_error.errortype(3)
            pass
Beispiel #38
0
def enter(the_player):

	the_player.location = 'Motor Shop'
	the_player.directions = ['Curling Street', 'left door', 'right door']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:
		print "You're back at the shop."


	else:
		the_player.visited.append(the_player.location)

		print "Thankfully the doors were not locked but"
		print "just in case you block them with a nearby"
		print "table."
		print "There's no light here so you turn on your"
		print "flashlight to look around."
		print "\nYou see mostly fishing stuff and some raided"
		print "supplies. There is a counter close to the wall"
		print "and two doors, one on the left and one on the right."

	while True:
		print "There is a counter in front of you and two doors,"
		print "one on the left and other on the right."

		action = prompt.standard(the_player)

		if action == "curling street" and 'motor' not in the_player.inventory.keys():
			print "\nYou still haven't found the motor."
			print "It's too risky to leave now and return later"
			print "because of the zombie herd outside."
		elif action == "curling street" and 'cart' not in the_player.inventory.keys():
			print "\nYou still need something to put the motor in. It is"
			print "too heavy to carry it in hands. The Junction if kind of"
			print "far too."
		elif action == "curling street" and 'cart' and 'motor' in the_player.inventory.keys():
			print "\nYou put the motor in the cart and head out of Motor shop to"
			print "meet Wanda at Junction."
			the_player.visited.append('got the motor')
			print "Thankfully the zombie herd is on the other"
			print "side of the street, on the spot where"
			print "Wanda taunted it. You don't see her"
			print "so you head out to Junction..."

			custom_error.errortype(4)
			
			if 'got the motor' and 'Wanda' in the_player.visited:
				print "Wanda: 'You made it! Great. I see you got pretty"
				print "creative with that cart.'"

			if 'boat key' in the_player.inventory.keys():
				print "Well, we have the key and the motor so let's"
				print "go to Harrington River, it's not far."
			else:
				print "We still need that boat key. It's in the"
			
				print "lobby of Old Building on March Street."
			return 'Junction'
		elif 'left' in action:
			return 'Warehouse'
		elif 'right' in action:
			return 'Maintenance room'
		elif 'counter' in action:
			print "There are some papers scattered around with"
			print "dried blood on them."
			print "You see a closed laptop."
		elif 'laptop' in action:
			print "You open the laptop and to your surprise"
			print "it powers up."
			laptop(the_player)
		else:
			custom_error.errortype(3)
def enter(the_player):

    the_player.location = 'Old Building (second floor)'
    the_player.directions = ['Old Building (first floor)']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:

        charlie_greets = [
            'looking good', 'missed you', "haven't seen you for a while",
            'nice ass', 'nice outside?'
        ]

        print "You come back to %s." % the_player.location
        print "'Hey there %s, %s!' Charlie screams." % (
            the_player.name, random.choice(charlie_greets))

        if 'Wanda' in the_player.visited:
            print "Good day to you too, Wanda. Sorry about Dave."

    else:
        the_player.visited.append(the_player.location)

        print "You slowly and carefully climb to second"
        print "floor. You see the source of light now."
        print "It's a small candle under the window."
        print "You see sleeping bag near it and"
        print "empty food cans around."
        print "Someone lives here, evidently."

        custom_error.errortype(4)

        if 'Wanda' in the_player.visited:
            print "Old grey man appears out of nowhere."
            print "'Wanda, wh-wh-what you doin here?' he says."
            print "'I came here to get our stuff' she replies."
            print "\n'Me and Dave were here few days earlier"
            print "and we had a plan to get out of Welton.'"
            print "Old man looks into the ground, his eyes"
            print "fixed on his feet."

            custom_error.errortype(4)

            print "'Listen... sorry if you feel offended, I just"
            print "wanted to keep Dave around, in case something..."
            print "I don't know... changed.'"
            print "\nWanda: 'It's okay Charlie. Don't sweat it..."
            print "We ended it. Just few moments ago. I know"
            print "he wouldn't want a life like that'"
            print "Charlie: 'Oh.. OK. You can stay for today"
            print "if you need the rest':"

            while True:
                rest = str(raw_input("Y/N > ")).lower()
                the_player.visited.append('charlie sleepover')

                if rest == "y":
                    the_player.hitpoints = the_player.max_hitpoints
                    print "You feel good after good rest. You have %.1f hitpoints now." % the_player.hitpoints
                    break
                elif rest == "n":
                    break
                else:
                    custom_error.errortype(5)

            custom_error.errortype(4)
            print "Charlie: 'OK, your stuff is down in the lobby."
            print "I think you're gonna need this.'"
            print "He handles you a flashlight."

            if 'flashlight' in the_player.inventory.keys():
                pass
            else:
                the_player.inventory['flashlight'] = 1

        else:
            charlie_check = random.randint(0, 1)
            if charlie_check == 0:
                print "You feel something hard landing on your head"
                print "and almost lose conscience."
                charlie_hit = random.uniform(0.1, 1.0)
                the_player.hitpoints = the_player.hitpoints - charlie_hit

                if the_player.hitpoints <= 0:
                    death.type(6)
                else:
                    print "You lose %.1f hitpoints." % charlie_hit
                    custom_error.errortype(4)

            elif charlie_check == 1:
                print "You see something approaching fast in"
                print "your peripheral vision."
                print "You manage to roll a feet away and stand"
                print "on your feet."

                score.calculate(the_player, 'charlie hit')

            print "You see old grey man in front of you."
            print "He was definitely hiding in the dark corner"
            print "across the candle."
            print "'Howdy there, I'm awfully sorry for that!"
            print "I thought it was Dave, he snapped that"
            print "rope last week and I had to fight him.'"

            end_conversation = False

            while end_conversation == False:
                print "\n'Heard some noise, is he allright?'\n"
                print "1. Yes"
                print "2. No"

                answer = prompt.conversation()

                if answer == 1:
                    print "'Good, good, he's a good boy."
                    print "He used to work for me in my restaurant."
                    print "I know he's different now...."
                    print "But I keep him around, as a warning"
                    print "and to keep me safe."
                    print "I know it's strange, don't judge me.'"

                    break

                elif answer == 2:

                    while end_conversation == False:

                        print "'No? What did you do to him?!'"
                        print "1. The rope snapped, I just defended myself."
                        print "2. I killed that f****r!"

                        answer2 = prompt.conversation()

                        if answer2 == 1:
                            print "'Oh...' Looks like old man is about to cry."
                            print "I kind of got attached to him, even when"
                            print "he became different, y'know..."
                            print "Nevermind...'"

                            end_conversation = True

                        elif answer2 == 2:
                            print "'What!!! You... I'm gonna f****n ~#^@#$...'"
                            print "Old man pulls a huge shotgun out of his"
                            print "coat."
                            death.type(8, the_player)

                        else:
                            custom_error.errortype(1)

                else:
                    custom_error.errortype(1)

            print "'Hey there, my name's Charlie. What's yours?'"

            custom_error.errortype(4)

            print "'%s' you mumble." % the_player.name
            print "\nYou hear Charlie's story, about his pizza place"
            print "and life he had before."
            print "You talked for a while and he offered you to stay"
            print "for the night: 'I saw a pack of 'em from the window."
            print "Wouldn't be safe for you to wander around at night.'\n"
            print "You agree and wake up late next day."

            custom_error.errortype(4)

            hp_to_heal = the_player.max_hitpoints - the_player.hitpoints
            the_player.hitpoints = the_player.hitpoints + hp_to_heal
            the_player.visited.append('charlie sleepover')

            print "You gain %.1f hitpoints from good night sleep.\n" % hp_to_heal
            print "'Listen, %s, by the way you wouldn't have some candy" % the_player.name
            print "on you or something?'"
            print "I might have a flashlight to trade...'"

    while True:
        action = prompt.standard(the_player)

        if "first floor" in action:
            return 'Old Building (first floor)'
        elif "chocolate" in action and 'Wanda' in the_player.visited:
            print "Charlie: 'No thanks.'"
        elif action == "chocolate" and 'flashlight' in the_player.inventory.keys(
        ) or action == "chocolate bar" and 'flashlight' in the_player.inventory.keys(
        ):
            print "Sorry, I don't have anything else to trade."
        elif action == "chocolate" or action == "chocolate bar" and the_player.inventory[
                'chocolate bar'] >= 1:
            the_player.inventory[
                'chocolate bar'] = the_player.inventory['chocolate bar'] - 1
            the_player.inventory['flashlight'] = 1
            print "Charlie: 'Great! Here you go, you might have a good use for it!'"
            print "He gives you working flashlight"
            score.calculate(the_player, 'flashlight')
        elif action == "chocolate" or action == "chocolate bar" and the_player.inventory[
                'chocolate bar'] == 0:
            print "You don't have any chocolate bar to give to Charlie."
        else:
            custom_error.errortype(3)
Beispiel #40
0
def enter(the_player):

    the_player.location = 'Motor Shop'
    the_player.directions = ['Curling Street', 'left door', 'right door']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:
        print "You're back at the shop."

    else:
        the_player.visited.append(the_player.location)

        print "Thankfully the doors were not locked but"
        print "just in case you block them with a nearby"
        print "table."
        print "There's no light here so you turn on your"
        print "flashlight to look around."
        print "\nYou see mostly fishing stuff and some raided"
        print "supplies. There is a counter close to the wall"
        print "and two doors, one on the left and one on the right."

    while True:
        print "There is a counter in front of you and two doors,"
        print "one on the left and other on the right."

        action = prompt.standard(the_player)

        if action == "curling street" and 'motor' not in the_player.inventory.keys(
        ):
            print "\nYou still haven't found the motor."
            print "It's too risky to leave now and return later"
            print "because of the zombie herd outside."
        elif action == "curling street" and 'cart' not in the_player.inventory.keys(
        ):
            print "\nYou still need something to put the motor in. It is"
            print "too heavy to carry it in hands. The Junction if kind of"
            print "far too."
        elif action == "curling street" and 'cart' and 'motor' in the_player.inventory.keys(
        ):
            print "\nYou put the motor in the cart and head out of Motor shop to"
            print "meet Wanda at Junction."
            the_player.visited.append('got the motor')
            print "Thankfully the zombie herd is on the other"
            print "side of the street, on the spot where"
            print "Wanda taunted it. You don't see her"
            print "so you head out to Junction..."

            custom_error.errortype(4)

            if 'got the motor' and 'Wanda' in the_player.visited:
                print "Wanda: 'You made it! Great. I see you got pretty"
                print "creative with that cart.'"

            if 'boat key' in the_player.inventory.keys():
                print "Well, we have the key and the motor so let's"
                print "go to Harrington River, it's not far."
            else:
                print "We still need that boat key. It's in the"

                print "lobby of Old Building on March Street."
            return 'Junction'
        elif 'left' in action:
            return 'Warehouse'
        elif 'right' in action:
            return 'Maintenance room'
        elif 'counter' in action:
            print "There are some papers scattered around with"
            print "dried blood on them."
            print "You see a closed laptop."
        elif 'laptop' in action:
            print "You open the laptop and to your surprise"
            print "it powers up."
            laptop(the_player)
        else:
            custom_error.errortype(3)
Beispiel #41
0
def enter(the_player):

	the_player.location = 'Old Building (first floor)'
	the_player.directions = ['Old Building', 'Old Building (second floor)']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		dave = False

		print "You're on %s again. Dave's corpse is still here." % the_player.location
		print "You can go down in Old Building Lobby or up"
		print "in to second floor."

		if 'Wanda' in the_player.visited and 'Dave is dead' in the_player.visited:
			print "\nYou see Wanda turning away from Dave's body."
			print "'Let's go' she says."

		elif 'Wanda' in the_player.visited:
			print "\nWanda: 'My god... that's David... or what's left of him!'"
			print "She starts sobbing uncontrollably. You decide"
			print "that it's best if you just go."

		else:
			pass
	
	else:
		the_player.visited.append(the_player.location)

		dave = True

		print "You see that the light comes from the windows"
		print "that were not boarded up."
		print "You see a grafitti painted on eastern wall"
		print "saying 'DON'T GO UP!'."
		print "You go to near the window to look outside."
		print "You scan the horizon towards Curling Street"
		print "and see a pack of zombies coming towards you."
		print "You quickly step away from the window and"
		print "immediately hear growling breath behind you."
		print "You quickly turn around to see decomposed"
		print "guy in uniform." 
		print "He reminds you if pizza delivery boy"
		print "that you used to meet."

		custom_error.errortype(4)

		if 'Wanda' in the_player.visited:
			print "'DAVE!' Wanda shouts. 'Please let's leave him"
			print "alone!'"
		else:
			pass

		custom_error.errortype(4)

		print "It's weird. He has a leash on his neck and"
		print "he angrily swings his arm towards you,"
		print "clenching his teeth."
		print "You try to slide past him but pizza boy"
		print "snaps into amok."
		print "In one moment the rope on his leash snaps."
		print "Ooops..."

		custom_error.errortype(4)

		encounter = fight.Encounter(the_player, 'Dave')
		encounter.start(the_player)

		dave = False

		the_player.visited.append('Dave is dead')

		if 'Wanda' in the_player.visited:
			print "'Oh my what did we just do? ..."
			print "I guess it was necessary... but.."
			print "poor Dave. He didn't deserve this.'"
			custom_error.errortype(4)
		else:
			pass

		print "Breathing heavily you observe remains of this"
		print "familiar guy and notice a name tag on his"
		print "shirt. It says 'DAVE'."

	while True:
		action = prompt.standard(the_player)

		if action == "dave" and 'dave chocolate' in the_player.visited:
			print "There's not anything on Dave."

		elif action == "dave" and not 'dave chocolate' in the_player.visited:
			the_player.visited.append('dave chocolate')
			print "You quickly search Dave's body"
			print "and to your surprise you find"
			print "old chocolate but it still looks OK."

			if 'chocolate bar' in the_player.inventory.keys():
				print "Cool another chocolate bar."
				the_player.inventory['chocolate bar'] = the_player.inventory['chocolate bar'] + 1
				print "You have %d bars now." % the_player.inventory['chocolate bar']
				score.calculate(the_player, 'chocolate bar')
			elif 'chocolate bar' not in the_player.inventory.keys():
				the_player.inventory['chocolate bar'] = 1
				score.calculate(the_player, 'chocolate bar')
		elif action == "second floor" or action == "old building (second floor)":
			return 'Old Building (second floor)'
		elif action == "lobby" or action == "old building":
			return 'Old Building'
		else:
			custom_error.errortype(3)
Beispiel #42
0
def enter(the_player):

    the_player.location = 'Wanda\'s house'

    if 'Wanda' in the_player.visited:
        the_player.directions = ['Wanda\'s house street']
    else:
        the_player.directions = ['Street with large mansion']

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:

        print "You've come back to %s." % the_player.location
        print "Alfie greets you by jumping at you."

    else:
        the_player.visited.append(the_player.location)

        print "The door were not locked but as soon"
        print "as you got inside you see the dog"
        print "that was making all the noise."
        print "The dog is a large dachshund with"
        print "really threatening look."
        print "It's growling at you..."

        custom_error.errortype(4)

        print "Suddenly you hear 'Alfie!' and"
        print "the dog runs up the wooden stairs."
        print "There you see a young woman aiming"
        print "small revolver at you."
        print "She says: 'Now I'm going"
        print "to ask you some questions and you're'"
        print "gonna answer.'"

        custom_error.errortype(4)

        end_conversation = False

        while end_conversation == False:

            print "'Are you gonna hurt me?'"
            print "1. Yes"
            print "2. No\n"

            answer_hurt = prompt.conversation()

            if answer_hurt == 1:
                death.type(10, the_player)
            elif answer_hurt == 2:
                print "'Good, good."
                print "Why did you come here?'"

                while end_conversation == False:
                    print "1. I was looking for a shelter."
                    print "2. I heard the dog barking."
                    print "3. I need to get out of this town.\n"

                    answer_come = prompt.conversation()

                    if answer_come == 2:
                        print "'Hmm. Alfie's been tense lately'"
                        print "and this is exactly what I was worried"
                        print "about. That the barking would attract more"
                        print "deads or not-so-friendly types.'\n"

                        pass

                    elif answer_come == 1:
                        print "Well... you can't expect me to offer you"
                        print "a place to crash. You're a stranger!\n"

                        pass

                    elif answer_come == 3:
                        end_conversation = True

            else:
                custom_error.errortype(1)

        print "'Well.. that makes two of us... name's Wanda by the way.'"
        print "'%s' you say." % the_player.name
        print "'Nice to meet you.'"

        custom_error.errortype(4)

        print "'Listen, I have a plan, sort of. Me and my boyfriend"
        print "were staying at this building on March St. We were"
        print "preparing to get outta town."
        print "We had everything - supplies, ammo and a ride..."
        print "but then a horde of deads heard us and started to"
        print "crawl into the lobby.'"

        custom_error.errortype(4)

        print "Well I managed to escape and still.. a herd of them"
        print "were following me for days. Then I found this place"
        print "and I have been here since."
        print "I couldn't get back... I was so scared and I'm not sure"
        print "I'll even see Dave again..."

        if 'Dave is dead' in the_player.visited:

            print "You: 'Listen, Wanda..'"
            print "'I know what happened to Dave.'"
            print "Wanda: 'You saw him?!'"
            print "'Yeah.. he turned, I had to kill him,' you replied."
            print "Wanda explodes in tears, you try to comfort her"
            print "but it's useless"

            custom_error.errortype(4)

            print "Few hours later she calms down a bit."
            print "'Hey.. I can't stay here. I gotta get away."
            print "let's get back to what I was trying to say...'"

        else:
            pass

        print "\n'The really bad thing is we had a perfect way out."
        print "We managed to fix one of the boats on Harrington River"
        print "but it had a broken motor.'"
        print "\n'So we got found a new one in a shop on Curling Street.'"
        print "You: 'Yeah that's where my place is.'"
        print "'Cool. But it gets worse. The keys for the boat"
        print "are somewhere in the building on March St., the place"
        print "where I saw Dave for last time.'"

        custom_error.errortype(4)

        print "'There should be a trunk with lock on it, I have the"
        print "password.'"
        print "\n'Let's get the motor and the key and get out of this"
        print "hellhole."
        print "We'll get going tomorrow morning.'"

        custom_error.errortype(4)

        hp_to_heal = the_player.max_hitpoints - the_player.hitpoints
        the_player.hitpoints = the_player.hitpoints + hp_to_heal
        print "You gain %.1f hitpoints from good night sleep.\n" % hp_to_heal

        print "'Hey %s here you go. It's a bandage that'll" % the_player.name
        print "heal you but it takes time to apply so you"
        print "need to use it outside of battle.'"
        print "\n*** Type HEAL outside of battle to heal yourself. ***\n"

        the_player.inventory['bandage'] = 2

        print "You get %d bandages." % the_player.inventory['bandage']
        print "Let's go! Alfie you need to stay here for now."

        the_player.visited.append('Wanda')

    while True:
        action = prompt.standard(the_player)

        if action == "street with large mansion" or 'out' in action or 'street' in action:
            return 'Cherry trees'
        else:
            custom_error.errortype(3)
Beispiel #43
0
def enter(the_player):

	the_player.location = 'Junction'
	the_player.directions = ['Curling Street','March Street', '22nd Street', 'Foreman Ave']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:

		print "You're back at %s of Curling Street again." % the_player.location
		print "You've been here before."
	
		if the_player.location in the_player.visited and 'charlie sleepover' in the_player.visited:
			print "The sound is definitely coming from Curling Street."
		else:
			pass

	else:
		the_player.visited.append(the_player.location)

		print "You pass few building in Curling Street"
		print "carefully. Thankfully no zombies are present here."
		print "Behind you is Curling Street, on your right"
		print "you can go to March Street, on your left"
		print "there's 22nd Street."
		print "If you continue to go forward you will enter Foreman Ave."

	while True:
		action = prompt.standard(the_player)
		
		if action == "curling street" and 'got the motor' in the_player.visited:
			print "The zombies are still herding in Curling Street and"
			print "you've already got what you need."

		elif action == "curling street" and 'charlie sleepover' in the_player.visited and 'Wanda' in the_player.visited:
			print "From afar you see a herd of zombies scattered in the street."
			print "Wanda: 'Let's go I have a plan.'"

			custom_error.errortype(4)
			return 'Curling Street'

		elif action == "curling street" and 'charlie sleepover' in the_player.visited:
			print "You go few meters but after a while you notice zombie sounds."
			print "A swarm of deads is scattered around the whole Curling Street."
			print "It doesn't look like a good idea to go there"
			print "but if you really want you might give it a shot:\n"

			while True:
				go_to_swarm = raw_input("> Continue? Y/N").lower()
				if go_to_swarm == "y":
					return 'Curling Street'
				elif go_to_swarm == "n":
					print "You decide to return to junction."
					break
				else:
					print "Type only 'Y' or 'N'."

		elif action == "curling street":
			return 'Curling Street'
		elif action == "march street":
			return 'March Street'
		elif action == "22nd street":
			return '22nd Street'
		elif action == 'foreman ave' or action == "foreman avenue":
			return 'Foreman Ave'
		elif action == 'knife':
			the_player.inventory['knife'] = 50
			print "You pick up knife"
		else:
			custom_error.errortype(3)
def enter(the_player):

	the_player.location = 'Maintenance room'
	the_player.directions = ['Motor Shop', 'Restroom']

	print "\nLocation:", the_player.location
	print "-" * 30

	if the_player.location in the_player.visited:
		print "You're back at the %s." % the_player.location

	else:
		the_player.visited.append(the_player.location)

		print "You open the door and something immediately jumps at you!"

		custom_error.errortype(4)

		the_player.visited.remove('Wanda')

		encounter = fight.Encounter(the_player, 'random')
		encounter.start(the_player)

		the_player.visited.append('Wanda')

		print "That was close!"

	print "In front of you, you see lots of junk. There is a closet on the left"
	print "and next to it is some kind of workbench."
	print "There are also paper boxes and wooden crates around the place."
	print "On your right you see doors marked 'restroom'."

	while True:
		
		action = prompt.standard(the_player)

		if action == 'restroom' or 'rest' in action:
			return 'Restroom'
		elif action == "closet":
			if 'wheels' in the_player.inventory.keys():
				print "There isn't anything useful in there anymore."
			else:
				print "You find some spare bike parts. Everything looks functional"
				print "and the wheels might be useful for something so you take them."
				the_player.inventory['wheels'] = 2
		elif action == "workbench":
			workbench(the_player)
		elif action == "paper boxes" or action == "boxes":
			print "You don't find anything useful."
		elif action == "wooden crates" or action == "crates" or action == "crate":
			if 'wooden board' in the_player.inventory.keys():
				print "The crates are already disassembled and there is"
				print "nothing of use to you."
			else:
				print "You inspect wooden crates and nothing if interest"
				print "is inside them, just some random junk."
				print "But the crates themselves are made of wooden boards"
				print "that you think you could use."
				print "You take few of the crates apart and get several boards."
				the_player.inventory['wooden board'] = 5
		elif action == "motor shop" or action == "shop":
			return 'Motor Shop'
		else:
			custom_error.errortype(3)
Beispiel #45
0
def enter(the_player):

	if 'Wanda' in the_player.visited:
		the_player.location = 'Wanda\'s boat'
	else:
		the_player.location = 'Yellow boat'

	the_player.directions = ['Marina']

	print "\nLocation:", the_player.location
	print "-" * 30

	if 'zombie captain' not in the_player.visited:

		print "Looks like a habitant of Marina has turned."
		print "You see funny looking dead in striped shirt"
		print "and captain's hat... but boy he's ripped"
		print "as hell..."

		custom_error.errortype(3)

		encounter = fight.Encounter(the_player,'zombie captain')
		encounter.start(the_player)

		the_player.visited.append('zombie captain')

	else:
		pass


	if 'Wanda' in the_player.visited:
		if the_player.location in the_player.visited:
			print "You're back at %s." % the_player.location
			print "Wanda: 'OK, let's get this thing going.'"
		else:
			the_player.visited.append(the_player.location)

			print "Wanda: 'So this is the boat that me and"
			print "Dave found.'"

			print "You both inspect the ship and see that the"
			print "motor is indeed missing. Also the boat"
			print "needs special key to operate."
	else:
		pass

	if the_player.location in the_player.visited:
		print "You're back at the %s." % the_player.location


	else:
		the_player.visited.append(the_player.location)
		print "You inspect the boat and notice that the motor is missing."
		print "Also you need special key to operate the boat."


	while True:
		
		action = prompt.standard(the_player)

		if 'motor' in action and 'motor' in the_player.inventory.keys():
			print "You install the motor onto the boat. There seems to"
			print "be enough fuel left in tanks. Now all you need"
			print "is to start the motor."

			the_player.visited.append('motor installed')
		elif 'start' in action or 'key' in action or 'boat key' in action:
			print "You put the boat key in the ignition."

			if 'motor installed' in the_player.visited:
				print "You hear the motor start."
				score.calculate(the_player,'end game')
				custom_error.errortype(4)
				return 'Ending'
			else:
				print "Nothing happens, the motor is still missing."
		elif action == "marina":
			return 'Marina'
		else:
			custom_error.errortype(3)
Beispiel #46
0
def enter(the_player):

    if 'Wanda' in the_player.visited:
        the_player.location = 'Wanda\'s boat'
    else:
        the_player.location = 'Yellow boat'

    the_player.directions = ['Marina']

    print "\nLocation:", the_player.location
    print "-" * 30

    if 'zombie captain' not in the_player.visited:

        print "Looks like a habitant of Marina has turned."
        print "You see funny looking dead in striped shirt"
        print "and captain's hat... but boy he's ripped"
        print "as hell..."

        custom_error.errortype(3)

        encounter = fight.Encounter(the_player, 'zombie captain')
        encounter.start(the_player)

        the_player.visited.append('zombie captain')

    else:
        pass

    if 'Wanda' in the_player.visited:
        if the_player.location in the_player.visited:
            print "You're back at %s." % the_player.location
            print "Wanda: 'OK, let's get this thing going.'"
        else:
            the_player.visited.append(the_player.location)

            print "Wanda: 'So this is the boat that me and"
            print "Dave found.'"

            print "You both inspect the ship and see that the"
            print "motor is indeed missing. Also the boat"
            print "needs special key to operate."
    else:
        pass

    if the_player.location in the_player.visited:
        print "You're back at the %s." % the_player.location

    else:
        the_player.visited.append(the_player.location)
        print "You inspect the boat and notice that the motor is missing."
        print "Also you need special key to operate the boat."

    while True:

        action = prompt.standard(the_player)

        if 'motor' in action and 'motor' in the_player.inventory.keys():
            print "You install the motor onto the boat. There seems to"
            print "be enough fuel left in tanks. Now all you need"
            print "is to start the motor."

            the_player.visited.append('motor installed')
        elif 'start' in action or 'key' in action or 'boat key' in action:
            print "You put the boat key in the ignition."

            if 'motor installed' in the_player.visited:
                print "You hear the motor start."
                score.calculate(the_player, 'end game')
                custom_error.errortype(4)
                return 'Ending'
            else:
                print "Nothing happens, the motor is still missing."
        elif action == "marina":
            return 'Marina'
        else:
            custom_error.errortype(3)
Beispiel #47
0
def enter(the_player):

	the_player.location = 'Old Building'
	the_player.directions = ['March Street','Old Building (first floor)']

	print "\nLocation:", the_player.location
	print "-" * 30

	num_of_tries = 4

	if the_player.location in the_player.visited and 'flashlight' in the_player.inventory.keys():
		print "You turn on the flashlight. Suddenly you can see all"
		print "the dead bodies in the room."

		if 'first time flash light' in the_player.visited:
			print "You see the trunk."


		else:
			the_player.visited.append('first time flash light')
			score.calculate(the_player,'turn on lights')

			print "Apart from the horrendous scene you notice a large trunk"
			print "in the back of the room."
			print "You come closer to open it but discover that"
			print "it has a mechanical lock on it with three"
			print "cylinders with number on them."
			print "The trunk has letters 'AK' crudely painted on it."

			if 'Wanda' in the_player.visited:
				print "\nWanda: 'That trunk is where our stuff should be.'"


	elif the_player.location in the_player.visited:

		print "You are at the lobby of %s again. It's dark here." % the_player.location

	else:
		the_player.visited.append(the_player.location)

		print "It's very dark inside and the smell is horrible."
		print "You can't see anything but you see a little"
		print "light coming from the other side of the lobby."
		print "You see some stairs leading up to first floor."

		if 'Wanda' in the_player.visited:
			print "\nWanda: 'This is it, this is the building. The stuff"
			print "must be somewhere here.'"

	while True:
		action = prompt.standard(the_player)

		if action == "march street" or 'out' in action:
			return 'March Street'
		elif action == "stairs" or action == "first floor":
			return 'Old Building (first floor)'
		elif action == "trunk" and not 'map' in the_player.inventory.keys():

			if 'Wanda' in the_player.visited:
				print "\n'The code is 498 but be careful"
				print "because you only have few tries."
				print "There's a special poison needle"
				print "to avoid hassling with the lock'"
			else:
				pass

			while True:
				if num_of_tries != 0:
					try:
						passcode = int(raw_input("Enter three digits, '000' to go away > "))
						num_of_tries = num_of_tries - 1
					except ValueError:
						print "Put three numbers only"
					if passcode == 000:
						break
					elif passcode == 498:
						the_player.inventory['boat key'] = 1
						score.calculate(the_player, 'key')

						print "You find some junk inside but most importantly,"
						print "the key for the boat is there. It is squared-shaped"
						print "and kind of unique."

						if 'Wanda' in the_player.visited:
							print "Wanda: 'We got the key! Let's go.'"
						else:
							pass
						break
					else:
						print "It's still locked."
				else:
					death.type(9, the_player)


		else:
			custom_error.errortype(3)
			pass
Beispiel #48
0
def enter(the_player):

    the_player.location = 'Foreman Ave'
    the_player.directions = [
        'Junction', 'Commercial Building', 'Car barricade'
    ]
    glass = random.randint(1, 4)

    print "\nLocation:", the_player.location
    print "-" * 30

    if the_player.location in the_player.visited:
        print "You're back at %s." % the_player.location
        print "There are waste containers on the side"
        print "of the road."
        print "Building with broken shop window is next to them."

    else:
        the_player.visited.append(the_player.location)

        print "You come to wide street with various shops"
        print "on each side and garbage everywhere."
        print "There are seven green waste containers on the right"
        print "side of the road that are stuffed"
        print "with various things."
        print "You see a commercial building, probably a shop"
        print "with broken front shop window."
        print "The street ends with a huge barricade made out of"
        print "cars."

    while True:

        action = prompt.standard(the_player)

        if action == "junction":
            return 'Junction'
        elif 'waste' in action or 'container' in action:
            container(the_player)
        elif 'window' in action or 'commercial' in action or 'building' in action:
            if glass == 1:
                death.type(12, the_player)
            else:
                print "You lose balance while stepping to the shop,"
                print "you almost impale yourself on glass shrapnel."
                print "Don't try that again!"
                score.calculate(the_player, 'glass')
        elif 'cars' in action or 'barricade' in action or 'car' in action:

            print "You try to climb the car barricade but"
            print "you fail, falling to the ground."

            if 'car barricade' not in the_player.visited:
                encounter = fight.Encounter(the_player, 'random')
                print "Somehow, a zombie crawls from one of the cars."

                custom_error.errortype(4)
                encounter.start(the_player)
                the_player.visited.append('car barricade')
            else:
                pass
        else:
            custom_error.errortype(3)