Example #1
0
def main(player):
	jinput("Press enter key to start: ")
	new_game = jinput("New game/load chapter? [new/load]:")
	if new_game == "new":
		story_progress = 1.0
		return player, story_progress
	elif new_game == "load":
		path_to_dir = os.path.abspath(".")
		saves = os.walk(path_to_dir + "/saveData")
		pprint("Here are your saved files.")
		for x in saves:
			for j, file in enumerate(x[2]):
				pprint("{}: {}".format(j + 1, file[:-4]))
		file_number = input("Which file do you choose? ")
		while file_number not in [str(i) for i in range(1, len(x[2]) + 1)]:
			file_number = input("Please pick again!\nWhich file do you choose? ")
		file = x[2][int(file_number) - 1]
		player, story_progress, choices = load(file)
		game.choices = choices
		pprint("Welcome back, {}!".format(player.name))
		time.sleep(1)
		return player, story_progress
	else:
		pprint(required)
		print("")
		pprint("Restarting")
		time.sleep(1)
		player, story_progress = main(player)
		return player, story_progress
Example #2
0
def dream():
	dream_choice_1 = jinput("Do you: \nA: Run \nB: stay \n")
	if dream_choice_1 == "a":
		pass
	elif dream_choice_1 == "b":
		jinput("000") ##DO SOMETHING
	elif dream_choice_1 == "wake up":
		global hidden_class
		hidden_class += 1
		pprint("\nYou realise")
	else:
		pprint(required)
		dream()
Example #3
0
def death():
	death = jinput ("You died, would you like to start again... or get up!?: ")
	if death == "yes":
		pass
	elif death in no:
		quit()
	elif death == "NOOO" or death == "get up" or death == "NO" or death == "stand up":
		pass
Example #4
0
def take_hand():
	hand = jinput("\n" + Fore.CYAN + "Do you take his hand?: " + Fore.GREEN)
	if hand == "yes":
		pprint(Fore.GREEN + "\nI love you!!!")
		return True
	elif hand == "no":
		return False
	else:
		pprint(required)
		take_hand()
Example #5
0
def player_name():
	p_name = jinputUpper(Fore.CYAN + "Choose a name: " + Fore.GREEN)
	certain = jinput(Fore.CYAN + "Are you sure?: " + Fore.GREEN)
	if certain == "yes":
		pprint ("\"Well, hi " + p_name + "! My name is Iri! Saw ya lying over and thought it best not to wake ya!... Want a hand up?\"\n")
		return p_name
	elif certain in no:
		player_name()
	else:
		pprint(required)
		player_name()