Exemple #1
0
def destree(player, timesHit = 0):
    if baseM.hasWeapon(player):
        input("You ready your weapons...")
        if timesHit == 0:
            print("\"CLANG!!!\"")
            choice = input("Leaves start raining down. However, you hear the faint sound of footsteps.. [Hit Again, Collect Leaves, Leave]")
        elif timesHit == 1:
            print("\"CLANG!!\" The shock and recoil from the tree shoots up your arms.")
            choice = input("More leaves rain down. The sound of footsteps grows louder.. [Hit Again, Collect Leaves, Leave]")
        elif timesHit == 2:
            print("\"CLANG!\" More pain shoots up your arms and you stagger back.")
            choice = input("The ground is almost covered in golden leaves. You no longer hear any footsteps. [Hit Again, Collect Leaves, Leave]")
        elif timesHit == 3:
            choice = input("\"CLANG\" You stagger back and fall down. [Hit Again, Collect Leaves, Leave]")
        elif timesHit == 4:
            print("\"clang...\" You feel weak and exhausted. You collapse onto a pile of golden leaves.")
            choice = input("[Collect Leaves, Leave]")
        if choice.title() in ["Hit", "Again", "H", "Hit Again"]:
            timesHit += 1
            destree(player, timesHit)
        elif choice.title() in ["Collect", "Leaves", "C", "Collect Leaves"]:
            input("You quickly gather up all the leaves on the ground and leave the room. [Continue]")
            pScript.earnGold(player, 17*(timesHit+1))
        elif choice.title() in ["Leave", "L"]:
            input("You leave the room wondering how much the golden leaves were really worth. [Continue]")
        else:
            baseM.checkCommands(choice, player)
            destree(player, timesHit)
    else:
        print("You punch the tree as hard as you can. A lone leaf falls down, and your hand hurts.")
        pScript.damage(player, 3)
        print("You pick up the leaf and leave the room.")
        pScript.earnGold(player, 2)
    return player
def crossbridge(player):
    global stupidswordvar, lavadamage
    print ("""You carefully make your way across the bridge.
Despite the spiderweb cracks in its base, the bridge seems to be holding up fine.
Being this close to the lava is taking its toll on you, though. You take """+str(lavadamage)+" damage")
    pScript.damage(player,lavadamage)
    lavadamage+=1
def vegetate(player):
    global stupidswordvar, lavadamage
    print ("""The heat of the lava is overpowering, and going closer to the bridge or the shrine would probably roast you alive.
Unfortunately, it's not much better where you're standing. You take """+str(lavadamage)+" damage from the lava's heat")
    pScript.damage(player,lavadamage)
    lavadamage+=1
    print("""You reconsider your options. Both the shrine and the bridge still seem extremely unnappealing
How would you wish to proceed?
Press 1 to cross the bridge
Press 2 to approach the shrine
Press 3 to cower away from the heat""")
def shrine(player, swordOfStupidity):
    global stupidswordvar, lavadamage
    print ("""The shrine is on the far side of the cavern, and it feels like hours as you slog through the blistering heat.
You take """+str(lavadamage)+" damage from the heat")
    pScript.damage(player,lavadamage)
    lavadamage+=1
    print ("""You look back at the bridge. It still seems close enough to cross easily, and it's only getting hotter as you near the shrine.
Will you turn back?
Press 1 to continue to the shrine
Press 2 to turn back and cross the bridge""")
    while True:
        response1 = console.getInput(player, ["1", "2"], "Make your choice")
        if response1.lower() == "1":
            print ("As you approach the shrine,you notice that it appears to have been chiseled out of a solid block of obsidian.")
            print ("A huge sword is planted in the otherwise smooth obsidian near the edge of the lava.")
            print ("Since the entire shrine is made out of black rock, it radiates intense heat as you approach.")
            print ("Or maybe it's just because you're so close to the lava. Regardless, you take "+str(lavadamage)+" damage from the heat")
            pScript.damage(player,lavadamage)
            lavadamage+=1
            print ("As you stumble toward the shrine, you see an opening in the cavern wall behind it. Safety!")
            print ("But then you hesitate, looking back at the unclaimed sword. It would be a shame to just leave it there...")
            print ("Press 1 to go back for the sword")
            print ("Press 2 to head for the exit")
            while True:
                response2 = console.getInput(player, ["1", "2"], "Make your choice")
                if response2.lower() == "1":
                    print ("Feeling the heat of the lava singeing your hair and eyes, you stagger up to the sword")
                    print ("Etched into the glassy stone reads the inscription: SWORD OF STUPIDITY-A WEAPON TO EMPOWER THE IRRATIONAL AND FOOLHARDY")
                    print ("You yank the sword from its stone sheath and instantly feel the heat drain from your body into the sword.")
                    pScript.addItem(player,swordOfStupidity)
                    stupidswordvar = 3*lavadamage
                    swordOfStupidity.damage = stupidswordvar
                    print ("Your Sword of stupidity has "+str(swordOfStupidity.damage)+" strength")
                    #Sword of Stupidity is meant to increase your attack damage by the value of stupidswordvar
                    print ("Feeling empowered, you stride confidently to the exit")
                    return player
                if response2.lower() == "2":
                    print ("You stagger into the blessedly cool tunnel, and continue on your way without looking back.")
                    return player
        if response1.lower() == "2":
            crossbridge(player)   
            return player
Exemple #5
0
def run(player):
    print("At the center of the room lies a large golden tree. The branches look sharp and irregular..")
    print("You approach the tree. Your urge to steal the golden leaves is almost irresistible...")
    choice = input("[Steal Leaves, Break Branches, Destroy Tree, Wait, Leave]")
    if choice.title() in ["Steal", "Rob", "Leaves", "Leaf", "S", "Steal Leaves"]:
        stealLeaves(player)
    elif choice.title() in ["Break", "Branches", "Branch", "Brk", "B", "Break Branches"]:
        print("You break off a branch of the tree. It's a lot heavier than you expected, and its irregular, sharp edges cut you.")
        pScript.earnGold(player, 163)
        pScript.damage(player, 30)
    elif choice.title() in ["Destroy", "Tree", "D", "Destroy Tree"]:
        destree(player)
    elif choice.title() in ["Wait", "Stay", "Stand", "W"]:
        wait(player)
    elif choice.title() in ["Leave", "L"]:
        input("You leave the room, not wanting to be greedy. [Continue]")
    else:
        baseM.checkCommands(choice, player)
        run(player)
    return player