; 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 = 800			;Amount of life to start with
power = 3000		;Amount of maximum power
attack = 100		;attack power (more is stronger)
defence = 100		;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 = 15		;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 = 2			;Horizontal scaling factor.
yscale = 2			;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.4		;Walk forward
walk.back = -2.2		;Walk backward
run.fwd  = 4.6, 0		;Run forward (x, y)
run.back = -4.5,-3.8	;Hop backward (x, y)
jump.neu = 0,-8.4		;Neutral jumping velocity (x, y)
jump.back = -2.55		;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 = 1		;Number of air jumps allowed (opt)
airjump.height = 35	;Minimum distance from ground before you can air jump (opt)
yaccel = .44		;Vertical acceleration
stand.friction = .85	;Friction coefficient when standing
crouch.friction = .82	;Friction coefficient when crouching

[Quotes]
;Dominating a normal being
victory1 = "Flawless victory! ~ Administrator"
victory2 = "Flawless victory, you did well! Finally. ~ Administrator"
victory3 = "Flawless victory, now do it again! ~ Administrator"
victory4 = "Flawless defeat! ~ Administrator to the Enemy"
victory5 = "Humiliating defeat! ~ Administrator to the Enemy"
victory6 = "You didn't kill any of them! ~ Administrator to the Enemy"
victory7 = "Next time try killing one of them. ~ Administrator to the Enemy"

; 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
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = command = "holdback"
trigger1 = var(59)=0
trigger2 = var(59)>0
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
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; RUN_FWD
[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, CtrlSet]
type = CtrlSet
Triggerall = var(59)>0
trigger1 = 1
value = 0

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

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

; 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

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Variables used:
;1(Helper Variable): Sandman stun time
;2: Winpose quote select
;3: Stuff for the winpose by Gudine

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

[State 180, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,180]
flag = roundnotover
flag2 = nobardisplay

[State 5501, 2]
type = playSnd
trigger1 = time = 0
value = S171,(random%11)
volume = 255
persistent = 0

[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 = MatchOver = 1
trigger1 = WinKO
value = 184

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

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

[State 5501, 2]
type = playSnd
trigger1 = time = 0
value = S179,(random%6)
volume = 255
persistent = 0

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

;---------------------------------------------------------------------------
; Domination 1
[Statedef 182]
type = S
ctrl = 0
anim = 181
velset = 2.4,0

[State 180, AssertSpecial]
type = ScreenBound
trigger1 = Stateno = 182
value = 1

[State 180, AssertSpecial]
type = AssertSpecial
trigger1 = Stateno = 182
flag = roundnotover
flag2 = nobardisplay

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

[State 180, 1]
type = ChangeState
trigger1 = abs(Pos X - EnemyNear,Pos X) < 20
value = 183

;---------------------------------------------------------------------------
; Domination 2
[Statedef 183]
type = S
ctrl = 0
anim = 182
velset = 0,0
sprpriority = 4

[State 180, AssertSpecial]
type = ScreenBound
trigger1 = Stateno = 183
value = 1

[State 180, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,180]
flag = roundnotover
flag2 = nobardisplay

[State 5501, 2]
type = playSnd
trigger1 = fvar(2) = 0
value = S180,(random%19)
volume = 255
persistent = 0

[State 5501, 2]
type = playSnd
trigger1 = fvar(2) = 1
value = S181,(random%3)
volume = 255
persistent = 0

[State 5501, 2]
type = playSnd
trigger1 = fvar(2) = 2
value = S182,(random%6)
volume = 255
persistent = 0

[State 5501, 2]
type = playSnd
trigger1 = fvar(2) = 3
value = S183,(random%6)
volume = 255
persistent = 0

[State 5501, 2]
type = playSnd
trigger1 = fvar(2) = 4
value = S184,(random%5)
volume = 255
persistent = 0

[State 5501, 2]
type = playSnd
trigger1 = fvar(2) = 5
value = S185,(random%10)
volume = 255
persistent = 0

[State 5501, 2]
type = playSnd
trigger1 = fvar(2) = 6
value = S186,(random%6)
volume = 255
persistent = 0

[State 5501, 2]
type = playSnd
trigger1 = fvar(2) = 7
value = S187,(random%6)
volume = 255
persistent = 0

[State 5501, 2]
type = playSnd
trigger1 = fvar(2) = 8
value = S188,(random%5)
volume = 255
persistent = 0

[State 5501, 2]
type = playSnd
trigger1 = fvar(2) = 9
value = S189,(random%4)
volume = 255
persistent = 0

[State 5501, 2]
type = playSnd
trigger1 = fvar(2) = 10
value = S191,(random%4)
volume = 255
persistent = 0

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

;---------------------------------------------------------------------------
;Domination Startup
[Statedef 184]
type = S
ctrl = 0
anim = 183
velset = 0,0

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

[State 1000, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal 
name = "Scout Domination"
ID = 182
stateno = 182
pos = 0,0
postype = p1 

;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 190]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 190, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

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

[State 190, 4] ;Change to stand state
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 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Standing Light Punch
; 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  = 1				;Number of air juggle points move takes
;Commonly-used controllers:
velset = 4,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 5501, 2]
type = playSnd
trigger1 = animelem = 2
value = S200,(random%4)
volume = 255

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 25, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 10
sparkno = 0
sparkxy = -10, -76
hitsound = S200,4
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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

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

