<?xml version="1.0"?>
<ItemRenderer>
	<Data>
		<Sprite name="s_death" fileName="game/particles_large16.rttex" textureSize="64" frame="0,0" />
		<Sprite name="s_feather" fileName="game/particles12.rttex" textureSize="32" frame="29,4" />
		<Sprite name="s_fog" fileName="game/particles12.rttex" textureSize="32" frame="30,4" />
		<Sprite name="s_projectile" fileName="game/particles12.rttex" textureSize="32" frame="31,4" />
		<Sprite name="s_scythe" fileName="game/player_longhanditem4.rttex" textureSize="64,32" frame="0,10" />
		<VariableMap>
			<Set name="context.pos">1.12e+03,768</Set>
			<Set name="boomerang.Offset">0,-8</Set>
			<Set name="target.pos">912,688</Set>
			<Set name="calculatedPos">1.12e+03,768</Set>
			<Set name="boomerangAngle">24.5</Set>
			<Set name="sittingOffset">0,0,0</Set>
		</VariableMap>
		<Animations>
			<InterpolationVec2Animation name="a_punchStart" variableName="calculatedPos" targetVariableName="target.pos" animTime="500" playOnState="PunchAnim.Start" />
			<InterpolationVec2Animation name="a_punchContinue" variableName="calculatedPos" targetVariableName="target.pos" animTime="30" isLoop="true" playOnState="PunchAnim.Continue" />
			<InterpolationVec2Animation name="a_punchEnd" variableName="calculatedPos" targetVariableName="context.pos" animTime="250" playOnState="PunchAnim.End" />
			<InterpolationVec2Animation name="a_asdfStart" variableName="boomerang.Offset" targetValue="0,0" animTime="500" playOnState="PunchAnim.Start" />
			<InterpolationVec2Animation name="a_dfyjrtEnd" variableName="boomerang.Offset" targetValue="0,-8" animTime="250" playOnState="PunchAnim.End" />
			<CurveAnimationFloat name="a_boomerangRotationRight" playOnState="PunchAnim.Start|PunchAnim.Continue|PunchAnim.End" isLoop="true" useFacing="RIGHT" animTime="250">
				<Curve name="boomerangAngle">
					<KeyFrame>0, 0</KeyFrame>
					<KeyFrame>1, 360</KeyFrame>
				</Curve>
			</CurveAnimationFloat>
			<CurveAnimationFloat name="a_boomerangRotationLeft" playOnState="PunchAnim.Start|PunchAnim.Continue|PunchAnim.End" isLoop="true" useFacing="LEFT" animTime="250">
				<Curve name="boomerangAngle">
					<KeyFrame>0, 0</KeyFrame>
					<KeyFrame>1, -360</KeyFrame>
				</Curve>
			</CurveAnimationFloat>
			<SpriteAnimation name="a_death" sprite="s_death" animTime="800" playOnState="IsDying.True">
				<Frame>0,0</Frame>
				<Frame>1,0</Frame>
				<Frame>2,0</Frame>
				<Frame>3,0</Frame>
				<Frame>4,0</Frame>
				<Frame>5,0</Frame>
				<Frame>6,0</Frame>
				<Frame>7,0</Frame>
				<Frame>15,0</Frame>
			</SpriteAnimation>
		</Animations>
		<StateMachines>
			<StateMachine name="Motion">
				<States>
					<State name="Idle" />
					<State name="Moving" />
				</States>
				<Transitions>
					<Transition to="Idle" from="Moving">
						<Condition>
							<IsVariableFloat name="speed.length" operator="Less" abs="true">0.1</IsVariableFloat>
						</Condition>
					</Transition>
					<Transition to="Moving" from="Idle">
						<Condition>
							<IsVariableFloat name="speed.length" operator="Greater" abs="true">0.1</IsVariableFloat>
						</Condition>
					</Transition>
				</Transitions>
			</StateMachine>
			<StateMachine name="IsDying">
				<States>
					<State name="False" />
					<State name="True" />
				</States>
				<Transitions>
					<Transition from="False" to="True">
						<Condition>
							<IsAction>DIE</IsAction>
						</Condition>
					</Transition>
					<Transition from="True" to="False">
						<Condition>
							<IsAction operatorType="NotEqual">DIE</IsAction>
						</Condition>
					</Transition>
				</Transitions>
			</StateMachine>
			<StateMachine name="PunchAnim">
				<States>
					<State name="Off" />
					<State name="Start" ExitTime="0.5" />
					<State name="Continue" />
					<State name="End" ExitTime="0.25" />
				</States>
				<Transitions>
					<Transition from="Off" to="Start">
						<Condition type="and">
							<IsAction>PUNCH</IsAction>
							<IsZombified>false</IsZombified>
						</Condition>
					</Transition>
					<Transition from="Start" to="Continue" />
					<Transition from="Continue" to="End">
						<Condition>
							<IsAction operatorType="NotEqual">PUNCH</IsAction>
						</Condition>
					</Transition>
					<Transition from="End" to="Off" />
				</Transitions>
			</StateMachine>
		</StateMachines>
		<RenderOptions>
			<Default>
				<Set name="IncludeAllActions">true</Set>
				<Set name="HideAngelOnDeath">true</Set>
				<Set name="HideAvatarOnDeath">true</Set>
				<Set name="RenderFrontArmInfected">true</Set>
				<Set name="RenderFrontArmInTheFront">true</Set>
				<Set name="DefaultRenderMannequinHandItem">false</Set>
				<Set name="IsPetWithLight">true</Set>
			</Default>
		</RenderOptions>
		<TileStampData>
			<Set name="FileName">game/particles12.rttex</Set>
			<Set name="EndFrame">28,3</Set>
			<Set name="FrameCount">4</Set>
		</TileStampData>
		<ParticleSystems>
			<ParticleSystem name="ps_feather" updateStage="AddClothingParticles" updateState="Motion.Moving">
				<Emitter>
					<Set name="offset">-17, -2</Set>
					<Set name="lifeTime">1</Set>
					<Set name="emissionInterval">0.2</Set>
					<Set name="checkParticleNumToEmit">true</Set>
					<Set name="particlesPerEmission">1</Set>
					<Set name="particlesToEmit">10</Set>
				</Emitter>
				<Particle>
					<Set name="sprite">s_feather</Set>
					<Random name="offset" min="-15, -10" max="15, -5" />
					<Set name="blendingMode">PREMULTIPLIED_ALPHA</Set>
					<Set name="initialAlpha">1</Set>
					<Set name="initalRGB">1, 1, 1</Set>
					<Set name="finalAlpha">0</Set>
					<Set name="interpolateAlpha">true</Set>
					<Set name="useGravity">true</Set>
					<Set name="initialScale">1, 1</Set>
					<Set name="lifeTime">1.2</Set>
					<Curve name="initialVelocity">
						<KeyFrame>0.2, -20, 0</KeyFrame>
						<KeyFrame>0.4, 50, 0</KeyFrame>
						<KeyFrame>0.6, -50, 0</KeyFrame>
						<KeyFrame>0.8, 50, 0</KeyFrame>
						<KeyFrame>1, 0, 0</KeyFrame>
					</Curve>
					<Curve name="initialAngle">
						<KeyFrame>0, 0</KeyFrame>
						<KeyFrame>0.2, -15</KeyFrame>
						<KeyFrame>0.4, 15</KeyFrame>
						<KeyFrame>0.6, -15</KeyFrame>
						<KeyFrame>0.8, 15</KeyFrame>
					</Curve>
					<Set name="gravityVector">0, 30</Set>
					<Set name="flipX">false</Set>
				</Particle>
			</ParticleSystem>
			<ParticleSystem name="ps_fogLocal" updateStage="AddClothingParticles" updateState="Motion.Idle">
				<Emitter>
					<Set name="emissionInterval">0.1</Set>
					<Set name="infParticles">false</Set>
					<Set name="infLifeTime">false</Set>
					<Set name="particlesPerEmission">1</Set>
				</Emitter>
				<Particle>
					<Set name="sprite">s_fog</Set>
					<Set name="relativeToEmitter">true</Set>
					<Random name="offset" min="-8, -8" max="8, -16" />
					<Set name="blendingMode">ADDITIVE</Set>
					<Curve name="initialAlpha">
						<KeyFrame>0, 0.25</KeyFrame>
						<KeyFrame>1, 0</KeyFrame>
					</Curve>
					<Set name="isBackgroundParticle">true</Set>
					<Set name="initalRGB">0.346503, 0.25668, 0.534314</Set>
					<Curve name="initialScale">
						<KeyFrame>0, 1, 1</KeyFrame>
						<KeyFrame>1, 2, 2</KeyFrame>
					</Curve>
					<Set name="lifeTime">1.5</Set>
					<RandomRadial name="initialVelocity" angleRange="0,360" radiusRange="10,30" />
					<Random name="initialAngle" min="0" max="360" />
				</Particle>
			</ParticleSystem>
			<ParticleSystem name="ps_fogWorld" updateStage="AddClothingParticles" updateState="Motion.Moving">
				<Emitter>
					<Set name="emissionInterval">0.1</Set>
					<Set name="infParticles">true</Set>
					<Set name="infLifeTime">true</Set>
					<Set name="particlesPerEmission">10</Set>
				</Emitter>
				<Particle>
					<Set name="sprite">s_fog</Set>
					<Random name="offset" min="-12, 0" max="12, -24" />
					<Set name="blendingMode">ADDITIVE</Set>
					<Curve name="initialAlpha">
						<KeyFrame>0, 0.25</KeyFrame>
						<KeyFrame>1, 0</KeyFrame>
					</Curve>
					<Set name="isBackgroundParticle">true</Set>
					<Set name="initalRGB">0.303625, 0.221429, 0.47549</Set>
					<Curve name="initialScale">
						<KeyFrame>0, 1.25, 1.25</KeyFrame>
						<KeyFrame>1, 2, 2</KeyFrame>
					</Curve>
					<Set name="lifeTime">1.5</Set>
					<RandomRadial name="initialVelocity" angleRange="0,360" radiusRange="10,20" />
					<Random name="initialAngle" min="0" max="360" />
				</Particle>
			</ParticleSystem>
			<ParticleSystem name="ps_punch_projectile">
				<Emitter>
					<Set name="lifeTime">0.02</Set>
					<Set name="emissionInterval">0.02</Set>
					<Set name="particlesPerEmission">1</Set>
					<Set name="particlesToEmit">1</Set>
				</Emitter>
				<Particle>
					<Set name="sprite">s_projectile</Set>
					<Set name="relativeToEmitter">false</Set>
					<Set name="offset" source="boomerang.Offset" />
					<Set name="blendingMode">PREMULTIPLIED_ALPHA</Set>
					<Set name="worldPos" source="calculatedPos" />
					<Set name="initialScale">1, 1</Set>
					<Set name="lifeTime">0.04</Set>
					<Set name="initialAngle" source="boomerangAngle" />
				</Particle>
			</ParticleSystem>
		</ParticleSystems>
	</Data>
	<RenderRules>
		<Update>
			<ArithmethicOperation LeftHandVariableName="calculatedPos" RightHandVariableName="context.pos" OperationType="Set" onState="PunchAnim.Off" />
			<ArithmethicOperation LeftHandVariableName="calculatedPos.x" RightHandVariableName="sittingOffset.x" OperationType="Substract" onState="PunchAnim.Off" />
			<ArithmethicOperation LeftHandVariableName="calculatedPos.y" RightHandVariableName="sittingOffset.y" OperationType="Substract" onState="PunchAnim.Off" />
		</Update>
		<AddClothingParticles>
			<StopIf>
				<IsVariableBool name="isBattleLeash">true</IsVariableBool>
				<IsWearing slot="SHIRT">ITEM_ID_TACTICAL_STEALTH_DEVICE</IsWearing>
			</StopIf>
		</AddClothingParticles>
		<RenderBehind>
			<SpriteRender name="s_death" alignment="CENTER" offset="0,-8" onState="IsDying.True" />
		</RenderBehind>
		<RenderHandItem>
			<Group onState="IsDying.False">
				<SpriteRender name="s_scythe" offset="0,8" rotationPoint="0,1" alignment="CENTER" rotateOffset="true" blend="PREMULTIPLIED_ALPHA" onState="PunchAnim.Off" />
				<ParticleSystemUpdate name="ps_punch_projectile" onState="PunchAnim.Start|PunchAnim.Continue|PunchAnim.End" />
			</Group>
		</RenderHandItem>
		<OnPunchUpdate>
			<AvatarTransform class="Face">
				<Set name="face">MAD</Set>
			</AvatarTransform>
			<AvatarTransform class="ArmAngle">
				<Set name="armName">arm2Angle</Set>
				<Set name="pointTowardsPunchTarget">true</Set>
			</AvatarTransform>
			<AvatarTransform class="ArmAngle">
				<Set name="armName">arm1Angle</Set>
				<Set name="armAngle">0</Set>
			</AvatarTransform>
		</OnPunchUpdate>
	</RenderRules>
</ItemRenderer>
