#Third band of dead adventurers in the Caves
from eventAPI import *
from APIUtils import *
from SDLKeys import *

DKP3 = 0

def fireEvent(e):
    global DKP3
    DKP3 = getTag(e, "DKP3")
    if (DKP3 == 1):
        finished(e)
    else:
        next(e)

def next(e):        
    choice = optionInput(e, ["You come across the remains of a party of adventurers. They seem to have fallen victim to a trap, as their heads are no longer attached to their bodies!", "", "Do you wish to take their belongings?"], ["(Y)es, (N)o"], [SDLK_y, SDLK_n])
    if (choice == SDLK_y):
        loot(e)
    elif (choice == SDLK_n):
        return 0
    else:
        return 0
        
def loot(e):
    setTag(e, "DKP3", 1)
    giveItems(e, ["Enchanted Dagger", "Boomerang"])
    return 0

def finished(e):
    showMessage(e, ["The remains of a party of adventurers lie here. You have already taken everything of value, you thieving bastards!"])
    