Example #1
0
def run(player, setEnemies=None):
    if setEnemies is not None:
        enemies = setEnemies[0]
        wording = setEnemies[1]
    else:
        enemies = [Ghoul()]
        wording = []
        rng = random.randint(1, 100)
        if rng <= 15:
            for i in range(3):
                enemies.append(Ghoul())
            wording = ["horde of ghouls", "ghouls", "they hit"]
        else:
            wording = ["ghoul", "ghoul", "it hits"]
    print("You encountered a {}!".format(wording[0]))
    choice = input("What do you do? [Fight, Run]\n")
    if choice.title() in ["Fight", "F"]:
        print("You engage the {} in combat!".format(wording[1]))
        baseM.runBasicFight(player, enemies)
    elif choice.title() in ["Run", "Flee", "R"]:
        print("As you fearfully flee the angry {}, {} you, dealing {} damage.".
              format(wording[1], wording[2], 7 * len(enemies)))
        player.health -= 7 * len(enemies)
    else:
        baseM.checkCommands(choice, player)
        run(player, (enemies, wording))
    return player
Example #2
0
def run(player):
    print("You encounter a thicket of vines preventing you from proceeding. What do you do?")
    choice = input("[Push Through, Cut Vines, Go Back]")
    if choice.title() in ["Push", "Push Through", "Through", "P"]:
        print("You push through the vines to the other side. Unfortunately, you realize that the vines were actually poisonous.")
        tx = curseScript.toxins()
        tx.severity = 3
        player.curses.append(tx)
    elif choice.title() in ["Cut", "Vines", "Cut Vines", "C"]:
        if baseM.hasWeapon(player):
            print("As you carefully cut the vines you start to feel the ground move beneath you.")
            print("You leap back onto solid ground as the giant green creature rises before you.")
            print("The creature turns to you and massive, moss-covered arms move toward you.")
            print("The enormous creature stands before you, and it looks like it's preparing to attack...")
            baseM.runBasicFight(player, [MossyGoober()], playerFirst = True)
        else:
            print("Without a proper weapon, you are unable to cut the vines.")
            run(player)
    elif choice.title() in ["Go Back", "Go", "Back", "G"]:
        print("You turn away from the vines only to find more vines blocking the entrance from which you came..")
        print("Or was it? As you look around, vines cover every wall and stretch in front of the many doorways into and out of this room.")
        print("Confused and dizzy, you sit down on the ground to reconsider your options.")
        player.curses.append(curseScript.madness())
    else:
        baseM.checkCommands(choice,player)
        run(player)
    return player
def fight(player, tf, first):
    if tf == True:
        jabber = jabberwocky()
        if first == False:
            print(
                """As you get nearer to the wabe, The dreadful burbling gets louder and louder...
It's right behind you!
you spin around to find the Jabberwocky blocking your escape!
""")
        else:
            print(
                "You ready your weapons, as the ferocious Jabberwocky bursts from the underbrush."
            )
        vb = baseM.getItem("Vorpal Blade", player)
        if vb is not None:
            vb.damage = 1000
            print("The Vorpal Blade suddenly hums and glows with energy!")
        baseM.runBasicFight(player, [jabber], 0, first)
        if player.alive:
            print(
                "You hath slain the Jabberwock! O Frabjous Joy! Callooh! Callay!"
            )
        if vb is not None:
            vb.damage = 15
            print("The power dissipates as quickly as it came...")
    else:
        print("You ready your weapons, but nothing came...")
