def move_one(player, possible_closet_rewards): """ This is all of the stuff that happens in the first move :param player: The player object :param possible_closet_rewards: The possible rewards granted in a closet :return: None """ # Print some dialogue GameActions.handle_dialogue( ["You get up and walk out side into the hallway."], 1) # Ask the player what they want to do player_move = GameActions.handle_options(player, ["Walk Left", "Walk Right"]) if player_move == 1: # Walk Left # There is a closet here given_reward = GameActions.handle_closet(player, 1, possible_closet_rewards) # If the user got a reward from the closet remove it from the list of possible rewards if given_reward is not None: possible_closet_rewards.remove(given_reward) GameActions.handle_dialogue( ["\nYou walk back to the right past your class room"], 1) else: # Walk Right GameActions.handle_dialogue(["You walk to the right..."], 1)
def move_four(player, possible_closet_rewards): """ This is all of the stuff that happens in move 4 :param player: The player object :param possible_closet_rewards: The possible rewards granted in a closet :return: None """ # Print the next dialogue dialogue_list = [ "\nYou reach the end of the hallway..", "On your right you see a closet and on your left a door leading to the court yard.", "What should you do?" ] GameActions.handle_dialogue(dialogue_list, 4) player_move = GameActions.handle_options(player, ["Closet", "Court Yard"]) if player_move == 1: # Closet # There is a closet here given_reward = GameActions.handle_closet(player, 1, possible_closet_rewards) # If the user got a reward from the closet remove it from the list of possible rewards if given_reward is not None: possible_closet_rewards.remove(given_reward) GameActions.handle_dialogue( ["Having nowhere else to go you walk towards the court yard"], 3) else: # Court yard pass dialogue_list = [ "As soon as you open the door to the court yard you are attacked by 4 rats!", "Get ready to fight!" ] GameActions.handle_dialogue(dialogue_list, 4) for i in range(0, 4): GameActions.handle_dialogue(["\nYou start fighting rat" + str(i + 1)], 2) GameActions.handle_fight(player, 2, 7)
def move_four(player, possible_closet_rewards): """ This is all of the stuff that happens in move 4 :param player: The player object :param possible_closet_rewards: The possible rewards granted in a closet :return: None """ # Print the next dialogue dialogue_list = [ "\nYou reach the end of the hallway..", "On your right you see a closet and on your left a door leading to the court yard.", "What should you do?", ] GameActions.handle_dialogue(dialogue_list, 4) player_move = GameActions.handle_options(player, ["Closet", "Court Yard"]) if player_move == 1: # Closet # There is a closet here given_reward = GameActions.handle_closet(player, 1, possible_closet_rewards) # If the user got a reward from the closet remove it from the list of possible rewards if given_reward is not None: possible_closet_rewards.remove(given_reward) GameActions.handle_dialogue(["Having nowhere else to go you walk towards the court yard"], 3) else: # Court yard pass dialogue_list = [ "As soon as you open the door to the court yard you are attacked by 4 rats!", "Get ready to fight!", ] GameActions.handle_dialogue(dialogue_list, 4) for i in range(0, 4): GameActions.handle_dialogue(["\nYou start fighting rat" + str(i + 1)], 2) GameActions.handle_fight(player, 2, 7)
def move_one(player, possible_closet_rewards): """ This is all of the stuff that happens in the first move :param player: The player object :param possible_closet_rewards: The possible rewards granted in a closet :return: None """ # Print some dialogue GameActions.handle_dialogue(["You get up and walk out side into the hallway."], 1) # Ask the player what they want to do player_move = GameActions.handle_options(player, ["Walk Left", "Walk Right"]) if player_move == 1: # Walk Left # There is a closet here given_reward = GameActions.handle_closet(player, 1, possible_closet_rewards) # If the user got a reward from the closet remove it from the list of possible rewards if given_reward is not None: possible_closet_rewards.remove(given_reward) GameActions.handle_dialogue(["\nYou walk back to the right past your class room"], 1) else: # Walk Right GameActions.handle_dialogue(["You walk to the right..."], 1)