;---------------------- Integer variable list ----------------------

; var(0):= -3
; var(2):= 1000, 1050, 1100, 1150, 1200, 1250
; var(4):= 3100
; var(5):= 3100
; var(6):= -2, 45
; var(7):= 1101
; var(9):= -2
;var(10):= -2
;var(11):= -2
;var(12):= -2, 57
;var(13):= 3011
;var(14):= -2, 3011
;var(15):= 1101, 1102, 3011
;var(16):= 1101
;var(17):= 1102
;var(18):= 1102
;var(19):= 3001, 3002
;var(21):= 1101, 1102, 1103, 1104
;var(29):= 620, 650, 101
;var(30):= -2
;var(31):= 620, 650, 101
;var(35):= 810, 831, 841, 851, -2
;var(50):= -2
;var(57):= 10000

;---------------------- Float variable list ----------------------

; fvar(2):= -2






;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Cammy (Marvel VS Capcom2) ver.1.0           ;
; Author: Kamekaze X Alchemist                ;
; Mugen version: 1.0+ Mugen Only              ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 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 = 1000			;Amount of life to start with
power =5000		;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 =2		;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 = 255			;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 = .8333333333333333333333333333333
yscale = 1
z.width = 3		;Vertical scaling factor.
ground.back = 28		;Player width (back, ground)
ground.front = 20		;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  = 3.85		;Walk forward
walk.back = -3.25		;Walk backward
run.fwd  = 4.6, 0		;Run forward (x, y)
run.back = -4.5,-3.8	;Hop backward (x, y)
jump.neu = 0,-10.2		;Neutral jumping velocity (x, y)
jump.back = -3.35		;Jump back Speed (x, y)
jump.fwd =3.1		;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1;Running jump speeds (opt)
runjump.fwd = 4,-8.1	;.
airjump.neu = 0,-9	;.
airjump.back = -2.95	;Air jump speeds (opt)
airjump.fwd = 2.9		;.
runjump.back = -2.55,-8.1
air.gethit.groundrecover = -.15,-3.5  ;Velocity for ground recovery state (x, y) **MUGEN 1.0**
air.gethit.airrecover.mul = .5,.2     ;Multiplier for air recovery velocity (x, y) **MUGEN 1.0**
air.gethit.airrecover.add = 0,-4.5    ;Velocity offset for air recovery (x, y) **MUGEN 1.0**
air.gethit.airrecover.back = -1       ;Extra x-velocity for holding back during air recovery **MUGEN 1.0**
air.gethit.airrecover.fwd = 0         ;Extra x-velocity for holding forward during air recovery **MUGEN 1.0**
air.gethit.airrecover.up = -2         ;Extra y-velocity for holding up during air recovery **MUGEN 1.0**
air.gethit.airrecover.down = 1.5
[Movement]
airjump.num =0		;Number of air jumps allowed (opt)
airjump.height = 35	;Minimum distance from ground before you can air jump (opt)
yaccel = .55		;Vertical acceleration
stand.friction = .85	;Friction coefficient when standing
crouch.friction = .82	;Friction coefficient when crouching
air.gethit.groundlevel = 15          ;Y-position at which a falling player is considered to hit the ground **MUGEN 1.0**
air.gethit.groundrecover.ground.threshold = -20 ;Y-position below which falling player can use the recovery command **MUGEN 1.0**
air.gethit.groundrecover.groundlevel = 10   ;Y-position at which player in the ground recovery state touches the ground **MUGEN 1.0**
air.gethit.airrecover.threshold = -1  ;Y-velocity above which player may use the air recovery command **MUGEN 1.0**
air.gethit.airrecover.yaccel = .35    ;Vertical acceleration for player in the air recovery state **MUGEN 1.0**
air.gethit.trip.groundlevel = 10      ;Y-position at which player in the tripped state touches the ground **MUGEN 1.0**
down.bounce.offset = 0, 20            ;Offset for player bouncing off the ground (x, y) **MUGEN 1.0**
down.bounce.yaccel = .4               ;Vertical acceleration for player bouncing off the ground **MUGEN 1.0**
down.bounce.groundlevel = 12          ;Y-position at which player bouncing off the ground touches the ground again **MUGEN 1.0**
down.friction.threshold = .05
;==============================================================================;
[Quotes]
; Up to 100 victory quotes can be specified per language (victory0 - victory99)
victory1 = "Mission accomplished!"
victory2 = "Fighting data retrieved successfully!"
victory3= "Now that we've won, you will bow to my master."
victory4 = "Minor damage... Memory error! What am I doing here..."
victory5 = "Don't get so serious because you have no chance to win."
victory6 = "I will finish the opponent in the shortest way possible!"

;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,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 = Time = 0 &&!matchover
value = ifelse(random<499,181,182)

[State 180, 1]
type = ChangeState
trigger1 = Time = 0 &&matchover
value = ifelse(random<499,183,184)
;---------------------------------------------------------------------------
; Win pose 1
; CNS difficulty: basic
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 181, PlaySnd] ;Too Short!!
type = PlaySnd
trigger1 = animelem = 3
value = S2,5
channel=0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win pose 1
; CNS difficulty: basic
[Statedef 182]
type = S
ctrl = 0
anim = 180
velset = 0,0
[State 181, PlaySnd] ;Too Short!!
type = PlaySnd
trigger1 = animelem = 5
value = S2,5
channel=0


[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win pose 1
; CNS difficulty: basic
[Statedef 183]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=15
value = 183
;elem = 1
;ignorehitpause = 
;persistent = 



[State 0, Helper]
type = Helper
trigger1 = time=0
helpertype = normal ;player
name = "launch"
ID = 185
stateno =185
pos = 105,-10
postype = p1    ;p2,front,back,left,right
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 40
pausemovetime = 40
ignorehitpause=1
persistent=0;pe
[State 181, PlaySnd] ;Too Short!!
type = PlaySnd
trigger1 = animelem = 2 && anim=183
value = S2,8
channel=0
[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=15
value = 184
;elem = 1
;ignorehitpause = 
;persistent = 



[State 0, Helper]
type = Helper
trigger1 = time=0
helpertype = normal ;player
name = "launch"
ID = 185
stateno =185
pos = 105,-10
postype = p1    ;p2,front,back,left,right
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 40
pausemovetime = 40
ignorehitpause=1
persistent=0;pe

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; 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, Explod] ;coat thrown
type = Explod
trigger1 = animelem = 6
id = 191
anim = 191
pos = 0,0
postype = p1
vel = -4,-5.7
accel = .050,.30
removetime = 45
scale = 1,1
sprpriority = 9
ontop = 1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = animelem=7
ID =191
vel = 4,-5.7

;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0


[State 190, PlaySnd] ;coat flapping sound
type = PlaySnd
trigger1 = animelem = 7
value = S3,0
volume = 255

[State 190, PlaySnd] ;come on!
type = PlaySnd
trigger1 = animelem = 7
value = S2,10
volume = 255


[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 190, PlaySnd] ;Lock on!
type = PlaySnd
trigger1 = animelem = 2
value = S4,8
volume = 255

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  =0; 1
ctrl = 0
anim = 200
poweradd = 13
sprpriority = 2
hitcountpersist = 1
[State 0, VelSet]
type = VelSet
trigger1 = vel x <0
x = 0
;ignorehitpause = 


[State 200, 1]
type = HitDef
trigger1 = Time = 0
trigger1 = anim = 200
attr = S, NA
;damage = 23, 0
damage =21
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9, 9
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10, -80
givepower=13,7
getpower=13,13
hitsound = S1, 0
guardsound = S3, 1
ground.type = High
ground.slidetime = 5
ground.hittime  = 9
ground.velocity = -3.5
guard.velocity = -3
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 10
forcenofall=1
yaccel=.67
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,0
channel = 1
;abspan = 
;ignorehitpause = 
;persistent = 


[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 201]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
triggerall = selfanimexist(5061)
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5061
[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim2
triggerall = !selfanimexist(5061)
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 50061
[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

;[State 5020, 4] ;Freeze anim
;type = ChangeAnim
;trigger1 = Time > 0
;value = anim
[State 0, ScreenBound]
type = ScreenBound
trigger1 = p2stateno=3100
value = 1
movecamera = 0,1
ignorehitpause = 1
;persistent = 

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = ifelse((p2stateno=1000||enemy,prevstateno=1000||p2stateno=3050||enemy,prevstateno=3050)&&enemy,movehit,1001,ifelse((p2stateno=1202||enemy,prevstateno=1202)&&enemy,movehit,1203,202))

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 202]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)
[State 0, ScreenBound]
type = ScreenBound
trigger1 = p2stateno=3100
value = 1
movecamera = 0,1
ignorehitpause = 1
[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 3]
type = selfState
triggerall = !HitFall
trigger1 = HitOver && (time>gethitvar(hittime)) 
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5040 ;HITA_RECOV

[State 5030, 4]
type = selfState
triggerall = HitFall
trigger1 = Vel Y > 0    ;Hit ground
trigger1 = Pos Y >= 10  ;.
value = 5110 ;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 203 ;HITA_UP (transition)

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 203]
type    = A
movetype= H
physics = N
[State 0, ScreenBound]
type = ScreenBound
trigger1 = p2stateno=3100
value = 1
movecamera = 0,1
ignorehitpause = 1
[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5061)
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5061

[State 5035, 1]
type = ChangeAnim2
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5061)
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 50061


[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, 3]
type = selfState
triggerall = !HitFall
trigger1 = HitOver && (time>gethitvar(hittime)) 
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5040  ;HITA_RECOV

[State 5035, 4]
type=selfState
triggerall = HitFall
trigger1 = Vel Y > 0    ;Hit ground
trigger1 = Pos Y >= 10  ;.
trigger2 = Anim != 5061 ;.
value = 5110 ;HITA_FALL
;-------------------------------
;---------------------------------------------------------------------------
; Standing Medium Punch
; CNS difficulty: easy
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  =0; 4
poweradd=22
ctrl = 0
anim =210
hitcountpersist = 1

[State 200, 1]
type = HitDef
trigger1 = Time = 0
trigger1 = anim = 210
attr = S, NA
;damage = 23, 0
damage = 42
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 8
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10, -70
hitsound = S1, 4
guardsound = S3, 1
ground.type = High
ground.slidetime = 10
ground.hittime  = 14
givepower=22,14
getpower=22,22
guard.velocity = -3
ground.velocity = -7.5
air.velocity = -2.5,-5
air.hittime = 14
forcenofall=1
yaccel=.67
id=200
ground.cornerpush.veloff=-9

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,1
channel = 1
[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 211]
type    = A
movetype= H
physics = N
juggle  =0;0; 0
velset=-10,6
poweradd= 59
ctrl = 0
sprpriority = 2
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .69
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0
value = 1202
[State 0, NotHitBy]
type = NotHitBy
trigger1 =anim!=1202
value = SCA
;value2 = S,NA
time = 1

;ignorehitpause =
;persistent =

