#bwmagicmouthred2nd riddle
from eventAPI import *
from APIUtils import *

bwmagicmouthred2nd = 0

def fireEvent(e):
    global bwmagicmouthred2nd
    bwmagicmouthred2nd = getTag(e, "bwmagicmouthred2nd")
    showPicture(e, "bw_magicmouthred2")
    if(not bwmagicmouthred2nd):
    	showPicture(e, "bw_magicmouthred2")
        showMessage(e,
            ["From out of the wall a magic mouth appears. It asks a riddle"])
        answer = stringInput(e,
            ["What can fill up a room, but take no space?"])
        if(answer.lower() != "light"):
            return 0 
        else:
            bwmagicmouthrednd2 = 1
            setTag(e, "bwmagicmouthrednd2", bwmagicmouthrednd2)
            
            
    showPicture(e, "bw_teleporter")
    if (poseYesNo(e,
        ["The floor begins to move in different directions as if pieces in a puzzle. The floor reforms into a teleporter circle",
         "Do you step in the circle?"])):
        tickGame(e, 60)
        setExit(e, "maps/bwquadrant2.cfg", 17, 12, 270)
    return 0
