from typing import Optional
import random


def make_monster_name(is_titan: Optional[bool] = False) -> str:
    """
    Generate a normal boss's name

    Parameters
    ----------
    is_titan : bool
        If the boss is a titan

    Returns
    -------
    str
        The name of the boss
    """

    # Boss is a titan
    if is_titan:
        first = ['Rel', 'Raid', 'Ur', 'Pal', 'Su']
        second = ['per', 'foul', 'es', 'idin', 'ipidimus']
        return random.choice(first) + random.choice(second) + " The TITAN"

    # Boss isn't a titan
    first = ['Gar', 'Hel', 'Bar', 'Or', 'Fre', 'Cra', 'Ju', 'Pre', 'Lue', 'Meu', 'Ve', 'Ki', 'Fr', 'Xse', "Har", 'Fai',
             'Ig', 'Tel', 'Ral', 'Gr', 'H']
    second = ['mold', 'gamlo', 'crem', 'ulk', 'opref', 'hold', 'joint', 'opold', 'ulf', 'rep', 'teft', 'dolt', 'fop',
              '', '', ',', ' Ulk', 'O', 'S']
    last = [' The Second', ' II', ' The Powerful', ' The Almighty', ' The Fourth', ' I', ' The Arrogant', ' The Troll',
            ' The Warrior', ' The Guard', ' Underwhelm', ' The Sorcerer', ' The King', ' The Queen', ' The Bard',
            ' The Traveler', ' The Scarred', ' The Lost Man', ' The Lonely', ' The Spider', ' The Giant Spider',
            ' The Elf', ' The Magician', ' The Trickster']
    # Halloween endings
    # last = [" The Ghost", " The Werewolf", " The Grim Reaper", " The Witch", " The Undead", " The Undead",
    # " The Spider", " The Troll", " The Maniac"]
    return random.choice(first) + random.choice(second) + random.choice(last)