<xml>
	<sequences>
		<Blend id="default" param="movement">
			<Switch id="idle" param="position">
				<Switch id="stand" param="state">
					<Switch id="idle" param="superstate" fading="1.5">
						<Blend id="idle" param="mood">
							<Sequence id="male" source="stand_idle_straight" rate="1.5" />
							<Sequence id="sleepy" source="stand_idle_sleepy" emotion="sad" />
							<Sequence id="tired" source="stand_idle_tired" />
						</Blend>
						<Sequence id="talk" source="stand_talk" emotion="talk" />
					</Switch>
					<Sequence id="sleeping" source="stand_idle_sleepy" emotion="blinka" />
					<Sequence id="[dream,think,table,clap,whisper,lookaround]" source="stand_*" />
					<Sequence id="[bar,bar_back]" source="stand_*" flags="nooverride" />
					<Sequence id="sleep" source="stand_sleep" emotion="blinka" />
					<Sequence id="happy" source="stand_jump" emotion="excited" />
					<Sequence id="laugh" source="stand_laugh" emotion="pleased" />
					<Sequence id="write" source="stand_write">
						<Prop bone="MoogleLArmPalm" source="models/items/pencil.model" />
						<Prop bone="MoogleRArmPalm" source="models/items/paper.model" />
					</Sequence>
					<Sequence id="mixdrinks" source="stand_mixdrinks">
						<Prop bone="BottleSource" source="models/items/bottle.model" material="textures/bottles/bottle_0" />
						<Prop bone="BottleTarget" source="models/items/bottle.model" material="textures/bottles/bottle_1" />
					</Sequence>
					<Sequence id="clean" source="stand_clean" flags="nooverride">
						<Prop bone="Dummy01" source="models/items/rag.model" />
					</Sequence>
					<Sequence id="throw" source="stand_throw" flags="0">
						<Action frame="29" callback="Throw" />
						<Action frame="29" callback="HideProps" />
						<Prop bone="MoogleProp" source="models/items/bottle.model" />
					</Sequence>
					<Sequence id="talk" source="stand_talk" emotion="talk" />
					<Playable id="[nod,slapa,givea,giveb,lookaround]" source="stand_*" />
					<Playable id="kick_ground" source="stand_kick_ground" fadein="1.5" emotion="angry">
						<Action frame="12" callback="OnHitFloor" />
						<Effect frame="12" effect="shockwave_big" particles="Effect_KickGround" bone="BerserkHitStand01" />
					</Playable>
					<Playable id="wakeup" source="stand_wakeup" fadein="0.25" emotion="blinka">
						<Emotion frame="1" emotion="sad" />
					</Playable>
					<Playable id="take" source="stand_take" fadein="0.5">
						<Action frame="12" callback="Take" />
					</Playable>
					<Playable id="fall" source="stand_fall" fadein="0.25" emotion="sad">
						<Action frame="4" callback="Fall" />
						<Action frame="6" callback="FallenOnGround" />
					</Playable>
					<Playable id="slapb" source="stand_slapb">
						<Emotion frame="6" emotion="pain" />
						<Emotion frame="27" emotion="blank" />
						<OldEffect frame="12" effect="head_stars" time="1" />
					</Playable>
					<Playable id="throw" source="stand_throw" flags="0">
						<Action frame="29" callback="Throw" />
						<Action frame="29" callback="HideProps" />
						<Prop bone="MoogleProp" source="models/items/bottle.model" />
					</Playable>
				</Switch>
				<Switch id="sit" param="state">
					<Switch id="idle" param="superstate">
						<Sequence id="idle" source="sit_idle" />
						<Sequence id="talk" source="sit_talk" />
					</Switch>
					<Switch id="look_over" param="superstate">
						<Sequence id="idle" source="sit_look_over" />
						<Sequence id="talk" source="sit_talk_over" />
					</Switch>
					<Sequence id="[read,menu]" source="sit_read">
						<Prop bone="MoogleProp" source="models/items/menu.model" />
					</Sequence>
					<Sequence id="cards" source="sit_cards">
						<Prop bone="MoogleProp" source="models/items/cards.model" />
					</Sequence>
					<Sequence id="laugh" source="sit_laugh" emotion="pleased" />
					<Sequence id="ready_[left,right]" source="sit_ready_*" />
					<Sequence id="sad_[left,right]" source="sit_ready_*" emotion="sad" />
					<Sequence id="happy_[left,right]" source="sit_happy_*" emotion="pleased" />
					<Switch id="drink_[0,1,2]" param="superstate" flags="nooverride">
						<Sequence id="idle" source="sit_drink" />
						<Sequence id="talk" source="sit_drink_talk" />
						<Prop bone="MoogleProp" source="models/items/bottle.model" material="textures/bottles/bottle_*" />
					</Switch>
					<Switch id="bottle_[0,1,2]" param="superstate" flags="nooverride">
						<Sequence id="idle" source="sit_bottle" />
						<Sequence id="talk" source="sit_drink_talk" />
						<Prop bone="MoogleProp" source="models/items/bottle.model" material="textures/bottles/bottle_*" />
					</Switch>
					<Sequence id="negative" source="sit_negative" emotion="sad" />
					<Sequence id="berserk" source="sit_berserk" emotion="angry">
						<Action frame="1" callback="OnHitTable" />
						<Action frame="9" callback="OnHitTable" />
						<Effect frame="1" effect="shockwave" particles="Effect_HitTable" bone="BerserkHit01" />
						<Effect frame="9" effect="shockwave" particles="Effect_HitTable" bone="BerserkHit02" />
					</Sequence>
					<Sequence id="annoyed" source="sit_berserk" emotion="angry" />
					<Playable id="[catch,catch_over]" source="sit_*" flags="0">
						<Action frame="0" callback="HideProps" />
						<Action frame="29" callback="ShowProps" />
						<Prop bone="MoogleProp" source="models/items/bottle.model" />
					</Playable>
				</Switch>
				<Switch id="sofa" param="state">
					<Sequence id="idle" source="sit_sofa_idle" />
				</Switch>
				<Event id="StateStarted" callback="OnPositionSwitched" />
			</Switch>
			<Blend id="running" param="movement">
				<Sequence id="starting" source="stand_run_start" flags="0">
					<Action frame="1"  callback="OnStep" />
					<Action frame="11" callback="OnStep" />
				</Sequence>
				<Sequence id="stopping" source="stand_run_stop" flags="0">
					<Action frame="1"  callback="OnStep" />
					<Action frame="11" callback="OnStep" />
				</Sequence>
			</Blend>
			<Sequence id="turning" source="stand_walk" />
			<Sequence id="walking" source="stand_walk" />
		</Blend>
		<!-- Optimized customer scheme, for speed -->
		<Blend id="customer" param="movement">
			<Switch id="idle" param="position">
				<Switch id="stand" param="state">
					<Blend id="idle" param="mood">
						<Switch id="ready" param="gender">
							<Sequence id="male" source="stand_idle_male" rate="1.5" />
							<Sequence id="female" source="stand_idle_female" rate="1.5" />
						</Switch>
						<Sequence id="sleepy" source="stand_idle_sleepy" emotion="sad" />
					</Blend>
					<Sequence id="drink" source="stand_drink">
						<Prop bone="MoogleProp" source="models/items/bottle.model" material="textures/bottles/bottle_0" />
					</Sequence>
					<Sequence id="laugh" source="stand_laugh" emotion="pleased" />
					<Sequence id="happy" source="stand_happy" emotion="pleased" />
					<Sequence id="clap" source="stand_clap"  emotion="pleased" />
					<Playable id="nod" source="stand_nod" />
					<Playable id="kick_ground" source="stand_kick_ground" fadein="1.5" emotion="angry">
						<Action frame="12" callback="OnHitFloor" />
						<Effect frame="12" effect="shockwave_big" particles="Effect_KickGround" bone="BerserkHitStand01" />
					</Playable>
				</Switch>
				<Switch id="sit" param="state">
					<Sequence id="idle" source="sit_idle" />
					<Sequence id="read" source="sit_read">
						<Prop bone="MoogleProp" source="models/items/menu.model" />
					</Sequence>
					<Sequence id="ready_[left,right]" source="sit_ready_*" />
					<Sequence id="cards" source="sit_cards">
						<Prop bone="MoogleProp" source="models/items/cards.model" />
					</Sequence>
					<Sequence id="sad_[left,right]" source="sit_ready_*" emotion="sad" />
					<Sequence id="happy_[left,right]" source="sit_happy_*" emotion="pleased" />
					<Switch id="drink_[0,1,2]" param="superstate" flags="nooverride">
						<Sequence id="idle" source="sit_drink" />
						<Sequence id="talk" source="sit_drink_talk" />
						<Prop bone="MoogleProp" source="models/items/bottle.model" material="textures/bottles/bottle_*" />
					</Switch>
					<Sequence id="negative" source="sit_negative" emotion="sad" />
					<Sequence id="berserk" source="sit_berserk" emotion="angry">
						<Action frame="1" callback="OnHitTable" />
						<Action frame="9" callback="OnHitTable" />
						<Effect frame="1" effect="shockwave" particles="Effect_HitTable" bone="BerserkHit01" />
						<Effect frame="9" effect="shockwave" particles="Effect_HitTable" bone="BerserkHit02" />
					</Sequence>
					<Sequence id="annoyed" source="sit_berserk" emotion="angry" />
				</Switch>
				<Sequence id="stand_[left,right,middle]" source="stand_idle_male" />
				<Event id="StateStarted" callback="OnPositionSwitched" />
				<Bridge from_id="stand_left" to_id="sit" source="stand_settle_left" />
				<Bridge from_id="stand_right" to_id="sit" source="stand_settle_right"  />
			</Switch>
			<Blend id="running" param="movement">
				<Sequence id="starting" source="stand_run_start" flags="0">
					<Action frame="1"  callback="OnStep" />
					<Action frame="11" callback="OnStep" />
				</Sequence>
				<Sequence id="stopping" source="stand_run_stop" flags="0">
					<Action frame="1"  callback="OnStep" />
					<Action frame="11" callback="OnStep" />
				</Sequence>
			</Blend>
			<Sequence id="turning" source="stand_walk" />
			<Sequence id="walking" source="stand_walk" />
		</Blend>
	</sequences>
</xml>
