#Asher in
from eventAPI import *
from APIUtils import *

AsherStat1 = 0

def fireEvent(e):
    AsherStat = getTag(e, "AsherStat1")

    if(AsherStat == 0):
        showMessage(e, ["You come across a large statue of a beautiful, but sad looking, woman."])
        showMessage(e, ["After admiring the amazing craftwork of the statue, you take your leave."])
    elif(AsherStat == 2):
        showMessage(e, ["The statue is no longer here, best be on your way."])
    else:
        showMessage(e, ["Standing before the statue of a beautiful woman, you know that your strength must see you through"])
        showPicture(e, "rose")
        showMessage(e, ["I don't like this at all, I can feel the evil contained in this statue"])
        if(poseYesNo(e, ["Will you attempt to destroy the statue?"])):
            fightStatue(e)
        else:
            showMessage(e, ["Turning to leave, you swear you can feel someone looking at you"])

    return 0

def fightStatue(e):
    showMessage(e, ["As one of your number unsheathes their weapon, the statue comes alive", "Really, didn't you see this one coming?"])
    combatRet = combat(e, [("Vampiress", 1, 0, 40)])
    if (combatRet == 1):
        wonStatueFight(e)
    elif (combatRet == 3):
        lostStatueFight(e)
    else:
        defeatedStatueFight(e)

def wonStatueFight(e):
    showMessage(e, ["The unholy screams of the vampiress fade, and you can smile knowing that you are closing in on Asher"])
    showMessage(e, ["In the central room behind you, you hear a loud click, and the sound of stone grinding"])
    showPicture(e, "argent")
    showMessage(e, ["THE MASTER CALLS"])
    showMessage(e, ["Argent begins to run away to the central room, the hourglass in his hand is pulsing with an unholy light"])
    showPicture(e, "rose")
    showMessage(e, ["ARGENT!, come back here!"])
    showMessage(e, ["Rose runs after him, you feel it best to pursue as quickly as possible"])
    setTag(e, "AsherStat1", 2)

def lostStatueFight(e):
    showMesasge(e,
        ["Your last memory is that of cold breath on your neck"])

def defeatedStatueFight(e):
    showMessage(e,
        ["As you run away, you notice you're not pursued, turning round, you see the statue has returned to its former state"])
 