[State 5501, 2]
type = playSnd
trigger1 = animelem = 3
value = S200,(random%4)
volume = 255

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 25, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 10
sparkno = 0
sparkxy = -10, -76
hitsound = S200,5
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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

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

[State 5501, 2]
type = playSnd
trigger1 = time = 0
value = S220,(random%2)
volume = 255

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 30, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 10
sparkno = 0
sparkxy = -10, -76
hitsound = S220, 2
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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

;---------------------------------------------------------------------------
; Standing Light Kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 230

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

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

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

;---------------------------------------------------------------------------
; Standing Strong Kick
; CNS difficulty: easy
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 250

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

;---------------------------------------------------------------------------
; Crouching Light Punch
; 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  = 5
poweradd= 15
ctrl = 0
velset = 4,0
anim = 400

[State 5501, 2]
type = playSnd
trigger1 = animelem = 2
value = S200,(random%4)
volume = 255

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 25, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 10
sparkno = 0
sparkxy = -10, -76
hitsound = S200,4
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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

;---------------------------------------------------------------------------
; Crouching Medium Punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
velset = 4,0
anim = 410

[State 5501, 2]
type = playSnd
trigger1 = animelem = 3
value = S200,(random%4)
volume = 255

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 25, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 10
sparkno = 0
sparkxy = -10, -76
hitsound = S200,5
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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

;---------------------------------------------------------------------------
; Crouching Strong Punch
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
velset = 4,0
anim = 420

[State 5501, 2]
type = playSnd
trigger1 = time = 0
value = S220,(random%2)
volume = 255

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 30, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 10
sparkno = 0
sparkxy = -10, -76
hitsound = S220, 2
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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

;---------------------------------------------------------------------------
; Crouching Light Kick
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 430

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

;---------------------------------------------------------------------------
; Crouching Medium Kick
; CNS difficulty: easy
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 440

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

;---------------------------------------------------------------------------
; Crouch Strong Kick
; CNS difficulty: easy
; Description: This move uses "Trip" for the "ground.type" parameter in
;     its HitDef. It's a special type that puts the opponent in a tripped
;     animation as he falls. Also, the hitflag parameter in the HitDef
;     is set to "MAFD". The "D" indicates that a downed opponent can be
;     hit by the attack.
[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 70
ctrl = 0
anim = 450

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

;---------------------------------------------------------------------------
; Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 600

[State 5501, 2]
type = playSnd
trigger1 = time = 0
value = S220,(random%2)
volume = 255

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 25, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 10
sparkno = 0
sparkxy = -10, -76
hitsound = S220, 2
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

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

[State 600, 5]
type = Changeanim
trigger1 = AnimTime = 0
value = 44

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

[State 5501, 2]
type = playSnd
trigger1 = time = 0
value = S220,(random%2)
volume = 255

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 25, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 10
sparkno = 0
sparkxy = -10, -76
hitsound = S220, 2
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 610, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 600, 5]
type = Changeanim
trigger1 = AnimTime = 0
value = 44