[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = anim!=5160
trigger1 =pos y>=0 && anim=1202 && time>3
value = 5160
[State 0, PosSet]
type = PosSet
trigger1 = anim=5160 && animelem=1
y = 0
[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=1 && anim=5160
x = -4
y = -6

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = alive
trigger1 = animelemtime(1)>7 && anim!=5200 && anim=5160
value = 5200
[State 0, SelfState]
type = SelfState
trigger1 =pos y >=0 &&anim=5200  &&alive
value =52
ctrl=1
[State 0, SelfState]
type = SelfState
trigger1 =pos y >=0 &&!alive  && time>5
value =5100
ctrl=1
;---------------------------------------------------------------------------
; Standing Strong Punch
; CNS difficulty: easy
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  =0; 4
poweradd=50
ctrl = 0

anim =220
hitcountpersist = 1
[State 0, VelSet]
type = VelSet
trigger1 = vel x <0
x = 0
[State 200, 1]
type = HitDef
trigger1 = Time = 0
trigger1 = anim = 220
attr = S, NA			;Attribute: Standing, Normal Attack
;damage = 30, 0
damage = 83			;Damage that move inflicts, guard damage
animtype =heavy			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA			;Flags on how move is to be guarded against
hitflag = MAF			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 12, 12			;Time attacker pauses, time opponent shakes
sparkno = S7005+(random%4)
guard.sparkno = S7009			;Spark anim no (Def: set above)
sparkxy = -15, -70		;X-offset for the "hit spark" rel. to p2,					;Y-offset for the spark rel. to p1
hitsound = S1, 2 	;Sound to play on hit
guardsound = S3, 1		;Sound to play on guard
ground.type = low		;Type: High, Low, Trip (def: Normal)
givepower=50,25
getpower=50,50
ground.slidetime = 13		;Time that the opponent slides back
ground.hittime  = 18		;Time opponent is in hit state
ground.cornerpush.veloff=-13.5
ground.velocity = -8		;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8	;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High			;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3		;X-velocity at which opponent is pushed,					;Y-velocity at which opponent is pushed
air.hittime = 16			;Time before opponent regains control in air
p2facing = 1
yaccel=.67
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
persistent=0


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,2
channel = 1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S2,1
channel = 0
[State 645 , dust]
type = Makedust
trigger1 = p2bodydist x > 10
trigger1 = prevstateno = 100
trigger1 = time > 0; && vel x
pos = -5,-2
spacing = 3

[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  =0; 4
poweradd = 13
ctrl = 0
anim = 230
hitcountpersist = 1
[State 0, VelSet]
type = VelSet
trigger1 = vel x <0
x = 0
[State 200, 1]
type = HitDef
trigger1 = Time = 0
trigger1 = anim = 230
attr = S, NA
;damage = 23, 0
damage = 28
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 8
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10, -80
hitsound = S1, 0
guardsound = S3, 1
givepower=13,7
getpower=13,13
ground.type = High
ground.slidetime = 7
ground.hittime  = 8
ground.velocity = -3.5
guard.velocity = -3
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 10
yaccel=.67
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 

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

[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  =0; 5
poweradd=22
ctrl = 0
anim =240
hitcountpersist = 1



[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
;damage = 23, 0
damage = 42
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 8
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10, -70
hitsound = S1, 1
guardsound = S3, 1
ground.type = High
givepower=22,14
getpower=22,22
ground.slidetime = 10
ground.hittime  = 14
guard.velocity = -3
ground.velocity = -7.5
air.velocity = -2.5,-5
air.hittime = 14
yaccel=.67
forcenofall=1
id=200
ground.cornerpush.veloff=-11.5
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,1
channel = 1
[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  =0; 5
poweradd=50
ctrl = 0
anim =250
hitcountpersist = 1
[State 0, VelSet]
type = VelSet
trigger1 = vel x <0
x = 0
[State 250, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA			;Attribute: Standing, Normal Attack
;damage = 37, 14
damage =97			;Damage that move inflicts, guard damage
animtype = up			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA			;Flags on how move is to be guarded against
hitflag = MAF			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10,10			;Time attacker pauses, time opponent shakes
sparkno = S7005+(random%4)
guard.sparkno = S7009				;Spark anim no (Def: set above)
sparkxy = -20, -80		;X-offset for the "hit spark" rel. to p2,					;Y-offset for the spark rel. to p1
hitsound = S1, 2 	;Sound to play on hit
guardsound = S3, 1		;Sound to play on guard
ground.type = High		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 19		;Time that the opponent slides back
ground.hittime  = 70		;Time opponent is in hit state
givepower=50,25
getpower=50,50
ground.velocity = 0,-16	;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8	;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))			;Type: High, Low, Trip (def: same as ground.type)
air.velocity = 0,-12		;X-velocity at which opponent is pushed,					;Y-velocity at which opponent is pushed
air.hittime = 70
p2facing = 1			;Time before oppo
yaccel=0.65
id=410



[State 0, Helper]
type = Helper
trigger1 = movehit
helpertype = normal ;player
name = "launch"
ID = 7011
stateno =7011
pos = 33,-96
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 40
pausemovetime = 40
ignorehitpause=1
persistent=0
;size.xscale = 
;size.yscale = 
;size.ground.back = 
;size.ground.front = 
;size.air.back = 
;size.air.front = 
;size.height = 
;size.proj.doscale = 
;size.head.pos = , 
;size.mid.pos = , 
;size.shadowoffset = 
;ignorehitpause = 
;persistent = 


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

[State 0, TargetState]
type = TargetState
trigger1 =movehit
value = 411
ID = 410
ignorehitpause =0
persistent=0
;persistent =
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S2,1
channel = 0
[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl =1
;---------------------------------------------------------------------------
; Standing Medium Kick
; CNS difficulty: easy
[Statedef 251]
type    = S
movetype= A
physics = S
juggle  =0; 5
poweradd=50
ctrl = 0
anim =251
hitcountpersist = 1


[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
;damage = 23, 0
damage = 83
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 8
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10, -70
hitsound = S1, 1
guardsound = S3, 1
ground.type = High
ground.slidetime = 16
ground.hittime  = 18
givepower=50,25
getpower=50,50
guard.velocity = -3
ground.velocity = -7.5
air.velocity = -2.5,-5
air.hittime = 14
yaccel=.67
forcenofall=1
id=200
ground.cornerpush.veloff=-16.5
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,2
channel = 1
[State 240, 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  =0; 5
poweradd = 13
ctrl = 0
anim = 400
hitcountpersist = 1
[State 0, VelSet]
type = VelSet
trigger1 = vel x <0
x = 0
[State 210, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA			;Attribute: Standing, Normal Attack
;damage = 21, 9
damage =21		;Damage that move inflicts, guard damage
animtype = light			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA			;Flags on how move is to be guarded against
hitflag = MAF			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 9,9			;Time attacker pauses, time opponent shakes
sparkno = S8100+(random%4)
guard.sparkno = S7009			;Spark anim no (Def: set above)
sparkxy = -10, -30		;X-offset for the "hit spark" rel. to p2,					;Y-offset for the spark rel. to p1
hitsound = S1, 0		;Sound to play on hit
guardsound = S3, 1		;Sound to play on guard
givepower=13,7
getpower=13,13
ground.type = low		;Type: High, Low, Trip (def: Normal)
ground.slidetime =5
ground.hittime  = 10
ground.velocity = -3.5
guard.velocity = -3
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 10
forcenofall=1
yaccel=.67
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 


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

;---------------------------------------------------------------------------
; Crouching Medium Punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  =0; 6
poweradd=22
ctrl = 0
anim = 410
hitcountpersist = 1

[State 305, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA			;Attribute: Standing, Normal Attack
;damage = 29, 14
damage =42		;Damage that move inflicts, guard damage
animtype = medium			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA			;Flags on how move is to be guarded against
hitflag = MAF			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10,10			;Time attacker pauses, time opponent shakes
sparkno = S7000+(random%4)
guard.sparkno = S7009			;Spark anim no (Def: set above)
sparkxy = -10, -40		;X-offset for the "hit spark" rel. to p2,					;Y-offset for the spark rel. to p1
hitsound = S1, 4			;Sound to play on hit
guardsound = S3, 1	;Sound to play on guard
givepower=22,14
getpower=22,22
ground.type = low		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 10
ground.hittime  = 14
guard.velocity = -3
ground.velocity = -6
air.velocity = -2.5,-5
air.hittime = 14
forcenofall=1
yaccel=.67
id=200
ground.cornerpush.veloff=-10.5
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,1
channel = 1
[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 411]
type    = A
movetype= H
physics = N
juggle  =0;0; 8
velset=-1,-15.35
poweradd= 59
ctrl = 0
sprpriority = 2
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .65


[State 0, ChangeAnim2]
type = ChangeAnim
triggerall = anim!=5160
trigger1 =time=0
value = 5051



[State 0, SelfState]
type = SelfState
trigger1 =time>=26
value =5040
ctrl=1
;---------------------------------------------------------------------------
; Crouching Strong Punch
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  =0; 6
poweradd=50
ctrl = 0
anim = 420
hitcountpersist = 1

[State 305, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA			;Attribute: Standing, Normal Attack
;damage = 37, 14
damage =84		;Damage that move inflicts, guard damage
animtype = up			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA			;Flags on how move is to be guarded against
hitflag = MAF			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10,10			;Time attacker pauses, time opponent shakes
sparkno = S7005+(random%4)
guard.sparkno = S7009			;Spark anim no (Def: set above)
sparkxy = -10, -60		;X-offset for the "hit spark" rel. to p2,					;Y-offset for the spark rel. to p1
hitsound = S1, 2 	;Sound to play on hit
guardsound = S3, 1		;Sound to play on guard
ground.type = High		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 19		;Time that the opponent slides back
ground.hittime  = 20		;Time opponent is in hit state
givepower=50,25
getpower=50,50
ground.velocity = -1.5,-16	;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8	;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))			;Type: High, Low, Trip (def: same as ground.type)
air.velocity = 0,-12		;X-velocity at which opponent is pushed,					;Y-velocity at which opponent is pushed
air.hittime = 20
p2facing = 1			;Time before oppo
yaccel=0.65
id=410
[State 0, TargetState]
type = TargetState
trigger1 =movehit
value = 411
ID = 410
ignorehitpause =0
persistent=0

[State 0, Helper]
type = Helper
trigger1 = movehit
helpertype = normal ;player
name = "launch"
ID = 7011
stateno =7011
pos = 65,-71
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 40
pausemovetime = 40
ignorehitpause=1
persistent=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S2,1
channel = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,2
channel = 1

[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  =0; 0
poweradd = 13
ctrl = 0
anim = 430
hitcountpersist = 1
[State 0, VelSet]
type = VelSet
trigger1 = vel x <0
x = 0
[State 210, 1]
type = HitDef
triggerall = p2stateno!=5110
trigger1 = time = 0
attr =C, NA			;Attribute: Standing, Normal Attack
;damage = 18, 9
damage = 21			;Damage that move inflicts, guard damage
animtype = light			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = LA			;Flags on how move is to be guarded against
hitflag = MAFD		;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 9,9			;Time attacker pauses, time opponent shakes
sparkno = S8100+(random%4)
guard.sparkno = S7009			;Spark anim no (Def: set above)
sparkxy = -10, -20		;X-offset for the "hit spark" rel. to p2,					;Y-offset for the spark rel. to p1
hitsound = S1, 0		;Sound to play on hit
guardsound = S3, 1		;Sound to play on guard
givepower=13,7
getpower=13,13
ground.type = low		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 7
ground.hittime  = 10
ground.velocity = -3.5
guard.velocity = -3
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 10
forcenofall=1
id=200
down.cornerpush.veloff=-11

[State 0, TargetState]
type = TargetState
trigger1 =(p2statetype= A||p2stateno=5080) && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 

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

[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  =0; 5
poweradd= 22
ctrl = 0
anim = 440
hitcountpersist = 1

[State 320, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA			;Attribute: Standing, Normal Attack
;damage = 26, 14
damage = 42		;Damage that move inflicts, guard damage
animtype =medium			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = LA			;Flags on how move is to be guarded against
hitflag = MAFD			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10,11			;Time attacker pauses, time opponent shakes
sparkno = S7000+(random%4)
guard.sparkno = S7009			;Spark anim no (Def: set above)
sparkxy = -10, -20		;X-offset for the "hit spark" rel. to p2,					;Y-offset for the spark rel. to p1
hitsound = S1, 1		;Sound to play on hit
guardsound = S3, 1	;Sound to play on guard
givepower=22,14
getpower=22,22
ground.type = low		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 10
ground.hittime  = 14
guard.velocity = -3
ground.velocity = -6
air.velocity = -2.5,-5
air.hittime = 14
forcenofall=1
yaccel=.67
id=200
ground.cornerpush.veloff=-11.5
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,1
channel = 1
[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  =0; 7
poweradd=50
ctrl = 0
anim = 450
hitcountpersist = 1

[State 325, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA			;Attribute: Standing, Normal Attack
;damage = 31, 14
damage =83	;Damage that move inflicts, guard damage
animtype = Hard			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = LA			;Flags on how move is to be guarded against
hitflag = MAFD			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 9,9			;Time attacker pauses, time opponent shakes
sparkno = S7005+(random%4)
guard.sparkno = S7009			;Spark anim no (Def: set above)
sparkxy = -10, -10		;X-offset for the "hit spark" rel. to p2,					;Y-offset for the spark rel. to p1
hitsound = S1, 2		;Sound to play on hit
guardsound = S3, 1	;Sound to play on guard
givepower=50,25
getpower=50,50
ground.type = trip		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5		;Time that the opponent slides back
ground.hittime  = 9		;Time opponent is in hit state
ground.velocity = 0,-3		;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8	;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = Trip			;Type: High, Low, Trip (def: same as ground.type)
air.velocity = 0,-3		;X-velocity at which opponent is pushed,					;Y-velocity at which opponent is pushed
air.hittime = 10			;Time before oppo
p2facing = 1
id=440
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S2,1
channel = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,2
channel = 1
[State 450, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 441]
type    = A
movetype=H
physics = N
velset =0,-2.3
poweradd = 40
anim=5070


[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .44
[State 0, NotHitBy]
type = NotHitBy
trigger1 = anim=5070
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =


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

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=5100|| anim=614|anim=612
statetype = L      ;S,A,C,L

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5100)
trigger1 = pos y>=0 && (anim=5070) && time>3
value = 5100
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5100)
trigger1 = pos y>=0 &&(anim=5070) && time>3
value = 614
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=614&& animtime=0
value = 612
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=5100 && animtime=0
value = 612

[State 0, PosSet]
type = PosSet
trigger1 =anim=5100 || anim=612 ||anim=614
y = 0
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 = anim=5100 || anim=612||anim=614
x = 0
y = 0
;ignorehitpause =
;persistent =
[State 0, ChangeState]
type = selfState
triggerall = alive
triggerall = anim=612 && animelemtime(1)>1
trigger1 = command="x"||command="y"||command="z"||command="a"||command="b"||command="c"
trigger2= AIlevel >0 && random<111
value =5120
ctrl = 0
[State 0, SelfState]
type = SelfState
trigger1 =animelemtime(1)=15 && anim=612
value =ifelse(alive,5120,5150)
ctrl=0
;---------------------------------------------------------------------------
; Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics =N
juggle  =0; 2
poweradd = 13
ctrl = 0
anim = 600
hitcountpersist = 1

[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
[State 600, 2]
type = HitDef
trigger1 = time = 0
attr = A, NA
;damage  = 20
damage = 21
animtype = light
guardflag = HA
priority = 3
pausetime = 9,9
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-58
hitsound   = S1,0
guardsound = S3,1
givepower=13,7
getpower=13,13
ground.type = High
ground.slidetime =6
ground.hittime = 12
air.hittime = 9
ground.velocity = -4
air.velocity = -.2,-8.5
yaccel=.8
forcenofall=1
id=200
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 

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

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

[State 0, ChangeState]
type = ChangeState
trigger1 =pos y >=0
value = 52
;---------------------------------------------------------------------------
; Jump Medium Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics =N
juggle  =0; 4
poweradd=22
ctrl = 0
anim = 610
hitcountpersist = 1

[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A
[State 600, 2]
type = HitDef
trigger1 = time = 0
attr = A, NA
;damage    = 32
damage = 42
animtype = medium
guardflag = HA
priority = 3
pausetime = 11,11
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-58
hitsound = S1, 4
guardsound = S3, 1
ground.type = High
ground.slidetime = 9
ground.hittime = 14
guard.ctrltime = 14
givepower=22,14
getpower=22,22
ground.velocity = -4
air.velocity =-.2,-11
air.hittime=15
yaccel=.8
forcenofall=1
id=200

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,1
channel = 1
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime=0
value = 57
ctrl = 1
[State 0, ChangeState]
type = ChangeState
trigger1 =pos y >=0
value = 52
;---------------------------------------------------------------------------
; Jump Strong Punch
; CNS difficulty: easy
[Statedef 620]
type    = A
movetype= A
physics =N
juggle  =0; 4
poweradd=50
ctrl = 0
anim = 620
hitcountpersist = 1

[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .435
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,2
channel = 1
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A
[State 600, 2]
type = HitDef
trigger1 = !movecontact
attr = A, NA
;damage = 43
damage = 84
animtype = Hard
guardflag = HA
priority = 3
pausetime = ifelse(p2statetype!=A,12,5),ifelse(p2statetype!=A,12,2)
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -25,-58
hitsound = S1, 2
guardsound = S3, 1
givepower=50,25
getpower=50,50
ground.type = High
ground.slidetime =15
ground.hittime  = 18
ground.velocity = -8.5
air.velocity = -2.5,15
id=ifelse(var(9)=1&&p2movetype=H,640,641)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit &&p2statetype=A   && var(9)
value = 621


[State 0, ScreenBound]
type = ScreenBound
triggerall = anim=621 && frontedgebodydist > 0
trigger1 = 1
value = 0
movecamera=cond(frontedgebodydist <15,1,0),0
[State 600, 3]
type = changestate
 triggerall =prevstateno= [600,640]
trigger1 = p2statetype=L&&var(31)=19 && var(29)=1
value = 101

[State 0, VarSet]
type = Varadd
trigger1 =var(29)=1
v = 31    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
triggerall = p2statetype=A   && var(9)
 triggerall =prevstateno= [600,640]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = pos y < -250 && enemy,pos y >-10 &&movehit
v = 29    ;fv = 10
value = 1

[State 0, VelSet]
type = VelSet
triggerall =  var(9)
 triggerall =prevstateno= [600,640]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = movehit  &&  pos y < -250
x = 0
y = 0
[State 600, 3]
type = changestate
triggerall =  ((pos y >= -240)|| (pos x >=40&&facing=1|| pos x<=-40&&facing=-1))  ||(!movehit)
trigger1 = animtime=0
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 10613]
type    = A
movetype= H
physics = N
juggle  =0;0; 0
velset=-13,13
poweradd= 59
ctrl = 0
sprpriority = -2
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .67
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0
value = 1202

[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = anim!=51601
trigger1 =pos y>=0 && anim=1202 && time>3

value = 51601
[State 0, PosSet]
type = PosSet
trigger1 = anim=51601&& animelem=1
y = 0
[State 0, NotHitBy]
type = NotHitBy
trigger1 = statetype=L
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =
[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=1 && anim=51601
y = -7
x=0
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,1
;ignorehitpause =
;persistent =

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=51601
statetype = L      ;S,A,C,L

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5101)
trigger1 = pos y>=0 && anim=51601 && animelemtime(1)>10
value = 5101
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5101)
trigger1 = pos y>=0 && anim=51601 && animelemtime(1)>10
value = 614
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=614&& animtime=0
value = 612
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=5101 && animtime=0
value = 612

[State 0, PosSet]
type = PosSet
trigger1 =anim=5101 || anim=612 ||anim=614
y = 0
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 = anim=5101 || anim=612||anim=614
x = 0
y = 0
;ignorehitpause =
;persistent =

[State 0, SelfState]
type = SelfState
trigger1 =animelemtime(1)=20 && anim=612
value =ifelse(alive,5120,5110)
ctrl=0
;---------------------------------------------------------------------------
; Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics =N
juggle  =0; 3
poweradd = 13
ctrl = 0
anim = 630
hitcountpersist = 1

[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A
[State 600, 2]
type = HitDef
trigger1 = time = 0
attr = A, NA
;damage = 23
damage = Floor(23*fvar(31))
animtype = light
guardflag = HA
priority = 3
pausetime = 9,9
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-58
hitsound = S1, 0
guardsound = S3,1
givepower=13,7
getpower=13,13
ground.type = High
ground.slidetime = 6
ground.hittime = 12
air.hittime = 11
ground.velocity = -4
air.velocity = -.2,-7
yaccel=.8
forcenofall=1
id=200

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

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime=0
value = 57
ctrl = 1
[State 0, ChangeState]
type = ChangeState
trigger1 =pos y >=0
value = 52
;---------------------------------------------------------------------------
; Jump Medium Kick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = N
juggle  =0; 4
poweradd=22
ctrl = 0
anim = 640
hitcountpersist = 1

[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A
[State 620, 2]
type = HitDef
trigger1 = time = 0
attr = A, NA
;damage = 31
damage = 42
animtype = medium
guardflag = HA
priority = 3
pausetime = 11,11
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -15,-45
hitsound = S1, 1
guardsound = S3,1
givepower=22,14
getpower=22,22
ground.type = High
ground.slidetime =8
ground.hittime = 14
air.hittime =15
ground.velocity = -4
air.velocity = -.2,-8.35
yaccel=.8
forcenofall=1
id=200

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,1
channel = 1
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime=0
value = 57
ctrl = 1
[State 0, ChangeState]
type = ChangeState
trigger1 =pos y >=0
value = 52
;---------------------------------------------------------------------------
; Jump Strong Kick
; CNS difficulty: easy
[Statedef 650]
type    = A
movetype= A
physics = N
juggle  =0; 4
poweradd=50
ctrl = 0
anim = 650
hitcountpersist = 1


[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S0,2
channel = 1
[State 625, 2]
type = HitDef
trigger1 = !movecontact
attr = A, NA
;damage = 39
damage =84
animtype = Hard
guardflag = HA
priority = 3
pausetime = 12,8
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -25,-40
hitsound = S1, 2
guardsound = S3,1
ground.type = High
pausetime = ifelse(p2statetype!=A,12,5),ifelse(p2statetype!=A,12,2)
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -25,-58
givepower=50,25
getpower=50,50
ground.type = High
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -8.5
air.velocity = -2.5,15
id=ifelse(var(9)=1&&p2movetype=H,640,641)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit &&p2statetype=A   && var(9)
value = 651


[State 0, ScreenBound]
type = ScreenBound
triggerall = anim=651&& frontedgebodydist > 0
trigger1 = 1
value = 0
movecamera=cond(frontedgebodydist <15,1,0),0
[State 600, 3]
type = changestate
 triggerall =prevstateno= [600,640]
trigger1 = p2statetype=L&&var(31)=19 && var(29)=1
value = 101

[State 0, VarSet]
type = Varadd
trigger1 =var(29)=1
v = 31    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
triggerall = p2statetype=A   && var(9)
 triggerall =prevstateno= [600,640]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = pos y < -250 && enemy,pos y >-10 &&movehit
v = 29    ;fv = 10
value = 1

[State 0, VelSet]
type = VelSet
triggerall =  var(9)
 triggerall =prevstateno= [600,640]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = movehit  &&  pos y < -250
x = 0
y = 0
[State 600, 3]
type = changestate
triggerall =  ((pos y >= -240)|| (pos x >=40&&facing=1|| pos x<=-40&&facing=-1))  ||(!movehit)
trigger1 = animtime=0
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
[Statedef 702]
type    = C
movetype= I
physics = N
poweradd= 0
velset = 5,0
ctrl = 0
anim = 702
sprpriority = -1

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



[State 8300, PlayerPush]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 8300, VelSet]
type = VelSet
trigger1 =time > 35
x = 0

[State 8300, PosSet]
type = PosSet
trigger1 = 1
y = 0

[State 8300, NotHitBy]  ;Can't get hit while rolling
type = NotHitBy
trigger1 = time < 35
value = SCA
time = 1

[State 8300, ChangeState]
type = ChangeState
trigger1 = time = 35
value = 11
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 703]
type    = C
movetype= I
physics = N
poweradd= 0
velset = -5,0
ctrl = 0
anim = 703
sprpriority = -1



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

[State 8300, PlayerPush]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 8300, VelSet]
type = VelSet
trigger1 = time > 35
x = 0

[State 8300, PosSet]
type = PosSet
trigger1 = 1
y = 0

[State 8300, NotHitBy]  ;Can't get hit while rolling
type = NotHitBy
trigger1 = time < 35
value = SCA
time = 1

[State 8300, ChangeState]
type = ChangeState
trigger1 = time = 35
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Throw - Attempt
; CNS difficulty: medium-advanced

[Statedef 800]
type    = S
movetype= A
physics = S
juggle  =0; 15
velset = 0,0
ctrl = 0
anim = 800

; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents the player from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[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
p1facing = ifelse (command = "holdfwd", 1, -1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face player
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 =220
ctrl = 0
;-------------------------------------------------------------
[Statedef 801]
type = A
movetype= A
physics = N
juggle = 0
ctrl = 0
velset=0,0
anim = 801
[State 0, Turn]
type = Turn
trigger1 = facing = enemy,facing&&time=0
;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S5100,12
channel = 1
;[State 0, PosAdd]
;type = PosAdd
;trigger1 =time =0 && prevstateno=831 
;y = -(enemynear,const(size.head.pos.y))+83
;ignorehitpause = 
;persistent = 
[State 0, VelAdd]
type = VelAdd
trigger1 =anim=5040
y = .5
[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 =time=1 
value =5040
[State 0, PlayerPush]
type = PlayerPush
trigger1 =1 
value =0
[State 0, VelSet]
type = VelSet
trigger1 =time=1 
x = -4.5
y = -2.5
[State 0, ChangeAnim]
type = selfstate
trigger1 =pos y>=0 && anim=5040&& time>3
value =52
ctrl=0
;-------------------------------------------------------------
[Statedef 802]
type = A
movetype= A
physics = N
juggle = 0
ctrl = 0
velset=0,0
[State 0, Turn]
type = Turn
trigger1 = facing = enemy,facing&&time=0
[State 0, NotHitBy]
type = NotHitBy
trigger1 =1 
value = SCA
;value2 = S,NA
time = 1
[State 0, PosSet]
type = PosSet
trigger1 = time=0
y = enemy,pos y
;ignorehitpause = 
;persistent = 
[State 0, VelAdd]
type = VelAdd
trigger1 =anim=5040
y = .5


[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0 
value = 801
[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 =time=1 
value =5040
[State 0, PlayerPush]
type = PlayerPush
trigger1 =1 
value =0
[State 0, VelSet]
type = VelSet
trigger1 =time=1 
x = -4.5
y = -2.5
[State 0, ChangeAnim]
type = selfstate
trigger1 =pos y>=0 && anim=5040 && time>3
value =52
ctrl=0
;---------------------------------------------------------------------------
; Throwing the opponent
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 56

[State 0, VarSet]
type = VarSet
trigger1 = random<33*AIlevel&&AIlevel>0&&time=0
v = 35   ;fv = 10
value = 1
[State 0, ChangeState]
type = ChangeState
trigger1 = p2stateno=802 
value =801

[State 0, ChangeState]
type = targetState
triggerall = time =[1,4] 
trigger1= (enemy,command="z" || enemy,command="y" || enemy,command="b")&& AILevel=0
trigger2 =  var(35)=1
value =802
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=2
value = S2,1
channel =0

[State 810, Bind 1]
type = TargetBind
trigger1 =  AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
pos = 2,0
[State 810, Bind 1]
type = TargetBind
trigger1 =  AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = -38,-48

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = -43,-44

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(4) >= 0 && AnimElemTime(6) < 0
pos = -26,-44

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = -19,-64

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 58,-50
[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
pos = 59,-19
[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElem = 9
pos = 67,-19


[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelem=9
value = 56
;ignorehitpause = 
;persistent = 


[State 3304, EnvShake]
type = EnvShake
Trigger1 = animelem=9
freq = 90
ampl = 4
phase = 20
time = 10

[State 0, Explod]
type = Explod
trigger1 =animelem=9
anim =6006
ID =8002
pos = 0,10
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem=9
value = -111
kill = 1
absolute = 0
[State 3303, PlaySnd]
type = PlaySnd
Trigger1 = animelemtime(9)=7
value = S1,3
volume = 255
channel = -1
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
[State 0, TargetState]
type = TargetState
trigger1 = animelemtime(9)=7
value = 821

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Opponent Thrown
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by the throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0

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

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


[State 820, SelfState]
type = SelfState
trigger1 = p2stateno!=810
value = 5050
;---------------------------------------------------------------------------
; 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
poweradd =56
velset=-3,-12



;ignorehitpause =
;persistent =


[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .73
[State 0, NotHitBy]
type = NotHitBy
trigger1 = statetype!=L
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =


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

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=5100|| anim=614|anim=612
statetype = L      ;S,A,C,L

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5100)
trigger1 = pos y>=0 && (anim=820|| anim=1156||anim=3121) && time>3
value = 5100
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5100)
trigger1 = pos y>=0 &&(anim=820|| anim=1156||anim=3121) && time>3
value = 614
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=614&& animtime=0
value = 612
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=5100 && animtime=0
value = 612

[State 0, PosSet]
type = PosSet
trigger1 =anim=5100 || anim=612 ||anim=614
y = 0
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 = anim=5100 || anim=612||anim=614
x = 0
y = 0
;ignorehitpause =
;persistent =

;ignorehitpause = 
;persistent = 
[State 0, ChangeState]
type = selfState
triggerall = alive
triggerall = anim=612 && animelemtime(1)>1
trigger1 = command="x"||command="y"||command="z"||command="a"||command="b"||command="c"
trigger2= AIlevel >0 && random<111
value =5120
ctrl = 0
[State 0, SelfState]
type = SelfState
trigger1 =animelemtime(1)=18 && anim=612
value =ifelse(alive,5120,5110)
ctrl=0

;---------------------------------------------------------------------------
; Throw - Attempt
; CNS difficulty: medium-advanced

[Statedef 830]
type    = S
movetype= A
physics = S
juggle  =0; 15
velset = 0,0
ctrl = 0
anim = 800

; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents the player from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[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
p1facing = ifelse (command = "holdfwd", -1, 1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face player
p1stateno = 831      ;On success, player changes to state 810
p2stateno = 832       ;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 =250
ctrl = 0

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

[State 0, VarSet]
type = VarSet
trigger1 = random<33*AIlevel&&AIlevel>0&&time=0
v = 35   ;fv = 10
value = 1
[State 0, ChangeState]
type = ChangeState
trigger1 = p2stateno=802 
value =801

[State 0, ChangeState]
type = targetState
triggerall = time =[1,4] 
trigger1= (enemy,command="z" || enemy,command="y" || enemy,command="b")&& AILevel=0
trigger2 =  var(35)=1
value =802
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=4
value = S2,0
channel = 0


[State 810, Bind 1]
type = BindToTarget
trigger1 = AnimElemTime(1) >= 0&&animelemtime(3)<0
pos = 29, (enemynear,const(size.head.pos.y))+83
;ignorehitpause = 
;persistent =

[State 810, Bind 1]
type = TargetBind
trigger1 =  AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = 41,-70

[State 810, Bind 2-4]
type = TargetBind
triggerall  = vel y <0
trigger1 =  AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
pos = -46,-25

[State 810, Bind 2-4]
type = TargetBind
triggerall  = vel y >0
trigger1 =  AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
pos = -28,0

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElem=5
pos = -20,-0

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelemtime(4)>=0 && pos y >=0
value = -111
kill = 1
persistent=0

[State 0, PosAdd]
type = PosAdd
trigger1 =animelem=4 
y = -35
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = animelem=3 
x = -.35
y = -4.5
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(3)>0&&animelemtime(5)<0 && pos y <0
y = .61
;ignorehitpause = 
;persistent = 
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(5)>3&&animelemtime(6)<0 && pos y <0
y = .5
[State 0, Turn]
type = Turn
trigger1 = animelem=5
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(5)=1
x = -.5
y = -6.5
[State 0, VelSet]
type = VelSet
trigger1 = pos y>=0 && animelemtime(3)>2&&animelemtime(5)<0
trigger2=pos y>=0 && animelemtime(5)>3
x = 0
y = 0
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = pos y>0 && animelemtime(5)>3
trigger2 = animelem=5
y = 0
;ignorehitpause = 
;persistent = 


[State 3304, EnvShake]
type = EnvShake
Trigger1 = animelemtime(4)>=0 && pos y >=0
freq = 90
ampl = 4
phase = 20
time = 10
persistent=0

[State 0, Explod]
type = Explod
trigger1 =animelemtime(4)>=0 && pos y >=0
anim =6006
ID =8002
pos = 0,10
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
persistent=0

[State 3303, PlaySnd]
type = PlaySnd
Trigger1 = animelemtime(4)>=0 && pos y >=0
value = S1,3
volume = 255
channel = 1
persistent=0

[State 0, TargetState]
type = TargetState
trigger1 = animelemtime(4)>=0 && pos y >=0 
value = 833
persistent=0

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value =0
ctrl =1
;---------------------------------------------------------------------------
; Opponent Thrown
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by the throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 832]
type    = A
movetype= H
physics = N
velset = 0,0

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

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

[State 820, 1]
type = ChangeAnim2
Trigger1 = enemy,vel y >0
value = 831
elem=5
persistent=0
[State 820, SelfState]
type = SelfState
trigger1 = p2stateno!=831
value = 5050
;---------------------------------------------------------------------------
; 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 833]
type    = A
movetype= H
physics = N
poweradd = 40
velset=0,0

[State 0, PosAdd]
type = PosAdd
trigger1 = time=0
x = -const(size.head.pos.y)

[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0
;ignorehitpause = 
;persistent = 


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0
value = 5110
;ignorehitpause = 
;persistent = 


[State 0, SelfState]
type = SelfState
trigger1 =time=20 
value =ifelse(alive,5120,5110)
;---------------------------------------------------------------------------
; Throw - Attempt
; CNS difficulty: medium-advanced

[Statedef 840]
type    = A
movetype= A
physics = N
juggle  =0; 15
ctrl = 0
anim = 802
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents the player from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = A, NT          ;Attributes: Standing, Normal Throw
hitflag = A-          ;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
p1facing = ifelse (command = "holdfwd", 1, -1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face player
p1stateno = 841      ;On success, player changes to state 810
p2stateno = 842       ;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 =620
ctrl = 0

;---------------------------------------------------------------------------
; Throwing the opponent
[Statedef 841]
type    = A
movetype= A
physics = A
anim = 840
poweradd = 56

[State 0, VarSet]
type = VarSet
trigger1 = random<33*AIlevel&&AIlevel>0&&time=0
v = 35   ;fv = 10
value = 1
[State 0, ChangeState]
type = ChangeState
trigger1 = p2stateno=802 
value =801

[State 0, ChangeState]
type = targetState
triggerall = time =[1,4] 
trigger1= (enemy,command="z" || enemy,command="y" || enemy,command="b")&& AILevel=0
trigger2 =  var(35)=1
value =802
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=4
value = S2,0
channel = 0

[State 0, PosFreeze]
type = PosFreeze
trigger1 =animelemtime(3)<0 
value = 1
;ignorehitpause = 
;persistent = 



[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0&&animelemtime(2)<0
pos = -10,-117
;ignorehitpause = 
;persistent =

[State 810, Bind 1]
type = TargetBind
trigger1 =  AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = 23,-92
[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElem=3
pos =38,-23
persistent=0
[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem=3
value = -125
kill = 1
persistent=0
[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelem=3
value = 56

[State 0, TargetState]
type = TargetState
trigger1 = animelem=3 
value = 843
persistent=0
[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelem=3
value = 56
[State 0, ChangeState]
type = ChangeState
trigger1 = animtime=0
value = 57
ctrl = 1
;---------------------------------------------------------------------------
; Opponent Thrown
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by the throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 842]
type    = A
movetype= H
physics = N
velset = 0,0

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

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


[State 820, SelfState]
type = SelfState
trigger1 = p2stateno!=841
value = 5050
;---------------------------------------------------------------------------
; 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 843]
type    = A
movetype= H
physics = N
poweradd = 56
velset=-6,15.5



;ignorehitpause =
;persistent =


[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .55
[State 0, NotHitBy]
type = NotHitBy
trigger1 = statetype!=L
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =


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

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=5100|| anim=614|anim=612
statetype = L      ;S,A,C,L

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5100)
trigger1 = pos y>=0 && (anim=841) && time>3
value = 5100
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5100)
trigger1 = pos y>=0 &&(anim=841) && time>3
value = 614
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=614&& animtime=0
value = 612
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=5100 && animtime=0
value = 612

[State 0, PosSet]
type = PosSet
trigger1 =anim=5100 || anim=612 ||anim=614
y = 0
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 = anim=5100 || anim=612||anim=614
x = 0
y = 0
;ignorehitpause =
;persistent =

;ignorehitpause = 
;persistent = 
[State 0, ChangeState]
type = selfState
triggerall = alive
triggerall = anim=612 && animelemtime(1)>1
trigger1 = command="x"||command="y"||command="z"||command="a"||command="b"||command="c"
trigger2= AIlevel >0 && random<249
value =5120
ctrl = 0
[State 0, SelfState]
type = SelfState
trigger1 =animelemtime(1)=18 && anim=612
value =ifelse(alive,5120,5110)
ctrl=0
;---------------------------------------------------------------------------
; Throw - Attempt
; CNS difficulty: medium-advanced

[Statedef 850]
type    = A
movetype= A
physics = N
juggle  =0; 15
ctrl = 0
anim = 802
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents the player from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = A, NT          ;Attributes: Standing, Normal Throw
hitflag = A-          ;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
p1facing = ifelse (command = "holdfwd", -1, 1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face player
p1stateno = 851      ;On success, player changes to state 810
p2stateno = 852       ;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 =650
ctrl = 0
;---------------------------------------------------------------------------
; Throwing the opponent
[Statedef 851]
type    = A
movetype= A
physics = N
anim = 850
poweradd = 56

[State 0, VarSet]
type = VarSet
trigger1 = random<33*AIlevel&&AIlevel>0&&time=0
v = 35   ;fv = 10
value = 1
[State 0, ChangeState]
type = ChangeState
trigger1 = p2stateno=802 
value =801

[State 0, ChangeState]
type = targetState
triggerall = time =[1,4] 
trigger1= (enemy,command="z" || enemy,command="y" || enemy,command="b")&& AILevel=0
trigger2 =  var(35)=1
value =802

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=5
value = S2,0
channel = 0

;persistent =
[State 810, Bind 1]
type = TargetBind
trigger1 =  AnimElemTime(1) >= 0 && AnimElemTime(3) < 0
pos = 47,-80

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = 41,-68
[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
pos =-39,-15

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElem=5&& AnimElemTime(6) < 0
pos =-28,0
[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElem=6
pos =-20,-0

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelemtime(5)>=0 && pos y >=0
value = -111
kill = 1
persistent=0
;ignorehitpause = 
;persistent = 
[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelemtime(5)>=0 && pos y >=0
value = 56
persistent=0
[State 0, VelSet]
type = VelSet
trigger1 = animelem=3 
x = -.35
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(3)>0&&animelemtime(5)<0 && pos y <0
y = .55
;ignorehitpause = 
;persistent = 

[State 0, Turn]
type = Turn
trigger1 = animelem=6
;ignorehitpause = 
;persistent = 

[State 820, 1]
type = ChangeAnim2
Trigger1 = animelemtime(4)>=0 && pos y >=0
value = 850
elem=5
persistent=0

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(6)=1
x = -.5
y = -6.5

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(6)>3&&animelemtime(7)<0 && pos y <0
y = .5
[State 0, VelSet]
type = VelSet
trigger1 = pos y>=0 && animelemtime(3)>2&&animelemtime(6)<0
trigger2=pos y>=0 && animelemtime(6)>3
x = 0
y = 0
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = pos y>0 && animelemtime(6)>3
trigger2 =  animelem=5
y = 0
;ignorehitpause = 
;persistent = 


[State 3304, EnvShake]
type = EnvShake
Trigger1 = animelemtime(5)>=0 && pos y >=0
freq = 90
ampl = 4
phase = 20
time = 10
persistent=0

[State 0, Explod]
type = Explod
trigger1 =animelemtime(5)>=0 && pos y >=0
anim =6006
ID =8002
pos = 0,10
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
persistent=0

[State 3303, PlaySnd]
type = PlaySnd
Trigger1 = animelemtime(5)>=0 && pos y >=0
value = S1,3
volume = 255
channel = 1
persistent=0

[State 0, TargetState]
type = TargetState
trigger1 = animelemtime(6)>=0 && pos y >=0
value = 833
persistent=0

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value =0
ctrl =1
;---------------------------------------------------------------------------
; Opponent Thrown
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by the throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 852]
type    = A
movetype= H
physics = N
velset = 0,0

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

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

[State 820, 1]
type = ChangeAnim2
Trigger1 = enemy,pos y>0
value = 851
elem=4
persistent=0
[State 820, SelfState]
type = SelfState
trigger1 = p2stateno!=851
value = 5050
;===============================[SPECIAL ATTACKS]==============================;
;===============
;[CANNON Drill]
;===============
[Statedef 1000]
type    = U
movetype= A
physics = N
juggle  =0; 1
ctrl = 0
velset=0,0
anim =1000+(statetype=A)
poweradd = 56
sprpriority = 2

[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
trigger1 = time=0
v = 2  ;fv = 10
value = ifelse(command = "Cannon_Drill_a",1,2)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(2)=2 && time=0
value = 1010+(statetype=A)

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = statetype!=A
statetype = C      ;S,A,C,
;persistent = 


[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = time=0 
trigger1=statetype=A
trigger2 = prevstateno=251 || prevstateno=440
trigger3 =p2bodydist x >90
v = 2  ;fv = 10
value = 2
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = time=0 
triggerall =statetype!=A 
triggerall = prevstateno!=251 && prevstateno!=440
trigger1= p2bodydist x <90
v = 2  ;fv = 10
value = 1
[State 0, Explod]
type = Explod
triggerall = statetype=A
trigger1 =time=0
anim =5334
ID =1001
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
persistent=0


[State 0, Explod]
type = Explod
triggerall = statetype!=A
trigger1 = animelem = 1
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=3
statetype = A       ;S,A,C,L

[State 0, Width]
type = Width
trigger1 = animelemtime(3)>0
edge = 25,0
player = 20,0
;value = 0,0
;ignorehitpause = 
;persistent = 


[State 0, VelSet]
type = VelSet
triggerall = anim=1001||anim=1011
trigger1 =animelem=4 
x =ifelse(anim=1001,10,13)
y = ifelse(statetype=A,.85,1.5)


[State 0, VelSet]
type = VelSet
triggerall = anim=1000||anim=1010
trigger1 =animelem=4 
x =ifelse(anim=1000,7,12.25)
y = ifelse(statetype=A,.85,1.5)
[State 0, PosAdd]
type = PosAdd
triggerall = anim!=1011 && anim!=1001
trigger1 =animelem=3 
y = -ifelse(anim=1000,5,15)
;ignorehitpause = 
;persistent = 

[State 0, PosSet]
type = PosSet
trigger1 = animelem=13 && anim=1000
trigger2 = animelem=18 && anim=1010
y = 0
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = animelem=13 && anim=1000
trigger2 = animelem=18 && anim=1010
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = animelem=14 && anim=1000
trigger2 = animelem=19 && anim=1010
x = 0
;ignorehitpause = 
;persistent = 

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=13 && anim=1000
trigger2 = animelem=18 && anim=1010
statetype = C      ;S,A,C,L
movetype = I        ;I,A,H
       ;I,A,H
[State 0, VelMul]
type = VelMul
trigger1 = animelemtime(13)>0 && anim=1000
trigger2 = animelemtime(18)>0 && anim=1010
x = .67

[State 0, VelSet]
type = VelSet
trigger1 = animelem=10 && anim=1001 
trigger2 = animelem=21 && anim=1011 
x = 4
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(10)>0&& anim=1001
trigger2 = animelemtime(21)>0&& anim=1011
y = .39
;ignorehitpause = 
;persistent = 

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=10 && anim=1001 
trigger2 = animelem=21 && anim=1001 
y = 10
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S2,4
volume = 255
channel=0

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S0,4
volume = 255
channel = 1


[State 2200, Hitdef]
type = HitDef
triggerall = anim=1000||anim=1010
Trigger1 = time = 0
attr = C,SA
hitflag = MAFD
guardflag = MA
animtype = hard
air.animtype = hard
damage    = ifelse(var(2)=1,97,111),14
guardflag = MA
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 2
guardsound = S3, 1
sparkxy = -10,-30
ground.type = high
ground.hittime  = 18
getpower=60,60
givepower=40,20
air.hittime = 30
ground.velocity = -ifelse(var(2)=1,4.5,9),-ifelse(var(2)=1,10,15)
air.velocity = -ifelse(var(2)=1,4.5,9),-ifelse(var(2)=1,5,9)
down.velocity=-9,-4
yaccel = .9
palfx.time = 70
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=1000
ground.cornerpush.veloff=-8
fall=1
fall.recover=0
[State 2200, Hitdef]
type = HitDef
triggerall = anim=1001||anim=1011
Trigger1 = time = 0
attr = A,SA
hitflag = MAFD
guardflag = MA
animtype = hard
air.animtype = hard
damage    = ifelse(var(2)=1,97,111)
guardflag = MA
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 2
guardsound = S3, 1
sparkxy = -10,-30
getpower=60,60
givepower=40,20
ground.type = high
ground.hittime  = 18
air.hittime = 30
ground.velocity = -ifelse(var(2)=1,10,14),-ifelse(var(2)=1,10,15)
air.velocity = -ifelse(var(2)=1,10,14),-ifelse(var(2)=1,6,15)
down.velocity=-9,-4
yaccel = .9
palfx.time = 70
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=1000
ground.cornerpush.veloff=-8
fall=1
fall.recover=0


[State 0, ChangeAnim]
type = ChangeAnim
triggerall = pos y >=0 && (anim=1001||anim=1011)
trigger1= animelemtime(14)>0&&anim=1001
trigger2= animelemtime(24)>0&&anim=1011
value = 1002

[State 0, PosSet]
type = PosSet
trigger1 = pos y>=0 && statetype=A
y = 0


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=1002
statetype = S      ;S,A,C,L
movetype = I 
[State 0, PosSet]
type = PosSet
trigger1 = anim=1002
y = 0
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = anim=1002
x = 0
y = 0
;ignorehitpause = 
;persistent = 



[State 2200, ChangeState]
type = ChangeState
trigger1 =animtime=0 && statetype!=A
value =ifelse(anim=1002,0,11)
ctrl = 1
;---------------------------------------------------------------------------
; 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 1001]
type    = A
movetype= H
physics = N
poweradd = 56

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time=0
value = 1202
;elem = 1
;ignorehitpause = 
;persistent = 

[State 0, HitVelSet]
type = HitVelSet
trigger1 = time=0
x = 1
y = 1
;ignorehitpause = 
;persistent =

;ignorehitpause =
;persistent =


[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .86
[State 0, NotHitBy]
type = NotHitBy
trigger1 = statetype!=L &&p2stateno!=[3050,3100]
trigger2 = enemy,numexplod(1001)>0&&p2stateno!=[3050,3100]
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =


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

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=5100|| anim=614|anim=612
statetype = L      ;S,A,C,L

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5100)
trigger1 = pos y>=-10 && (anim=1202) && time>3
value = 5100
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5100)
trigger1 = pos y>=0 &&(anim=1202) && time>3
value = 614
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=614&& animtime=0
value = 612
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=5100 && animtime=0
value = 612

[State 0, PosSet]
type = PosSet
trigger1 =anim=5100 || anim=612 ||anim=614
y = 0
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 = anim=5100 || anim=612||anim=614
x = 0
y = 0
;ignorehitpause =
;persistent =

;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = selfState
triggerall = p2stateno!=3050
triggerall = alive
triggerall = anim=612 && animelemtime(1)>1
trigger1 = command="x"||command="y"||command="z"||command="a"||command="b"||command="c"
trigger2= AIlevel >0 && random<249
value =5120
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 


[State 0, SelfState]
type = SelfState
trigger1 =animelemtime(1)=8 && anim=612
value =ifelse(alive,5120,5110)
ctrl=0
;==============
;[CANNON SPIKE]
;==============
[Statedef 1050]
type    = S
movetype= A
physics = S
juggle  =0; 1
velset = 0,0
ctrl = 0
anim = 1050
poweradd = 20
sprpriority = 2


[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
trigger1 = time=0
v = 2  ;fv = 10
value = ifelse(command = "Cannon_Spike_a",1,2)

[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = time=0 
trigger1= p2bodydist x <35
v = 2  ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = time=0 
trigger1 =p2bodydist x >=35
v = 2  ;fv = 10
value = 2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(2)=2 && time=0
value = 1051
[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S2,3
volume = 255
channel=0

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S0,4
volume = 255
channel = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=5&& anim!=1052
trigger2 =  anim=1053
statetype = A       ;S,A,C,L
physics=N
[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(5)=1&& anim!=[1052,1053]
x =ifelse(var(2)=1,7.75,17)
y = ifelse(var(2)=1,-13.5,-19)

[State 0, VelAdd]
type = VelAdd
triggerall=anim!=[1052,1053]
trigger1 =animelemtime(5)>1 
y = ifelse(var(2)=1,.88,.8)
[State 0, VelAdd]
type = VelAdd
triggerall=anim=1053
trigger1 =1
y = .45
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = animelem=10 && anim=1050
trigger2 = animelem=14 && anim=1051
x = 0
;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=-7 && (anim=1050||anim=1051|| anim=1053) && animelemtime(6)>0
value = 1052

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=1052
statetype = S      ;S,A,C,L
movetype = I 
[State 0, PosSet]
type = PosSet
trigger1 = anim=1052
y = 0
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = anim=1052
x = 0
y = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact
value = 1053
persistent=0


[State 0, VelSet]
type = VelSet
trigger1 = anim=1053 
x = -4
y = -7
persistent=0
[State 0, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(5)<0
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 


[State 2200, Hitdef]
type = HitDef
Trigger1 = time = 0
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage    = ifelse(var(2)=1,125,139)
guardflag = MA
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 1
guardsound = S3, 1
sparkxy = -10,-30
ground.type = high
ground.hittime  = 24
air.hittime = 24
ground.velocity = -8,-ifelse(var(2)=1,12,19)
air.velocity = -8,-ifelse(var(2)=1,12,19)
down.velocity=-9,-4
yaccel = .9
palfx.time = 24
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=200
ground.cornerpush.veloff=-8
forcenofall=1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=28
trigger2 = animelem=18 && var(2)=1
;trigger3= 
movetype = I        ;I,A,H
;ignorehitpause = 
;persistent = 


[State 0, TargetState]
type = TargetState
trigger1 =(p2statetype= A) && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 2200, ChangeState]
type = ChangeState
trigger1 =animtime=0 && anim=1052
value =0
ctrl = 1
;==============
;[SPIN KNUCKLE]
;==============
[Statedef 1100]
type    = S
movetype= A
physics = S
juggle  =0; 1
velset = 0,0
ctrl = 0
anim = 1100
poweradd = 56
sprpriority = 2

[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
trigger1 = time=0
v = 2  ;fv = 10
value = ifelse(command = "Axel_Spin_Knuckle_x",1,2)

[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = time=0 
trigger1 =p2bodydist x >=70
v = 2  ;fv = 10
value = 2

[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = time=0 
trigger1= p2bodydist x <70
v = 2  ;fv = 10
value = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(2)=2 && time=0
value = 1101
[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S2,0
volume = 255
channel=0

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S0,4
volume = 255
channel = 1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(6)<0
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=3
statetype = A       ;S,A,C,L
physics=N
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=6
statetype = S      ;S,A,C,L
physics=N
[State 0, VelSet]
type = VelSet
trigger1 = animelem=3&& anim!=[1052,1053]
x =ifelse(var(2)=1,3.5,7)
y = -3.5

[State 0, VelAdd]
type = VelAdd
triggerall=animelemtime(3)>1 
trigger1=animelemtime(3)>0&&animelemtime(6)<0
y = .55
[State 0, PosSet]
type = PosSet
trigger1 = animelem=6
y = 0
[State 0, PosSet]
type = velset
trigger1 = animelem=6
y = 0
x=0
;ignorehitpause = 
;persistent = 
[State 2200, Hitdef]
type = HitDef
Trigger1 = animelem=9
trigger2= animelem=11 && var(2)=2
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage    = ifelse(var(2)=1,49,55)
guardflag = MA
pausetime = 9,9
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 2
guardsound = S3, 1
sparkxy = -10,-30
getpower=30,30
givepower=20,10
ground.type = high
ground.hittime  =18
guard.ctrltime=16
air.hittime = 18
ground.velocity = -8,-ifelse(var(2)=1,9,0)
air.velocity = -8,-9
down.velocity=-9,-4
yaccel = .7
palfx.time =18
palfx.add = 90,0,0
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,50
id=200
ground.cornerpush.veloff=-8
forcenofall=1
[State 2200, Hitdef]
type = HitDef
trigger1= animelem=11 && var(2)=1
trigger2= animelem=13 && var(2)=2
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage    = ifelse(var(2)=1,49,55)
guardflag = MA
pausetime = 9,9
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 2
guardsound = S3, 1
sparkxy = -10,-30
ground.type = high
getpower=30,30
givepower=20,10
ground.hittime  =18
guard.ctrltime=16
air.hittime = 18
ground.velocity = -6,-9.2
air.velocity = -6,-9.2
down.velocity=-9,-4
yaccel = .84
palfx.time =18
palfx.add = 90,0,0
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,0
id=200
ground.cornerpush.veloff=-8
forcenofall=1
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 2200, ChangeState]
type = ChangeState
trigger1 =animtime=0 
value =0
ctrl = 1
;==============
;[HOOLIGAN COMBINATION]
;==============
[Statedef 1150]
type    = S
movetype= A
physics = S
juggle  =0; 1
velset = 0,0
ctrl = 0
anim = 1150
poweradd = 20
sprpriority = 2

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=2
statetype = A       ;S,A,C,L
physics=N
[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
trigger1 = time=0
v = 2  ;fv = 10
value = ifelse(command = "Hooligan Combination_a",1,2)
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = time=0 
trigger1= p2bodydist x <60
v = 2  ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = time=0 
trigger1 =p2bodydist x >=60
v = 2  ;fv = 10
value = 2
[State 0, VelSet]
type = VelSet
trigger1 = animelem=2
x =ifelse(var(2)=1,2.5,6)
y = -8.5

;ignorehitpause = 
;persistent = 
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=5
y = -50

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=20
statetype = C  

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2)>0 
y = .55

[State 0, VelSet]
type = VelSet
trigger1 = statetype=C
y =0
[State 0, PosSet]
type = PosSet
trigger1 = statetype=C
y = 0
;ignorehitpause = 
;persistent = 
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 1
movecamera = 1,0
;ignorehitpause = 
;persistent = 


[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 21
value = S3,2
volume = 255
channel = 1

     ;S,A,C,L

[State 0, VelAdd]
type = Velmul
trigger1 = animelemtime(21)>0 
x = .75
[State 0, VelSet]
type = VelSet
trigger1 = animelem=22
x =0


[State 2200, Hitdef]
type = HitDef
Trigger1 = time = 0
attr = A,SA
hitflag = MAF
guardflag = LA
animtype = hard
air.animtype = hard
damage    = ifelse(var(2)=1,83,97),14
guardflag = MA
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 4
guardsound = S3, 1
sparkxy = -10,-30
ground.type = high
ground.hittime  = 24
air.hittime = 24
ground.velocity = -8,-ifelse(var(2)=1,12,19)
air.velocity = -8,-ifelse(var(2)=1,12,19)
down.velocity=-9,-4
yaccel = .9
id=440
ground.cornerpush.veloff=-8
forcenofall=1


[State 0, ChangeState]
type = ChangeState
triggerall = statetype=A
triggerall = AIlevel =0
triggerall = (command="x"||command="y"||(command="z"&&var(57)=0))|| (command="a"||command="b"||(command="c"&&var(57)=0))
trigger1 = animelemtime(5)>0
value =ifelse((command="x"||command="y"||(command="z"&&var(57)=0)),1152,1151)

[State 0, ChangeState]
type = ChangeState
triggerall = statetype=A
triggerall = AIlevel >0
triggerall = p2statetype!=L
triggerall = random <250
triggerall = (p2bodydist x <15 &&p2movetype!=A&&p2statetype=C&&pos y >-15) ||(p2bodydist x <15 &&p2movetype!=A&&p2statetype!=C) || (p2movetype=A&&p2bodydist x <70)
trigger1 = animelemtime(5)>0
value =ifelse(p2bodydist x <25,1152,1151)

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

;-------------
;divekick
;==============
[Statedef 1151]
type    = A
movetype= A
physics = N
juggle  =0; 1
velset = 0,0
ctrl = 0
anim = 1151
poweradd =0
sprpriority = 2

[State 0, PosAdd]
type = PosAdd
trigger1 = time=0
y = 50
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 =animelem=4 && statetype=A
x =5.5
y = 10
;ignorehitpause = 
;persistent = 
[State 0, PlayerPush]
type = PlayerPush
trigger1 = p2bodydist x <15
value = 0
;ignorehitpause = 
;persistent = 
[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4&& anim=1151
value = S2,2
volume = 255
channel=0

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4 && anim=1151
value = S0,4
volume = 255
channel = 1
[State 2200, Hitdef]
type = HitDef
Trigger1 = time = 0
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage    = ifelse(var(2)=1,83,97),7
guardflag = MA
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 1
guardsound = S3, 1
sparkxy = -10,-30
getpower=60,60
givepower=40,20
ground.type = high
ground.hittime  = 18
ground.slidetime=13
air.hittime = 18
ground.velocity = -9.5
air.velocity = -5,-5
down.velocity=-9,-3
yaccel = .7
ground.cornerpush.veloff=-8
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=-10 && animelemtime(4)>0
value = 1152
persistent=0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=1152
statetype = C  
physics=S

[State 0, VelAdd]
type = VelAdd
trigger1 = anim=1151 && animelemtime(4)>0
y = .55

[State 0, VelSet]
type = VelSet
trigger1 = statetype=C&& (!movecontact || enemy,backedgebodydist >15)
y =0
x=0

[State 0, VelSet]
type = VelSet
trigger1 = statetype=C && (movecontact && enemy,backedgebodydist <15)
y =0
x=-5
persistent=0
[State 0, PosSet]
type = PosSet
trigger1 = statetype=C
y = 0

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0 && anim=1152
value =0
ctrl = 1
;-------------
;grab you
;==============
[Statedef 1152]
type    = A
movetype= A
physics = N
juggle  =0; 1
ctrl = 0
anim = 1153
poweradd =0
sprpriority = 2

[State 0, PosAdd]
type = PosAdd
trigger1 = time=0
y = 50
[State 800, 1]
type = HitDef
triggerall = pos y <-25
Trigger1 = Time = 0
attr = A,ST          ;Attributes: Standing, Normal Throw
hitflag = MA-          ;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
p1facing = ifelse (command = "holdfwd", -1, 1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face player
p1stateno = 1153      ;On success, player changes to state 810
p2stateno = 1154      ;If hit, p2 changes to state 820 in player's cns
fall = 1            
[State 800, 1]
type = HitDef
triggerall = pos y >=-25
Trigger1 = Time = 0
attr = S,ST          ;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
p1facing = ifelse (command = "holdfwd", -1, 1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face player
p1stateno = 1155     ;On success, player changes to state 810
p2stateno = 1156    ;If hit, p2 changes to state 820 in player's cns
fall = 1   
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=0 && time>3
value = 1152
persistent=0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=1152
statetype = C  

[State 0, VelAdd]
type = VelAdd
trigger1 = anim!=1152
y = .55

[State 0, VelSet]
type = VelSet
trigger1 = statetype=C
y =0
x=0
[State 0, PosSet]
type = PosSet
trigger1 = statetype=C
y = 0

[State 0, ChangeState]
type = ChangeState
triggerall = animelemtime(4)>0
trigger1 =p2movetype=A && command="holdback" 
value =120
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 


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

;---------------------------------------------------------------------------
; Throwing the opponent
[Statedef 1153]
type    = S
movetype= A
physics = N
velset=0,0
anim = 830
poweradd =56

;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=4
value = S2,0
channel = 0
[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S2,1
volume = 255
channel=0

[State 0, PosSet]
type = PosSet
trigger1 = enemy,pos y =0 && time=0
y =(enemynear,const(size.head.pos.y))+83


[State 810, Bind 1]
type = TargetBind
trigger1 =  AnimElemTime(1) >= 0 && AnimElemTime(3) < 0
pos = 47,-80

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = 41,-68
[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
pos =-39,-15

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElem=5&& AnimElemTime(6) < 0
pos =-28,0
[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElem=6
pos =-20,-0

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelemtime(5)>=0 && pos y >=0
value = -111
kill = 1
persistent=0
;ignorehitpause = 
;persistent = 
[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelemtime(5)>=0 && pos y >=0
value = 56
persistent=0
[State 0, VelSet]
type = VelSet
trigger1 = animelem=3 
x = -.35
y=-3
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(3)>3&&animelemtime(5)<0 && pos y <0
y = .55
;ignorehitpause = 
;persistent = 

[State 0, Turn]
type = Turn
trigger1 = animelem=6
;ignorehitpause = 
;persistent = 

[State 820, 1]
type = ChangeAnim
Trigger1 = animelemtime(4)>=0 && pos y >=0
value = 850
elem=5
persistent=0

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(6)=1
x = -.5
y = -6.5

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(6)>3&&animelemtime(7)<0 && pos y <0
y = .5
[State 0, VelSet]
type = VelSet
trigger1 = pos y>=0 && animelemtime(3)>2&&animelemtime(6)<0
trigger2=pos y>=0 && animelemtime(6)>3
x = 0
y = 0
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = pos y>0 && animelemtime(6)>3
trigger2 =  animelem=5
y = 0
;ignorehitpause = 
;persistent = 


[State 3304, EnvShake]
type = EnvShake
Trigger1 = animelemtime(5)>=0 && pos y >=0
freq = 90
ampl = 4
phase = 20
time = 10
persistent=0

[State 0, Explod]
type = Explod
trigger1 =animelemtime(5)>=0 && pos y >=0
anim =6006
ID =8002
pos = 0,10
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
persistent=0

[State 3303, PlaySnd]
type = PlaySnd
Trigger1 = animelemtime(5)>=0 && pos y >=0
value = S1,3
volume = 255
channel = 1
persistent=0

[State 0, TargetState]
type = TargetState
trigger1 = animelemtime(6)>=0 && pos y >=0
value = 833
persistent=0

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value =0
ctrl =1
;---------------------------------------------------------------------------
; Opponent Thrown
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by the throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 1154]
type    = A
movetype= H
physics = N
velset = 0,0

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


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

[State 820, 1]
type = ChangeAnim2
Trigger1 = enemy,pos y>0
value = 851
elem=4
persistent=0
[State 820, SelfState]
type = SelfState
trigger1 = p2stateno!=1153
value = 5050
;---------------------------------------------------------------------------
; Throwing the opponent
[Statedef 1155]
type    = S
movetype= A
physics = N
velset=0,0
anim =1155
poweradd = 56

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=1&& anim=1155
value = S2,1
channel =0
[State 0, PosSet]
type = PosSet
trigger1 = time=0
y = 0
;ignorehitpause = 
;persistent = 
[State 0, Width]
type = Width
trigger1 =anim=1155 
edge = 60,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=8&& anim=1155
value = S2,0
channel =0
[State 810, Bind 1]
type = TargetBind
trigger1 =  AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
pos = 40,-66
[State 810, Bind 1]
type = TargetBind
trigger1 =  AnimElemTime(2) >= 0 && AnimElemTime(3) < 0&& anim=1155
pos = 37,-19

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(3) >= 0 && AnimElemTime(4) < 0&& anim=1155
pos = -31,-29

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(4) >= 0 && AnimElemTime(5) < 0&& anim=1155
pos = -22,-94

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(5) >= 0 && AnimElemTime(6) < 0&& anim=1155
pos = 45,-65

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElem= 6&& anim=1155
pos = 62,0


[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem=8&& anim=1155
value = -125
kill = 1
absolute = 0
[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelem=8&& anim=1155
value = 56
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 =animelem=8 && anim=1155
x = -3
y = -5

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=10 && anim=1155
x = 3
y = -4.5

[State 0, VelAdd]
type = VelAdd
trigger1 =animelemtime(1)>10 && animelemtime(5)<2&& anim=1155
trigger2 = animelemtime(9)>0 && anim=1155
y = .65

[State 0, PosSet]
type = PosSet
trigger1 = animelemtime(5)=2
trigger2= anim=1157
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(5)=2
trigger2= anim=1157
x = 0
y = 0


[State 3304, EnvShake]
type = EnvShake
Trigger1 = animelem=8
freq = 90
ampl = 4
phase = 20
time = 10

[State 0, Explod]
type = Explod
trigger1 =animelem=8
anim =6006
ID =8002
pos = 0,10
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 3303, PlaySnd]
type = PlaySnd
Trigger1 = animelem=8
value = S1,3
volume = 255
channel = 2
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
[State 0, TargetState]
type = TargetState
trigger1 = animelemtime(8)=5
value = 821
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=0 && animelemtime(9)>0
value = 1157
persistent = 0

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0 && anim=1157
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Opponent Thrown
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by the throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 1156]
type    = A
movetype= H
physics = N
velset = 0,0

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

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


[State 820, SelfState]
type = SelfState
trigger1 = p2stateno!=1155
value = 5050

;---------------------------------------------------------------------------
;[Cannon Revenge]
;==============
[Statedef 1200]
type    = S
movetype= A
physics = S
juggle  =0; 1
velset = 0,0
ctrl = 0
anim = 1200
poweradd = 56
sprpriority = 2
[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
trigger1 = time=0
v = 2  ;fv = 10
value = ifelse(command = "Cannon Revenge1",1,2)



[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
trigger1 = time=0 && p2bodydist x >60
v = 2  ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
trigger1 = time=0 && p2bodydist x <60 
v = 2  ;fv = 10
value = 2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(2)=2 && time=0
value = 1201

[State 0, Explod]
type = Explod
triggerall = var(4) = 0
trigger1 = animelem = 1
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S2,10
channel=0
[State 1000, PalFX]; lighting
type = PalFX
trigger1 = animelemtime(2)> 0 && animelemtime(3)< 0
trigger1 = (time%5) = 0
time = 3
add = 10,10,130
sinadd = 10,10,30,10
ignorehitpause = 1
[State 0, ReversalDef]
type = ReversalDef
trigger1 = animelemtime(2)> 0 && animelemtime(3)< 0
reversal.attr = SCA,AA           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
p1stateno = ifelse(var(2)=1,1201,1202)
ignorehitpause =1 
;persistent = 

;ignorehitpause = 
;persistent = 


[State 1000, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------
[Statedef 1201]
type    = S
movetype= A
physics = S
juggle  =0; 1
velset = 0,0
ctrl = 0
anim = 1203
poweradd = 0
sprpriority = 2

[State 0, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 17
movetime=17
anim = - 1
sound =-1
darken = 1
p2defmul=1

[State 250, 3]
type = Explod
trigger1 = time = 0
anim = 1209
scale = .5,.5
ontop = 1
ownpal = 1
supermovetime = 9999
sprpriority = 3
removetime=18
postype = p1
pos = 5,-65
bindtime = 1
removetime = 30

[State 250, 3]
type = Explod
trigger1 = time = 5
anim = 1210
scale = 1,1
ontop = 1
ownpal = 1
supermovetime = 9999
sprpriority = 3
postype = p1
pos =  5,-65
bindtime = 1
removetime = 30


[State 2100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S2,13
channel=0

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S0,4
volume = 255
channel = 1




[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=5&& anim!=1052
trigger2 =  anim=1204
statetype = A       ;S,A,C,L
physics=N
[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(5)=1&& anim=1203
x =6
y = -13.5

[State 0, VelAdd]
type = VelAdd
triggerall=anim=1203
trigger1 =animelemtime(5)>1 
y = .88
[State 0, VelAdd]
type = VelAdd
triggerall=anim=1053
trigger1 =1
y = .45
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = animelem=10 && anim=1203
x = 0
;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=-7 && (anim=1203||anim=1053) && animelemtime(6)>0
value = 1052

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=1052
statetype = S      ;S,A,C,L
movetype = I 
[State 0, PosSet]
type = PosSet
trigger1 = anim=1052
y = 0
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = anim=1052
x = 0
y = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact
value = 1053
persistent=0


[State 0, VelSet]
type = VelSet
trigger1 = anim=1053 
x = -4
y = -7
persistent=0

[State 2200, Hitdef]
type = HitDef
Trigger1 = time = 0
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage    = ifelse(var(2)=1,125,139)
guardflag = MA
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 2
guardsound = S3, 1
sparkxy = -10,-30
ground.type = high
ground.hittime  = 24
air.hittime = 24
getpower=60,60
givepower=40,20
ground.velocity = -8,-ifelse(var(2)=1,12,19)
air.velocity = -8,-ifelse(var(2)=1,12,19)
down.velocity=-9,-4
yaccel = .9
palfx.time = 24
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=200
ground.cornerpush.veloff=-8
forcenofall=1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=18 && var(2)=1
;trigger3= 
movetype = I        ;I,A,H
;ignorehitpause = 
;persistent = 


[State 0, TargetState]
type = TargetState

trigger1 =(p2statetype= A) && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 2200, ChangeState]
type = ChangeState
trigger1 =animtime=0 && anim=1052
value =0
ctrl = 1
;---------------------------------------------------------------------------
;[Cannon Revenge]
;==============
;[Statedef 1201]
;type    = S
;movetype= A
;physics = S
;juggle  =0; 1
;velset = 0,0
;ctrl = 0
;anim = 1203
;poweradd = 20
;sprpriority = 2

;ignorehitpause = 
;persistent = 
;-------------------------------------------------------------
[Statedef 1202]
type    = S
movetype= A
physics = S
juggle  =0; 1
velset = 0,0
ctrl = 0
anim = 1205
poweradd = 0
sprpriority = 2

[State 0, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 7
movetime=7
anim = - 1
sound =-1
darken = 1
p2defmul=1

[State 250, 3]
type = Explod
trigger1 = time = 0
anim = 1209
scale = .5,.5
ontop = 1
ownpal = 1
supermovetime = 9999
sprpriority = 3
removetime=18
postype = p1
pos = 5,-65
bindtime = 1
removetime = 30

[State 250, 3]
type = Explod
trigger1 = time = 5
anim = 1210
scale = 1,1
ontop = 1
ownpal = 1
supermovetime = 9999
sprpriority = 3
postype = p1
pos =  5,-65
bindtime = 1
removetime = 30


[State 2100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S2,0
channel=0

[State 2100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S0,4
volume = 255
channel = 1

[State 305, 1]
type = HitDef
trigger1 = time = 0
attr = S, SA			;Attribute: Standing, Normal Attack
;damage = 37, 14
damage =84		;Damage that move inflicts, guard damage
animtype = up			;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA			;Flags on how move is to be guarded against
hitflag = MAF			;Flags of conditions that move can hit
priority = 3, Hit			;Attack priority: 0 (least) to 7 (most), 4 default					;Hit/Miss/Dodge type (Def: Hit)
pausetime = 10,10			;Time attacker pauses, time opponent shakes
sparkno = S7005+(random%4)
guard.sparkno = S7009			;Spark anim no (Def: set above)
sparkxy = -10, -60		;X-offset for the "hit spark" rel. to p2,					;Y-offset for the spark rel. to p1
hitsound = S1, 2 	;Sound to play on hit
guardsound = S3, 1		;Sound to play on guard
getpower=60,60
givepower=40,20
ground.type = High		;Type: High, Low, Trip (def: Normal)
ground.slidetime = 19		;Time that the opponent slides back
ground.hittime  = 20		;Time opponent is in hit state
ground.velocity = -1.5,-16	;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8	;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))			;Type: High, Low, Trip (def: same as ground.type)
air.velocity = 0,-12		;X-velocity at which opponent is pushed,					;Y-velocity at which opponent is pushed
air.hittime = 20
p2facing = 1			;Time before oppo
yaccel=0.65
id=1203
[State 0, TargetState]
type = TargetState
triggerall = numtarget(1203)
trigger1 =(p2statetype= A) && movehit=1 && (p2stateno!=[201,203])
value =201
ID =1203
ignorehitpause =1
[State 2200, ChangeState]
type = ChangeState
trigger1 =animtime=0
value =0
ctrl = 1
;---------------------------------------------------------------------------
; 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 1203]
type    = A
movetype= H
physics = N
poweradd = 40
velset=0,-17
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time=0
value = 1202
;elem = 1
;ignorehitpause = 
;persistent = 



;ignorehitpause =
;persistent =


[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .85
[State 0, NotHitBy]
type = NotHitBy
trigger1 = statetype!=L
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =


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

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=5100|| anim=614|anim=612
statetype = L      ;S,A,C,L

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5100)
trigger1 = pos y>=-10 && (anim=1202) && time>3
value = 5100
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5100)
trigger1 = pos y>=0 &&(anim=1202) && time>3
value = 614
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=614&& animtime=0
value = 612
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = pos y>=0 && anim=5100 && animtime=0
value = 612

[State 0, PosSet]
type = PosSet
trigger1 =anim=5100 || anim=612 ||anim=614
y = 0
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 = anim=5100 || anim=612||anim=614
x = 0
y = 0
;ignorehitpause =
;persistent =

;ignorehitpause = 
;persistent = 

[State 0, SelfState]
type = SelfState
trigger1 =animelemtime(1)=4 && anim=612
value =ifelse(alive,5120,5110)
ctrl=0
;-------------
;Useless divekick
;==============
[Statedef 1250]
type    = A
movetype= A
physics = N
juggle  =0; 1
velset = 0,0
ctrl = 0
anim = 1250
poweradd = 50
sprpriority = 2
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
trigger1 = time=0
v = 2  ;fv = 10
value = ifelse(command = "Hooligan Combination_a",1,2)
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
trigger1 = time=0 && p2bodydist x <50
v = 2  ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
trigger1 = time=0 && p2bodydist x>=75
v = 2  ;fv = 10
value = 2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(2)=2
value = 1251
persistent=0
;elem = 1


[State 0, VelSet]
type = VelSet
trigger1 =animelem=4 
x =ifelse(var(2)=2,15,6.5)
y = ifelse(var(2)=2,14,10)
;ignorehitpause = 
;persistent = 
[State 0, PlayerPush]
type = PlayerPush
trigger1 = p2bodydist x <15
value = 0
;ignorehitpause = 
;persistent = 
[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4&& anim=1250+(var(2)-1)
value = S2,2
volume = 255
channel=0

[State 2200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4 && anim=1250+(var(2)-1)
value = S0,4
volume = 255
channel = 1
[State 2200, Hitdef]
type = HitDef
Trigger1 = time = 0
attr = A,SA
hitflag = MAF
guardflag = HA
animtype = hard
air.animtype = hard
damage    = ifelse(var(2)=1,83,97),14
guardflag = MA
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 2
guardsound = S3, 1
sparkxy = -10,-30
getpower=30,30
givepower=20,10
ground.type = high
ground.hittime  = 18
air.hittime = 15
ground.velocity = -ifelse(var(2)=1,7,11),-9
air.velocity = -ifelse(var(2)=1,7,11),-6
down.velocity=-9,-3
yaccel = .85
ground.cornerpush.veloff=-8
palfx.time =18
palfx.add = 90,0,0
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,50
forcenofall=1
id=200


[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=-10 && time>3
value = 1252+(var(2)-1)
persistent=0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=1252+(var(2)-1)
statetype = C  
ignorehitpause=1
[State 0, VelAdd]
type = VelAdd
trigger1 = (anim!=1252+(var(2)-1)) && animelemtime(4)>0
y = .57

[State 0, VelSet]
type = VelSet
trigger1 = statetype=C 
y =0
x=0


[State 0, PosSet]
type = PosSet
trigger1 = statetype=C
y = 0

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0 && anim=1252+(var(2)-1)
value =0
ctrl = 1

;===============================[HYPER ATTACKS]==============================;
;[SPIN DRIVE SMASHER]
;====================
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  =0; 1
poweradd =0
velset = 0,0
ctrl = 0
anim = 3000
sprpriority = 2

[State 3000, Super A]
type = SuperPause
trigger1 = time =14
poweradd = -1000
anim = -1
time = 48
p2defmul=1
unhittable=1
darken=0


[State 2100, PlaySnd]
type = PlaySnd
triggerall = animelemtime(1)=15
trigger1 = anim=3000
value = S2,11
channel=0
persistent=0
;endcmdbuftime = 0
;pausebg = 1
;ignorehitpause = 
;persistent = 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = numexplod(6001) || numhelper(4000)
trigger2=time=[15,19]
flag = noFG
flag2=nobg
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =14
value = S3001,0
[State 0, Explod]
type = Explod
trigger1 = time = 8
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
supermovetime = 4
pausemovetime  = 4

[State 182, 2]
type = NotHitBy
trigger1 = Time = 15
value = SCA
time =8

[State 3000, Hyperbg]
type = Explod
trigger1 = time = 14
anim = 6004
ID = 6001
pos = -2,-19
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
supermovetime = 90
pausemovetime  = 90
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
supermovetime = 90
pausemovetime  = 90

[State 3000, Hyperbg]
type = Explod
trigger1 = time = 15
anim = 6005
ID = 6001
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime =-1
supermovetime = 90
pausemovetime  = 90
scale = .5,ifelse(GameHeight = 180,.4,.5)
sprpriority = -6
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1






[State 3000, helper]
type = Helper
trigger1 = time = 14
pos = 0,-240
postype = back
id = 4000
name = "Hyperportrait"
stateno = 4001
ownpal = 1
size.xscale = 1
size.yscale = 1.25
supermovetime = 90
pausemovetime  = 90


[State 0, VelSet]
type = VelSet
triggerall = anim=3000
trigger1 =animelem=6 
x =14
y = 1.5
[State 0, PosAdd]
type = PosAdd
triggerall = anim!=1011 && anim!=1001
trigger1 =animelem=6 
y = -15
;ignorehitpause = 

[State 3000, Hitdef]
type = HitDef
trigger1 = animelem=6
trigger2= animelemtime(6)=2
trigger3=animelem=10
attr = C,HA
hitflag = MAFD
guardflag = MA
animtype = hard
air.animtype = hard
damage    = 28,7
guardflag = MA
pausetime = 4,4
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 2
guardsound = S3, 1
sparkxy = -10,-30
ground.type = high
getpower=0
givepower=10,5
ground.hittime  = 18
air.hittime = 30
ground.velocity = -2,0
air.velocity = -4,-5
down.velocity=-5,-4
yaccel = .9
palfx.time = 70
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=200
forcenofall=1

[State 3000, Hitdef]
type = HitDef
trigger1=animelem=14
trigger2=animelem=18
attr = C,HA
hitflag = MAFD
guardflag = MA
animtype = hard
air.animtype = hard
damage    =29,7
guardflag = MA
pausetime = 4,4
getpower=0
givepower=10,5
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 2
guardsound = S3, 1
sparkxy = -10,-30
ground.type = high
ground.hittime  = 18
air.hittime = 30
ground.velocity = -2,0
air.velocity = -4,-5
down.velocity=-5,-4
yaccel = .9
palfx.time = 70
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=200
forcenofall=1




[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=6
value = S0,4
volume = 255
ignorehitpause = 1
persistent = 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=19
statetype = S      ;S,A,C,L
physics=N
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=6
trigger2 = animelem=24
statetype = A       ;S,A,C,L
physics=N
[State 0, VelSet]
type = VelSet
trigger1 = animelem=19
x = 0
y=0
[State 0, PosSet]
type = PosSet
trigger1 = animelem=19
y = 0
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(24)=1
x =17
y = -19

[State 0, VelAdd]
type = VelAdd
trigger1 =animelemtime(24)>1 
y = .8

;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = animelem=32 && anim=1051
x = 0
;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=-5 && animelemtime(26)>0
value = 1052

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=1052
statetype = S      ;S,A,C,L
movetype = I 
[State 0, PosSet]
type = PosSet
trigger1 = anim=1052
y = 0
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = anim=1052
x = 0
y = 0

[State 2200, Hitdef]
type = HitDef
trigger1 = animelem=23
trigger2= animelem=25
trigger3=animelem=30
attr = A,HA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage    = 45,14
guardflag = MA
pausetime = 4,4
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 1
guardsound = S3, 1
getpower=0
givepower=20,10
sparkxy = -10,-30
ground.type = high
ground.hittime  = 24
air.hittime = 24
ground.velocity = -8,-15
air.velocity = -8,-15
down.velocity=-7,-6
yaccel = .9
palfx.time = 24
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=200
ground.cornerpush.veloff=-8
forcenofall=1
[State 2200, Hitdef]
type = HitDef
trigger1=animelem=44
trigger2=animelem=45
attr = A,HA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage    = 30,7
guardflag = MA
getpower=0
givepower=20,10
pausetime = 4,4
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 1
guardsound = S3, 1
sparkxy = -10,-30
ground.type = high
ground.hittime  = 24
air.hittime = 24
ground.velocity = -8,-12
air.velocity = -8,-11
down.velocity=-9,-4
yaccel = .9
palfx.time = 24
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=200
ground.cornerpush.veloff=-8
fall=1
fall.recover=0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=47
;trigger3= 
movetype = I        ;I,A,H
;ignorehitpause = 
;persistent = 

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelem= 47
id =6001

[State 0, TargetState]
type = TargetState
trigger1 =(p2statetype= A) && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 2200, ChangeState]
type = ChangeState
trigger1 =animtime=0 && anim=1052
value =0
ctrl = 1
;=============================================================================
;=============================================================================
;=============================================================================
;[Reverse somethingsomething]
;====================
[Statedef 3050]
type    = S
movetype= A
physics = S
juggle  =0; 1
poweradd =0
velset = 0,0
ctrl = 0
anim = 3050
sprpriority = 2

[State 3000, Super A]
type = SuperPause
trigger1 = time =7
poweradd = -1000
anim = -1
time = 48
p2defmul=1
unhittable=1
darken=0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = numexplod(6001)|| numhelper(4000)
flag = noFG
flag2=nobg
ignorehitpause=1

;endcmdbuftime = 0
;pausebg = 1
;ignorehitpause = 
;persistent = 

[State 2100, PlaySnd]
type = PlaySnd
triggerall = time=8
trigger1 = anim=3050
value = S2,1
channel=0
persistent=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =7
value = S3001,0
[State 0, Explod]
type = Explod
trigger1 = time = 7
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
supermovetime = 4
pausemovetime  = 4

[State 182, 2]
type = NotHitBy
trigger1 = Time =7
value = SCA
time =8

[State 3000, Hyperbg]
type = Explod
trigger1 = time = 7
anim = 6004
ID = 6001
pos = -2,-19
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
supermovetime = 90
pausemovetime  = 90
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
supermovetime = 90
pausemovetime  = 90

[State 3000, Hyperbg]
type = Explod
trigger1 = time = 7
anim = 6005
ID = 6001
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime =-1
supermovetime = 90
pausemovetime  = 90
scale = .5,ifelse(GameHeight = 180,.4,.5)
sprpriority = -6
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1

[State 3000, helper]
type = Helper
trigger1 = time = 7
pos = 0,-240
postype = back
id = 4000
name = "Hyperportrait"
stateno = 4001
ownpal = 1
size.xscale = 1
size.yscale = 1.25
supermovetime = 90
pausemovetime  = 90


[State 0, VelSet]
type = VelSet
trigger1 =animelem=9
y = -16
;ignorehitpause = 
;persistent = 
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=9
statetype = A       ;S,A,C,L

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(20)>0
y = .55


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=-7  && animelemtime(25)>0
value = 1052
persistent=0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=1052
statetype = S      ;S,A,C,L
movetype = I 
[State 0, PosSet]
type = PosSet
trigger1 = anim=1052
y = 0
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = anim=1052
x = 0
y = 0


[State 3000, Hitdef]
type = HitDef
trigger1 = animelem=6
trigger2= animelem=7
trigger3=animelem=8
attr = S,HA
hitflag = MAFD
guardflag = MA
animtype = hard
air.animtype = hard
damage    = 23,7
guardflag = MA
pausetime = 4,4
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 1
guardsound = S3, 1
sparkxy = -10,-30
ground.type = high
getpower=0
givepower=10,5
ground.hittime  = 18
air.hittime = 30
ground.velocity = 5,-5
air.velocity = 4,-5
down.velocity=-5,-4
yaccel = .65
palfx.time = 70
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=200
fall=1
fall.recover=0

[State 3000, Hitdef]
type = HitDef
trigger1 = animelem=9
trigger2= animelem=10
trigger3=animelem=11
trigger4 = animelem=12
trigger5= animelem=13
trigger6=animelem=14
trigger7 = animelem=16
trigger8= animelem=18
trigger9=animelem=20
trigger10 = animelem=22
trigger11= animelem=24
trigger12=animelem=26
trigger13 = animelem=28
trigger14= animelem=30
trigger15=animelem=32
trigger16 = animelem=34
trigger17= animelem=36
trigger18=animelem=38
trigger19 = animelem=39
trigger20= animelem=40
trigger21=animelem=41
trigger22 = animelem=42
trigger23= animelem=43
attr = A,HA
hitflag = MAFD
guardflag = MA
animtype = hard
air.animtype = hard
damage    = 16,7
guardflag = MA
pausetime = 2,2
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 1
guardsound = S3, 1
sparkxy = -10,-75
ground.type = high
getpower=0
givepower=10,5
ground.hittime  = 18
air.hittime = 30
ground.velocity = 2,0
air.velocity = .25,-15
down.velocity=-5,-4
yaccel = .65
palfx.time = 70
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=200
fall=1
fall.recover=0

[State 0, TargetState]
type = TargetState
trigger1 =(p2statetype= A) && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 3000, Hitdef]
type = HitDef
trigger1 = animelem=44
attr = A,HA
hitflag = MAFD
guardflag = MA
animtype = hard
air.animtype = hard
damage    = 165,7
guardflag = MA
pausetime = 2,2
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 1
guardsound = S3, 1
sparkxy = -10,-85
ground.type = high
getpower=0
givepower=10,5
ground.hittime  = 18
air.hittime = 30
ground.velocity = 2,0
air.velocity = -15,-17
down.velocity=-5,-4
yaccel = .9
palfx.time = 70
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=1000
fall=1
fall.recover=0
[State 1027, No scroll]
type = ScreenBound
triggerall = p2movetype=H&&(p2stateno!=[120,155])
trigger1=anim=3050||anim=1052||anim=0
value = 0
;movecamera=0,1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = backedgebodydist<0 && anim=1052 && animtime=0&&p2movetype=H&&(p2stateno!=[120,155])
value = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =anim=0
flag = invisible
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelem= 45
id =6001

[State 0, VarSet]
type = Varadd
trigger1 =var(29)=1 && p2statetype=L
v = 31    ;fv = 10
value = 1
ignorehitpause=1
[State 0, VarSet]
type = VarSet
triggerall = backedgebodydist<0 && p2movetype=H
trigger1 =anim=3050
v = 29    ;fv = 10
value = 1
ignorehitpause=1
[State 0, ChangeAnim]
type = Changestate
trigger1 = (animtime=0 && anim=1052&&var(29)=0) ||  ( p2statetype=L&&var(31)>=6 && var(29)=1 && anim=0)
value = ifelse(anim=0,101,0)
ctrl=1


;=============================================================================
;Killer Bee Assault !!!! All in one state because I'm the best.
;=============================================================================
;Killer Bee Assault(Flip Back)
[Statedef 3100]
type = U
movetype = A
physics = N
anim = 3100
velset = 0,0
ctrl = 0

[State 3000, Super A]
type = SuperPause
triggerall = animelemtime(1)=1 && var(5)=0
trigger1 = anim=3101
poweradd = -1000
anim = -1
time = 48
p2defmul=1
unhittable=1
darken=0

persistent=0
[State 0, VarSet]
type = VarSet
trigger1 = statetype!=A && time=0 
v = 3   ;fv = 10
value = 0
[State 0, VarSet]
type = VarSet
trigger1 = statetype=A && time=0 
v = 3   ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = numexplod(6001)

flag = noFG
flag2=nobg
ignorehitpause=1

[State 0, Width]
type = Width
trigger1 = 1
edge = 0,0
player = 0,0
;value = 0,0
;ignorehitpause = 
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
triggerall = animelemtime(1)=1&& var(5)=0
trigger1 = anim=3101
value = S3001,0
channel=2
persistent=0
[State 2100, PlaySnd]
type = PlaySnd
triggerall = animelemtime(1)=1&& var(5)=0
trigger1 = anim=3101
value = S2,9
channel=0
persistent=0
[State 0, Explod]
type = Explod
trigger1 = time = 0 && statetype!=A
anim =8000
ID =8005
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
supermovetime = 4
pausemovetime  = 4
persistent=0
[State 182, 2]
type = NotHitBy
trigger1 = anim!=3100
value = SCA
time =8
persistent=0

[State 3000, Hyperbg]
type = Explod
triggerall =animelemtime(1)=1&& var(5)=0
trigger1 = anim=3101
anim = 6004
ID = 6001
pos = -2,-19
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
supermovetime = 90
pausemovetime  = 90
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
supermovetime = 90
pausemovetime  = 90
persistent=0

[State 3000, Hyperbg]
type = Explod
triggerall =animelemtime(1)=2&& var(5)=0
trigger1 = anim=3101
anim = 6005
ID = 6001
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime =-1
supermovetime = 90
pausemovetime  = 90
scale = .5,ifelse(GameHeight = 180,.4,.5)
sprpriority = -6
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1
persistent=0


[State 3000, helper]
type = Helper
triggerall =animelemtime(1)=1&& var(5)=0
trigger1 = anim=3101
pos = 0,-240
postype = back
id = 4000
name = "Hyperportrait"
stateno = 4001
ownpal = 1
size.xscale = 1
size.yscale = 1.25
supermovetime = 90
pausemovetime  = 90
persistent=0
;[State 0, Pause]
;type = Pause
;trigger1 = var(3)=1 && time >8 && anim=3100
;time = 3
;movetime = 3
;endcmdbuftime = 0
;pausebg = 1
;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = backedgebodydist < 25&& time >26&& var(5)=0
value = 3101
persistent=0
;elem = 1
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 5    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

[State 0, Null]
type = Null
;triggerall = AILevel>0
triggerall = var(5)!=0
triggerall = anim=[3101,3103]
triggerall = p2statetype!=L
trigger1=pos y >=0&&anim!=3102||((p2bodydist y  >=0 )&& (anim=3101||anim=3103)&& p2bodydist x =[-15,45]) || var(5)=5 &&p2bodydist y <0 
trigger1=var(5):=23
trigger2=((p2bodydist y  >=5 )&& (anim=3101||anim=3103)&& p2bodydist x =[46,90]) ||(frontedgebodydist <=35 && anim=3103)
trigger2=var(5):=3
trigger3=(p2bodydist y  >=0)&& (anim=3101||anim=3103) && var(5)>0 && p2bodydist x >90
trigger3=var(5):=36
trigger4=(p2bodydist y  <0 )&&  anim=3102 &&  p2bodydist x >90
trigger4=var(5):=96
trigger5=(( p2bodydist x =[46,90]) &&  anim=3102) ||((p2bodydist y  <-15&&  anim=3101)&&pos y <-25)
trigger5=var(5):=9
trigger6=((p2bodydist y  <0 )&&  anim=3102  &&p2bodydist x =[16,45])
trigger6=var(5):=89
trigger7=(p2bodydist x =[-15,15]) &&  anim=3102
trigger7=var(5):=8
ignorehitpause=1
[State 0, ChangeAnim]
type = ChangeAnim
triggerall=var(5)=6||var(5)=9||var(5)=3||var(5)=5||var(5)=96||var(5)=89||var(5)=23
trigger1 = frontedgebodydist <=35
trigger1= pos y <=-0&& anim=[3110,3119]
value =3101


[State 0, PlayerPush]
type = PlayerPush
trigger1 = movehit || var(5)>0
value = 1
ignorehitpause = 1
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=var(5)=2||var(5)=3||var(5)=23||var(5)=36 || var(5)=5 || var(5)=2
trigger1= pos y >=0&& anim=[3110,3119]
value =3102
[State 0, ChangeAnim]
type = ChangeAnim
triggerall=var(5)=9 || var(5)=8||var(5)=7||var(5)=96||var(5)=89
trigger1= pos y <-200&& anim=[3110,3119]
value =3103

[State 2100, PlaySnd]
type = PlaySnd
triggerall = animelemtime(1)=1 && var(5)!=0
trigger1 = anim=3101
trigger2 = anim=3102
trigger3 = anim=3103
value = S2,0
channel=0
[State 0, Turn]
type = Turn
trigger1 = anim=3101 && animelemtime(1)=0 &&var(5)!=0
trigger2=anim=3102 && animelemtime(1)=0&& p2bodydist x <-15
trigger3=anim=3103 && animelemtime(1)=0&& p2bodydist x <-15
[State 0, VarSet]
type = VarSet
triggerall = enemy,alive
trigger1 = movehit && var(5)=0 && p2statetype!=L && p2stateno=[200,203]
v =5    ;fv = 10
value = 5
persistent=0




[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =animelem=3 && anim=3100
statetype = A   

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = statetype=A && time=0
value = 3100
elem = 3
[State 0, VelSet]
type = VelSet
trigger1 =anim=[3101,3104] 
x = 0
y = 0
[State 0, VelSet]
type = VelSet 
trigger1 = animelemtime(3)>1 && anim=3100
x = -20
y = -ifelse(Var(3)=1 && pos y <-35,2.5,7.5)
[State 0, VelSet]
type = VelSet
trigger1 = backedgedist <20 && anim=3100
x = 0
;ignorehitpause = 
;persistent = 

;persistent = 
    ;S,A,C,L
;ignorehitpause = 
;persistent = 

[State 0, ScreenBound]
type = ScreenBound
triggerall = anim!=3100
;triggerall = anim!=3101||var(5)!=0
trigger1 =  anim!=3121 || anim=3111&&!movecontact 
value = 1
movecamera = 0,0
;ignorehitpause = 
;persistent = 
[State 0, ScreenBound]
type = ScreenBound
trigger1 =  anim=3100
value = 0
movecamera = 0,1
ignorehitpause=1


[State 0, VelSet]
type = VelSet
trigger1 =anim= 3110
x = 28
[State 0, VelSet]
type = VelSet
trigger1 =anim= 3111
x = 29
y=15
[State 0, VelSet]
type = VelSet
trigger1 =anim= 3112
x = 14
y=28
[State 0, VelSet]
type = VelSet
trigger1 =anim= 3113
x =11
y=28
[State 0, VelSet]
type = VelSet
trigger1 =anim= 3114
y=28

[State 0, VelSet]
type = VelSet
trigger1 =anim= 3115
y=-28
[State 0, VelSet]
type = VelSet
trigger1 =anim= 3116
x = 11
y=-28

[State 0, VelSet]
type = VelSet
trigger1 =anim= 3117
x = 14
y=-28

[State 0, VelSet]
type = VelSet
trigger1 =anim= 3118
x =28
y=-11

[State 0, PosSet]
type = Posadd
triggerall = time >30
trigger1 = anim=3101 && animelemtime(1)=0
x = -30

[State 0, PosSet]
type = PosSet
trigger1 =anim=3102 
y = 0
ignorehitpause=1
[State 0, PosSet]
type = Posadd
trigger1 =anim=3103 && animelemtime(1)=0
y = -112

[State 0, PosAdd]
type = PosAdd
trigger1 = anim=3103 && animtime=0
y =96
ignorehitpause=1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim=3101 && var(5)=6
trigger1 = animtime=0
value = 3110
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = var(4)!=999
triggerall = (anim=3101||anim=3103) && (var(5)=63 || var(5)=0)
trigger1 = animelemtime(1)>=2
value = 3111

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = (anim=3101||anim=3103)  && var(5)=3
trigger1 = animtime=0
value = 3112
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = (anim=3101||anim=3103)  && var(5)=23
trigger1 = animtime=0
value = 3113
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = (anim=3101||anim=3102) && var(5)=89
trigger1 = animtime=0
value = 3116
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = (anim=3101||anim=3102) && var(5)=96
trigger1 = animtime=0
value = 3118
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = (anim=3101||anim=3102)  && var(5)=9
trigger1 =animtime=0
value = 3117
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = (anim=3102)  && var(5)=8
trigger1 = animtime=0
value = 3115
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = (anim=3103)  && (var(5)=8||var(5)=89||var(5)=96||var(5)=9)
trigger1 = animtime=0
value = 3114
;elem = 1
;ignorehitpause = 
;persistent = 
[State 0, MoveHitReset]
type = MoveHitReset
triggerall = animelemtime(1)=1
trigger1 = anim=[3110,3119]
;ignorehitpause = 
;persistent = 

[State 2200, Hitdef]
type = HitDef
trigger1 =!movecontact
attr = A,HA
hitflag = MAFD
guardflag = MA
animtype = hard
air.animtype = hard
damage    = 28,14
guardflag = MA
pausetime = 4,4
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound = S1, 1
guardsound = S3, 1
getpower=0
givepower=20,10
sparkxy = -10,-30
ground.type = high
ground.hittime  = 24
guard.ctrltime=24
air.hittime = 24
ground.velocity = 1,-16
air.velocity = 0.5,-6
down.velocity=-2,-4
yaccel = .75
palfx.time = 24
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
id=200
ground.cornerpush.veloff=-8
fall=1

forcenofall=1
[State 0, VarSet]
type = Varadd
trigger1 = movehit=1
v = 4  ;fv = 10
value = 1
ignorehitpause = 0
;persistent = 
[State 0, VarSet]
type = Varset
trigger1 = frontedgebodydist <30 && anim=3111 &&var(5)=0
trigger2= time>30&& p2statetype=L && anim=[3101,3102]
v = 4  ;fv = 10
value = 999
ignorehitpause = 0
[State 0, VarSet]
type = VarSet
trigger1 = var(4)=999
v = 5    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 

;persistent = 
[State 0, VarSet]
type = Varset
trigger1 = anim=3120
v = 4  ;fv = 10
value = 0
ignorehitpause = 0
[State 0, TargetState]
type = TargetState
triggerall = anim=[3100,3119]
trigger1 =(p2statetype= A) && movehit && (p2stateno!=[201,203]) && p2stateno!=1001
value =201
ID =200
ignorehitpause =1 
;ignorehitpause = 
;persistent = 
[State 0, Width]
type = Width
trigger1 = anim=3120
edge = 60,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=8&& anim=3120
value = S2,0
channel =0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit&& var(4)=5
value = 3120
persistent=0
[State 0, TargetState]
type = TargetState
trigger1 =anim=3120 && animelemtime(1)=0
value =3101
persistent=0
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = animelem=1&& anim=3120
x = 0
y = 0
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(5)=0 && pos y >=10 && anim=3111
value = 3102
persistent=0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = frontedgebodydist <=35 && anim=3111 && var(4)=999
value = 3104
persistent=0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(5)=0  && (anim=3102||anim=3104||anim=3101&&var(4)=999) && animtime=0||moveguarded&&anim=3111
value = 3120
elem = 8

[State 0, Turn]
type = Turn
trigger1 = anim=3101 && var(4)=999 && animtime=0

[State 2100, PlaySnd]
type = PlaySnd
triggerall = animelemtime(1)=1 && var(5)!=0
trigger1 = anim=3120
value = S2,1
channel=0
;[State 0, PosSet]
;type = PosSet
;trigger1 = animelem=8 && anim=3120
;y = 0
;ignorehitpause = 
;persistent = 

;persistent = 

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=1&& anim=3120 && pos y =[-160,-10]
y =-40
ignorehitpause=1
[State 810, Bind 1]
type = TargetBind
trigger1 =  AnimElemTime(1) >= 0 && AnimElemTime(2) < 0&& anim=3120
pos = 40,-66
[State 810, Bind 1]
type = TargetBind
trigger1 =  AnimElemTime(2) >= 0 && AnimElemTime(3) < 0&& anim=3120
pos = 37,-19

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(3) >= 0 && AnimElemTime(4) < 0&& anim=3120
pos = -31,-29

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(4) >= 0 && AnimElemTime(5) < 0&& anim=3120
pos = -22,-94

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElemTime(5) >= 0 && AnimElemTime(6) < 0&& anim=3120
pos = 45,-65

[State 810, Bind 2-4]
type = TargetBind
trigger1 =  AnimElem= 6&& anim=3120
pos = 62,0
[State 0, ScreenBound]
type = ScreenBound
trigger1 = anim=3120;|| var(5)=0 && !movecontact
value = 1
movecamera = 1,1
;ignorehitpause = 
;persistent = 
[State 0, TargetFacing]
type = TargetFacing
trigger1 =anim=3120 
value = -1
;ignorehitpause = 
;persistent = 


[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem=8&& anim=3120&&var(5)!=0
value = -ceil(248*fvar(2))
kill = 1
absolute = 0
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 =animelem=8 && anim=3120
x = -3
y = -5

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=10 && anim=3120
x = 6
y = -ifelse(pos y <-200,2.5,5) 
[State 0, VelAdd]
type = VelAdd
trigger1 =animelemtime(1)>10 && animelemtime(5)<2&& anim=3120
y = .45
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(9)>0&& anim=3120
y = .65

[State 0, PosSet]
type = PosSet
trigger1 = animelemtime(5)=2&& anim=3120
trigger2= anim=1157
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(5)=2&& anim=3120
trigger2= anim=1157
trigger3 = anim=3104
x = 0
y = 0


[State 3304, EnvShake]
type = EnvShake
triggerall = p2stateno=3101 || p2stateno=821
Trigger1 = animelem=8&& anim=3120
freq = 90
ampl = 4
phase = 20
time = 10
[State 2100, PlaySnd]
type = PlaySnd
triggerall = p2stateno=3101 || p2stateno=821
Trigger1 = animelem=8&& anim=3120
value = S2,2
channel=0
[State 0, Explod]
type = Explod
triggerall = p2stateno=3101 || p2stateno=821
trigger1 =animelem=8&& anim=3120
anim =6006
ID =8002
pos = 0,10
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 3303, PlaySnd]
type = PlaySnd
triggerall = p2stateno=3101 || p2stateno=821
Trigger1 = animelem=8&& anim=3120
value = S1,3
volume = 255
channel = 2

[State 0, TargetState]
type = TargetState
triggerall = (p2stateno=3101 || p2stateno=821)&&var(5)!=0
trigger1 = animelemtime(8)=5&& anim=3120 
value = 821
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=0 && animelemtime(9)>0 && anim=3120
value = 1157
persistent = 0
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =anim=3120
id =6001

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0 && anim=1157
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Opponent Thrown
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by the throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 3101]
type    = A
movetype= H
physics = N
velset = 0,0

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

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


[State 820, SelfState]
type = SelfState
trigger1 = p2stateno!=3100
value = 5050
;=============================================================================
;[REVERSE SHAFT BREAKER]
;====================
[Statedef 3900]
type    = S
movetype= A
physics = S
juggle  =0; 1
poweradd =-1000
velset = 0,0
ctrl = 0
anim = 3900
sprpriority = 2

[State 3100, AssertSpecial]
type = AssertSpecial
trigger1= Var(15)> 0
trigger1 = time >= 0
flag = noBG
flag = noFG
flag2=nobg

[State 3000, mvc2]
type = explod
triggerall= Var(15)>0&&Var(15)<2
trigger1 = time = 0
anim = 6006
postype = left
pos = -16,-3
bindtime = -1
scale = 0.7,1
supermovetime = 99999999
pausemovetime = 99999999
sprpriority = -4
removeongethit = 1
removetime = 55
ownpal = 1

[State 3000, mvc2]
type = explod
triggerall= Var(15)>0&&Var(15)<2
trigger1 = time = 0
anim = 6007
postype = right
pos = 16,-3
bindtime = -1
scale = 0.7,1
supermovetime = 99999999
pausemovetime = 99999999
sprpriority = -4
removeongethit = 1
removetime = 55
ownpal = 1

[State 3001, Super_Spark]
type = explod
trigger1 = time =0
anim = 7999
postype = p1
pos = 40, 0
sprpriority = 3
ontop = 1
scale = .5,.5
supermovetime = 39
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "9999"
ID = 9999
stateno = 9999
pos = 0,0
postype = p1
facing = 1
ownpal = 1
pausetime = 999
supermovetime = 9999

[State 0, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 50
anim = -1
sound = S10,0
darken = 2
unhittable = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 3901
ctrl = 0
;=============================================================================
;[REVERSE SHAFT BREAKER]
;====================
[Statedef 3901]
type    = S
movetype= A
physics = S
juggle  =0; 1
velset = 0,0
ctrl = 0
anim = 3901
sprpriority = 2


[State 3000, VelSet]
type = VelSet
trigger1 = time = 0
;trigger1 = AnimElemtime(12) < 0
x = 0
y = -10

[State 741, 3]
type = VelAdd
trigger1 = 1
y = .15

[State 740, 2]
type = HitDef
trigger1=animelem=1
trigger2=animelem=2
trigger3=animelem=3
trigger4=animelem=4
trigger5=animelem=5
trigger6=animelem=6
trigger7=animelem=7
trigger8=animelem=8
trigger9=animelem=9
trigger10=animelem=10
trigger11=animelem=11
trigger12=animelem=12
trigger13=animelem=13
trigger14=animelem=14
trigger15=animelem=15
trigger16=animelem=16
trigger17=animelem=17
trigger18=animelem=18
trigger19=animelem=19
trigger20=animelem=20
trigger21=animelem=21
trigger22=animelem=22
trigger23=animelem=23
trigger24=animelem=24
trigger25=animelem=25
trigger26=animelem=26
attr = S, HA
damage = 12,3
animtype = Hard
hitflag = MAF
guardflag = MA
pausetime = 2,1
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = 0,-70
hitsound = S1, 2
guardsound = S3,1
ground.type = High
ground.slidetime = 4
ground.hittime  = 25
ground.velocity = 0,-8
air.velocity = 0,-8
yaccel = .4
fall = 1
fall.recover = 0
down.bounce = 0
palfx.time = 80
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
;========================
;send their ass flying!!!
;=======================
[State 740, 2]
type = HitDef
trigger1=animelem=27
attr = S, HA
damage = 10,3
animtype = Hard
hitflag = MAF
guardflag = MA
pausetime = 2,1
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound = S1, 2
guardsound = S3,1
ground.type = High
ground.slidetime = 4
ground.hittime  = 25
ground.velocity = -10,-10
air.velocity = -10,-12
fall = 1
fall.recover = 0
down.bounce = 0
palfx.time = 80
palfx.add = 0,0,90
palfx.mul = 310,310,310
palfx.sinadd = 9,9,120,5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(29)>0
movetype = I        ;I,A,H
;ignorehitpause = 
;persistent = 

[State 625,Screenbound]
type = screenbound
trigger1 = animelem = 27
trigger1 = movehit
trigger1 = time >=0
value = 0
ignorehitpause = 1

[State 625, taking him out of the screen]
type = changestate
trigger1 = BackEdgeDist < 0
value = 705

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
trigger1 = BackEdgeDist > 0
value = 49
ctrl = 0
;=============================================================================
; HYPER COMBO FINISH!!!


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

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

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = p2movetype!=H
id = 1001
;ignorehitpause = 
;persistent = 

[State 0, TargetState]
type = TargetState
triggerall = numtarget(1000)
trigger1 =(p2statetype= A) && movehit=1 && (p2stateno!=[201,203])
value =201
ID =1000
ignorehitpause =1 
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 =  1
text = " fvar1= %d  pos x = %d explod= %d facing=%f"
params  =numexplod(6001),(enemy,var(2)),var(5),(enemy,var(9))
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1 =p2movetype!=H 
v =35   ;fv = 10
value = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = numhelper(6000)
flag = nokoslow
[State 0, TargetState]
type = TargetState
trigger1 =movehit &&p2statetype=A && p2stateno!=211 
value =211
ID = 641
ignorehitpause=1
[State 0, TargetState]
type = TargetState
trigger1 =movehit &&p2statetype=A && p2stateno!=10613  
value =10613
ID = 640
ignorehitpause=0
[State 0, TargetState]
type = TargetState
trigger1 =movehit&&enemy,stateno!=441
value = 441
ID = 440
ignorehitpause =0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =statetype!=A 
id = 56
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =p2movetype!=H
id = 635
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =p2movetype!=H
id = 630
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =p2movetype!=H
id = 605
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = statetype!=A
v = 6    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 =  p2stateno=411
v = 9   ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H
v =9   ;fv = 10
value = 0
[State 0, PlaySnd]
type = PlaySnd
triggerall = enemynear,movetype=H
triggerall = enemynear,anim!=5160
trigger1 =enemynear,pos y>=0 && enemynear,anim=1202 && enemynear,time>3
trigger2 = enemynear,stateno=1030 && enemynear,time=1
value = S15,0





;ignorehitpause =
;persistent =
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno !=360
id =  7011
;ignorehitpause =
;persistent =




[State -2, Helper]
type = Helper
trigger1 = winko && (stateno = [3000,3100]) &&movehit
triggerall = NumHelper(6000) < 1
helpertype = normal ;player
name = "winko"
ID = 6000
stateno = 6000
pos = 0,0
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove =999
pausemove = 999
ignorehitpause = 1
persistent=0



[State 0, VarSet]
type = VarSet
trigger1 = authorname= "KamekazeXAlchemist" && p1name = "MVC2 Cammy"
v = 50    ;fv = 10
value = 1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = 1
time = 1
value = fvar(2)
ignorehitpause = 1
persistent = 1

[State 0, VarSet]
type = VarSet
triggerall = enemy,movetype = H
triggerall = enemy,gethitvar(hitcount) >2
triggerall = fvar(2)>.024
trigger1 =1
fv =2 ;fv = 10
value = 1-((enemy,gethitvar(hitcount)) *.033 )

[State 0, VarSet]
type = VarSet
triggerall = enemy,movetype = H
triggerall = fvar(2)<=.024
trigger1 =1
fv =2 ;fv = 10
value = .024
ignorehitpause=1
[State 0, VarSet]
type = VarSet
triggerall = enemy,movetype != H || (p2stateno=[120,155])
trigger1 =1
fv =2 ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
triggerall = movehit && (!var(9))
triggerall=p2movetype =H  && ((p2stateno != [120,199])||(enemy,prevstateno!=[120,199]))
trigger1 = 1
v = 12  ;fv = 10
value = enemy,gethitvar(hitcount)
ignorehitpause=1

[State 0, VarSet]
type = VarSet
triggerall = (enemy,gethitvar(hitcount) > 2)
triggerall = movehit
trigger1 = statetype = A && (var(9))
v = 12  ;fv = 10
value = 999

[State 0, VarSet]
type = VarSet
trigger1 = p2movetype != H || p2stateno=10613  ||((p2stateno = [120,199])||(enemy,prevstateno=[120,199]))
trigger2 = lose||winko
v = 12    ;fv = 10
value = 0
ignorehitpause=1
persistent=1


[State 0, VarSet]
type = VarSet
trigger1 =life <= 300
v = 14   ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 =life > 300
v = 14   ;fv = 10
value = 0


 [State 0, VarSet]
type = VarSet
trigger1 = statetype= A
trigger2=(p2stateno=821||p2stateno=841||p2stateno=821||p2stateno=1001||p2stateno=1203)
v=30
value = 0

[State 0, VarSet]
type = VarSet
triggerall = statetype != A
triggerall = ctrl
triggerall = random <29
trigger1= enemy,hitdefattr=SC,AT
trigger2= p2stateno=5120 || p2stateno=5110&& enemy,time >2
v = 30   ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = roundstate = 0
v = 10   ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = movecontact && (!moveguarded)
v = 10   ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 = roundstate = 0
v = 11  ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = enemy,movecontact && (!enemy,moveguarded)
v = 11  ;fv = 10
value = 0

[State 0, Helper]
type = Helper
triggerall = roundno = 1
trigger1 = numhelper(3004) < 1 && var(10) = 0 && var(11) = 1
helpertype = normal ;player
name ="FA"
ID = 3004
stateno = 3010
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 0, Helper]
type = Helper
trigger1 = numhelper(3006) < 1 && var(14) = 1
helpertype = normal ;player
name ="danger"
ID = 3006
stateno = 3012
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing =1
keyctrl = 0
ownpal = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = enemynear,anim!=5160
triggerall = enemynear,movetype=H
;trigger1 =enemynear,pos y>=0 && enemynear,anim=1202 && enemynear,time>3
trigger1 = enemynear,stateno=1030 && enemynear,time=1
trigger2 =enemynear,pos y>=0 && enemynear,anim=841 && enemynear,time>3
trigger3 =enemynear,pos y>=0 && enemynear,anim=1120 && enemynear,time>3
trigger4 =enemynear,pos y>=0 && enemynear,anim=1121 && enemynear,time>3
;trigger6 =enemynear,pos y>=0 && enemynear,anim=821 && enemynear,time>3 && p2stateno=821
trigger5= enemynear,anim=612 && enemynear,animelemtime(1)=1
value = S15,0
[State 0, Explod]
type = Explod
triggerall = enemynear,movetype=H
triggerall = enemynear,anim!=5160
;trigger1 =enemynear,pos y>=0 && enemynear,anim=1202 && enemynear,time>3
trigger1 = enemynear,stateno=1030 && enemynear,time=1
trigger2=  enemynear,anim=612 && enemynear,animelemtime(1)=1
;trigger =enemynear,pos y>=0 && enemynear,anim=821 && enemynear,time>3 && p2stateno=821
anim =6006
ID =8002
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1


[State 0, Helper]
type = Helper
triggerall=(p2stateno!=[120,155])
triggerall = var(12)>1
trigger1 = numhelper(3005) < 1 &&(enemy,gethitvar(hitcount) >2)
helpertype = normal ;player
name ="combo"
ID = 3005
stateno = 3011
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing =1
keyctrl = 0
ownpal = 0

[State -3, Wall Hit Sound]
type = PlaySnd
triggerall = enemynear,movetype=H
triggerall = !NumExplod(9050)
trigger1 = ((enemy, stateno = 1027) && (enemy,time = 1));&& Enemy, frontEdgeDist < 25
value = S1,3
volume = 255
ignorehitpause = 1
persistent = 0

[State -3, Wall Hit Spark]
type = Explod
triggerall = enemynear,movetype=H
triggerall = !NumExplod(9050)
trigger1 = ((enemy, stateno = 1027) && (enemy,time = 1));&& Enemy, frontEdgeDist < 25
anim = 6000
ID = 9050
pos = -20, -60
postype = p2
bindtime = 1
facing = -1
removetime = -2
scale = 0.5, 0.5
sprpriority = 4
ownpal = 1
ignorehitpause = 1
persistent = 0

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

[Statedef -3]


[State -3, Landing Dust]
type = Explod
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
anim = 48
ID = 48
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1
removetime = -2
scale = 1,1
ownpal = 1
sprpriority = 3
removeongethit = 0

[State -2: Helper]
type = Helper
triggerall = numhelper(10000) < 1
trigger1 = roundstate!=2
helpertype = Normal
name = "choice"
id = 10000
pos = 0,0
postype = p1
facing = 0
stateno = 10000
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 99999
ignorehitpause = 1


[State -3, Wall Hit Sound]
type = PlaySnd
triggerall = enemynear,movetype=H
triggerall = !NumExplod(9049)
triggerall =  Enemy, BackEdgeDist < 5
trigger1 = ((enemy, stateno = 5030) && (time = 1))
trigger2 = ((enemy, stateno = 5050) && (time = 1))
trigger3 = (enemy, stateno = 5020)
trigger4=enemy,anim=1106
trigger5=enemy,anim=5061
value = S1,3
volume = 255
ignorehitpause = 1
persistent = 0

[State -3, Wall Hit Spark]
type = Explod
triggerall = enemynear,movetype=H
triggerall = !NumExplod(9049)
triggerall =  Enemy, BackEdgeDist < 5
trigger1 = ((enemy, stateno = 5030) && (time = 1))
trigger2 = ((enemy, stateno = 5050) && (time = 1))
trigger3 = (enemy, stateno = 5020)
trigger4=enemy,anim=1106
trigger5=enemy,anim=5061
anim = 6000
ID = 9049
pos = -20, -60
postype = p2
bindtime = 1
facing = -1
removetime = -2
scale = 0.5, 0.5
sprpriority = 4
ownpal = 1
ignorehitpause = 1
persistent = 0





[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = (stateno != 3000 && time >= 0)
trigger1 = stateno !=3100 && time >= 0
trigger1 = stateno !=3050 && time >= 0
trigger2 = Winko
id = 6001

;[State 0, StopSnd]
;type = StopSnd
;trigger1 = movetype = H && time = 0
;channel = -1



[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = stateno != 100 && time >= 0
trigger1 = stateno != 101 && time >= 0
id = 7000

[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = stateno != 105 && time >= 0
id = 7001



[State -3, VarRandom]
type = VarRandom
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
trigger4 = stateno = 5030
trigger5 = stateno = 5050
trigger6 = stateno = 5070
trigger7 = stateno = 5080
v = 0
range = 0,60
;--------------------
[State -3, Hit0]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [0,20]
trigger1 = Stateno = 5000
trigger2 = Stateno = 5010
value = 5000, 0
channel=0
[State -3, Hit1]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [21,30]
trigger1 = Stateno = 5000
trigger2 = Stateno = 5010
value = 5000, 1
channel=0
;----------------------
[State -3, Hit2]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [31,40]
trigger1 = stateno = 5020
trigger2 = stateno = 5030
trigger3 = stateno = 5050
value = 5000, 1
channel=0
[State -3, Hit2]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [41,50]
trigger1 = stateno = 5070
trigger2 = stateno = 5080
value = 5000, 0
channel=0
[State -3, Hit2]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [51,60]
trigger1 = stateno = 5070
trigger2 = stateno = 5080
value = 5000, 1
channel=0
;----------------------

[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = stateno!=3000
trigger1 = stateno!=3100
id = 6005


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

