Exemplo n.º 1
0
def _D1_move_east(player):
	
	if player.unlockD1:
		return None # it is already unlocked
	
	user_try = input("""
	You see a door made of stone to your east.
	About twice as wide as you are, it appears to be made out of unrefined
	granite.
	In its center, there is a series of five large stone knobs which
	can evidently be twisted into different positions.
	The first three are letters, and the last two are numerals.
	Enter a combination, or type 'exit' to return to the room:
	
	""").lower().strip()
	
	if user_try == 'exit':
		print('You slowly back away, and return to looking around the room')
		
	elif user_try == convert_to_caesar(16, player.dungeon_combo).lower().strip():
		time.sleep(2)
		print("""
		BOOM! The door falls through the floor. You can now move east.		""")
		D1.connected_nodes['e'] = D2
		del D1.item_reactions['e']
		return playerModPacket.PlayerModPacket({'unlockD1':True})
		
	else:
		time.sleep(2)
		print('The combo does not work! Arrows fly towards you, shooting from the wheel. You die!')
		return playerModPacket.PlayerModPacket({'dead':True})
Exemplo n.º 2
0
def _M1_move_north(player):
	response = input("""
	There is a python in the room. You step back, startled. The python says to you,\"David's father has three sons : Snap, Crackle and _____ ? \"
	Your Response: """)
	
	if response.strip().lower() == 'david':
		print('\"Very good',player.name, '! Very very good... You may proceed.\" says the snake. It slithers away, and you can move.')
		print(F1.look_description)
		return playerModPacket.PlayerModPacket({'location': F1})
	else:
		print("\"Wrong answer! Now you DIE!!!\" says the snake. You try to get away, but it pounces and kills you on the spot!\nGame over!")
		return playerModPacket.PlayerModPacket({'dead': True})
Exemplo n.º 3
0
def _G0_move_north(player):
	if 'guard' in G0.items or 'guard' in player.inventory:
		if 'sword' in player.inventory:
			print('You get past the guard using your sword. You may now move north.')
			G0.connected_nodes['n'] = M0
			del G0.item_reactions['n']
			del G0.items[1]
		else:
			print('you try sneaking past the guard. He awakes, and stabs you in the heart. You die!')
			return playerModPacket.PlayerModPacket({'dead':True})
	else:
		print('You have consumed the guard, allowing you to move north.')
		print(M0.look_description)
		G0.connected_nodes['n'] = M0
		del G0.item_reactions['n']
		return playerModPacket.PlayerModPacket({'location':M0})
Exemplo n.º 4
0
def _talkBlueGoblin(player):
	print('\"Ahoy! I am the blue goblin\" says the goblin.')
	
	if 'bgrrb' in (player.goblins + 'b').lower():
		print("""
				You hear a voice above you say
				\"wELL dONE! yOUR CLEVERNESS HAS SAVED YOU FROM
				A BASEMENTY FATE.\"
				The hatch springs open. Your vision is flooded with light.
			""")
		del B1.item_reactions['n']
	else:
		return playerModPacket.PlayerModPacket({'goblins':'B'})
Exemplo n.º 5
0
def _D2_useladder(_):
	print('You prop the ladder against the hole in the ceiling. You may move north.')
	D2.connected_nodes['n'] = B2
	del D2.item_reactions['n']
	return playerModPacket.PlayerModPacket({'unlockD2':True})
Exemplo n.º 6
0
def _D0_usekey(_):
	print('You unlock yourself.\nYou can now move around.')
	return playerModPacket.PlayerModPacket({'mobile': 'true', 'inventory remove':'key'})
Exemplo n.º 7
0
def _talkRedGoblin(player):
	print('\"Ahoy! I am the red goblin\" says the goblin.')
	return playerModPacket.PlayerModPacket({'goblins':'R'})
Exemplo n.º 8
0
def _talkGreenGoblin(player):
	print('\"Ahoy! I am the green goblin\" says the goblin.')
	return playerModPacket.PlayerModPacket({'goblins':'G'})