;---------------------------------------------------------------------------
; Jump Strong Punch
; CNS difficulty: easy
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 70
ctrl = 0
anim = 620

[State 5501, 2]
type = playSnd
trigger1 = animelem = 4
value = S620,(random%4)
volume = 255

[State 5501, 2]
type = playSnd
trigger1 = animelem = 4
value = S1020,0
volume = 255

[State 100, 1]
type = VelSet 
trigger1 = animelem = 5
x = -5
y = -5

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 30, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 10
sparkno = 0
sparkxy = -10, -76
hitsound = S3, 2
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -4, 10
air.hittime = 12
fall = 1
yaccel = 0.8

[State 620, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 600, 5]
type = Changeanim
trigger1 = AnimTime = 0
value = 44

;---------------------------------------------------------------------------
; Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 20
ctrl = 0
anim = 630

[State 630, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

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

[State 640, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

;---------------------------------------------------------------------------
; Jump Strong Kick
; CNS difficulty: easy
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 70
ctrl = 0
anim = 650

[State 650, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

;---------------------------------------------------------------------------
; Imma lazily use this statedef for the Sandman Super
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1025

[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
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

;---------------------------------------------------------------------------
; Scout steals the KFM or whatever
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 1026
poweradd = 0

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = time = 40
value = -78

[State 810, Throw 11]
type = TargetState
trigger1 = time = 0
value = 821

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

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

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

;---------------------------------------------------------------------------
; Opponent thrown into the air
; (a custom gethit state)
; Description: This state has the opponent flying through the air and
;     falling down onto the ground. The SelfState controller sets the
;     opponent back using to his own state file when he his the ground.
;     Controllers 821,2 and 821,3 allow the opponent to recover by
;     hitting his recovery command when he is falling.
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 2.8,-7
poweradd = 40

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

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

;---------------------------------------------------------------------------
; Sandman
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 1
poweradd= 20
ctrl = 0
anim = 1000

[State 1000, 2]
type = playSnd
trigger1 = animelem = 5
value = S1001,(random%2)
volume = 255

[State 1000, Helper]
type = Helper
trigger1 = animelem = 5
trigger1 = NumHelper(1002) = 1
helpertype = normal 
name = "Baseball"
ID = 1007
stateno = 1007
pos = 0,-40
postype = p1 
size.ground.back = 4
size.ground.front = 4

[State 1000, Helper]
type = Helper
trigger1 = animelem = 5
trigger1 = NumHelper(1002) = 0
helpertype = normal 
name = "Baseball"
ID = 1002
stateno = 1002
pos = 0,-40
postype = p1 
size.ground.back = 4
size.ground.front = 4

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

;---------------------------------------------------------------------------
; Sandman Air
[Statedef 1001]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 20
ctrl = 0
anim = 1001

[State 1000, 2]
type = playSnd
trigger1 = animelem = 5
value = S1001,(random%2)
volume = 255

[State 1000, Helper]
type = Helper
trigger1 = animelem = 5
trigger1 = NumHelper(1002) = 1
helpertype = normal 
name = "Baseball"
ID = 1007
stateno = 1007
pos = 0,-40
postype = p1 
size.ground.back = 4
size.ground.front = 4

[State 1000, Helper]
type = Helper
trigger1 = animelem = 5
trigger1 = NumHelper(1002) = 0
helpertype = normal 
name = "Baseball"
ID = 1002
stateno = 1002
pos = 0,-40
postype = p1 
size.ground.back = 4
size.ground.front = 4

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

;---------------------------------------------------------------------------
; Sandmanball
[Statedef 1002]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 9,-6
anim = 1002

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

[State 1002, VarAdd]
type = VarAdd
trigger1 = !NumTarget
v = 1
value = 6

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

[State 200, 1]
type = HitDef
trigger1 = Time = 0
trigger1 = var(1) <= 100
attr = S, NA
damage = 15, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 0
sparkno = 0
sparkxy = -10, -76
hitsound = S200,4
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
p2stateno = 1003

[State 200, 1]
type = HitDef
trigger1 = Time = 0
trigger1 = var(1) > 100
attr = S, NA
damage = 45, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 0
sparkno = 0
sparkxy = -10, -76
hitsound = S200,4
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
p2stateno = 1003

[State 1000, Helper]
type = Helper
trigger1 = movecontact
helpertype = normal 
name = "Baseball hit"
ID = 1006
stateno = 1006
pos = 0,0
postype = p1

[State 5501, 2]
type = playSnd
trigger1 = var(1) <= 100
trigger1 = movehit = 1
value = S1001,2
volume = 255

[State 5501, 2]
type = playSnd
trigger1 = var(1) > 100
trigger1 = movehit = 1
value = S1001,3
volume = 255

[State 200, 5]
type = ChangeState
trigger1 = movehit = 1
value = 1005

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 200
trigger2 = moveguarded = 1

;---------------------------------------------------------------------------
; Get Stunned
[Statedef 1003]
type    = U
movetype= H
physics = N
anim = 5300

[State 1003, Gravity]
type = Gravity
trigger1 = Statetype = A

[State 1003, Lose Velocity]
type = Velset
trigger1 = Statetype != A
trigger1 = Pos Y > 0
x = 0
y = 0

[State 1003, Posset]
type = Posset
trigger1 = Pos Y > 0
y = 0

[State 1003, Statetypeset] 
type = StateTypeSet 
trigger1 = Pos Y >= 0
trigger1 = Statetype = A
trigger2 = Statetype != A
statetype = S 
physics = S


;---------------------------------------------------------------------------
; Go back to state 0
[Statedef 1004]
type    = U
movetype= H
physics = U

[State 1004, Selfstate]
type = SelfState
trigger1 = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Sandmanball (intangible)
[Statedef 1005]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1003
movehitpersist = 1

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

[State 1005, TargetState]
trigger1 = var(1) = 0
type = TargetState
value = 1004

[State 1005, DestroySelf]
type = DestroySelf
trigger1 = var(1) = 0

;---------------------------------------------------------------------------
; Sandmanball (tangible)
[Statedef 1006]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 65
ctrl = 0
velset = -3,-4
anim = 1004

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

[State 1003, Lose Velocity]
type = Velset
trigger1 = Pos Y > 0
x = -1
y = -2

[State 1005, DestroySelf]
trigger1 = root, Pos X = [Pos X-4, Pos X+4]
type = DestroySelf

;---------------------------------------------------------------------------
; Sandmanball
[Statedef 1007]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 9,-6
anim = 1002

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

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 45, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 0
sparkno = 0
sparkxy = -10, -76
hitsound = S200,4
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 1007, Helper]
type = Helper
trigger1 = movecontact = 1
helpertype = normal 
name = "Baseball hit"
ID = 1006
stateno = 1006
pos = 0,0
postype = p1

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 200
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
; Wrap Assassin
[Statedef 1008]
type    = S
movetype= A
physics = S
juggle  = 1
poweradd= 15
ctrl = 0
anim = 1005

[State 1000, 2]
type = playSnd
trigger1 = animelem = 5
value = S1000,(random%2)
volume = 255

[State 1000, Helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal 
name = "Ornament"
ID = 1008
stateno = 1010
pos = 0,-40
postype = p1 

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

;---------------------------------------------------------------------------
; Wrap Assassin Air
[Statedef 1009]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 15
ctrl = 0
anim = 1006

[State 1000, 2]
type = playSnd
trigger1 = animelem = 5
value = S1000,(random%2)
volume = 255

[State 1000, Helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal 
name = "Ornament"
ID = 1008
stateno = 1010
pos = 0,-40
postype = p1 
size.ground.back = 4
size.ground.front = 4

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

;---------------------------------------------------------------------------
; Ornament
[Statedef 1010]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 9,-6
anim = 1007

[State 1002, VarAdd]
type = VarAdd
trigger1 = !NumTarget
v = 1
value = 6

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

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 35, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 12, 0
sparkno = 0
sparkxy = -10, -76
hitsound = S1000,2
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 1010, PlaySnd]
type = PlaySnd
trigger1 = Pos Y = 0
value = S1000 , 1

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 200
trigger2 = movecontact = 1
trigger3 = Pos Y = 0

;---------------------------------------------------------------------------
; Flying Guillotine
[Statedef 1011]
type    = S
movetype= A
physics = S
juggle  = 1
poweradd= 65
ctrl = 0
anim = 1009

[State 1000, 2]
type = playSnd
trigger1 = animelem = 5
value = S200,(random%4)
volume = 255

[State 1000, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal 
name = "Guillotine"
ID = 1009
stateno = 1013
pos = 0,-40
postype = p1 

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

;---------------------------------------------------------------------------
; Flying Guillotine Air
[Statedef 1012]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 65
ctrl = 0
anim = 1010

[State 1000, 2]
type = playSnd
trigger1 = animelem = 5
value = S200,(random%4)
volume = 255

[State 1000, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal 
name = "Guillotine"
ID = 1009
stateno = 1013
pos = 0,-40
postype = p1 
size.ground.back = 4
size.ground.front = 4

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

;---------------------------------------------------------------------------
; Guillotine
[Statedef 1013]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 65
ctrl = 0
velset = 9,-6
anim = 1011

[State 1002, VarAdd]
type = VarAdd
trigger1 = !NumTarget
v = 1
value = 6

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

[State 6000, 2]
type = AngleDraw
trigger1 = Time >=0

[State 6000, 4]
type = AngleAdd
trigger1 = Time >= 0
value = -30

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 50, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 12, 0
sparkno = 0
sparkxy = -10, -76
hitsound = S1002,(random%7)
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 1010, PlaySnd]
type = PlaySnd
trigger1 = Pos Y = 0
value = S1003,(random%5)

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 100
trigger2 = movecontact = 1
trigger3 = Pos Y = 0

;---------------------------------------------------------------------------
; Pistol
[Statedef 1020]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 24
ctrl = 0
velset = 0,0
anim = 1020

[State 5501, 2]
type = playSnd
trigger1 = animelem = 1
value = S200,(random%4)
volume = 255

[State 5501, 2]
type = playSnd
trigger1 = animelem = 4
trigger2 = animelem = 6
trigger3 = animelem = 8
trigger4 = animelem = 10
trigger5 = animelem = 12
value = S1020,4
volume = 255

[State 1007, Helper]
type = Helper
trigger1 = animelem = 4
trigger2 = animelem = 6
trigger3 = animelem = 8
trigger4 = animelem = 10
trigger5 = animelem = 12
helpertype = normal 
name = "Pistol Bullet"
ID = 1020
stateno = 1021
pos = 10,-40
postype = p1

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

;---------------------------------------------------------------------------
; Pistol Bullet
[Statedef 1021]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 15, (0 - Random/550)
anim = 1024

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 15, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = 0
sparkxy = 0, 0
hitsound = S100,4
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 100
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
; Winger
[Statedef 1022]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 20
ctrl = 0
velset = 0,0
anim = 1021

[State 5501, 2]
type = playSnd
trigger1 = animelem = 1
value = S200,(random%4)
volume = 255

[State 5501, 2]
type = playSnd
trigger1 = animelem = 4
trigger2 = animelem = 6
trigger3 = animelem = 8
trigger4 = animelem = 10
trigger5 = animelem = 12
value = S1020,4
volume = 255

[State 1007, Helper]
type = Helper
trigger1 = animelem = 4
trigger2 = animelem = 6
trigger3 = animelem = 8
trigger4 = animelem = 10
trigger5 = animelem = 12
helpertype = normal 
name = "Winger Bullet"
ID = 1022
stateno = 1023
pos = 10,-40
postype = p1

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

;---------------------------------------------------------------------------
; Winger Bullet
[Statedef 1023]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 15, (0 - Random/550)
anim = 1024

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 19, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = 0
sparkxy = 0, 0
hitsound = S100,4
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 100
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
; Pretty Boy's Pocket Pistol
[Statedef 1024]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1022

[State 5501, 2]
type = playSnd
trigger1 = animelem = 1
value = S200,(random%4)
volume = 255

[State 5501, 2]
type = playSnd
trigger1 = animelem = 4
trigger2 = animelem = 6
trigger3 = animelem = 8
value = S1020,4
volume = 255

[State 1007, Helper]
type = Helper
trigger1 = animelem = 4
trigger2 = animelem = 6
trigger3 = animelem = 8
helpertype = normal 
name = "Pretty Boy's Pocket Pistol Bullet"
ID = 1024
stateno = 1025
pos = 10,-40
postype = p1

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

;---------------------------------------------------------------------------
; Pretty Boy's Pocket Pistol Bullet
[Statedef 1025]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 15, (0 - Random/550)
anim = 1024

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 15, 0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = 0
sparkxy = 0, 0
hitsound = S100,4
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 100
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
; Shortstop
[Statedef 1026]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1023

[State 5501, 2]
type = playSnd
trigger1 = animelem = 2
value = S200,(random%4)
volume = 255

[State 5501, 2]
type = playSnd
trigger1 = time = 0
value = S3003,0
volume = 255

[State 1026, SuperPause]
type = SuperPause
trigger1 = time = 0
pos = -180,-900
time = 101
darken = 0
movetime = 0
sound = s3000,(random%4)
p2defmul = 1
poweradd = -1000

[State 1026, Scout Hyper Portrait]
type = Explod
trigger1 = time = 0
anim = 3001
ID = 3001
postype = left
pos = 160,80
supermovetime = 999999
pausemovetime = 999999
sprpriority = 9
removetime = 101
removeongethit = 1
bindtime = -1
scale = 0.25,0.25
ownpal = 1

[State 5501, 2]
type = playSnd
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
value = S1020,3
volume = 255

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "Shortstop Bullet"
ID = 1026
stateno = 1027
pos = 10,-40
postype = p1

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "Shortstop Bullet"
ID = 1026
stateno = 1027
pos = 10,-40
postype = p1

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "Shortstop Bullet"
ID = 1026
stateno = 1027
pos = 10,-40
postype = p1

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "Shortstop Bullet"
ID = 1026
stateno = 1027
pos = 10,-40
postype = p1

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

;---------------------------------------------------------------------------
; Shortstop Bullet
[Statedef 1027]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 15, (2 - Random/250)
anim = 1024

[State 200, 1]
type = HitDef
trigger1 = !movecontact && !movereversed
attr = S, NA
damage = 3+Floor(9-(time*(9/20.0))),0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = 0
sparkxy = 0, 0
hitsound = S100,4
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
givepower = 0

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 100
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
; Mini Critical Shortstop
[Statedef 1028]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1023

[State 1030, PalFX]
type = PalFX
trigger1 = time = 0
time = 142
add = 0, 0, 25
mul = 255, 255, 0
color = 256

[State 5501, 2]
type = playSnd
trigger1 = time = 0
value = S3003,0
volume = 255

[State 5501, 2]
type = playSnd
trigger1 = PalNo = 1
trigger1 = time = 0
value = S3001,1
volume = 255

[State 5501, 2]
type = playSnd
trigger1 = PalNo = 2
trigger1 = time = 0
value = S3001,0
volume = 255

[State 1026, SuperPause]
type = SuperPause
trigger1 = time = 0
pos = -180,-900
time = 101
darken = 0
movetime = 0
sound = s3000,(random%4)
p2defmul = 1
poweradd = -2000

[State 1026, Scout Hyper Portrait]
type = Explod
trigger1 = time = 0
anim = 3002
ID = 3002
postype = left
pos = 160,80
supermovetime = 999999
pausemovetime = 999999
sprpriority = 9
removetime = 101
removeongethit = 1
bindtime = -1
scale = 0.25,0.25
ownpal = 1

[State 5501, 2]
type = playSnd
trigger1 = animelem = 2
value = S200,(random%4)
volume = 255

[State 5501, 2]
type = playSnd
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
value = S1020,3
volume = 255

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "MiniCritical Shortstop Bullet"
ID = 1028
stateno = 1029
pos = 10,-40
postype = p1

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "MiniCritical Shortstop Bullet"
ID = 1028
stateno = 1029
pos = 10,-40
postype = p1

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "MiniCritical Shortstop Bullet"
ID = 1028
stateno = 1029
pos = 10,-40
postype = p1

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "MiniCritical Shortstop Bullet"
ID = 1028
stateno = 1029
pos = 10,-40
postype = p1

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

;---------------------------------------------------------------------------
; MiniCritical Shortstop Bullet
[Statedef 1029]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 15, (2 - Random/250)
anim = 1024

[State 200, 1]
type = HitDef
trigger1 = !movecontact && !movereversed
attr = S, NA
damage = 6+Floor(18-(time*(18/20.0))),0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = 0
sparkxy = 0, 0
hitsound = S1030,(random%5)
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
givepower = 0

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 100
trigger2 = movecontact = 1


;---------------------------------------------------------------------------
; Critical Shortstop
[Statedef 1030]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1023

[State 1030, PalFX]
type = PalFX
trigger1 = PalNo = 1
trigger1 = time = 0
time = 142
add = 0, 25, 25
mul = 255, 0, 0
color = 256

[State 1030, PalFX]
type = PalFX
trigger1 = PalNo = 2
trigger1 = time = 0
time = 142
add = 25, 25, 0
mul = 0, 0, 255
color = 256

[State 5501, 2]
type = playSnd
trigger1 = time = 0
value = S3002,0
volume = 255

[State 1026, SuperPause]
type = SuperPause
trigger1 = time = 0
pos = -180,-900
time = 101
darken = 0
movetime = 0
sound = s3000,(random%4)
p2defmul = 1
poweradd = -3000

[State 1026, Scout Hyper Portrait]
type = Explod
trigger1 = time = 0
anim = 3003
ID = 3003
postype = left
pos = 160,80
supermovetime = 999999
pausemovetime = 999999
sprpriority = 9
removetime = 101
removeongethit = 1
bindtime = -1
scale = 0.25,0.25
ownpal = 1

[State 5501, 2]
type = playSnd
trigger1 = animelem = 2
value = S200,(random%4)
volume = 255

[State 5501, 2]
type = playSnd
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
value = S1020,3
volume = 255

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "Critical Shortstop Bullet"
ID = 1030
stateno = 1031
pos = 10,-40
postype = p1

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "Critical Shortstop Bullet"
ID = 1030
stateno = 1031
pos = 10,-40
postype = p1

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "Critical Shortstop Bullet"
ID = 1030
stateno = 1031
pos = 10,-40
postype = p1

[State 1007, Helper]
type = Helper
trigger1 = animelem = 5
trigger2 = animelem = 7
trigger3 = animelem = 9
trigger4 = animelem = 11
helpertype = normal 
name = "Critical Shortstop Bullet"
ID = 1030
stateno = 1031
pos = 10,-40
postype = p1

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

;---------------------------------------------------------------------------
; Critical Shortstop Bullet
[Statedef 1031]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 0
ctrl = 0
velset = 15, (2 - Random/250)
anim = 1024

[State 200, 1]
type = HitDef
trigger1 = !movecontact && !movereversed
attr = S, NA
damage = 9+Floor(27-(time*(27/20.0))),0
animtype = Medium
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = 0
sparkxy = 0, 0
hitsound = S1031,(random%5)
guardsound = s3, 2
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
givepower = 0

[State 1000, DestroySelf]
type = DestroySelf
trigger1 = time = 100
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
; Sandman Super
[Statedef 1040]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1025

[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
p1stateno = 1041       ;On success, player changes to state 810
p2stateno = 1042       ;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

;---------------------------------------------------------------------------
; Sandman Super caught
[Statedef 1041]
type    = S
movetype= A
physics = N
anim = 1026
poweradd = 0

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = time = 40
value = -195

[State 810, Throw 11]
type = TargetState
trigger1 = time = 40
value = 1043

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

;---------------------------------------------------------------------------
; Opponent Caught in Sandman Super
[Statedef 1042]
type    = A
movetype= H
physics = N
velset = 0,0

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

;---------------------------------------------------------------------------
; Get hit with the flying guillotine
[Statedef 1043]
type    = A
movetype= H
physics = N
velset = 2.8,-7
poweradd = 40

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

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

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

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

[State -2, 0]
type = SelfState
triggerall = var(59) >0
triggerall = stateno = 100
trigger1 = numenemy = 1
trigger1 = enemy(0), alive = 0
trigger2 = numenemy = 2
trigger2 = enemy(0), alive + enemy(1), alive = 0
ctrl = 1
value = 0

[State -2,Debug] 
type = displaytoclipboard 
trigger1 = 1 
text = "Var 1 = %d" 
params = Var(1)

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

[Statedef -3]

[State 5501, 2]
type = varset
trigger1 = P2Name = "Scout"
trigger2 = P2Name = "TF2Scout"
trigger3 = P2Name = "TF2 Scout"
trigger4 = P2Name = "TF2 Jeremy"
value = 1
fv = 2

[State 5501, 2]
type = varset
trigger1 = P2Name = "Soldier"
trigger2 = P2Name = "Jane Doe"
trigger3 = P2Name = "TF2Soldier"
trigger4 = P2Name = "TF2 Soldier"
value = 2
fv = 2

[State 5501, 2]
type = varset
trigger1 = P2Name = "Pyro"  ;Yes, even the Marvel Pyro won't get any love.
trigger2 = P2Name = "TF2Pyro"
trigger3 = P2Name = "TF2 Pyro"
value = 3
fv = 2

[State 5501, 2]
type = varset
trigger1 = P2Name = "Demo"
trigger2 = P2Name = "Tavish Finnegan Degroot"
trigger3 = P2Name = "Tavish"
trigger4 = P2Name = "Mr. Degroot"
trigger5 = P2Name = "TF2Demoman"
trigger6 = P2Name = "TF2 Demoman"
value = 4
fv = 2

[State 5501, 2]
type = varset
trigger1 = P2Name = "Heavy"
trigger2 = P2Name = "Heavy Weapons Guy"
trigger3 = P2Name = "Misha"
trigger4 = P2Name = "TF2Heavy"
trigger5 = P2Name = "TF2 Heavy"
trigger6 = P2Name = "Mikhail"
value = 5
fv = 2

[State 5501, 2]
type = varset
trigger1 = P2Name = "Engineer"
trigger2 = P2Name = "Dell Conagher"
trigger3 = P2Name = "Dell" ;I'm gonna laugh my ass off if someone makes a hate character out of the Dell company and this trigger gets called.
trigger4 = P2Name = "Mr. Conagher"
trigger5 = P2Name = "TF2Engineer"
trigger6 = P2Name = "TF2 Engineer"
value = 6
fv = 2

[State 5501, 2]
type = varset
trigger1 = P2Name = "Medic"
trigger2 = P2Name = "TF2Medic"
trigger3 = P2Name = "TF2 Medic"
trigger4 = P2Name = "Dr. Ludwig"
value = 7
fv = 2

[State 5501, 2]
type = varset
trigger1 = P2Name = "Sniper"
trigger2 = P2Name = "Mr. Mundy"
trigger3 = P2Name = "TF2Sniper" ;I'm too sexy for my BONK! Too sexy for my BOINK!
trigger4 = P2Name = "TF2 Sniper"
value = 8
fv = 2

[State 5501, 2]
type = varset
trigger1 = P2Name = "Spy"
trigger2 = P2Name = "TF2Spy"
trigger3 = P2Name = "TF2 Spy"
trigger4 = P2Name = "Segalow" ;THAT RUGAL IS A SPAI.
value = 9
fv = 2

[State 5501, 2]
type = varset
trigger1 = P2Name = "Utsuho"
trigger2 = P2Name = "Utsuho_RP" ;I blame PlasmoidThunder for this decision.
value = 10
fv = 2

[State -3, Lifeadd]
type = LifeAdd
trigger1 = Helper(1024), movehit
value = 7

;This controller plays a sound everytime the player lands from a jump, or
;from a back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 40, 0
