; Constants and state file.
; There are comments scattered through this file, so you may like to
; take a look if would like to learn more about the cns.

[Data]
life = 990			;Amount of life to start with
power = 3000		;Amount of maximum power
attack = 100		;attack power (more is stronger)
defence = 90		;defensive power (more is stronger)
fall.defence_up = 50	;Percentage to increase defense everytime player is knocked down
liedown.time = 60		;Time which player lies down for, before getting up
airjuggle = 16		;Number of points for juggling
sparkno = 2			;Default hit spark number for HitDefs
guard.sparkno = 40	;Default guard spark number
KO.echo = 0			;1 to enable echo on KO
volume = 0			;Volume offset (negative for softer)
IntPersistIndex = 60	;Variables with this index and above will not have their values
FloatPersistIndex = 40  ;reset to 0 between rounds or matches. There are 60 int variables,
  				;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
  				;If omitted, then it defaults to 60 and 40 for integer and float
  				;variables repectively, meaning that none are persistent, i.e. all
  				;are reset. If you want your variables to persist between matches,
  				;you need to override state 5900 from common1.cns.


[Size]
xscale = .91			;Horizontal scaling factor.
yscale = .91			;Vertical scaling factor.
ground.back = 15		;Player width (back, ground)
ground.front = 16		;Player width (front, ground)
air.back = 12		;Player width (back, air)
air.front = 12		;Player width (front, air)
height = 60			;Height of player (for opponent to jump over)
attack.dist = 160		;Default attack distance
proj.attack.dist = 90	;Default attack distance for projectiles
proj.doscale = 0		;Set to 1 to scale projectiles too   
head.pos = -5, -90	;Approximate position of head
mid.pos = -5, -60		;Approximate position of midsection
shadowoffset = 0		;Number of pixels to vertically offset the shadow
draw.offset = 0,0		;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 2		;Walk forward
walk.back = -2		;Walk backward
run.fwd  = 4.3, 0	;Run forward (x, y)
run.back = -4.2,-1.8	;Hop backward (x, y)
jump.neu = 0,-6		;Neutral jumping velocity (x, y)
jump.back = -2		;Jump back Speed (x, y)
jump.fwd = 2.5		;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1;Running jump speeds (opt)
runjump.fwd = 4,-8.1	;.
airjump.neu = 0,-8.1	;.
airjump.back = -2.55	;Air jump speeds (opt)
airjump.fwd = 2.5		;.

[Movement]
airjump.num = 0		;Number of air jumps allowed (opt)
airjump.height = 20	;Minimum distance from ground before you can air jump (opt)
yaccel = .33		;Vertical acceleration
stand.friction = .85	;Friction coefficient when standing
crouch.friction = .82	;Friction coefficient when crouching

;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...
;--------------------------------------------------------------------------
[Quotes]
;Random Quotes
victory1 = "What did they expect?"
victory2 = "The outcome was never really in doubt."
victory3 = "Sorry to 'pop-in' unannounced."
victory4 = "With my apologies."
;Vs Heavy
victory5 = "Oh, fat man, please! This is getting awkward!"
victory6 = "That is a diet I call 'death.'"
victory7 = "Aww, too bad this wasn't a pie-eating contest!"
;Vs Spy
victory8 = "Go to hell, and take your cheap suit with you!"
victory9 = "We all knew you were a Spy!"
victory10 = "You are an amateur and a fool!"
victory11 = "I'll see you in hell... you handsome rogue!"
victory12 = "You are an embarrassment to Spies everywhere!"
;---------------------------------------------------------------------------
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7 && anim = 20
value = S20,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 11 && anim = 20
value = S20,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5 && anim = 21
value = S20,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10 && anim = 21
value = S20,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7 && anim = 20
value = S20,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 11 && anim = 20
value = S20,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5 && anim = 21
value = S20,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10 && anim = 21
value = S20,0

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21
;---------------------------------------------------------------------------
; Run forward
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = S20,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 11
value = S20,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = S20,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 11
value = S20,1

[State 100, 4]
type = ChangeState
trigger1 = command != "holdfwd"
value = 0

; Run forward AI
[Statedef 101]
type    = S
physics = S
anim = 100
sprpriority = 1
ctrl = 0

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = S20,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 11
value = S20,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = S20,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 11
value = S20,1

[State 100, 4]
type = ChangeState
triggerall = var(59)
trigger1 = numenemy = 1
trigger1 = enemy(0), alive = 0
trigger2 = numenemy = 2
trigger2 = enemy(0), alive + enemy(1), alive = 0
ctrl = 1
value = 0

[State 100, 4]
type = ChangeState
Triggerall = var(59)>0
trigger1 = p2bodydist x  <= 10
value = 0
ctrl = 1

;---------------------------------------------------------------------------

; Jump Start
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 40, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 40]
Type=Changestate
Triggerall=time=0
Triggerall=var(59)>0
trigger1 = command = "holdup"
value=0
ctrl=1

[State 40, 2]
type = VarSet
trigger1 = command = "holdfwd"
trigger1 = var(59)=0
trigger2 = var(59)>0
trigger2 = enemynear, movetype = H
trigger2 = enemynear, Statetype = A
trigger2 = prevstateno = 240
trigger3 = var(59)>0
trigger3 = random<var(50) * 90
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = command = "holdback"
trigger1 = var(59)=0
trigger2 = var(59)>0
trigger2 = random<var(50) * 10
sysvar(1) = -1

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;---------------------------------------------------------------------------

; GUARD (start)
[Statedef 120]
type = U   ;Leave state type unchanged
physics = U;Leave physics unchanged

[State 120]
Type=CtrlSet
Trigger1=var(59)>0
value=0

