#Asher in
from eventAPI import *
from APIUtils import *

AsherPet1 = 0

def fireEvent(e):
    AsherPet = getTag(e, "AsherPet1")
    if(AsherPet == 5):
        showPicture(e, "Stairs_D")
        if (poseYesNo(e,
            ["You see before you an old rusty door, leading down.",
             "Do you descend?"])):
            tickGame(e, 60)
            setExit(e, "maps/asher3.cfg", 2, 2, 270)
        return 0
    elif(AsherPet == 4):
        if(poseYesNo(e, ["All three lights are now lit, and you see that the altar appears to float now.", "do you inspect it further?"])):
            setTag(e,"AsherPet1", 5)
            showMessage(e, ["The altar glides easily to the side, revealing stairs downward! You'd best collect yourself before proceeding"])
            return 1
    elif(AsherPet == 3):
        showMessage(e, ["Two of the Three lamps are now lit, but the altar shows no sign of change"])
        return 0
    elif(AsherPet == 2):
        showMessage(e, ["One of the Three lamps is list, but the altar shows no sign of change"])
        return 0
    else:
        showMessage(e, ["You see before you a large stone altar, with 3 dark lamps", "The altar appears solid and too heavy to move - however there is an inscription:", "\"Those who would seek further passage must find my favored pet, and consecrate his remains, that I may know he will not turn against his master\""])
        showPicture(e, "rose")
        showMessage(e, ["What blasphemy is this? a cold altar to the horrid gods of death?", "I knew this place was tainted, but this is an affront to all that is holy"])
        showPicture(e, "argent")
        showMessage(e, ["Well, I think you can feel glad knowing we're going to cleanse it, right Rose?"])
        showPicture(e, "rose")
        showMessage(e, ["Oh", "Right.","I won't be able to perform the blessing, while helping Argent maintain his will to keep away the constructs of Asher", 
             "I'd best teach you all the basics of consecration, so that we may rid the world of this desecration and continue our quest"])
        showMessage(e, ["After a small lesson from Rose, you feel you could perform the sanctification ritual in her stead"])
        setTag(e, "AsherPet1", 1)
        return 0