Example #4
0
def run(player):
    print("You enter a seemingly empty room. [continue]")
    print("As you walk further in, you begin to feel dizzy.[continue]")
    print("You see two doors at the end of the room.[continue]")
    print("What do you do?")
    while True:
        choice = input("[Go through left door, Go through right door, Leave]")
        if choice.lower() in ["left", "left door", "go through left door"]:
            print(
                "You start towards the left door when suddenly, your body moves toward the right door. [continue]"
            )
            print(
                "You struggle to take control but it is too late. [continue]")
            print(
                "You enter the right door which reveals a golden goblet with a strange glowing liquid. [continue]"
            )
            while True:
                print("What do you do?")
                choice = input("[Drink the liquid, Leave]")
                if choice.lower() in ["drink", "liquid", "drink the liquid"]:
                    print(
                        "You drink the liquid and feel refreshed. You regain 30 health"
                    )
                    pScript.heal(player, 30)
                    break
                elif choice.lower() in ["leave"]:
                    print("You leave the room dumbfounded but unscathed")
                    break
                else:
                    baseM.checkCommands(choice, player)
            break
        elif choice.lower() in [
                "right", "right door", "go through right door"
        ]:
            print(
                "You start towards the right door when suddenly, your body moves toward the left door. [continue]"
            )
            print(
                "You struggle to take control but it is too late. [continue]")
            print(
                "You enter the left door which reveals a statue with red glowing eyes. [continue]"
            )
            print("Suddenly the statue begins to move")
            baseM.runBasicFight(player, [Gargoyle()])
            break
        elif choice.lower() in ["leave"]:
            print(
                "As you leave the room, your headache disappears. [continue]")
            break
        else:
            baseM.checkCommands(choice, player)
    return player
def run(player):
    t = timeEater()
    if len(player.items) > 50:
        t.baseDamage = math.ceil(len(player.items) / 3)
    t.baseDamage *= player.timeClimbing
    print(
        "You walk into a large spacious room. There are clocks all over the walls, each with a different name on it."
    )
    print(
        "As you continue walking you see your name. Suddenly, the clock starts to grow, and the hands reach out toward you."
    )
    baseM.runBasicFight(player, [t])
    return player
Example #6
0
def run(player):
    print("A golden idol stands in the middle of the hallway")
    print("Hack pieces off or touch the idol?")
    choice = input("[hack pieces, touch idol]")
    thisIdol = Idol()
    while True:
        if choice.lower() in ["hack pieces", "hack", "h"]:
            baseM.runBasicFight(player, [thisIdol], 0, True, 5)
            print("You broke " + str(round((1000 - thisIdol.health()) / 2)) +
                  " worth of gold fragments off the idol!")
            player.gold += round((1000 - thisIdol.health()) / 2)
            return player
        elif choice.lower() in ["touch idol", "touch", "t"]:
            print("The idol shrinks in size until it can fit in your backpack")
            player.items.append(itemStats.idol())
            return player
        else:
            baseM.checkCommands(choice, player)
def run(player):
    enemies = [random.choice([Grenlim(), Snak(), Sorcerer()])]
    print("You encountered a {}!".format(enemies[0].type))
    choice = input("What do you do? [Fight, Run]\n")
    if choice.title() in ["Fight", "F", "Attack"]:
        print("You engage the {} in combat!".format(enemies[0].type))
        baseM.runBasicFight(player, enemies)
    elif choice.title() in ["Flee", "Run", "R"]:
        print("You run away from the {} and it deals {} damage to you.".format(
            enemies[0].type, enemies[0].baseDamage))
        if type(enemies[0]) == Snak:
            print("The Snak envenomated you with its attack!")
            player.curses.append(toxins())
        player.health -= enemies[0].baseDamage
    else:
        baseM.checkCommands(choice, player)
        run(player)
    return player
def run(player):
    print("You encountered a Zombo-man!")
    enemies = [Zomboman()]
    for itm in player.items:
        if itm.name == "Zomboman Guts":
            enemies.append(Zomboman())
    choice = input("What do you do? [Fight, Run]\n")
    if choice.title() in ["Fight", "F"]:
        print("You engage the Zombo-man in combat!")
        baseM.runBasicFight(player, enemies)
    elif choice.title() in ["Run", "Flee", "R"]:
        print(
            "As you fearfully flee the angry Zombo-man, it punches you, dealing 1 damage."
        )
        player.health -= 1
    else:
        baseM.checkCommands(choice, player)
        run(player)
    return player
