<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Quest SName="electricity" RName="electricity" LName="electricity">
  <ScaleEffect X="970" Y="300" Effect="1" StartScale="0" />

  <MoveX>
    <PosBegin Value="-100" />
    <Type Value="SIN" />
    <Delay Value="0" />
    <IsRandom Value="0" />
    <IsResetCycle Value="0" />
    <Params A="100" B="360" F="90"/>
    <TimeFunction Timer="0" Loop="1" MaxCount="0" K="1" B="0" />
  </MoveX>
  <MoveY>
    <PosBegin Value="0" />
    <Type Value="SIN" />
    <Delay Value="0" />
    <IsRandom Value="0" />
    <IsResetCycle Value="0" />
    <Params A="100" B="360" F="0"/>
    <TimeFunction Timer="0" Loop="1" MaxCount="0" K="1" B="0" />
  </MoveY>
  <MoveS>
    <PosBegin Value="1" />
    <Type Value="LINEAR" />
    <Delay Value="0" />
    <IsRandom Value="0" />
    <IsResetCycle Value="0" />
    <Params A="0" V="0.5" B="0"/>
    <TimeFunction Timer="0" Loop="1" MaxCount="0" K="1" B="0" />
  </MoveS>
  <Tasks>
    <Task Type="REQUEST_TASKS" NameOfRequest="MiniQuestEnter" />
    <Task Type="ADD_MARK" Key="Global" Name="LastMiniQuest" Value="electricity" Mode="String"/>
  </Tasks>
  <Decorations>
    <Decoration>
      <Id Name="background" Order="1" SubId="1" />
      <Visible Value="1" />
      <Type Value="ANIM_MACHINE" />
      <MoveX>
        <Type Value="STATIC" />
        <PosBegin Value="207" />
      </MoveX>
      <MoveY>
        <Type Value="STATIC" />
        <PosBegin Value="10" />
      </MoveY>
      <AnimMachine BeginStep="background" EndStep="background">
        <Steps>
          <Step Key="default" Name="background" Delay="0" NameStep="background" />
        </Steps>
      </AnimMachine>
    </Decoration>
  </Decorations>
  <RequestTasks>

    <RequestTask Name="QuestOnBegin">
      <Condition>
        <Var Key="electricity" Name="State" Value="0" />
      </Condition>
      <Tasks>
        <Task Type="ADD_MARK" Param1="electricity" Param2="State" Param3="2" />
      </Tasks>
    </RequestTask>

    <RequestTask Name="GameOnBegin">
      <Condition>
        <Var Key="electricity" Name="State" Value="2" />
      </Condition>
      <Tasks>
      </Tasks>
    </RequestTask>

    <RequestTask Name="GameOnWinOrPass">
      <Condition>
        <Var Key="electricity" Name="State" Value="3" />
      </Condition>
      <Tasks>
        <Task Type="REQUEST_TASKS" NameOfRequest="manual_hide" />
        <Task Type="SET_SOUND" Mode="Replay" Name="gong.ogg" />
        <Task Type="ADD_MARK" Param1="sluice_chamber" Param2="electricity_game_state" Param3="2" />
        <Task Type="EMULATE_HINT" Action="UsrEvt" Name="electricity_win"/>
        <Task Type="QUEUE" Mode="begin" Name="electricity" />
        <Task Type="DELAY" Delay="2500" />
        <Task Type="ADD_MARK" Param1="electricity" Param2="State" Param3="4" />
        <Task Type="QUEUE" Mode="end" />
      </Tasks>
    </RequestTask>

    <RequestTask Name="GameOnLose">
      <Condition>
        <Var Key="no" Name="no" Value="0" />
      </Condition>
      <Tasks>
        <Task Type="REQUEST_TASKS" NameOfRequest="close" />
      </Tasks>
    </RequestTask>

    <RequestTask Name="GameOnCancel">
      <Condition>
        <Var Key="no" Name="no" Value="0" />
      </Condition>
      <Tasks>
        <Task Type="REQUEST_TASKS" NameOfRequest="close" />
      </Tasks>
    </RequestTask>

    <RequestTask Name="QuestOnEnd">
      <Condition>
        <Var Key="electricity" Name="State" Value="4" />
      </Condition>
      <Tasks>
        <Task Type="REQUEST_TASKS" NameOfRequest="close" />
      </Tasks>
    </RequestTask>
    <RequestTask Name="manual_show">
      <Condition>
        <Var Key="no" Name="no" Value="0" />
      </Condition>
      <Tasks>
        <Task Type="SET_ANIMATIONTOOL" ResName="electricity" AKey="default" AName="manual" CtrlName="manual" RX="512" RY="309" SX="207" SY="10" SW="610" SH="610" RequestName="manual_hide" Angle="0" IsFlickr="0"/>
      </Tasks>
    </RequestTask>
  </RequestTasks>
</Quest>
