from eventAPI import getTag, showPicture, optionInput, giveItems, setTag
from SDLKeys import SDLK_t, SDLK_w, SDLK_SPACE

def fireEvent(eventPtr):
    lFlagU = getTag(eventPtr, "lFlagU")
    if (lFlagU == 0xFFFFFFFF):
        return 1
    choice = optionInput(eventPtr,
                         ["A breeze like Spring's first love whistles easy...",
                          "You feel a breath of invigorating
			   of your hand."],
                         ["(T)ake the leaf", "(W)alk away"],
                         [SDLK_t, SDLK_w])
    if (choice == SDLK_t):
        optionInput(eventPtr,
                    ["You gently wrap the leaf into your pack
		     and then decide you might want to inspect it... 
		     there appears to me some design on the leaf face."],
                    ["(SPACE) to Continue"],
                    [SDLK_SPACE])
        giveItems(eventPtr, ["Fallen Leaf"])
        setTag(eventPtr, "lFlagU", 0xFFFFFFFF)
    return 1