[State 120, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 120 + (statetype = C) + (statetype = A)*2

[State 120, 2]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
physics = S

[State 120, 3]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
physics = C

[State 120, 4]
type = StateTypeSet
trigger1 = Time = 0 && statetype = A
physics = A

[State 120, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(59)=0
trigger1 = command = "holddown"
trigger2 = var(59)>0
trigger2 = (abs(enemynear, pos x - pos X)>120) || (enemynear,movetype=H) || (enemynear,statetype=C)
trigger2 = enemynear,statetype!=A
trigger2 = AILevel>=3
statetype = C
physics = C

[State 120, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(59)=0
trigger1 = command!= "holddown"
trigger2 = Var(59) > 0
trigger2 = enemynear,statetype = A
trigger2 = abs(enemynear,pos x - pos X)=3
statetype = S
physics = S

[State 120, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 130 + (statetype = C) + (statetype = A)*2

[State 120, Stop Guarding]
type = ChangeState
trigger1 = command!= "holdback"
trigger1 = var(59)=0
trigger2 =!inguarddist
value = 140

;---------------------------------------------------------------------------
; Stand guard (guarding)
[Statedef 130]
type    = S
physics = S

[State 120]
Type=CtrlSet
Trigger1=var(59)>0
value=0

[State 130, 1]
type = ChangeAnim
trigger1 = Anim!= 130
value = 130

[State 130, Hi to Lo]
type = ChangeState
trigger1 = command = "holddown"
trigger1 = var(59)=0
trigger2 = var(59)>0
trigger2 = (abs(enemynear, pos x - pos X)>120) || (enemynear,movetype=H) || (enemynear,statetype=C)
trigger2 = enemynear,statetype!=A
trigger2 = AILevel>=3
value = 131

[State 130, Stop Guarding]
type = ChangeState
trigger1 = var(59)=0
trigger1 = command!= "holdback"
trigger2 =!inguarddist
value = 140

;---------------------------------------------------------------------------
; Crouch guard (guarding)
[Statedef 131]
type    = C
physics = C

[State 120]
Type=CtrlSet
Trigger1=var(59)>0
value=0

[State 131, 1]
type = ChangeAnim
trigger1 = Anim!= 131
value = 131

[State 131, Lo to Hi]
type = ChangeState
trigger1 = command!= "holddown"
trigger1 = var(59)=0
trigger2 = Var(59) > 0
trigger2 = enemynear,statetype = A
trigger2 = abs(enemynear, pos x - pos X)=3
value = 130

[State 131, Stop Guarding]
type = ChangeState
trigger1 = var(59)=0
trigger1 = command!= "holdback"
trigger2 =!inguarddist
trigger3 = var(59) > 0
trigger3 = time >= 110
trigger3 = abs(enemynear, pos x - pos X) >= 100
value = 140

;---------------------------------------------------------------------------
; Air guard (guarding)
[Statedef 132]
type    = A
physics = N

[State 120]
Type=CtrlSet
Trigger1=var(59)>0
value=0

[State 132, 1]
type = ChangeAnim
trigger1 = Anim!= 132
value = 132

[State 132, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 132, 3]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 132, 4]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 132, 5]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 132, 6]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command = "holdback" || (var(59)>0)
trigger1 = inguarddist
value = 130

[State 132, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

[State 132, Stop Guarding]
type = ChangeState
trigger1 = var(59)=0
trigger1 = command!= "holdback"
trigger2 =!inguarddist
value = 140


;---------------------------------------------------------------------------
; Stand guard hit (shaking)
[Statedef 150]
type    = S
movetype= H
physics = N
velset = 0,0

[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150

[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(StateType=C)

[State 120, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(59)=0
trigger1 = command = "holddown"
trigger2 = var(59)>0
trigger2 = (abs(enemynear, pos x - pos X)>120) || (enemynear,movetype=H) || (enemynear,statetype=C)
trigger2 = enemynear,statetype!=A
trigger2 = AILevel>=3
statetype = C
physics = C

[State 120, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(59)=0
trigger1 = command!= "holddown"
trigger2 = Var(59) > 0
trigger2 = enemynear,statetype = A
trigger2 = abs(enemynear, pos x - pos X)=3
statetype = S
physics = S

[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3

;---------------------------------------------------------------------------
; Stand guard hit (knocked back)
[Statedef 151]
type    = S
movetype= H
physics = S
anim = 150

[State 151, 1]
type = VelSet
trigger1 = Time = 0
x = Hitvel x

[State 151, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 151, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
trigger1 = var(59)=0
value = 1

[State 120, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(59)=0
trigger1 = command = "holddown"
trigger2 = var(59)>0
trigger2 = (abs(enemynear, pos x - pos X)>120) || (enemynear,movetype=H) || (enemynear,statetype=C)
trigger2 = enemynear,statetype!=A
trigger2 = AILevel>=3
statetype = C
physics = C

[State 120, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(59)=0
trigger1 = command!= "holddown"
trigger2 = Var(59) > 0
trigger2 = enemynear,statetype = A
trigger2 = abs(enemynear, pos x - pos X)=3
statetype = S
physics = S

[State 151, 4]
type = ChangeState
trigger1 = HitOver
value = 130
ctrl =!var(59)

;---------------------------------------------------------------------------
; Crouch guard hit (shaking)
[Statedef 152]
type    = C
movetype= H
physics = N
velset = 0,0

[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 151

[State 152, 3]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(StateType=C)

[State 120, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(59)=0
trigger1 = command = "holddown"
trigger2 = var(59)>0
trigger2 = (abs(enemynear, pos x - pos X)>120) || (enemynear,movetype=H) || (enemynear,statetype=C)
trigger2 = enemynear,statetype!=A
trigger2 = AILevel>=3
statetype = C
physics = C

[State 120, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(59)=0
trigger1 = command!= "holddown"
trigger2 = Var(59) > 0
trigger2 = enemynear,statetype = A
trigger2 = abs(enemynear, pos x - pos X)=3
statetype = S
physics = S

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; Crouch guard hit (knocked back)
[Statedef 153]
type    = C
movetype= H
physics = C
anim = 151

[State 153, 1]
type = VelSet
trigger1 = Time = 0
x = hitvel x

[State 153, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 151, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
trigger1 = var(59)=0
value = 1

[State 120, Hi to Lo]
type = StateTypeSet
triggerall = statetype = S
trigger1 = var(59)=0
trigger1 = command = "holddown"
trigger2 = var(59)>0
trigger2 = (abs(enemynear, pos x - pos X)>120) || (enemynear,movetype=H) || (enemynear,statetype=C)
trigger2 = enemynear,statetype!=A
trigger2 = AILevel>=3
statetype = C
physics = C

[State 120, Lo to Hi]
type = StateTypeSet
triggerall = statetype = C
trigger1 = var(59)=0
trigger1 = command!= "holddown"
trigger2 = Var(59) > 0
trigger2 = p2statetype = A
trigger2 = abs(enemynear, pos x - pos X)=3
statetype = S
physics = S

[State 153, 4]
type = ChangeState
trigger1 = HitOver
value = 131
ctrl =!var(59)

;---------------------------------------------------------------------------
; Air guard hit (shaking)
[Statedef 154]
type    = A
movetype= H
physics = N
velset = 0,0

[State 154, 1]
type = ChangeAnim
trigger1 = 1
value = 152

[State 154, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155;AGUARDHIT2

[State 154, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; Air guard hit (knocked away)
[Statedef 155]
type    = A
movetype= H
physics = N
anim = 152

[State 155, 1]
type = VelSet
trigger1 = Time = 0
x = hitvel x
y = hitvel y

[State 155, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 151, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
trigger1 = var(59)=0
value = 1

[State 155, 4]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 155, 5]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command = "holdback" || var(59)>0
trigger1 = inguarddist
value = 130

[State 155, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S170,0
volumescale = 255

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S170,0
volumescale = 255

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = 181

;---------------------------------------------------------------------------
; Win pose 1
; CNS difficulty: basic
[Statedef 181]
type = S
ctrl = 0
anim = 180
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S180,0+random%3
volumescale = 255

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = S1300,0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 6
x = -2

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 16
x = 0

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [0,250]
flag = roundnotover

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Pre-intro
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190, 1]
type = ChangeAnim
trigger1 = SelfAnimExist(190)
value = 190

[State 190, ChangeState]
type = ChangeState
trigger1 = Enemy, Name = "Spy"
value = 192

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
value = 191
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 7
value = S20,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 11
value = S20,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 12
value = S190,0+random%4
volumescale = 255

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Intro (Against Enemy Spy)
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0

[State 192, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S192,0+random%2

[State 192, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S195,0
volumescale = 255

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Light Attack
; CNS difficulty: easy
[Statedef 200]
type    = S			;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A			;Move-type: A-attack, I-idle, H-gethit
physics = S			;Physics: S-stand, C-crouch, A-air
juggle  = 4			;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0			;Set ctrl (Def: no change)
anim = 200			;Change animation (Def: no change)
poweradd = 20			;Power to add (Def: 0)
sprpriority = 2			;Set layering priority to 2 (in front)


[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = NumHelper(1305) > 0
value = 1.50
[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = NumHelper(1305) = 0
value = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 120,0
pausetime = 5,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-85
hitsound = S209,0
guardsound = S2,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 18
ground.hittime = 18
air.hittime = 20
ground.velocity = -5.2,0
air.velocity = -5.2,-1

[State ]
Type = TargetState
TriggerAll = MoveHit = 1 && enemynear, stateno = 1203
Trigger1 = IsHelper = 0
Trigger1 = 1 || Cond(Var(30) = -1, (Var(30) := GameTime + 200), 0)
Trigger2 = 1 || Cond((Root,Var(30) = -1), Root,Cond(1, (Var(30) := GameTime + 200), 0), 0)
Value = 1203
Persistent = 0

[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Medium Attack
; CNS difficulty: easy
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 210

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = NumHelper(1305) > 0
value = 1.50
[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = NumHelper(1305) = 0
value = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 90,0
pausetime = 5,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-85
hitsound = S209,0
guardsound = S2,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 18
ground.hittime = 18
air.hittime = 20
ground.velocity = -5.5,0
air.velocity = -5.5,-1
airguard.velocity = 0,0
ground.cornerpush.veloff = -11
air.cornerpush.veloff = -11
down.cornerpush.veloff = -11
guard.cornerpush.veloff = -11
airguard.cornerpush.veloff = -11

[State ]
Type = TargetState
TriggerAll = MoveHit = 1 && enemynear, stateno = 1203
Trigger1 = IsHelper = 0
Trigger1 = 1 || Cond(Var(30) = -1, (Var(30) := GameTime + 200), 0)
Trigger2 = 1 || Cond((Root,Var(30) = -1), Root,Cond(1, (Var(30) := GameTime + 200), 0), 0)
Value = 1203
Persistent = 0



[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Hard Attack
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 230

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = NumHelper(1305) > 0
value = 1.50
[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = NumHelper(1305) = 0
value = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = med          ;light,medium,hard,back,up,diagup
air.animtype = med
damage = 95,0
pausetime = 5,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-75
hitsound = S1120,0
guardsound = S2,2
ground.type = Low      ;Low,Trip,None
ground.slidetime = 14
ground.hittime = 14
air.hittime = 24
ground.velocity = -4,0
air.velocity = -4,-1
ground.cornerpush.veloff = -9
air.cornerpush.veloff = -9
down.cornerpush.veloff = -9
guard.cornerpush.veloff = -9
airguard.cornerpush.veloff = -9

[State ]
Type = TargetState
TriggerAll = MoveHit = 1 && enemynear, stateno = 1203
Trigger1 = IsHelper = 0
Trigger1 = 1 || Cond(Var(30) = -1, (Var(30) := GameTime + 200), 0)
Trigger2 = 1 || Cond((Root,Var(30) = -1), Root,Cond(1, (Var(30) := GameTime + 200), 0), 0)
Value = 1203
Persistent = 0

[State 230, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Launcher
; CNS difficulty: easy
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 240

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = NumHelper(1305) > 0
value = 1.50
[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = NumHelper(1305) = 0
value = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = med          ;light,medium,hard,back,up,diagup
air.animtype = med
damage = 105,10
pausetime = 5,5
guard.pausetime = 15,0
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-75
hitsound = S1120,0
guardsound = S2,2
ground.type = Low      ;Low,Trip,None
ground.slidetime = 18
ground.hittime = 18
air.hittime = 20
ground.velocity = -0.9,-8
air.velocity = -0.9,-8
fall = 1

[State ]
Type = TargetState
TriggerAll = MoveHit = 1 && enemynear, stateno = 1203
Trigger1 = IsHelper = 0
Trigger1 = 1 || Cond(Var(30) = -1, (Var(30) := GameTime + 200), 0)
Trigger2 = 1 || Cond((Root,Var(30) = -1), Root,Cond(1, (Var(30) := GameTime + 200), 0), 0)
Value = 1203
Persistent = 0


[State 240, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Light Attack
; CNS difficulty: easy
; Description: Simple crouching attack. The HitDef's guardflag parameter
;     is set to "L", meaning that the move can only be guarded low
;     (crouching), and not by standing or jumping opponents.
;     Like for all light attacks, it's a good idea to keep the slidetime
;     and hittime parameters at a smaller number, so the opponent isn't
;     stunned for too long. For all crouching attacks you have to
;     remember to set the attr parameter to indicate that it is crouching
;     attack. In this case, "C, NA" stands for "crouching, normal attack".
;     The HitDef's priority is set at 3, instead of the default of 4,
;     so this attack has a lower priority than most others, meaning the
;     player will get hit instead of trading hits with the opponent if
;     their attack collision boxes (Clsn1) intersect each other's Clsn2
;     boxes at the same time.
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 15
ctrl = 0
anim = 400

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAFD        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 110,0
pausetime = 5,5
sparkno = 0
guard.sparkno = 40
sparkxy = -5,0
hitsound = S1,3
guardsound = S2,2
ground.type = Low      ;Low,Trip,None
ground.slidetime = 18
ground.hittime = 18
air.hittime = 20
ground.velocity = -3.5,0
air.velocity = -3.5,-1
ground.cornerpush.veloff = -5
air.cornerpush.veloff = -5
down.cornerpush.veloff = -5
guard.cornerpush.veloff = -5
airguard.cornerpush.veloff = -5

[State 400, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Medium Attack
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 50
ctrl = 0
anim = 410

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAFD        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 90,0
pausetime = 5,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-65
hitsound = S209,0
guardsound = S2,2
ground.type = Low      ;Low,Trip,None
ground.slidetime = 18
ground.hittime = 18
air.hittime = 20
ground.velocity = -2.9,0
air.velocity = -2.9,-1
ground.cornerpush.veloff = -3
air.cornerpush.veloff = -3
down.cornerpush.veloff = -3
guard.cornerpush.veloff = -3
airguard.cornerpush.veloff = -3

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Hard Attack
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 22
ctrl = 0
anim = 430

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = med          ;light,medium,hard,back,up,diagup
air.animtype = med
damage = 100,0
pausetime = 5,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-33
hitsound = S1120,0
guardsound = S2,2
ground.type = Low      ;Low,Trip,None
ground.slidetime = 18
ground.hittime = 18
air.hittime = 20
ground.velocity = -5.5,0
air.velocity = -5.5,-1

[State 430, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Light Attack
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 11
ctrl = 0
anim = 600

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 105,0
pausetime = 5,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-75
hitsound = S1,0
guardsound = S2,2
ground.type = Low      ;Low,Trip,None
ground.slidetime = 18
ground.hittime = 18
air.hittime = 20
ground.velocity = -1,0
air.velocity = -1,-1

[State 600, 5]
type = CtrlSet
trigger1 = Time = 16
value = 1

;---------------------------------------------------------------------------
; Medium Attack
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 610

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 105,0
pausetime = 5,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-75
hitsound = S209,0
guardsound = S2,2
ground.type = Low      ;Low,Trip,None
ground.slidetime = 18
ground.hittime = 18
air.hittime = 20
ground.velocity = -1,0
air.velocity = -1,-1

[State 610, 5]
type = CtrlSet
trigger1 = Time = 16
value = 1
;---------------------------------------------------------------------------
; Hard Attack
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 20
ctrl = 0
anim = 630

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 110,0
pausetime = 5,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-75
hitsound = S209,0
guardsound = S2,2
ground.type = Low      ;Low,Trip,None
ground.slidetime = 18
ground.hittime = 18
air.hittime = 20
ground.velocity = -1,0
air.velocity = -1,-1

[State 630, 5]
type = CtrlSet
trigger1 = Time = 12
value = 1
;---------------------------------------------------------------------------
; Special
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 640

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S0,1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 110,0
pausetime = 5,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-75
hitsound = S1120,0
guardsound = S2,2
ground.type = Low      ;Low,Trip,None
ground.slidetime = 18
ground.hittime = 18
air.hittime = 20
ground.velocity = -5,0
air.velocity = 0,5
fall = 1

[State 640, 5]
type = CtrlSet
trigger1 = Time = 12
value = 1
;---------------------------------------------------------------------------
; Throw - Attempt 1
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
sprpriority = 1       ;Draw in front of p2
hitsound = S800,0
p1stateno = 810       ;On success, player changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in player's cns
fall = 1              ;Force p2 into falling down

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Throwing the opponent 1
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2||animelem = 6
value = S0,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3||animelem = 6
value = S1120,0

[State 0, HitAdd]
type = HitAdd
trigger1 = animelem = 3||animelem = 6
value = 1

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 3
value = -45
kill = 0

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 6
value = -95
kill = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 3||animelem = 6
anim = F0
pos = -10,-75
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 2
ownpal = 1

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Opponent Thrown 1
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 821

;---------------------------------------------------------------------------
; Opponent thrown into the air 1
[Statedef 821]
type    = A
movetype= H
physics = N
velset = -2,0
poweradd = 40

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground
;---------------------------------------------------------------------------
; Throw - Attempt 2
[Statedef 850]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
hitsound = S800,0
p1stateno = 860       ;On success, player changes to state 810
p2stateno = 870       ;If hit, p2 changes to state 820 in player's cns
fall = 1              ;Force p2 into falling down

[State 850, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Throwing the opponent 2
[Statedef 860]
type    = S
movetype= A
physics = N
anim = 860
poweradd = 60

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S0,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S1120,0

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 3
value = -120

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = F0
pos = -10,-75
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 2
ownpal = 1

[State 860, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Opponent Thrown 2
[Statedef 870]
type    = A
movetype= H
physics = N
velset = 0,0

[State 870, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 870

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 871

;---------------------------------------------------------------------------
; Opponent thrown into the air 2
[Statedef 871]
type    = A
movetype= H
physics = N
velset = 0,0
poweradd = 40

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground
;---------------------------------------------------------------------------------------------------------------
;Revolver
[Statedef 1000]
type = S
movetype = A
physics = N
anim = 1000
ctrl = 0
velset = 0,0
poweradd = 20

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1000,0

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "Bullet"
stateno = 1001
pos = 50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, 0]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Bullet (Revolver)
[Statedef 1001]
type = A
movetype = A
anim = 1001
ctrl = 0
velset = 19,0
sprpriority = -1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = med          ;light,medium,hard,back,up,diagup
air.animtype = med
damage = 60,10
pausetime = 0,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-87
hitsound = S1,3
guardsound = S2,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 9
ground.hittime = 9
air.hittime = 9
ground.velocity = -6,0
air.velocity = -6,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveHit

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveGuarded

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 180
;---------------------------------------------------------------------------------------------------------------
;Revolver (Air)
[Statedef 1005]
type = A
movetype = A
physics = A
anim = 1005
ctrl = 0
poweradd = 20

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1000,0

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "Bullet"
stateno = 1006
pos = 50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, 0]
type = ChangeState
Trigger1 = AnimTime = 0
value = 50
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Bullet (Revolver; Air Version)
[Statedef 1006]
type = A
movetype = A
anim = 1006
ctrl = 0
velset = 9,19
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = med          ;light,medium,hard,back,up,diagup
air.animtype = med
damage = 70,10
pausetime = 0,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-87
hitsound = S1,3
guardsound = S2,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 9
ground.hittime = 9
air.hittime = 9
ground.velocity = -6,0
air.velocity = -6,0
air.fall = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveHit

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveGuarded

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 180
;---------------------------------------------------------------------------------------------------------------
;Ambassador (Charging)
[Statedef 1010]
type = S
movetype = A
physics = N
anim = 1010
ctrl = 0
velset = 0,0
poweradd = 30

[State 0, PalFXWiz]
type = PalFX
trigger1 = time = 0
time = 40
add = -104,-104,7
mul = 256,256,256
sinadd = 56,56,0,4
invertall = 0
color = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = time = 20
time = 40
add = 255,255,0
mul = 256,256,256
sinadd = 255,255,0,4
invertall = 0
color = 256

[State 400, 3]
type = ChangeState
triggerall = Var(11) != 1 && AnimElem = 1||AnimElem = 2||AnimElem = 3||AnimElem = 4||AnimElem = 5
trigger1 = Var(59) <= 0
trigger1 = command != "hold_y"
Trigger2 = var(59)>0
trigger2 = p2bodydist x <= 125
value = 1011

[State 400, 3]
type = ChangeState
triggerall = Var(11) != 1 && AnimElem = 6||AnimElem = 7||AnimElem = 8||AnimElem = 9||AnimElem = 10 && AnimElem = 11||AnimElem = 12||AnimElem = 13
trigger1 = Var(59) <= 0
trigger1 = command != "hold_y"
Trigger2 = var(59)>0
trigger2 = p2bodydist x <= 125
value = 1012

[State 0, 0]
type = ChangeState
Trigger1 = AnimTime = 0
value = 1013
;---------------------------------------------------------------------------------------------------------------
;Ambassador (Shoot Uncharged)
[Statedef 1011]
type = S
movetype = A
physics = N
anim = 1011
ctrl = 0
velset = 0,0

[State 0, PalFXWiz]
type = PalFX
trigger1 = time = 0
time = 0
add = 0,0,0
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1010,0

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "Bullet"
stateno = 1014
pos = 50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Ambassador (Mid Uncharged)
[Statedef 1012]
type = S
movetype = A
physics = N
anim = 1011
ctrl = 0
velset = 0,0

[State 0, PalFXWiz]
type = PalFX
trigger1 = time = 0
time = 0
add = 0,0,0
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1010,0

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "Bullet"
stateno = 1015
pos = 50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Ambassador (Shoot (Fully Charged))
[Statedef 1013]
type = S
movetype = A
physics = N
anim = 1011
ctrl = 0
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1010,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1050,1

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "Bullet"
stateno = 1016
pos = 50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Bullet (Ambassador Uncharged)
[Statedef 1014]
type = A
movetype = A
anim = 1001
ctrl = 0
velset = 10,0
sprpriority = -1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = med          ;light,medium,hard,back,up,diagup
air.animtype = med
damage = 40,0
pausetime = 0,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-85
hitsound = S1,3
guardsound = S2,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 9
ground.hittime = 9
air.hittime = 9
ground.velocity = -6,0
air.velocity = -6,0


[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveHit

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveGuarded

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 100
;---------------------------------------------------------------------------------------------------------------
;Bullet (Ambassador Mid-Charged)
[Statedef 1015]
type = A
movetype = A
anim = 1001
ctrl = 0
velset = 16,0
sprpriority = -1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = med          ;light,medium,hard,back,up,diagup
air.animtype = med
damage = 120,5
pausetime = 0,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-85
hitsound = S1,3
guardsound = S2,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 9
ground.hittime = 9
air.hittime = 9
ground.velocity = -6,0
air.velocity = -6,0

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "MiniCrit"
ID = 1050
stateno = 1050
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveHit
[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveGuarded
[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 100
;---------------------------------------------------------------------------------------------------------------
;Bullet (Ambassador Fully Charged)
[Statedef 1016]
type = A
movetype = A
anim = 1001
ctrl = 0
velset = 15,0
sprpriority = -1

[State 0, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 100
palcolor = 255
palbright = 0,255,255
palcontrast = 0,255,255
palpostbright = 0,128,255
paladd = 0,255,255
timegap = 1
framegap = 2
trans = "add"

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag =         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = hard
damage = 280,30
pausetime = 0,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-85
hitsound = S1,3
guardsound = S2,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 9
ground.hittime = 9
air.hittime = 9
ground.velocity = -12,0
air.velocity = -12,0
fall = 1

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 1050
stateno = 1051
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveHit
[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveGuarded

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 100

; Mini Crit!
[Statedef 1050]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 1050
velset = 0,-0.5
sprpriority = 3

[State -2, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 9999999

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1050,0
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, Trans]
type = Trans
trigger1 = time >= 31
trigger1 = time%2 = 0
trans = add
alpha = 256-13,256

[State 0, Turn]
type = Turn
trigger1 = facing != 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 57

; Critical Hit!
[Statedef 1051]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 1051
velset = 0,-0.5
sprpriority = 3

[State -2, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 9999999

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1050,2
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1050,2
volumescale = 255
channel = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 1

[State 0, Trans]
type = Trans
trigger1 = time >= 31
trigger1 = time%2 = 0
trans = add
alpha = 256-13,256

[State 0, Turn]
type = Turn
trigger1 = facing != 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 57

;---------------------------------------------------------------------------------------------------------------
;Diamondback
[Statedef 1020]
type = S
movetype = A
physics = N
anim = 1020
ctrl = 0
velset = 0,0
poweradd = 60

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1020,0

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "Bullet"
stateno = 1021
pos = 50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, 0]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Bullet (Diamondback)
[Statedef 1021]
type = A
movetype = A
anim = 1001
ctrl = 0
velset = 17,0
sprpriority = -1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light         ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 50,5
pausetime = 0,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-85
hitsound = S1,3
guardsound = S2,0
ground.type = Low      ;Low,Trip,None
ground.slidetime = 9
ground.hittime = 9
air.hittime = 9
ground.velocity = -3,0
air.velocity = -3,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveHit

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveGuarded

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 130

;---------------------------------------------------------------------------------------------------------------
;Diamondback Crits
[Statedef 1022]
type = S
movetype = A
physics = N
anim = 1020
ctrl = 0
velset = 0,0
poweradd = 60

[State 0, VarAdd]
type = VarAdd
trigger1 = time = 0
v =  1   
value = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1022,0
volumescale = 255
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1022,0
volumescale = 255

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "BulletCrits"
stateno = 1023
pos = 50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, 0]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Bullet (Diamondback Crits)
[Statedef 1023]
type = A
movetype = A
anim = 1001
ctrl = 0
velset = 17,0
sprpriority = -1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag =          ;HLA
animtype = hard        ;light,medium,hard,back,up,diagup
air.animtype = hard
damage = 155,
pausetime = 0,5
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-85
hitsound = S1,3
guardsound = S2,0
ground.type = Low      ;Low,Trip,None
ground.slidetime = 9
ground.hittime = 9
air.hittime = 9
ground.velocity = -3,0
air.velocity = -3,0

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 1050
stateno = 1051
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveHit

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveGuarded

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 130
;---------------------------------------------------------------------------------------------------------------
;Conniver's Kunai
[Statedef 1100]
type = S
movetype = A
physics = N
anim = 1100
ctrl = 0
velset = 0,0
poweradd = 20

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
helpertype = normal ;player
name = "Conniver's Kunai Proj."
stateno = 1101
ID = 1101
pos = 20,-85
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = AnimElem = 4
value = S0,0

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Conniver's Kunai (Proj.)
[Statedef 1101]
type = A
movetype = A
anim = 1101
ctrl = 0
velset = 12,0
sprpriority = 2

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = med          ;light,medium,hard,back,up,diagup
air.animtype = med
damage = 45,10
pausetime = 0,15
sparkno = 0
guard.sparkno = 40
sparkxy = 0,0
hitsound = S8,2
guardsound = S2,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 5
ground.hittime = 5
air.hittime = 5
ground.velocity = -6,0
air.velocity = -6,0
ground.cornerpush.veloff = 0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = movehit
v = 2   
value = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveHit 
value = 1102

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveGuarded

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 180
trigger2 = FrontEdgeDist <= -10
trigger3 = BackEdgeDist <= -10
;---------------------------------------------------------------------------------------------------------------
;Conniver's Kunai (Heal)
[Statedef 1102]
type = A
movetype = A
anim = 1102
ctrl = 0
velset = 0,0
sprpriority = 2

[State 0, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0
;---------------------------------------------------------------------------------------------------------------
;Conniver's Kunai (Air)
[Statedef 1105]
type = A
movetype = A
physics = A
anim = 1105
ctrl = 0
poweradd = 20

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 2
helpertype = normal ;player
name = "Conniver's Kunai Proj."
stateno = 1106
ID = 1101
pos = 20,-85
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S0,0

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Conniver's Kunai (Air Proj.)
[Statedef 1106]
type = A
movetype = A
anim = 1101
ctrl = 0
velset = 6,12
sprpriority = 2

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = med          ;light,medium,hard,back,up,diagup
air.animtype = med
damage = 50,5
pausetime = 0,15
sparkno = 0
guard.sparkno = 40
sparkxy = 0,0
hitsound = S8,2
guardsound = S2,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 9
ground.hittime = 9
air.hittime = 9
ground.velocity = -6,0
air.velocity = -6,0
ground.cornerpush.veloff = 0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = movehit
v = 2   
value = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveHit 
value = 1102

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveGuarded

[State 0, DestroySelf]
type = DestroySelf
trigger1 = pos y > 0
trigger2 = Time = 180
;---------------------------------------------------------------------------------------------------------------
;Spycicle
[Statedef 1110]
type = S
movetype = A
physics = N
anim = 1110
ctrl = 0
velset = 0,0
poweradd = 40

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1110,0

[State 0, HitDef]
type = HitDef
triggerall = enemynear, movetype!= H
trigger1 = time = 0
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 130,2
pausetime = 5,5
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = S1110,1
guardsound = S2,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 14
ground.hittime = 14
air.hittime = 14
ground.velocity = 0,0
air.velocity = 0,0
p2stateno = 1111
getpower = 300,0
givepower = -200,0
kill = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = MoveHit
trigger1 = HitPauseTime = 5
ignorehitpause = 1
value = S1110,2
volumescale = 255

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Hit by Spycicle
[Statedef 1111]
type = S
movetype = H
physics = N
velset = 0,0

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 0,170,255
mul = 100,255,255
sinadd = 85,55,110,6
invertall = 0
color = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 5010

[State 0, SelfState]
type = SelfState
trigger1 = Time = 60
value = ifelse(statetype = S, 0, 5030) 
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Sharp Dresser (Parry)
[Statedef 1120]
type = S
movetype = A
physics = N
anim = 1120
ctrl = 0
velset = 0,0

[State 0, PalFXWiz]
type = PalFX
trigger1 = animelem = 2
time = 16
add = 166,20,4
mul = 166,20,4
sinadd = 255,0,0,5
invertall = 0
color = 256

[State 0, ReversalDef]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,AA          ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,10
sparkno = -1
hitsound = -1
p1stateno = 1121

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Sharp Dresser (Counterattack)
[Statedef 1121]
type = S
movetype = A
physics = N
anim = 1121
ctrl = 0
velset = 0,0
poweradd = 20

[State 0, PalFXWiz]
type = PalFX
trigger1 = time = 0
time = 1
add = 0,0,0
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S0,0

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MA-
guardflag =         ;HLAFD+-
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = hard
damage = 250,0
pausetime = 0,0
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-75
hitsound = S1120,0
guardsound = S2,2
ground.type = Trip      ;Low,Trip,None
ground.slidetime = 10
ground.hittime = 10
air.hittime = 10
ground.velocity = 0,0
air.velocity = 0,0
fall = 1
getpower = 500

[State 0, Helper]
type = Helper
trigger1 = movehit = 1
helpertype = normal ;player
name = "CriticalHit"
ID = 1050
stateno = 1051
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Sapper (Light Variation)
[Statedef 1200]
type = S
movetype = A
physics = N
anim = 1200
ctrl = 0
velset = 0,0
poweradd = 20

[State 0, Helper]
type = Helper
triggerall = AnimElem = 3
trigger1 = p2bodydist x = [0,50]
trigger1 = enemy, stateno != [5100,5150]
trigger1 = enemy, pos y > -30
helpertype = normal ;player
name = "Sapper"
stateno = 1202
ID = 1202
pos = 50,-30
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
[State 0, Helper]
type = Helper
triggerall = AnimElem = 3
trigger1 = p2bodydist x != [0,50]
trigger2 = enemy, stateno = [5100,5150]
trigger3 = enemy, pos y <= -30
helpertype = normal ;player
name = "Sapper"
stateno = 1204
ID = 1202
pos = 50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Sapper (Hit Opponent)
[Statedef 1202]
type = A
movetype = A
physics = N
anim = 1202
ctrl = 0
velset = 0,0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = time = 0
v = 1    
value = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,1
volumescale = 255
channel = 2
loop = 1

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,NP       
hitflag = MAF       
guardflag =                
animtype = hard       
air.animtype = hard
damage = 2,0
pausetime = 0,0
;guard.pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = -1
guardsound = -1
ground.type = High      ;Low,Trip,None
ground.slidetime = 0
ground.hittime = 1
air.hittime = 1
ground.velocity = 0,0
air.velocity = 0,0
p1getp2facing = 0
fall = 0
fall.yvelocity = -4.5
fall.recover = 1
fall.recovertime = 4
fall.damage = 0
down.bounce = 0
id = 0
chainID = -1
nochainID = -1
hitonce = 1
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
getpower = 0,0
givepower = 0,0
palfx.time = 0
envshake.time = 0
fall.envshake.time = 0

[State 0, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA,AA,AP,AT
slot = 0
stateno = 1205
time = -1
forceair = 0
[State 0, HitBy]
type = HitBy
trigger1 = time = 0
value = SCA,AA,AP
time = -1

[State 0, StopSnd]
type = StopSnd
trigger1 = time = 90
trigger2 = p2bodydist x != [-50,50]
channel = 2

[State 0, Helper]
type = Helper
trigger1 = time = 90
trigger2 = p2bodydist x != [-50,50]
helpertype = normal ;player
name = "SapperDestroyed"
ID = 1205
stateno = 1205
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0


[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 90
trigger2 = p2bodydist x != [-50,50]



;---------------------------------------------------------------------------------------------------------------
;Sapper (On the Opponent)
[Statedef 1204]
type = S
movetype = I
physics = N
anim = 1204
ctrl = 0
velset = 0,0
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1200,1
volumescale = 255
channel = 2
loop = 1

[State 0, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA,AA,AP,AT
slot = 0
stateno = 1205
time = -1
forceair = 0
[State 0, HitBy]
type = HitBy
trigger1 = time = 0
value = SCA,AA,AP
time = -1

[State 0, StopSnd]
type = StopSnd
trigger1 = Time = 120
channel = 2

[State 0, Helper]
type = Helper
trigger1 = time = 120
helpertype = normal ;player
name = "SapperDestroyed"
ID = 1205
stateno = 1205
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0


[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 120

;Sapper (Destroyed)
[Statedef 1205]
type = A
movetype = I
physics = N
anim = 1205
ctrl = 0
velset = 0,0

[State 0, Gravity]
type = Gravity
trigger1 = 1

[State -1]
Type = AssertSpecial
Trigger1 = pos y >= 0
Flag = Noshadow
IgnoreHitPause = 1

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = F3
ID = 1205
pos = 0,0
postype = p1 
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 3,3
sprpriority = 9
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 0, StopSnd]
type = StopSnd
trigger1 = time = 0
channel = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1 
value = S1200,0
volumescale = 255
channel = 2

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 120
;---------------------------------------------------------------------------------------------------------------
;Sapper (Medium Variation)
[Statedef 1210]
type = S
movetype = A
physics = N
anim = 1200
ctrl = 0
velset = 0,0
poweradd = 40

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 3
helpertype = normal ;player
name = "Sapper"
stateno = 1211
ID = 1202
pos = 50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Sapper (M Proj.)
[Statedef 1211]
type = S
movetype = A
physics = S
anim = 1211
ctrl = 0

[State 0, VelSet]
type = VelSet
trigger1 = time = [0,16]
x = 16-(1*time)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1200,1
volumescale = 255
channel = 2
loop = 1

[State 0, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S,SP       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAFD        ;HLAFD+-
damage = 0,0
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = -1
guardsound = -1
ground.velocity = 0,0
air.velocity = 0,0
p1stateno = 1212

[State 0, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA,AA,AP,AT
slot = 0
stateno = 1205
time = -1
forceair = 0
[State 0, HitBy]
type = HitBy
trigger1 = time = 0
value = SCA,AA,AP
time = -1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 2
statetype = S       ;S,A,C,L
movetype = I        ;I,A,H
physics = S         ;A,C,S,N

[State 0, StopSnd]
type = StopSnd
trigger1 = Time = 120
channel = 2

[State 0, Helper]
type = Helper
trigger1 = time = 120
helpertype = normal ;player
name = "SapperDestroyed"
ID = 1205
stateno = 1205
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 120

;---------------------------------------------------------------------------------------------------------------
;----------------------------------------------------------------------------------------------------------------
;Hit by Sapper (Medium Variation)
[Statedef 1212]
type = S
movetype = H
physics = N
velset = 0,0
ctrl = 0
anim = 1212

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = time = 0
v = 1    
value = 1


[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,NP       
hitflag = MAFD       
guardflag =                
animtype = hard       
air.animtype = hard
damage = 2,0
pausetime = 0,0
;guard.pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = -1
guardsound = -1
ground.type = High      ;Low,Trip,None
ground.slidetime = 0
ground.hittime = 1
air.hittime = 1
ground.velocity = 0,0
air.velocity = 0,0
p1getp2facing = 0
fall = 0
fall.yvelocity = -4.5
fall.recover = 1
fall.recovertime = 4
fall.damage = 0
down.bounce = 0
id = 0
chainID = -1
nochainID = -1
hitonce = 1
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
getpower = 0,0
givepower = 0,0
palfx.time = 0
envshake.time = 0
fall.envshake.time = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,1
volumescale = 255
channel = 2
loop = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA,AA,AP,AT
time = -1

[State 0, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA,AA,AP  
slot = 0
stateno = 1205
time = 1
forceair = 0

[State 0, StopSnd]
type = StopSnd
trigger1 = time = 90
trigger2 = p2bodydist x != [-50,50]
channel = 2


[State 0, Helper]
type = Helper
trigger1 = time = 90
trigger2 = p2bodydist x != [-50,50]
helpertype = normal ;player
name = "SapperDestroyed"
ID = 1205
stateno = 1205
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0


[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 90
trigger2 = p2bodydist x != [-50,50]

;---------------------------------------------------------------------------------------------------------------
;Sapper (Hard Variation)
[Statedef 1220]
type = S
movetype = A
physics = N
anim = 1220
ctrl = 0
velset = 0,0
poweradd = 40

[State 0, Helper]
type = Helper
triggerall = AnimElem = 3
trigger1 = p2bodydist x = [0,50]
trigger1 = enemy, stateno != [5100,5150]
trigger1 = enemy, pos y > -30
helpertype = normal ;player
name = "Sapper"
stateno = 1222
ID = 1202
pos = 50,-30
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
[State 0, Helper]
type = Helper
triggerall = AnimElem = 3
trigger1 = p2bodydist x != [0,50]
trigger2 = enemy, stateno = [5100,5150]
trigger3 = enemy, pos y <= -30
helpertype = normal ;player
name = "Sapper"
stateno = 1224
ID = 1202
pos = 50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
ownpal = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------------------------------------------------------------------------------
;Hit by Sapper (Hard Variation)
[Statedef 1222]
type = A
movetype = A
physics = N
velset = 0,0
anim = 1222

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = time = 0
v = 1    
value = 1

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = A,NP       
hitflag = MAF       
guardflag =                
animtype = hard       
air.animtype = hard
damage = 0,0
pausetime = 0,0
;guard.pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = -1
guardsound = -1
ground.type = High      ;Low,Trip,None
ground.slidetime = 0
ground.hittime = 1
air.hittime = 1
ground.velocity = 0,0
air.velocity = 0,0
p1getp2facing = 0
fall = 0
fall.yvelocity = -4.5
fall.recover = 1
fall.recovertime = 4
fall.damage = 0
down.bounce = 0
id = 0
chainID = -1
nochainID = -1
hitonce = 1
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
getpower = 10,0
givepower = -15,0
palfx.time = 0
envshake.time = 0
fall.envshake.time = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
trigger2 = time = 100
trigger3 = time = 200
trigger4 = time = 300
trigger5 = time = 400
value = S1220,0+random%5
volumescale = 180
channel = 3

[State 0, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA,AA,AP,AT
slot = 0
stateno = 1225
time = -1
forceair = 0
[State 0, NotHitBy]
type = HitBy
trigger1 = time = 0
value = SCA,AA,AP
time = -1

[State 0, StopSnd]
type = StopSnd
trigger1 = time = 90
trigger2 = p2bodydist x != [-50,50]
channel = 3

[State 0, Helper]
type = Helper
trigger1 = time = 90
trigger2 = p2bodydist x != [-50,50]
helpertype = normal ;player
name = "RedTapeRecorderDestroyed"
ID = 1205
stateno = 1225
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0


[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 90
trigger2 = p2bodydist x != [-50,50]


;---------------------------------------------------------------------------------------------------------------
;Red Tape Recorder (On the Ground)
[Statedef 1224]
type = S
movetype = A
physics = N
anim = 1224
ctrl = 0
velset = 0,0
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
trigger2 = time = 100
trigger3 = time = 200
trigger4 = time = 300
trigger5 = time = 400
value = S1220,0+random%5
volumescale = 180
channel = 3

[State 0, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA,AA,AP,AT
slot = 0
stateno = 1225
time = -1
forceair = 0
[State 0, NotHitBy]
type = HitBy
trigger1 = time = 0
value = SCA,AA,AP
time = -1

[State 0, StopSnd]
type = StopSnd
trigger1 = Time = 120
channel = 3

[State 0, Helper]
type = Helper
trigger1 = time = 120
helpertype = normal ;player
name = "RedTapeRecorderDestroyed"
ID = 1205
stateno = 1225
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0


[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 120

;Red Tape Recorder (Destroyed)
[Statedef 1225]
type = A
movetype = I
physics = N
anim = 1225
ctrl = 0
velset = 0,0

[State 0, Gravity]
type = Gravity
trigger1 = 1

[State -1]
Type = AssertSpecial
Trigger1 = pos y >= 0
Flag = Noshadow
IgnoreHitPause = 1

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = F3
ID = 1205
pos = 0,0
postype = p1 
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 3,3
sprpriority = 9
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 0, StopSnd]
type = StopSnd
trigger1 = time = 0
channel = 3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1 
value = S1200,0
volumescale = 255
channel = 3


[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 120
;---------------------------------------------------------------------------------------------------------------
;Invis Watch
[Statedef 1300]
type = S
movetype = I
physics = N
anim = 1300
ctrl = 0
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S1300,0
volumescale = 255

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1301
;---------------------------------------------------------------------------------------------------------------
;Invis Watch (Moving Around)
[Statedef 1301]
type = S
movetype = I
physics = S
anim = 1301
sprpriority = 0

[State 731, ChangeAnim]
type = ChangeAnim
triggerall = Anim != 1301
trigger1 = Vel X = 0
trigger1 = Vel Y = 0
trigger2 = Vel X = 0
trigger2 = Vel Y > 0
value = 1305

[State 731, ChangeAnim]
type = ChangeAnim
triggerall = Anim != 1301
triggerall = Vel X > 0
trigger1 = Vel Y = 0
trigger2 = Vel Y != 0
value = 1305

[State 731, ChangeAnim]
type = ChangeAnim
triggerall = Anim != 1301
trigger1 = Vel X = 0
trigger1 = Vel Y < 0
value = 1305

[State 731, ChangeAnim]
type = ChangeAnim
triggerall = Anim != 1301
triggerall = Vel X < 0
trigger1 = Vel Y = 0
trigger2 = Vel Y != 0
value = 1305

[State 731, VelSet]
type = VelSet
trigger1 = Var(59) <= 0
trigger1 = Command != "holdfwd"
trigger1 = Command != "holdback"
x = 0
y = 0

[State 731, VelSet]
type = VelSet
trigger1 = Var(59) <= 0
trigger1 = Command = "holdfwd"
trigger1 = Command != "holdback"
Trigger2 = var(59)>0
x = 2
y = ifelse(Pos Y < -4.3, 4.3, 0)

[State 731, VelSet]
type = VelSet
trigger1 = Var(59) <= 0
trigger1 = Command = "holdback"
trigger1 = Command != "holdfwd"
x = -2
y = ifelse(Pos Y < -4.3, 4.3, 0)

[State 731, VelSet]
type = VelSet
trigger1 = Var(59) <= 0
trigger1 = Command = "FF"
trigger1 = Command != "FF"
x = 4.3
y = ifelse(Pos Y < -4.3, 4.3, 0)

[State 731, VelSet]
type = VelSet
trigger1 = Var(59) <= 0
trigger1 = Command = "FF"
trigger1 = Command != "FF"
x = -4.3
y = ifelse(Pos Y < -4.3, 4.3, 0)

[State 731, Turn]
type = Turn
trigger1 = P2Dist X < 0
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"

[State 0, ChangeState]
type = ChangeState
triggerall = !Var(59)
trigger1 = command = "Invis Watch"
value = 1302

[State 0, Helper]
type = Helper
triggerall = NumHelper(1305) = 0
trigger1 = root, stateno!= 1301
trigger1 = root, stateno != 1302
helpertype = normal ;player
name = "Damage Boost"
ID = 1305
stateno = 1305
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0


[State 0, ChangeState]
type = ChangeState
trigger1 = Var(59) <= 0
trigger1 = command = "x"
Trigger2 = var(59)>0
trigger2 = enemynear, pos x <= 65
trigger2 = (EnemyNear,Const(size.head.pos.y)) <= -60
trigger2 = random<var(50) * 25
value = 200
[State 0, ChangeState]
type = ChangeState
trigger1 = Var(59) <= 0
trigger1 = command = "y"
Trigger2 = var(59)>0
trigger2 = p2bodydist x <= 35
trigger2 = random<var(50) * 25
value = 210
[State 0, ChangeState]
type = ChangeState
trigger1 = Var(59) <= 0
trigger1 = command = "a"
Trigger2 = var(59)>0
trigger2 = p2bodydist x  <= 45
trigger2 = random<var(50) * 25
value = 230
[State 0, ChangeState]
type = ChangeState
trigger1 = Var(59) <= 0
trigger1 = command = "b"
Trigger2 = var(59)>0
trigger2 = p2bodydist x <= 50
trigger2 = random<var(50) * 25
value = 240

[State 0, ChangeState]
type = ChangeState
trigger1 = Time = 180
value = 1303
;---------------------------------------------------------------------------------------------------------------
;Invis Watch Uncloak
[Statedef 1302]
type = S
movetype = I
physics = N
anim = 1302
ctrl = 0
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S1300,1
volumescale = 255

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Invis Watch Too Long
[Statedef 1303]
type = S
movetype = I
physics = N
anim = 1302
ctrl = 0
velset = 0,0

[State 0, LifeAdd]
type = LifeAdd
trigger1 = time = 0
value = -200
kill = 1
absolute = 0 

[State 0, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 3    
value = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S1300,1
volumescale = 255

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Damage Boost Helper
[Statedef 1305]
type = S
movetype = I
physics = S
anim = 99998
sprpriority = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA,AA,AP,AT
time = -1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time >= 30


;---------------------------------------------------------------------------------------------------------------
;Snack Attack
[Statedef 1310]
type = S
movetype = A
physics = N
anim = 1310
ctrl = 0
velset = 0,0
poweradd = 30

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "Snack Attack"
stateno = 1311
ID = 1311
pos = 60,-110
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Snack Attack Proj.
[Statedef 1311]
type = A
movetype = A
physics = N
anim = 1311
ctrl = 0
velset = 2,-9

[State 0, Veladd]
type = Veladd
trigger1 = 1
y = 0.25

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S,ST        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = M-        ;HLAFD+-
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = hard
damage = 30,0
pausetime = 0,0
sparkno = 0
guard.sparkno = 40
sparkxy = 0,0
hitsound = S8,0
guardsound = S2,2
ground.type = High      ;Low,Trip,None
ground.velocity = 0,0
air.velocity = 0,0
p1stateno = 1312
p2stateno = 1313
kill = 0
guard.dist = 0


[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 81
;---------------------------------------------------------------------------------------------------------------
;Snack Attack (Contact on Opponent)
[Statedef 1312]
type = S
movetype = I
physics = N
anim = 1312
ctrl = 0
velset = 0,0

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = 0

[State 0, TargetBind]
type = TargetBind
trigger1 = time = 0
pos = 10,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 6
trigger3 = animelem = 9
trigger4 = animelem = 12
trigger5 = animelem = 15
trigger6 = animelem = 18
trigger7 = animelem = 21
value = S8,0

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
trigger2 = animelem = 6
trigger3 = animelem = 9
trigger4 = animelem = 12
trigger5 = animelem = 15
trigger6 = animelem = 18
trigger7 = animelem = 21
anim = F0
pos = -10,-75
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 4
ownpal = 1

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 3
trigger2 = animelem = 6
trigger3 = animelem = 9
trigger4 = animelem = 12
trigger5 = animelem = 15
trigger6 = animelem = 18
value = -35
kill = 0

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 21
value = -50

[State 0, HitAdd]
type = HitAdd
trigger1 = animelem = 3
trigger2 = animelem = 6
trigger3 = animelem = 9
trigger4 = animelem = 12
trigger5 = animelem = 15
trigger6 = animelem = 18
trigger7 = animelem = 21
value = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------------------------------------------
;Hit by Snack Attack
[Statedef 1313]
type = S
movetype = H
physics = N
velset = 0,0

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 1313

[State 0, SelfState]
type = SelfState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Dead Ringer (Parry)
[Statedef 1320]
type = S
movetype = A
physics = N
anim = 1320
ctrl = 0
velset = 0,0

[State 0, ReversalDef]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,NA,SA,HA,NP,SP,HP           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,0
sparkno = 0
hitsound = S1,0
p1stateno = 1321

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Dead Ringer (Success)
[Statedef 1321]
type = S
movetype = I
physics = N
anim = 1301
ctrl = 0
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S5000,0+random%10
volumescale = 255

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 1321
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 2
ownpal = 1
[State 731, ChangeAnim]
type = ChangeAnim
triggerall = Anim != 1301
trigger1 = Vel X = 0
trigger1 = Vel Y = 0
trigger2 = Vel X = 0
trigger2 = Vel Y > 0
value = 1305

[State 731, ChangeAnim]
type = ChangeAnim
triggerall = Anim != 1301
triggerall = Vel X > 0
trigger1 = Vel Y = 0
trigger2 = Vel Y != 0
value = 1305

[State 731, ChangeAnim]
type = ChangeAnim
triggerall = Anim != 1301
trigger1 = Vel X = 0
trigger1 = Vel Y < 0
value = 1305

[State 731, ChangeAnim]
type = ChangeAnim
triggerall = Anim != 1301
triggerall = Vel X < 0
trigger1 = Vel Y = 0
trigger2 = Vel Y != 0
value = 1305

[State 731, VelSet]
type = VelSet
trigger1 = Var(59) <= 0
trigger1 = Command != "holdfwd"
trigger1 = Command != "holdback"
x = 0
y = 0

[State 731, VelSet]
type = VelSet
trigger1 = Var(59) <= 0
trigger1 = Command = "holdfwd"
trigger1 = Command != "holdback"
Trigger2 = var(59)>0
x = 2
y = ifelse(Pos Y < -4.3, 4.3, 0)

[State 731, VelSet]
type = VelSet
trigger1 = Var(59) <= 0
trigger1 = Command = "holdback"
trigger1 = Command != "holdfwd"
x = -2
y = ifelse(Pos Y < -4.3, 4.3, 0)

[State 731, VelSet]
type = VelSet
trigger1 = Var(59) <= 0
trigger1 = Command = "FF"
trigger1 = Command != "FF"
x = 4.3
y = ifelse(Pos Y < -4.3, 4.3, 0)

[State 731, VelSet]
type = VelSet
trigger1 = Var(59) <= 0
trigger1 = Command = "FF"
trigger1 = Command != "FF"
x = -4.3
y = ifelse(Pos Y < -4.3, 4.3, 0)

[State 731, Turn]
type = Turn
trigger1 = P2Dist X < 0
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"


[State 0, Helper]
type = Helper
triggerall = NumHelper(1305) = 0
trigger1 = root, stateno!= 1321
trigger1 = root, stateno != 1322
helpertype = normal ;player
name = "Damage Boost"
ID = 1305
stateno = 1305
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0


[State 0, ChangeState]
type = ChangeState
trigger1 = Var(59) <= 0
trigger1 = command = "x"
Trigger2 = var(59)>0
trigger2 = enemynear, pos x <= 65
trigger2 = (EnemyNear,Const(size.head.pos.y)) <= -60
trigger2 = random<var(50) * 25
value = 200
[State 0, ChangeState]
type = ChangeState
trigger1 = Var(59) <= 0
trigger1 = command = "y"
Trigger2 = var(59)>0
trigger2 = p2bodydist x <= 35
trigger2 = random<var(50) * 25
value = 210
[State 0, ChangeState]
type = ChangeState
trigger1 = Var(59) <= 0
trigger1 = command = "a"
Trigger2 = var(59)>0
trigger2 = p2bodydist x  <= 45
trigger2 = random<var(50) * 25
value = 230
[State 0, ChangeState]
type = ChangeState
trigger1 = Var(59) <= 0
trigger1 = command = "b"
Trigger2 = var(59)>0
trigger2 = p2bodydist x <= 50
trigger2 = random<var(50) * 25
value = 240


[State 0, ChangeState]
type = ChangeState
trigger1 = Time = 240
value = 1322
;---------------------------------------------------------------------------------------------------------------
;Dead Ringer Uncloak
[Statedef 1322]
type = S
movetype = I
physics = N
anim = 1302
ctrl = 0
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S1320,0
volumescale = 255

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S1320,0
volumescale = 255

[State 0, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------------
; Enforcer
[Statedef 3000]
type = S
movetype = A
physics = N
anim = 3000
ctrl = 0
velset = 0,0
poweradd = -1000

[State 3000, assertspecial]
type = assertspecial
trigger1 = time = [0,75]
flag = noBG
flag2 = noFG
flag3 = nobardisplay
ignorehitpause = 1

[State 0, SuperPause]
type = SuperPause
trigger1 = AnimElem = 1
time = 75
anim = -1
sound = S3000,0
pos = 0,0
movetime = 75
darken = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 5
trigger3 = animelem = 8
trigger4 = animelem = 11
trigger5 = animelem = 14
trigger6 = animelem = 17
value = S3000,1
volumescale = 255

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
trigger2 = animelem = 5
trigger3 = animelem = 8
trigger4 = animelem = 11
trigger5 = animelem = 14
trigger6 = animelem = 17
helpertype = normal ;player
name = "Bullet"
stateno = 3001
pos = 50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 3000, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------------------------------------------
;Bullet (Enforcer)
[Statedef 3001]
type = A
movetype = A
anim = 1001
ctrl = 0
velset = 20,0
sprpriority = -1

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = hard
damage = 50,10
pausetime = 0,25
sparkno = 0
guard.sparkno = 40
sparkxy = -10,-85
hitsound = S1,3
guardsound = S2,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 5
ground.hittime = 5
air.hittime = 5
ground.velocity = -8,0
air.velocity = -8,0
getpower = 0,0
fall = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveHit

[State 0, DestroySelf]
type = DestroySelf
trigger1 = MoveGuarded

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 100
;----------------------------------------------
; Fencing
[Statedef 3100]
type = S
movetype = A
physics = N
anim = 3100
ctrl = 0
velset = 0,0
poweradd = -1000

[State 3000, assertspecial]
type = assertspecial
trigger1 = time = [0,85]
flag = noBG
flag2 = noFG
flag3 = nobardisplay
ignorehitpause = 1

[State 0, SuperPause]
type = SuperPause
trigger1 = AnimElem = 1
time = 85
anim = -1
sound = S3000,0
pos = 0,0
movetime = 85
darken = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S200,0
volumescale = 255
channel = 0

[State 0, HitDef]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 9
attr = S,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = med          ;light,medium,hard,back,up,diagup
air.animtype = med
damage = 75,8
pausetime = 0,0
sparkno = 2
guard.sparkno = 40
sparkxy = -35,-72
hitsound = S209,0
guardsound = S2,2
ground.type = High      ;Low,Trip,None
ground.slidetime = 8
ground.hittime = 8
air.hittime = 8
ground.velocity = -3,0
air.velocity = -2,-1
getpower = 0,0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 10
movetype = I       
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 13
movetype = A     


[State 0, HitDef]
type = HitDef
trigger1 = AnimElem = 14
attr = S,HA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = M-        ;HLAFD+-
guardflag = 
animtype = med          ;light,medium,hard,back,up,diagup
air.animtype = med
damage = 1000,40
pausetime = 0,0
sparkno = -1
guard.sparkno = 40
sparkxy = 0,0
hitsound = S209,0
guardsound = -1
ground.type = High      ;Low,Trip,None
ground.slidetime = 8
ground.hittime = 8
air.hittime = 8
ground.velocity = -25,-12
air.velocity = -25,-12
fall = 1
getpower = 0,0
p2stateno = 1025

[State 0, Helper]
type = Helper
trigger1 = animelem = 14 && movehit
helpertype = normal ;player
name = "CriticalHit"
ID = 1050
stateno = 1051
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 3100, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------------
; Your Eternal Award
[Statedef 3200]
type = S
movetype = A
physics = N
anim = 3200
ctrl = 0
velset = 0,0
poweradd = -3000

[State 0, BGPalFX]
type = BGPalFX
trigger1 = 1
time = 10
add =184,66,41
mul = 184,66,41
sinadd = 0,0,0,10
color = 255

[State 3000, assertspecial]
type = assertspecial
trigger1 = time = [0,40]
flag = noBG
flag2 = noFG
flag3 = nobardisplay
ignorehitpause = 1

[State 0, SuperPause]
type = SuperPause
trigger1 = AnimElem = 1
time = 40
anim = -1
sound = S3000,0
pos = 0,0
movetime = 40
darken = -1

[State 0, ReversalDef]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,NA           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
pausetime = 0,0
sparkno = -1
hitsound =-1
p1stateno = 3201
p2stateno = 3202

[State 3100, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------------------------------------------------------------------
; Your Eternal Award (Success)
[Statedef 3201]
type = S
movetype = A
physics = N
anim = 3201
ctrl = 0
velset = 0,0
sprpriority = -1

[State 0, BGPalFX]
type = BGPalFX
trigger1 = 1
time = 10
add =184,66,41
mul = 184,66,41
sinadd = 0,0,0,10
color = 255

[State 0, TargetBind]
type = TargetBind
trigger1 = time = 0
pos = -30,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S5000,0+random%10
volumescale = 255

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S1320,0
volumescale = 255

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S1320,0
volumescale = 255

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 1321
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 2
ownpal = 1

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 55
value = -800

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 55
value = S1120,0
volumescale = 255

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 55
value = S8,0
volumescale = 255

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 55
value = S3200,0
volumescale = 255

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 55
anim = F3
pos = -10,-70
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 2
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 55
helpertype = normal ;player
name = "CriticalHit"
ID = 1050
stateno = 1051
pos = -15,-30+floor(Enemy,Const(Size.Head.Pos.Y))
postype = p2    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 0.1 
size.yscale = 0.1
persistent = 0

[State 0, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------------------------------------------------------------------
; Hit by Your Eternal Award
[Statedef 3202]
type = S
movetype = H
physics = N
velset = 0,0

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 58
anim = 0
pos = -30,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 90
scale = .91,.91
sprpriority = 3
ontop = 0
shadow = 255,0,0
ownpal = 1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 3202

[State 0, 2]
type = SelfState
Trigger1 = AnimTime = 0
value = 5110
ctrl = 1
;--------------------------------------------------------------------------------
; Hit by Wall Bounce - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 1025]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = 1
value = 1025

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1026

;------------------
; Hit by Wall Bounce - flying through the air
; (a custom gethit state)
[Statedef 1026]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
y = .45

[State 1026, No scroll]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1027

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; Hit by Wall Bounce - hit wall
; (a custom gethit state)
[Statedef 1027]
type    = A
movetype= H
physics = N

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1027, Spark]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1027

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1028

;------------------
; Hit by Wall Bounce - bounce off wall
; (a custom gethit state)
[Statedef 1028]
type    = A
movetype= H
physics = N

[State 1028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -6

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100
;-----------------------------------------------------------------------------
;Super Jump
[Statedef 7000]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 7000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 13
value = 0

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdfwd"
v = 13
value = 1

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdback"
v = 13
value = -1

[State 7000, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 7001
ctrl = 1

;-----------------------------------------------------------------------------
;Super Jump
[Statedef 7001]
type = A
physics = A
ctrl = 1
anim = 41
velset = 0,-15.3

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25

[State 0, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 20
length = 20
palcolor = 255
palbright = 0,0,255
palcontrast = 0,0,255
paladd = 0,0,-128
trans = add


[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 42
trigger1 = Time = [0,5]
x = 4

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 43
trigger1 = Time = [0,5]
x = -3.5

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(13) = 0
trigger1 = Time = [0,4]
value = 41

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(13) = 1
trigger1 = Time = [0,4]
value = 42

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(13) = -1
trigger1 = Time = [0,4]
value = 43

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = time = 20
value = 44

[State 7001, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 9999,5

[State 7001, Super Jump FX]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 9995
postype = p1
pos = 0,0
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = .5,.5

[State 7001, Ground Circle]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 9006
postype = p1
pos = -7, 20
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 2, 2

[State 7001, Var]
type = VarSet
trigger1 = Time = 0
v = 12
value = 1

;-----------------------------------------------------------------------------
;Super Jump
[Statedef 7002]
type    = A
physics = A
ctrl = 1

[State 7002, Vel]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7002, Vel]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25

[Statedef 54321]
Anim = 99998

[State ]
Type = NULL
TriggerAll = IsHelper(54321)
Trigger1 = GameTime > Root,Var(30)
Trigger1 = 0 && Root,Cond(1, (Var(30) := -1), 0)
IgnoreHitPause = 1

[State ]
Type = ReversalDef
TriggerAll = 0
Trigger1 = 1
Reversal.Attr = SCA,AA,AT,AP
IgnoreHitPause = 1

[State ]
Type = TargetDrop
TriggerAll = 0
TriggerAll = NumTarget
Trigger1 = Target,ID != Enemy(0),ID
Trigger1 = Target,ID != Enemy(NumEnemy>1),ID
IgnoreHitPause = 1

[State ]
Type = ChangeAnim
TriggerAll = 0
Trigger1 = NumTarget
Value = 99998
IgnoreHitPause = 1

[State ]
Type = TargetState
TriggerAll = 0
Trigger1 = NumTarget
Trigger1 = Root,Var(30) != -1
Trigger1 = Root,Var(30) > GameTime
Trigger1 = Target,StateNo != 5255
Value = 5525
IgnoreHitPause = 1

[State ]
Type = DisplayToClipboard
TriggerAll = 0
Trigger1 = 1
Text = "Target=%d"
Params = NumTarget
IgnoreHitPause = 1

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

[Statedef -2]

[State -2, LifeAdd]
type = LifeAdd
trigger1 = NumHelper (1101) >= 1
trigger1 = var(2) >= 1
value = 3
kill = 1
absolute = 0

[State -2, VarSet]
type = VarSet
trigger1 = NumHelper (1101) = 0
v = 2  
value = 0 


;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 47, 0

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 47, 0

[State -2, Get Hit Sound]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5000 && anim != 5010
trigger2 = stateno = 5010
trigger2 = anim != 5020
value = S5000,0+random%4
channel = 0
ignorehitpause = 1
volume = 255

[State -2, Get Hit Sound]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5030 || stateno = 5060
trigger1 = anim != 5030 && anim != 5060
trigger2 = stateno = 5030
trigger2 = anim != 5060
value = S5000,4+random%6
channel = 0
ignorehitpause = 1
volume = 255


[State -3]
Type = DisplayToClipboard
Trigger1 = 1
Text = "Stun=%d"
Params = Cond(IsHelper = 0, (Var(30)), (Root,Var(30)))
IgnoreHitPause = 1

[State -3]
Type = Helper
Trigger1 = NumHelper(54321) = 0
Name = "Stun Manager"
ID = 54321
StateNo = 54321
PosType = P1
Pos = -10000,10000
SuperMoveTime = 99999
PauseMoveTime = 99999
IgnoreHitPause = 1

