Example #1
0
def enter(player_obj, space_obj):
    art.display("bridge")
    if 'unlocked' in space_obj.options:
        print('#' * 100)
        print('You are at the bridge you unlocked earlier.')
    else:
        print('#' * 100)
        print(
            "You find a bridge, the gate is locked. Maybe you have something that will open it?"
        )

    while True:
        q = input('What would you like to do? ')
        if q.lower().split(' ')[0] == 'unlock' or 'key' in q.lower(
        ) or 'open' in q.lower():
            unlock(player_obj, space_obj)
        if q.lower().split(' ')[0] == 'jump' or 'climb' in q.lower():
            jump(player_obj)
            break
        else:
            err, rtext = query.parse_movement(q)
            if err == False:
                if rtext == 'forward' and 'unlocked' not in space_obj.options:
                    print(
                        'You are unable to travel forward as the gate is locked.'
                    )
                elif rtext == 'right' or rtext == 'left':
                    sweptaway(player_obj)
                    break
                else:
                    player_obj.move(rtext)
                    break
Example #2
0
def jump(player_obj):
    print('')
    art.display("blood")
    print('#' * 100)
    print(
        "You tried jumping the gate, impaling yourself on a spike and falling on the other side. You don't make it very far before you collapse and die."
    )
    player_obj.kill()
Example #3
0
def enter(player_obj, space_obj):
    art.display("field")
    print('#' * 100)
    print('You are in a field. Tall grass surrounds you.')
    while True:
        q = input('What would you like to do? ')
        err, rtext = query.parse_movement(q)
        if err == False:
            player_obj.move(rtext)
            break
Example #4
0
def enter(player_obj, space_obj):
    art.display("river")
    print('#' * 100)
    print('You are on the edge of a river, it is unsafe to cross.')
    while True:
        q = input('What would you like to do? ')
        err, rtext = query.parse_movement(q)
        if err == False:
            if rtext == 'forward' or rtext == 'right' or rtext == 'left':
                sweptaway(player_obj)
                break
            else:
                player_obj.move(rtext)
                break
Example #5
0
def enter(player_obj, space_obj):
    art.display("field")
    print('#' * 100)
    print(
        'You are in a field. Tall grass surrounds you. The ground seems to be recently disturbed.'
    )
    while True:
        q = input('What would you like to do? ')
        err, rtext = query.parse_movement(q)
        if q.lower() == 'dig':
            dig(player_obj, space_obj)
        else:
            if err == False:
                player_obj.move(rtext)
                break
Example #6
0
def enter(player_obj, space_obj):
	art.display("forest")
	print('#'*100)
	print("You are in a forest. Tall trees tower over you. You feel goosebumps on your skin, something doesn't feel right.")
	time.sleep(3)
	if random.random() < 0.45:
		if monster(player_obj, space_obj) == False:
			while True:
				q = input('What would you like to do? ')
				err, rtext = query.parse_movement(q)
				if err == False:
					player_obj.move(rtext)
					break
	else:	
		while True:
			q = input('What would you like to do? ')
			err, rtext = query.parse_movement(q)
			if err == False:
				player_obj.move(rtext)
				break
Example #7
0
def enter(player_obj, space_obj):
	if 'beardead' not in space_obj.options:
		art.display("bear")
		print('#'*100)
		print('Oh no! A bear! It appears to be aggressive and will not let you pass.')
	else:
		art.display("field")
		print('#'*100)
		print("This is where you shot the bear. Its carcass is starting to decay.")

	while True:
		q = input('What would you like to do? ')
		if q.lower().split(' ')[0] == 'shoot' or q.lower().split(' ')[0] == 'kill':
			shoot(player_obj, space_obj)
		else:
			err, rtext = query.parse_movement(q)
			if err == False:
				if rtext == 'right' and 'beardead' not in space_obj.options:
					bearattack(player_obj)
					break
				else:
					player_obj.move(rtext)
					break
Example #8
0
def sweptaway(player_obj):
    print('')
    art.display("sweptaway")
    print('#' * 100)
    print("You've been swept away!")
    player_obj.kill()