def run(player):
    print("""A gnarled tree trunk protrudes from the cracked tile of the floor.
Sticking from the top of the tree trunk is a sword of dark grey steel
How would you wish to proceed?
Press 1 to take the sword
Press 2 to leave""")
    while True:
        choice = input()
        if choice == "1":
            print("""You yank hard on the sword, trying to dislodge it.
To your surprise, the floor begins to rumble and the tree trunk begins to rise.
You realize that the tree trunk is actually the head of a massive bog giant!"""
                  )
            baseM.runBasicFight(player, [BogGiant()], 0, True)
            return player
        elif choice == "2":
            print("You suspect a trap, so you leave the sword untouched.")
            return player
        else:
            print("Sorry, that is not one of your options")
Example #10
0
def run(player):
    # runs the room
    print(
        "You enter a room and see a bluish-purple heart floating in the middle..."
    )
    choice = input("What do you do? [Attack, Ignore, Run]\n")
    if choice.title() in ["Attack", "A", "Atk"]:
        print(
            "You prepare to attack the heart. It bleeds but is ultimately unharmed."
        )
        print(
            "The heart suddenly attacks you back! You try to defend but your best efforts seem in vain..."
        )
        baseM.runBasicFight(player, [Heart()])
        if player.alive:
            input(
                "As the heart falls, you notice a bluish-purple liquid in your bag. [Continue]"
            )
    elif choice.title() in ["Ignore", "I"]:
        ignore(player)
    elif choice.title() in ["Run", "R"]:
        print(
            "You flee the room as fast as your legs can take you. Looking back, you see the heart slowly moving toward you..."
        )
        input(
            "The heart starts to drain your health and your consciousness starts to fade....[Continue]"
        )
        print(
            "Suddenly, you see an open doorway above you! You grab the ledge and pull yourself out of the room gravely injured, but ultimately alive."
        )
        dmg = player.health - 1
        player.health = 1
        sel = input(
            "You take {} damage as you escape...[Continue]".format(dmg))
    else:
        baseM.checkCommands(choice, player)
        run(player)
    return player
def run(player):
    x = Collector()
    print("""Opening the door, you peer cautiously into the room.
A hooded figure with three swords strapped to his back stands at its center.

""")
    while True:
        response0 = console.getInput(player, ["1"], "Press 1 to continue")
        if response0.lower() == "1":
            break
    print(""" The head swivels smoothly toward you, and a hollow voice says,

"Choose your death, or choose your glory
Blood and steel will write your story
If you fear a gruesome end
My farmer's blade will give and bend
Should you desire jewels and gold
My blade of kings is yours to hold
But if you fear not war or strife
My hero's blade will take your life

Choose wisely, adventurer. The blade I wield will be your reward should you best me."
Press 1 to choose the peasant's blade
Press 2 to choose the king's blade
Press 3 to choose the hero's blade (don't do it)
""")
    for objects in player.items:
        x.baseDamage += 2
        x.health += 30
        x.maxHp += 30
    enemylist = [x]
    while True:
        response = console.getInput(player, ["1", "2", "3"],
                                    "Make your choice")
        if response.lower() == "1":
            x.baseDamage += 2
            x.loot = [("Gold", random.randint(100, 120)), peasantsBlade()]
            baseM.runBasicFight(player, enemylist, 0, True)
            return player
        if response.lower() == "2":
            x.baseDamage += 8
            x.loot = [("Gold", random.randint(250, 300)), kingsBlade()]
            baseM.runBasicFight(player, enemylist, 0, True)
            return player
        if response.lower() == "3":
            x.baseDamage += 40
            x.loot = [("Gold", random.randint(120, 150)), herosBlade()]
            baseM.runBasicFight(player, enemylist, 0, True)
            return player
def run(player):
    you = Yourself()
    you.baseDamage += baseM.modifyPlayerEffects("atk", player)
    you.health = player.health * 3
    you.maxHp = player.health * 3
    baseM.runBasicFight(player, [you], 0, True)
Example #13
0
def run(player):
    print("A raging, drooling Ohgur charges at you!")
    baseM.runBasicFight(player, [Senior()], 0, True)
    return player
Example #14
0
def run(player):
    print("A snarling, scrawny goblin leaps out of the darkness!")
    baseM.runBasicFight(player, [Junior()], playerFirst=True)
    return player