Beispiel #1
0
def create_player(mode, race, char_name):
    """ Create the player's character """
    if mode == 2:
        if race == 1:
            player = character.Goblin(char_name, app)
        elif race == 2:
            player = character.Orc(char_name, app)
        elif race == 3:
            player = character.Uruk(char_name, app)
        elif race == 4:
            player = character.Wizard(char_name, app)
        else:
            player = character.Haradrim(char_name, app)
    else:
        if race == 1:
            player = character.Elf(char_name, app)
        elif race == 2:
            player = character.Dwarf(char_name, app)
        elif race == 3:
            player = character.Human(char_name, app)
        elif race == 4:
            player = character.Hobbit(char_name, app)
        elif race == 5:
            player = character.Wizard(char_name, app)
        elif race == 6:
            player = character.Dunedain(char_name, app)
        elif race == 7:
            player = character.Crusader(char_name, app)
    return player  #Tells you your name & race e.g. "Gimli the Dwarf"
Beispiel #2
0
def create_enemies(mode, difficulty):
    """ Create the enemies """
    roll = random.randint(0, 2)
    if mode == 2:
        if difficulty == 'm':
            enemies = [character.Hobbit("Peregrin", app), character.Hobbit("Meriadoc", app),
                       character.Human("Eowyn", app)]
        elif difficulty == 'h':
            enemies = [character.Dwarf("Gimli", app), character.Elf("Legolas", app), character.Human("Boromir", app)]
        elif difficulty == 'l':
            enemies = [character.Human("Faramir", app), character.Human("Aragorn", app),
                       character.Wizard("Gandalf", app)]
        elif difficulty == 'un':
            enemies = [character.Elf("Galadriel", app), character.Human("Treebeard", app), character.Uruk("Beorn", app)]
        elif difficulty == 'b':
            enemies = [character.Hobbit("Bilbo", app)]
        else:
            enemies = [character.Hobbit("Frodo", app), character.Hobbit("Sam", app)]

    else:
        if difficulty == 'm':
            enemies = [character.Goblin("Azog", app), character.Goblin("Gorkil", app), character.Orc("Sharku", app)]
        elif difficulty == 'h':
            enemies = [character.Orc("Shagrat", app), character.Orc("Gorbag", app), character.Uruk("Lurtz", app)]
        elif difficulty == 'l':
            enemies = [character.Orc("Grishnakh", app), character.Uruk("Lurtz", app), character.Wizard("Saruman", app)]
        elif difficulty == 'un':
            if roll == 0:
                enemies = [character.Nazgul("Witch-king of Angmar", app)]
            elif roll == 1:
                enemies = [character.Dragon("Smaug", app)]
            elif roll == 2:
                enemies = [character.Spider("Shelob", app)]
        elif difficulty == 'b':
            enemies = [character.Human("Grima", app)]
        else:
            enemies = [character.Goblin("Azog", app), character.Goblin("Gorkil", app)]

    return enemies
Beispiel #3
0
def create_enemies(mode, difficulty):
    """ Create the enemies """
    #Whaterver side player is choosing, they still end up facing the same types of monsters
    global map_level
    if mode == 2:  # Evil Mode - good enemies
        if difficulty == 'm':
            enemies = [
                character.Hobbit("Peregrin", 1, app),
                character.Hobbit("Meriadoc", 1, app),
                character.Human("Eowyn", 1, app)
            ]
        elif difficulty == 'h':
            enemies = [
                character.Dwarf("Gimli", 1, app),
                character.Elf("Legolas", 1, app),
                character.Human("Boromir", 1, app)
            ]
        elif difficulty == 'l':
            enemies = [
                character.Human("Sianas", 1, app),
                character.Human("Altern", 1, app),
                character.Wizard("Niapa", 1, app)
            ]
        elif difficulty == "b":
            return menu()
        else:
            enemies = [
                character.Hobbit("Frodo", 1, app),
                character.Hobbit("Sam", 1, app)
            ]

    else:  # Good Mode - evil enemies
        common, uncommon, rare, boss = read_map_level()
        if difficulty == 'm':
            enemies = [
                character.Mobs(common, map_level + random.randint(0, 5), app),
                character.Mobs(common, map_level + random.randint(0, 5), app),
                character.Mobs(uncommon, 1, app)
            ]
        elif difficulty == 'h':
            enemies = [
                character.Mobs(uncommon, map_level + random.randint(1, 6),
                               app),
                character.Mobs(uncommon,
                               map_level + map_level + random.randint(1, 6),
                               app),
                character.Mobs(uncommon,
                               map_level + map_level + random.randint(0, 4),
                               app)
            ]
        elif difficulty == 'l':
            enemies = [
                character.Mega(rare,
                               map_level + map_level + random.randint(0, 5),
                               app),
                character.Mega(rare, map_level + random.randint(0, 5), app),
                character.Mega(rare,
                               map_level + map_level + random.randint(0, 4),
                               app)
            ]
        elif difficulty == 's':
            enemies = [
                character.Dragon(boss, map_level + 1, app),
                character.Dragon(boss, map_level + 1, app)
            ]
        elif difficulty == 'b':
            return menu()
        else:
            enemies = [
                character.Mobs(common, map_level, app),
                character.Mobs(common, map_level, app)
            ]

    return enemies