<?xml version="1.0"?>
<ItemRenderer item="ITEM_ID_TWILIGHT_AURA">
	<Data>
		<Sprite name="s_Aura" fileName="game/particles_large13.rttex" textureSize="64" frame="12,4" />
		<Sprite name="s_Rays" fileName="game/particles_large13.rttex" textureSize="64" frame="13,4" />
		<Sprite name="s_Sparkles" fileName="game/particles11.rttex" textureSize="32" frame="12,23" />
		<StateMachines>
			<StateMachine name="PlayerAction">
				<States>
					<State name="Idle" />
					<State name="Move" />
				</States>
				<Transitions>
					<Transition from="Idle" to="Move">
						<Condition>
							<IsVariableFloat name="speed.length" operator="Greater" abs="true">0.1</IsVariableFloat>
						</Condition>
					</Transition>
					<Transition from="Move" to="Idle">
						<Condition>
							<IsVariableFloat name="speed.length" operator="Less" abs="true">0.1</IsVariableFloat>
						</Condition>
					</Transition>
				</Transitions>
			</StateMachine>
		</StateMachines>
		<Animations>
			<SpriteAnimation name="a_RandomSparkles" sprite="s_Sparkles">
				<Frame>12,23</Frame>
				<Frame>13,23</Frame>
			</SpriteAnimation>
		</Animations>
		<ParticleSystems>
			<ParticleSystem name="ps_Rays">
				<Emitter>
					<Set name="offset">-2, -28</Set>
					<Set name="offsetFacing">true</Set>
					<Set name="emissionInterval">0.5</Set>
					<Set name="infParticles">true</Set>
					<Set name="infLifeTime">true</Set>
					<Set name="particlesPerEmission">1</Set>
				</Emitter>
				<Particle>
					<Set name="sprite">s_Rays</Set>
					<Set name="relativeToEmitter">true</Set>
					<Set name="inSpecificOrder">true</Set>
					<Set name="blendingMode">PREMULTIPLIED_ALPHA</Set>
					<Curve name="initialAlpha">
						<KeyFrame>0, 0</KeyFrame>
						<KeyFrame>0.5, 1</KeyFrame>
						<KeyFrame>1, 0</KeyFrame>
					</Curve>
					<Curve name="initialScale">
						<KeyFrame>0, 0.75, 0.75</KeyFrame>
						<KeyFrame>0.5, 1.25, 1.25</KeyFrame>
						<KeyFrame>1, 1.75, 1.75</KeyFrame>
					</Curve>
					<Set name="lifeTime">1</Set>
					<Random name="initialAngle" min="0" max="360" />
				</Particle>
			</ParticleSystem>
			<ParticleSystem name="ps_Sparkles">
				<Emitter>
					<Set name="offset">0, -32</Set>
					<Set name="emissionInterval">0.05</Set>
					<Set name="infParticles">true</Set>
					<Set name="infLifeTime">true</Set>
					<Set name="particlesPerEmission">1</Set>
				</Emitter>
				<Particle randomSpriteFrame="true">
					<Set name="sprite">s_Sparkles</Set>
					<Random name="offset" min="-20, -21" max="20, 21" />
					<Set name="inSpecificOrder">true</Set>
					<Set name="blendingMode">PREMULTIPLIED_ALPHA</Set>
					<Curve name="initialAlpha">
						<KeyFrame>0, 0</KeyFrame>
						<KeyFrame>0.05, 1</KeyFrame>
						<KeyFrame>0.1, 0</KeyFrame>
						<KeyFrame>0.15, 1</KeyFrame>
						<KeyFrame>0.2, 0</KeyFrame>
						<KeyFrame>0.25, 1</KeyFrame>
						<KeyFrame>0.3, 0</KeyFrame>
						<KeyFrame>0.35, 1</KeyFrame>
						<KeyFrame>0.4, 0</KeyFrame>
						<KeyFrame>0.45, 1</KeyFrame>
						<KeyFrame>0.5, 0</KeyFrame>
						<KeyFrame>0.55, 1</KeyFrame>
						<KeyFrame>0.6, 0</KeyFrame>
						<KeyFrame>0.65, 1</KeyFrame>
						<KeyFrame>0.7, 0</KeyFrame>
						<KeyFrame>0.75, 1</KeyFrame>
						<KeyFrame>0.8, 0</KeyFrame>
						<KeyFrame>0.85, 1</KeyFrame>
						<KeyFrame>0.9, 0</KeyFrame>
						<KeyFrame>0.95, 1</KeyFrame>
						<KeyFrame>1, 0</KeyFrame>
					</Curve>
					<Set name="interpolateScale">true</Set>
					<Random name="initialScale" min="0.25" max="0.75" />
					<Set name="finalScale">0, 0</Set>
					<Random name="lifeTime" min="1" max="1.5" />
					<Select name="initialRotationRate" input="randomNumber">
						<Item>-720</Item>
						<Item>-360</Item>
						<Item>360</Item>
						<Item>720</Item>
					</Select>
				</Particle>
			</ParticleSystem>
		</ParticleSystems>
    <RenderOptions>
      <Default>
        <Set name="UserNameOffset">18</Set>
      </Default>
    </RenderOptions>
	</Data>
	<RenderRules>
		<RenderBackpack>
      <Group>
				<StopIf>
					<IsRenderMod>RENDER_MOD_MINI_YOU</IsRenderMod>
				</StopIf>
				<ParticleSystemRender name="ps_Sparkles"/>
				<ParticleSystemRender name="ps_Rays"/>
      </Group>
			<SpriteRender name="s_Aura" offset="0,-32" scale="0.8,0.8"/>
		</RenderBackpack>
		<AddClothingParticles>
			<ParticleSystemUpdate name="ps_Sparkles" onState="PlayerAction.Move" />
			<ParticleSystemUpdate name="ps_Rays" />
		</AddClothingParticles>
	</RenderRules>
</ItemRenderer>
