示例#1
0
        for pig, skill in choice_dict.items():
            result += f"-- {pig}: {skill}\n"
    return result


player_name = input("What is your name? \n>> ")
print(f"Yo {player_name}! \n")

chosen_skills = player_type_choice()

# Create player
player = Player(name=player_name,
                hp=[30, 30],
                dmg=[5, 15],
                skills=chosen_skills)

# Play game
while True:
    play_or_stats = input("If you want check your stats type 'stats'. \
Otherwise type 'play'\n>> ")
    if play_or_stats.lower() == "stats":
        player.get_stats()
        print(MONSTERS_DICT)
    elif play_or_stats.lower() == "play":
        event = create_random_event(player, BATTLE_DESCRIPTS, MONSTERS_DICT,
                                    OTHER_EVENTS)
        if not event:
            player.get_stats()
            exit("You won the game!")  # Futureproofing
        event.take_place()