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

; var(0):= -3
; var(1):= 210, 230, 430, -2, -1
; var(2):= -2, 1001, 1006, 1008
; var(3):= 1000, 1051, 1050, 1100, 1006, 1008
; var(5):= -2
; var(6):= -2
; var(8):= -2
; var(9):= 9000, -3
;var(10):= -2, 56, 1001, 1006, 3001, 3003
;var(11):= -2
;var(12):= 840, -2, 57
;var(13):= 3011
;var(14):= -2, 3011
;var(15):= -3, 1001, 1006, 1008, 3001, 3011
;var(16):= -2
;var(18):= 1006
;var(20):= 810, 840, -2
;var(21):= -3
;var(22):= -3
;var(23):= 1000, 1104, 1106, 1107, 3000, -3
;var(24):= -2
;var(25):= 1000, -2
;var(26):= 1000, -2
;var(29):= 605, 610, 640, 1101, 3000, 101
;var(30):= -2
;var(31):= 605, 610, 640, 1101, 3000, 101
;var(32):= -2
;var(33):= -3
;var(34):= 1051
;var(35):= 3100
;var(36):= 3100
;var(40):= 3000, -2
;var(41):= 3000, -2
;var(46):= -3
;var(50):= -2
;var(57):= 10000

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

; fvar(1):= 1000, -2
; fvar(2):= -2
; fvar(5):= 9000
; fvar(6):= 3000, -2
;fvar(10):= 9000
;fvar(11):= 9000



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

[Data]
life = 1000
power = 5000
attack = 100
defence = 110
fall.defence_up = 50
liedown.time = 2
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 255
IntPersistIndex = 58
FloatPersistIndex = 40

[Size]
xscale = .8333333333333333333333333333333
yscale = 1
ground.back = 20
ground.front = 37
air.back = 15
air.front = 20
height = 55
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = 27, -100
mid.pos = 16, -84
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd  = 2.5
walk.back = -1.95
run.fwd  = 18, 0
run.back = -18,0
jump.neu = 0,-9
jump.back = -2.99
jump.fwd = 3.2
runjump.back = -2.55,-8.1
runjump.fwd = 4,-8.1
airjump.neu = 0,-8.6
airjump.back = -2.55
airjump.fwd = 2.5
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
airjump.height = 35
yaccel = .54
stand.friction = .85
crouch.friction = .82
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 = "Don't bother getting up. I'll show myself out."
victory2 = "HULK SMASH!!! Sorry, I just had to say it."
victory3 = "I hope your medical insurance is paid up."
victory4 = "Some days it just doesn't pay to get out of bed, does it?"
victory5 = "Have you ever considered gamma radiation? It did wonders for me."
victory6 = "Good fight! I might even have bruises from this!"
victory7 = "I said you wouldn't like you when I'm angry. Maybe you'll listen next time"
victory8 = "Brains and a body, what a perfect combo."
victory9 = "Don't ever call me Banner!"
victory10= "Don't make me angry! You wouldn't like me..."
victory11= "Hulk Smash! Smash! Smash! Only kidding..."
victory12 = "I am a mean, green, fighting machine."
victory13 = "I beat the Thing. You are no Thing!"
victory14= "I do not care about the fight, only your pain!"
victory15 = "What do you think? Green or Gray?"
victory16= "All this, and I can tote babes too!"
victory17= "Barely flexed a bicep that time. Who's next?"
victory18 = "Come back later; I've got some research to do!"
victory19 = "Gamma-charged and ready for the next match-up!"
victory20= "Hey, quit hitting my fists with your head."
victory21= "I've had a harder time swatting mosquitoes."
victory22= "Still the strongest in this or any other world!"
victory23 = "That was pathetic. Are you trying to be funny?"
victory24 = "No one stops Hulk!"

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

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

[State 0, ChangeState]
type = ChangeState
trigger1 = time =15
value = 1502
ctrl = 0

;---------------------------------------------------------------------------
; Win state decider
[Statedef 180]
type = S
[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
[State 180, 1]
type = ChangeState
trigger1 = random = [0,333]
value = 181
[State 180, 1]
type = ChangeState
trigger1 = random = [334,666]
value = 182
[State 180, 1]
type = ChangeState
trigger1 = random = [667,999]
value = 183
;[State 180, 1]
;type = ChangeState
;triggerall =palno <7
;trigger1 =random < 499
;value = 183


;[State 180, 1]
;type = ChangeState
;triggerall = var(17) = 0
;trigger1 =palno = [7,12]
;value = 182


;---------------------------------------------------------------------------
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0


[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 180, 1
channel=0


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

[State 186, 2]
type = AssertSpecial
trigger1 = time < 180
flag = RoundNotOver

;---------------------------------------------------------------------------
[Statedef 182]
type = S
ctrl = 0
anim = 183
velset = 0,0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 180, 0
channel=0


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

;---------------------------------------------------------------------------
[Statedef 183]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 180, 0
channel=0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
[Statedef 184]
type = S
ctrl = 0
anim = 4005
velset = 0,0

[State 4003, win]
type=changestate
trigger1= time >= 60 ;&& prevstateno!=180
value=180
ctrl = 1

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
[Statedef 190]
type = S

;[State 180, 1]
;type = ChangeState
;trigger1 = random <499
;value = 192


[State 180, 1]
type = ChangeState
trigger1 =  1;random >=499
value = 191

;--------------------------------------------------------------------------------
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,2

[State 0, VelAdd]
type = VelAdd
trigger1 = anim=190
y = .35
;ignorehitpause =
;persistent =

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = intro
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=0 && anim=190  &&time >5
value = 191
[State 0, PosSet]
type = PosSet
trigger1 =time=0
y = -150
[State 0, PosSet]
type = PosSet
trigger1 =anim=191
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = anim=191
x = 0
y = 0
;ignorehitpause =
;persistent =



[State 1052, 2] ;Play a sound for landing
type = PlaySnd
triggerall = anim=191
trigger1 = animelemtime(1)=1
value = 2, 8
[State 1052, 2] ;Play a sound for landing
type = PlaySnd
triggerall =anim=191
trigger1 = animelemtime(1)=1
value = 2, 8
[State 1052, 2] ;Play a sound for landing
type = PlaySnd
triggerall =anim=191
trigger1 = animelemtime(1)=1
value = 2, 1
channel=0

[State 0, EnvShake]
type = EnvShake
trigger1 = animelemtime(4)=0
time = 10
freq = 85
ampl = 4
phase = 90


[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = animtime = 0 &&anim=191
value = 0

;---------------------------------------------------------------------------
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0


[State 200, 1]
type = PlaySnd
trigger1 = time = 7
value = 2, 2

[State 200, 1]
type = PlaySnd
trigger1 = time = 7
value = 2, 2



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

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 =time = 40
value = 0

;---------------------------------------------------------------------------
[Statedef 193]
type = S
ctrl = 0
anim = 192
velset = 0,0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 2, 12
[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 2, 12


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

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




[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 180, 1
channel=0


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

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 34
value = 143
[State 9000, ChangeAnim]
type = ChangeAnim
triggerall = prevstateno = 9000
trigger1 = Time =0
value = Anim
elem  = var(33)
[State 195, 2]
type = ChangeState
trigger1 =animtime=0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  =0; 8

ctrl = 0
poweradd = 14
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value =200




[State 200, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
damage = ceil(36),7
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
ground.type = High
ground.slidetime =8
ground.hittime  = 23
ground.velocity = -6
guard.ctrltime=18
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime =18
nochainid=200
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
triggerall= roundstate=2
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 200, 1]
type = PlaySnd
trigger1 = animelem=1
value = 0, 0
channel=1
[State 200, 1]
type = PlaySnd
trigger1 =  animelem=1
value = 2, 0
channel=0
[State 200, 7]
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
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5061

[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 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 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 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 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 = 5061


[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 strong punch
[Statedef 205]
type    = S
movetype= A
physics = S
juggle  =0; 8
poweradd= 30
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 205


[State 200, 1]
type = PlaySnd
trigger1 = animelem=1
value = 0, 1
channel=1



[State 210, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype  = Medium
damage = ceil(57),7
guardflag = MA
pausetime = 10,8
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-75
hitsound   = S1,4
guardsound = S3,1
ground.type = High
ground.slidetime = 16
ground.hittime  = 28
guard.ctrltime=17
ground.velocity = -8,6
air.velocity = -7.5,7
id=205
nochainid=205

[State 0, TargetState]
type = TargetState
trigger1 =movehit && p2stateno!=212&&enemy,hitshakeover
value =212
ID = 205
ignorehitpause=1
[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  =0; 8
poweradd= 59
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value =210


[State 200, 1]
type = PlaySnd
trigger1 = animelem=2
value = 0, 2
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = animelem=2
value = 2, 1
channel=0
[State 0, VarSet]
type = VarSet
trigger1 =p2statetype=L
v = 1    ;fv = 10
value = 1
;ignorehitpause =
;persistent =

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage = ceil(99),7
guardflag = MA
hitflag=mafd
pausetime = ifelse(p2statetype=L,5,10),10
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-75
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime =17
air.hittime=31
ground.hittime  = 28
guard.ctrltime = 23
ground.velocity = -4.5,-13
air.velocity = -4.5,-13
down.velocity =-7,-9
forcenofall=1
down.hittime=22
id=210
nochainid=210
yaccel=.67

[State 0, TargetState]
type = TargetState
trigger1 =(p2statetype= A||p2stateno=5080) && movehit=1 && (p2stateno!=[201,203])
value =201
ID =210
ignorehitpause =1 
[State 0, Width]
type = Width
trigger1 =animelem=1
edge = 40,0
player = 35,0
;value = 0,0
;ignorehitpause =
;persistent =

[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
velset=-10,6
poweradd= 59
ctrl = 0
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .69
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0
value = 1205
[State 0, NotHitBy]
type = NotHitBy
trigger1 =anim!=1205
value = SCA
;value2 = S,NA
time = 1

;ignorehitpause =
;persistent =

[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = anim!=5160
trigger1 =pos y>=0 && anim=1205 && 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
[Statedef 212]
type    = A
movetype= H
physics = N
juggle  =0; 0
velset=-8,-4
poweradd= 59
ctrl = 0
sprpriority = 2
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .6
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0
value = 1205
[State 0, NotHitBy]
type = NotHitBy
trigger1 =anim!=1205
value = SCA
;value2 = S,NA
time = 1

;ignorehitpause =
;persistent =

[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = anim!=5160
trigger1 =pos y>=0 && anim=1205 && 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 light kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  =0; 8
poweradd= 14
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 230

[State 200, 1]
type = PlaySnd
trigger1 = animelem=1
value = 0, 0
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = animelem=1
value = 2, 2
channel=0
[State 0, VarSet]
type = VarSet
trigger1 =p2statetype=L
v = 1    ;fv = 10
value = 1

[State 230, 2]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
animtype  = Medium
damage = ceil(36),7
guardflag = MA
hitflag=mafd
pausetime = 10,10
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-48
hitsound   = S1,0
guardsound = S3,1
ground.type = Low
ground.slidetime = 6
ground.hittime  = 12
guard.ctrltime = 8
ground.velocity = -4
air.velocity = -2.5,-3.5
down.velocity=-7,-1.5
down.cornerpush.veloff=-16
down.hittime=16
forcenofall=1
id=230
nochainid=230
forcenofall=1
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =230
ignorehitpause =1 
[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 235]
type    = S
movetype= A
physics = S
juggle  =0; 8
poweradd= 30
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 235

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



[State 240, 2]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
animtype  = Medium
damage = ceil(57),7
guardflag = MA
pausetime = 10,8
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -12,-75
hitsound   = S1,1
guardsound = S3,1
ground.type = high
ground.slidetime = 10
ground.hittime  = 20
guard.ctrltime =13
ground.velocity = -5.8
air.velocity = -2.2,-3.2
ground.velocity = -8,6
air.velocity = -7.5,7
id=205
nochainid=205

[State 0, TargetState]
type = TargetState
trigger1 =movehit && p2stateno!=212&&enemy,hitshakeover
value =212
ID = 205
ignorehitpause=1

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


;---------------------------------------------------------------------------
; Standing strong kick
; CNS difficulty: easy
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  =0; 8
poweradd= 59
ctrl = 0
sprpriority = 2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 240
[State 200, 1]
type = PlaySnd
trigger1 = animelem=4
value = 0, 2
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = animelem=4
value = 2, 1
channel=0


[State 230, 2]
type = HitDef
trigger1 = animelem = 5
attr = S, NA
animtype  = heavy
damage = ceil(99),7
guardflag = MA
pausetime = 8,8
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -15,-83
hitsound   = S1,2
guardsound = S3,1
ground.type = high
ground.slidetime =19
air.hittime=31
ground.hittime  = 28
guard.ctrltime = 28
ground.velocity = -4.5,-13
air.velocity = -4.5,-13
id=210
nochainid=210
yaccel=.67
forcenofall=1

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =210
ignorehitpause =1 
[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Crouching light punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  =0; 5
poweradd= 12
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 400
[State 200, 1]
type = PlaySnd
trigger1 = animelem=2
value = 0, 0
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = animelem=2
value = 2, 2
channel=0



[State 400, 2]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage = ceil(36),7
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = MHA
pausetime = 8,8
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-38
hitsound   = S1,0
guardsound = S3,1
ground.type = Low
ground.slidetime = 11
ground.hittime  = 19
guard.ctrltime=17
ground.velocity = -3
air.velocity = -1.5,-3
id=400
nochainid=400
forcenofall=1

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =400
ignorehitpause =1 
[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl =1

;---------------------------------------------------------------------------
;Crouching light punch
[Statedef 405]
type    = C
movetype= A
physics = C
juggle  =0; 5
poweradd= 28
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 405
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 0, 2
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 2,0
channel=0




[State 400, 2]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
damage = ceil(57),7
priority  = 3
animtype  = medium
hitflag = MAF
guardflag = MHA
pausetime = 10,10
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-57
hitsound   = S1,4
guardsound = S3,1
ground.type = Low
ground.slidetime = 13
ground.hittime  = 20
guard.ctrltime=15
ground.velocity = -9
air.velocity = -1.5,-3
id=405
nochainid=405
forcenofall=1

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =405
ignorehitpause =1 
[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl =1

;---------------------------------------------------------------------------
;Crouching strong punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  =0; ifelse(p2statetype= A,9,6)
poweradd= 55
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 410
[State 410, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = Time = 1
value = 0, 2

[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=3
value = 0, 2
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=3
value = 2, 1
channel=0



[State 0, Explod]
type = Explod
triggerall = animelem = 3
trigger1 =numexplod(7011) < 1 &&movecontact && !moveguarded
anim =7011
ID =7011
pos = 134,-97
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
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
trigger1 = movehit && animelemtime(4)>0
helpertype = normal ;player
name = "launch"
ID = 7011
stateno =7011
pos = 50,-65
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 40
pausemovetime = 40
ignorehitpause=1
persistent=0

[State 410, 2]
type = HitDef
triggerall = prevstateno!=9000 || (p2movetype!=H && prevstateno=9000)
trigger1 = AnimElem = 3
attr = S, NA
damage = ceil(45),7
animtype  = heavy
hitflag = MAF
guardflag = MA
pausetime =6,6
priority =5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-77
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
guard.ctrltime = 10
guard.ground.slidetime = 15
guard.ground.hittime  = 15
ground.velocity = -1,-15
air.velocity = -2,-13
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -1
air.velocity = -2,-3


[State 410, 3]
type = HitDef
triggerall = prevstateno!=9000 || (p2movetype!=H && prevstateno=9000)
trigger1 = AnimElem = 4
attr =S, NA
damage = ceil(44),7
animtype  = up
hitflag = MAF
guardflag = MA
pausetime = 12,12
sparkxy = -10,-102
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -1,-18
air.velocity = -2,-16.5
fall.recovertime = 35
id=410

[State 0, TargetState]
type = TargetState
triggerall = animelemtime(6)<0
trigger1 =movehit&&enemy,stateno!=411
value = 411
ID = 410
ignorehitpause =0

[State 410, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 411]
type    = A
movetype= H
physics = N
juggle  =0; 0
velset=-1,-16.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>=24
value =5040
ctrl=1
;--------
;---------------------------------------------------------------------------
;Crouching light kick
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  =0; 8
poweradd= 12
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 430
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 0, 0
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 2, 2
channel=0
[State 0, VarSet]
type = VarSet
trigger1 =p2statetype=L
v = 1    ;fv = 10
value = 1
[State 430, 2]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage = ceil(36),7
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 9,9
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-6
hitsound   = S1,0
guardsound = S3,1
ground.type = Low
ground.slidetime = 6
ground.hittime  = 12
guard.ctrltime=10
ground.velocity = -2
air.velocity = -2,-3
down.velocity=-7,-1.5
down.cornerpush.veloff=-16
down.hittime=16
forcenofall=1
id=430
nochainid=430
[State 430, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Crouching light kick
; CNS difficulty: easy
[Statedef 435]
type    = C
movetype= A
physics = C
juggle  =0; 8
poweradd= 28
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 435


[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 0,1
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 2, 0
channel=0


[State 440, 3]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage = ceil(57),7
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-6
hitsound   = S1,2
guardsound = S3,1
ground.type =heavy
ground.slidetime = 9
ground.hittime  = 16
guard.ctrltime=13
ground.velocity = -13
air.velocity = -1.5,-3
id=405
nochainid=405


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

;---------------------------------------------------------------------------
;Crouch Strong Kick
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  =0; 8
poweradd=55
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 440
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 0, 2
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 2, 1
channel=0


[State 9000, ChangeAnim]
type = ChangeAnim
triggerall = prevstateno = 9000
trigger1 = Time =0
value = Anim
elem  = var(33)
ignorehitpause=1
persistent=1



[State 430, 2]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage = ceil(99),7
animtype  = heavy
hitflag = MAF
guardflag = MA
pausetime = 12,10
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 28
ground.hittime  = 28
guard.ctrltime=17
ground.velocity = -8,6
air.velocity = -7.5,7
id=205
nochainid=205

[State 0, TargetState]
type = TargetState
trigger1 =movehit && p2stateno!=212&&enemy,hitshakeover
value =212
ID = 205
ignorehitpause=1

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

;---------------------------------------------------------------------------
;Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = N
juggle  =0; 1
poweradd= 13
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 600
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 0, 0
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 2, 1
channel=0

[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  

[State 600, 2]
type = HitDef
trigger1 = animelem = 2
attr = A, NA
damage = ceil(36),7
guardflag = HA
animtype=medium
air.animtype=up
priority = 3
pausetime = 7,10
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-78
hitsound   = S1,0
guardsound = S3,1
ground.type = High
ground.slidetime =6
ground.hittime = 12
air.hittime = 12
ground.velocity = -4
air.velocity = -.2,-6.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 600, 3]
type = changestate
trigger1 =  animtime = 0
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
;Jump Light Punch
; CNS difficulty: easy
[Statedef 605]
type    = A
movetype= A
physics = N
juggle  =0; 1
poweradd= 29
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 605
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 0, 1
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 2, 2
channel=0
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
[State 640, 3]
type = HitDef
triggerall =!var(24)
trigger1 = animelem = 3
attr = A, NA
damage = ceil(57),7
guardflag = HA
priority = 4
pausetime = 16,16
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-67
hitsound   = S1,4
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 10
ground.hittime  = 18
ground.velocity = -5
air.velocity = -10,8
yaccel = .7
air.fall  =1
fall.recover = 0
id=641
[State 640, 3]
type = HitDef
triggerall =var(24)
trigger1 = animelem = 3
attr = A, NA
damage = ceil(57),7
guardflag = HA
priority = 4
pausetime = 16,16
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-97
hitsound   = S1,2
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -15,10
yaccel = .7
fall  =1
fall.recover = 0
id=640



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit &&p2statetype=A  && (prevstateno= [600,635])  && var(24)
value = 606


[State 0, ScreenBound]
type = ScreenBound
triggerall = anim=606
trigger1 = 1
value = 0
[State 600, 3]
type = changestate
 triggerall =prevstateno= [600,635]
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(24)
 triggerall =prevstateno= [600,635]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = pos y < -230 && enemy,pos y >-10 &&movehit
v = 29    ;fv = 10
value = 1


[State 0, VelSet]
type = VelSet
triggerall =  var(24)
 triggerall =prevstateno= [600,635]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = movehit  &&  pos y < -230
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
;---------------------------------------------------------------------------
;Jump Strong Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  =0; 2
poweradd= 58
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 610
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 0, 2
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 2, 1
channel=0

[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 3,2
channel=2
[State 0, ScreenBound]
type = ScreenBound
triggerall = movecontact && !moveguarded  &&  pos y < -340
trigger1 = 1
value = 0

[State 0, Explod]
type = Explod
trigger1 =animelem= 2
anim =615
ID = 615
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =99
scale = 1,1
sprpriority = -3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
[State 0, Explod]
type = Explod
trigger1 =animelem= 2
anim =613
ID = 613
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =99
scale = 1,1
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
;ignorehitpause =
;trans =
;persistent =
;supermove = 0
;pausemove = 0


[State 640, 3]
type = HitDef
triggerall =!var(24)
trigger1 = animelem = 2  && !movecontact
attr = A, NA
damage = ceil(99),7
guardflag = HA
priority = 4
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-67
hitsound   = S1,2
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -5
air.velocity = -10,8
yaccel = .7
air.fall  =1
fall.recover = 0
id=641

[State 640, 3]
type = HitDef
triggerall = var(24)
trigger1 = animelem = 2  && !movecontact
attr = A, NA
damage = ceil(99),7
guardflag = HA
priority = 4
pausetime = 8,8
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-67
hitsound   = S1,2
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 38
ground.hittime  = 38
ground.velocity = -5
air.velocity = -3,10
id=640

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(2)=0
x = 0
y=0
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = Velset
triggerall = pos y <-14
trigger1 =animelemtime(2)=2
y = -5.5




[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit &&p2statetype=A  && (prevstateno= [600,635])  && var(24)
value = 611


[State 0, ScreenBound]
type = ScreenBound
triggerall = anim=611
trigger1 = 1
value =cond(frontedgebodydist <15,1,0)
movecamera=cond(frontedgebodydist <15,1,0),0
[State 600, 3]
type = changestate
 triggerall =prevstateno= [600,635]
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(24)
 triggerall =prevstateno= [600,635]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = pos y < -230 && enemy,pos y >-10 &&movehit
v = 29    ;fv = 10
value = 1


[State 0, VelSet]
type = VelSet
triggerall =  var(24)
 triggerall =prevstateno= [600,635]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = movehit  &&  pos y < -230
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
velset=-13,10
poweradd= 59
ctrl = 0
sprpriority = -2
facep2=1
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .67
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0
value = 1205
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = anim!=5160
trigger1 =pos y>=0 && anim=1205 && time>3
value = 5160

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=1 && anim=5160
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=5160||anim=614
statetype = L      ;S,A,C,L

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5101)
trigger1 = pos y>=0 && anim=5160 && animelemtime(1)>10
value = 5101
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5101)
trigger1 = pos y>=0 && anim=5160 && 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)=29 && anim=612
value =ifelse(alive,5120,5110)
ctrl=1
;---------------------------------------------------------------------------
;Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = N
juggle  =0; 1
poweradd= 13
ctrl = 0
sprpriority = 2
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 630

[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 0, 0
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 2, 2
channel=0
[State 9000, ChangeAnim]
type = ChangeAnim
triggerall = prevstateno = 9000
trigger1 = Time =0
value = Anim
elem  = var(33)

[State 630, 2]
type = HitDef
trigger1 = animelem =2
attr = A, NA
damage = ceil( 36) ,7
guardflag = HA
priority = 3
pausetime = 10,10
animtype=medium
air.animtype=up
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -5,-35
hitsound   = S1,0
guardsound = S3,1
ground.type = High
ground.slidetime = 6
ground.hittime = 12
air.hittime = 11
ground.velocity = -4
air.velocity = -.2,-7
yaccel=.5
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 600, 3]
type = changestate
trigger1 =  animtime = 0
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
;Jump Strong Kick
; CNS difficulty: easy
[Statedef 635]
type    = A
movetype= A
physics = N
juggle  =0; 1
poweradd= 29
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 635
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 0, 1
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 2, 0
channel=0
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
[State 640, 3]
type = HitDef
trigger1 = animelem = 3
attr = A, NA
damage = ceil(57),7
guardflag = HA
animtype=medium
air.animtype=up
priority = 4
pausetime = 9,9
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-75
hitsound   = S1,1
guardsound = S3,1
ground.type = High
ground.slidetime =8
ground.hittime = 15
air.hittime =17
ground.velocity = -4
air.velocity = -.2,-6.35
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 600, 3]
type = changestate
trigger1 =  animtime = 0
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
;Jump Strong Kick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = N
juggle  =0; 2
poweradd= 58
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 640
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 0, 2
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem=2
value = 2, 1
channel=0
[State 9000, ChangeAnim]
type = ChangeAnim
triggerall = prevstateno = 9000
trigger1 = Time =0
value = Anim
elem  = var(33)
[State 640, 3]
type = HitDef
triggerall = var(24)
trigger1 =!movecontact
attr = A, NA
damage = ceil(99),7
guardflag = HA
priority = 4
pausetime = 16,16
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-68
hitsound   = S1,2
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -15,10
yaccel = .7
fall  =1
fall.recover = 0
id=640

[State 640, 3]
type = HitDef
triggerall = !var(24)
trigger1 = !movecontact
attr = A, NA
damage = ceil(99),7
guardflag = HA
priority = 4
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-68
hitsound   = S1,2
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -10,8
yaccel = .7
air.fall  =1
fall.recover = 0
id=641


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit &&p2statetype=A  && (prevstateno= [600,635])  && var(24)
value = 641


[State 0, ScreenBound]
type = ScreenBound
triggerall = anim=641
trigger1 = 1
value =cond(frontedgebodydist <15,1,0)
movecamera=cond(frontedgebodydist <15,1,0),0
[State 600, 3]
type = changestate
 triggerall =prevstateno= [600,635]
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(24)
 triggerall =prevstateno= [600,635]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = pos y < -230 && enemy,pos y >-10 &&movehit
v = 29    ;fv = 10
value = 1


[State 0, VelSet]
type = VelSet
triggerall =  var(24)
 triggerall =prevstateno= [600,635]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = movehit  &&  pos y < -230
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 = 6,0
ctrl = 0
anim = 700
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 =animtime = 0
x = 0

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

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

[State 8300, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 703]
type    = C
movetype= I
physics = N
poweradd= 0
velset = -6,0
ctrl = 0
anim = 701
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 = animtime = 0
x = 0

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

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

[State 8300, ChangeState]
type = ChangeState
trigger1 =animtime = 0
value = 11
ctrl = 1
;-------------------------------------------------------------
[Statedef 800]
type = S
movetype= A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
anim = 800

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 810
p2stateno = 820
hitsound = S800,0
fall = 1

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 210
;-------------------------------------------------------------
[Statedef 801]
type = A
movetype= A
physics = N
juggle = 0
ctrl = 0
velset=0,0
anim = 801

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

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

[State 0, NotHitBy]
type = NotHitBy
trigger1 =1 
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 =animtime=0 
x = -4.5
y = -2.5

[State 0, ChangeAnim]
type = Changestate
trigger1 =animtime=0 
value =5040
ctrl=0

;-------------------------------------------------------------
[Statedef 802]
type = A
movetype= A
physics = N
juggle = 0
ctrl = 0
velset=0,0
[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = enemy,pos y
[State 0, NotHitBy]
type = NotHitBy
trigger1 =1 
value = SCA
;value2 = S,NA
time = 1
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0 
value = 801
[State 0, PlayerPush]
type = PlayerPush
trigger1 =1 
value =0
[State 0, VelSet]
type = VelSet
trigger1 =animtime=0 
x = -4.5
y = -2.5
[State 0, ChangeAnim]
type = selfstate
trigger1 =animtime=0 
value =5040
ctrl=0
;----------------------------------------------------------------------
[Statedef 810]
type = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 0, VarSet]
type = VarSet
trigger1 = random<33*AIlevel&&AIlevel>0&&time=0
v = 20   ;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(20)=1
value =802

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(5) < 0
edge = 40,100
player = 0,25
value = 0,25

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

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 2, 1
[State 4001, bind]
type=targetbind
trigger1=animelem=1
pos=169,-63
[State 0, SprPriority]
type = SprPriority
trigger1 =animelem=2
value = 3
;ignorehitpause =
;persistent =



[State 4001, bind]
type=targetbind
trigger1=animelem=2
pos=79,-142

[State 4001, bind]
type=targetbind
trigger1=animelem=3
pos=26,-182

[State 4001, bind]
type=targetbind
trigger1=animelem=4
pos=-94,-6




[State 810, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem =4
value = -99

[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 6
value = 821
[State 831, Shake]
type  = envshake
trigger1 = animelem = 4
freq  = 60
time  = 16
ampl  = 4

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim =6006
ID =8002
pos = 20,6
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 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 =  animelem = 4
value = 15, 0
[State 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 =  animelem = 4
value = 15, 0
[State 0, Turn]
type = Turn
trigger1 = animtime=0
;ignorehitpause =
;persistent =

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

;----------------------------------------------------------------------
[Statedef 820]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority=2
[State 0, SelfState]
type = SelfState
trigger1 = enemy,stateno !=810
value = 5050

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



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

;----------------------------------------------------------------------
[Statedef 821]
type = S
movetype = H
velset =5,-12
poweradd = 40
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time=0
value = 1205
;elem = 1
;ignorehitpause =
;persistent =
[State 0, Turn]
type = Turn
trigger1 =time=0
;ignorehitpause =
;persistent =


 [State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = time=20&&alive
value = 5040
[State 0, VelSet]
type = Veladd
trigger1 = 1
y = .6

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


[State 821, 4] ;Hit ground
type = SelfState
trigger1 = pos y >=0 && time >5
value = ifelse(Alive,0,5050)
ctrl =1

;------------------
; Hit by Fast Kung Fu Palm - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 1025]
type    = A
movetype= H
physics = N
velset = 0,0

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

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

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

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

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

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

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

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

;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 1027]
type    = A
movetype= H
physics = N

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

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

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


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

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

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

[State 1028, 1]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = .1
[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

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

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

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

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

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100
;-------------------------------------------------------------
[Statedef 830]
type = A
movetype= A
physics = A
juggle = 0
ctrl = 0
anim = 835

[State 800, 1]
type = HitDef
triggerall = p2movetype!=H || (p2stateno=120||p2stateno=140) ||(p2stateno=5040&&enemy,ctrl=1)
Trigger1 = Time = 0
attr = A, NT
hitflag=A
priority = 6
sparkno = -1
sprpriority = 1
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 840
p2stateno = 850
hitsound = S800,0
fall = 1

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


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

;----------------------------------------------------------------------
[Statedef 840]
type = A
movetype= A
physics = N
anim = 840
poweradd = 60
velset=0,0
[State 0, VarSet]
type = VarSet
trigger1 = random<33*AIlevel&&AIlevel>0&&time=0
v = 20   ;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(20)=1
value =802
[State 200, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 0, 4

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(3) < 0
edge = 0,25
player = 0,25
value = 0,25

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

[State 0, Explod]
type = Explod
trigger1 =animelem= 2
anim =842
ID = 842
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime =99
scale = .833333333333333333333333333333,1
sprpriority = -3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
[State 4001, bind]
type=targetbind
trigger1=animelemtime(1)>=0 && animelemtime(2)<0
pos=97,-117


[State 4001, bind]
type=targetbind
trigger1=animelemtime(2)>=0 && animelemtime(3)<0
pos=-71,-164

[State 4001, bind]
type=targetbind
trigger1=animelemtime(3)>=0 && animelemtime(4)<0
pos=6,-166


[State 4001, bind]
type=targetbind
trigger1=animelem=4
pos=51,3

[State 810, Hurt]
type =targetLifeAdd
trigger1 = AnimElem = 4
value = -99
[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 4
value = 851

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

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 12  ;fv = 10
value = 999
;ignorehitpause =
;persistent =


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

;----------------------------------------------------------------------
[Statedef 850]
type = A
movetype = H
physics = N
velset = 0,0

[State 3545, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 841

[State 0, SelfState]
type = SelfState
trigger1 = enemy,stateno !=840
value = 5050


[State 210, 3]
type = sprpriority
trigger1 = time = 0
value = -1
;----------------------------------------------------------------------
[Statedef 851]
type = A
movetype = H
physics = N
velset = 0,7
poweradd = 40

[State 0, PlayerPush]
type = PlayerPush
triggerall=anim=841
trigger1 = 1
value = 0

;[State 0, Turn]
;type = Turn
;trigger1 = time = 0

[State 821, 1] ;Gravity
type = VelAdd
triggerall=anim=841
Trigger1 = 1
y = .5

[State 0, HitAdd]
type = HitAdd
triggerall=anim=841
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1

[State 0, EnvShake]
type = EnvShake
triggerall=anim=841
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
time = 10
freq = 60
ampl = 4
phase = 90

[State 0, VelAdd]
type = VelAdd
trigger1 =anim!=841
y = .67


[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = anim!=5160
trigger1 =pos y>=0 && anim=841 && time>3
value = 5160

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=1 && anim=5160
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=5160 ||anim=614 ||stateno=612
statetype = L      ;S,A,C,L

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5101)
trigger1 = pos y>=0 && anim=5160 && animelemtime(1)>10
value = 5101
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5101)
trigger1 = pos y>=0 && anim=5160 && 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)=10 && anim=612
value =ifelse(alive,5120,5110)
ctrl=1
;-------------------------------------------------------------
[Statedef 860]
type = S
movetype= A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
anim = 800

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 861
p2stateno = 862
hitsound = S800,0
fall = 1

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

;----------------------------------------------------------------------
[Statedef 861]
type = S
movetype= A
physics = N
anim = 830
poweradd = 60

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(3) < 0
edge = 80,25
player = 0,25
value = 0,25

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


[State 4001, bind]
type=targetbind
trigger1=animelem=1
pos=2,-148


[State 4001, bind]
type=targetbind
trigger1=animelem=2
pos=26,-163

[State 4001, bind]
type=targetbind
trigger1=animelem=3
pos=171,-86

[State 4001, bind]
type=targetbind
trigger1=animelem=4
pos=156,-17

[State 4001, bind]
type=targetbind
trigger1=animelem=5
pos=139,7


[State 810, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem =5
value = -111

[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 5
value = 863

[State 831, Shake]
type  = envshake
trigger1 = animelem = 5
freq  = 60
time  = 16
ampl  = 4

[State 0, Explod]
type = Explod
trigger1 = animelem = 5
anim =6006
ID =8002
pos = 20,6
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 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 =  animelem = 5
value = 2, 5
[State 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 =  animelem = 5
value = 2, 5
[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------
[Statedef 862]
type = S
movetype = H
physics = N
velset = 0,0

[State 3545, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 831

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

[State 0, SelfState]
type = SelfState
trigger1 = enemy,stateno !=861
value = 5050
;----------------------------------------------------------------------
[Statedef 863]
type = S
movetype = H
physics = N
velset = 0,0

[State 3545, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 832

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

[State 0, Turn]
type = Turn
trigger1 =time = 0
[State 0, SelfState]
type = changestate
trigger1 = animtime = 0
value =864

;----------------------------------------------------------------------
[Statedef 864]
type = A
movetype = H
physics = N
velset = 2,-20
poweradd = 40

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


[State 3545, 1]
type = ChangeAnim
trigger1 = time = 0
value = 5061

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 5050 ;Hit ground
;---------------------------------------------------------------------------
[Statedef 1000]
type    =S
movetype= A
physics = S
juggle  =0; 0
poweradd= 13
ctrl = 0
sprpriority = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && (prevstateno!=9000||(anim!=[1000,1010]))
value = 1000
[State 0, VarSet]
type = VarSet
triggerall = AILEvel=0
trigger1 =time=0
v = 3  ;fv = 10
value = ifelse(command="gou1",0,1)

[State 0, VarSet]
type = VarSet
triggerall = AILEvel>0
trigger1 =time=0
v = 3  ;fv = 10
value = ifelse(p2bodydist x <120,0,1)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time=1 && var(3)!=0  && prevstateno!=9000
value = 1010
;elem = 1
;ignorehitpause =
;persistent =


;elem = 1
;ignorehitpause =
;persistent =




;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 =animelem=1
v = 25    ;fv = 10
value = 0
[State 0, VarSet]
type = VarSet
trigger1 =animelem=1
fv = 1    ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
triggerall = prevstateno != 9000
trigger1 = animelem = 2
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 = 0
ignorehitpause =1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1
id=8002
removeongethit = 1
;ignorehitpause =
;trans =
;persistent =
;supermove = 0
;pausemove = 0


[State 0, VarSet]
type = VarSet
triggerall =prevstateno != 9000
trigger1 = time=0
v = 23    ;fv = 10
value =  0

[State 0, VarSet]
type = VarSet
triggerall =prevstateno = 9000
trigger1 = 1
v = 23    ;fv = 10
value =  var(23) + time
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
triggerall =prevstateno != 9000
trigger1 = 1
v = 23   ;fv = 10
value =  time


[State 200, 1]
type = PlaySnd
trigger1 = animelem=7
value = 0, 1
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = animelem=7
value = 2, 1
channel=0
[State 0, Helper]
type = Helper
triggerall = numhelper(1001) < 1
trigger1 =animelemtime(7) = 1
helpertype = normal ;player
name ="rock spawn"
ID = 1001
stateno = 1001
pos = 85,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.yscale= 1
size.xscale= .8333333333333333333333333333333




;ignorehitpause =
;persistent =



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



;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 1051]
type    = S
movetype= A
physics = S
juggle  =0; 0
poweradd= 60

ctrl = 0
sprpriority = 2
[State 0, CtrlSet]
type = CtrlSet
trigger1 =1
value = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 1070
[State 1050, 1]
type = PlaySnd
triggerall = prevstateno!=9000
trigger1 = time = 1 && anim=1050
value = 0, 2

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

[State 0, VarSet]
type = VarSet
triggerall = AILevel > 0
trigger1 =time=0
v = 3  ;fv = 10
value = ifelse(p2bodydist y >-120,0,1)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time=1 && var(3)!=0 && prevstateno!=9000
value = 1071



[State 0, Explod]
type = Explod
triggerall = prevstateno != 9000
triggerall = statetype!=A
trigger1 = animelem = 2  && (anim=1070)
trigger2 = animelem = 1  && (anim=1071)
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 = 0
ignorehitpause =1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1
id=8002
removeongethit = 1







[State 0, VarSet]
type = VarSet
trigger1=time=0 && prevstateno!=9000
v =34    ;fv = 10
value =0
[State 0, VarSet]
type = VarSet
triggerall = pos y <0
trigger1 = animelemtime(1)=2&& (anim=1070)
trigger2 = animelemtime(1)=1&& (anim=1071)

v =34    ;fv = 10
value = 1
ignorehitpause=1
persistent=1


[State 200, 1]
type = PlaySnd
trigger1 = animelem=3  &&  (anim=1070||(anim=[1080,1081]))
trigger2 = animelem=2 && (anim=1071||(anim=[1075,1076]))
value = 2, 6
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = animelem=2  &&  (anim=1070||(anim=[1080,1081]))
trigger2 = animelemtime(1)=1 && (anim=1071||(anim=[1075,1076]))
value = 2, 3
channel=0
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel=0
triggerall = var(34)=0
triggerall = (command!="holdback" &&command!="holdfwd")
trigger1 = animelemtime(4)>=0 && animelemtime(10)<0&& anim=1070   && (command="a")
trigger2 = animelemtime(3)>=0 && animelemtime(14)<0 && anim=1071 && (command="a")
value = 1070

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel=0
triggerall = var(34)=0
triggerall = (command!="holdback" &&command!="holdfwd")
trigger1 = animelemtime(4)>=0 && animelemtime(10)<0&& anim=1070   && ( command="b" || (command="c" && var(57)=0))
trigger2 = animelemtime(3)>=0 && animelemtime(14)<0 && anim=1071 && ( command="b" || (command="c" && var(57)=0))
value = 1071


[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel=0
triggerall = var(34)=0
triggerall = (command="holdfwd" && command="holdup")
trigger1 = animelemtime(4)>=0 && animelemtime(10)<0&& anim=1070   && (command="a")
trigger2 = animelemtime(3)>=0 && animelemtime(14)<0 && anim=1071 && (command="a")
value = 1080

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel=0
triggerall = var(34)=0
triggerall = (command="holdfwd" && command="holdup")
trigger1 = animelemtime(4)>=0 && animelemtime(10)<0&& anim=1070   && ( command="b" || (command="c" && var(57)=0))
trigger2 = animelemtime(3)>=0 && animelemtime(14)<0 && anim=1071 && ( command="b" || (command="c" && var(57)=0))
value = 1081


[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel=0
triggerall = var(34)=0
triggerall = (command="holdfwd" && command!="holdup")
trigger1 = animelemtime(4)>=0 && animelemtime(10)<0&& anim=1070   && (command="a")
trigger2 = animelemtime(3)>=0 && animelemtime(14)<0 && anim=1071 && (command="a")
value = 1075

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel=0
triggerall = var(34)=0
triggerall = (command="holdfwd" && command!="holdup")
trigger1 = animelemtime(4)>=0 && animelemtime(10)<0&& anim=1070   && ( command="b" || (command="c" && var(57)=0))
trigger2 = animelemtime(3)>=0 && animelemtime(14)<0 && anim=1071 && ( command="b" || (command="c" && var(57)=0))
value = 1076


[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel>0
triggerall = var(34)=0
trigger1 = animelemtime(4)>=0 && animelemtime(10)<0&& anim=1070   && movehit && random<249
trigger2 = animelemtime(3)>=0 && animelemtime(14)<0 && anim=1071   && movehit && random<249
value = 1071




[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel>0
triggerall = var(34)=0
trigger1 = animelemtime(4)>=0 && animelemtime(10)<0&& anim=1070   && ((p2bodydist x>=10&&p2bodydist y<=0 )||(movehit && random<249))
trigger2 = animelemtime(3)>=0 && animelemtime(14)<0 && anim=1071 && ((p2bodydist x>=10&&p2bodydist y<=0 )||(movehit && random<249))
value = 1081

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel>0
triggerall = var(34)=0
trigger1 = animelemtime(4)>=0 && animelemtime(10)<0&& anim=1070     && movehit && random<249
trigger2 = animelemtime(3)>=0 && animelemtime(14)<0 && anim=1071  && movehit && random<249
value = 1076


;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1= anim=1070 && animelem=2
trigger2= anim=1071 && animelem=3
anim =1056
ID =8003
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
removetime=-1
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit =0
ignorehitpause =1
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1
id=8003
removeongethit = 1
[State 0, Explod]
type = Explod
trigger1= (anim=[1080,1081]) && animelem=3
anim =1057
ID =8003
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
removetime=-1
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit =0
ignorehitpause =1




[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1
id=8003
removeongethit = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1= (anim=1070) && animelem=3
trigger2= (anim=1071) && animelem=2
statetype = A       ;S,A,C,L
physics =N
[State 0, Width]
type = Width
trigger1 = animelemtime(2) > 0 && (anim=[1080,1081])
edge = 55,0

[State 330, 5]
type = VelAdd
triggerall =anim!=1054
trigger1 = anim=1070 && animelemtime(3)>0 && animelemtime(10)<0
trigger2= anim=1071 && animelemtime(2)>0 && animelemtime(14)<0
trigger3 =(anim=1080) && animelemtime(3)>0  && animelemtime(10)<0
trigger4 =(anim=1081) && animelemtime(3)>0  && animelemtime(16)<0
y = .97

[State 330, 5]
type = VelAdd
triggerall =anim!=1054
trigger1 =( anim=1070||anim=1080) &&  animelemtime(10)>=0
trigger2 = anim=1075 &&  animelemtime(9)>=0
trigger3 = anim=1071 &&  animelemtime(15)>=0
trigger4 = (anim=1076||anim=1081) &&  animelemtime(16)>=0
y = .48
[State 0, VelSet]
type = VelSet
;triggerall=prevstateno!=9000 && vel x<.75
trigger1 = animelem=3 && (anim=1070||(anim=[1080,1081]))
trigger2 = animelem=2 && anim=1071
x =ifelse((anim=[1070,1071]),0,7)
y =-20.5
ignorehitpause = 1
persistent = 1


[State 1055, 5]
type = HitDef
trigger1 = animelemtime(2)>=0 && animelemtime(15)<0 && (anim=[1070,1071])
attr = A, SA
animtype  = Med
damage = ifelse((anim=[1080,1081]),57,71),7
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = -25,-67
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -6, -23
guard.velocity = -7
guard.ctrltime = 12
air.velocity =  -6, -23
airguard.velocity = -4,-4.5
givepower = 100
getpower = 80
air.hittime=65
forcenofall=ifelse((anim=[1080,1081]),0,1)
fall.recover=0
yaccel=.62
id=1051
nochainid=1051
fall=ifelse((anim=[1080,1081]),1,0)

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =1051
ignorehitpause =1 
[State 1055, 5]
type = HitDef
trigger1 =  animelemtime(3)>=0 && animelemtime(15)<0 && (anim=[1080,1081])
attr = A, SA
animtype  = Med
damage = ifelse((anim=[1080,1081]),57,71),7
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = -25,-67
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -6, -23
guard.velocity = -7
guard.ctrltime = 12
air.velocity =  -6, -23
airguard.velocity = -4,-4.5
givepower = 100
getpower = 80
air.hittime=65
fall.recover=0
yaccel=.62
id=1054
nochainid=1054
fall=1

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =1054
ignorehitpause =1 
;persistent =
[State 0, VelSet]
type = VelSet
triggerall = ((anim=[1070,1071])&& pos y <0)
trigger1= animelemtime(1)=0
x = 0
y = 0
;ignore        ;A,C,S,N
;ignorehitpause =
;persistent =
[State 0, VelSet]
type = VelSet
triggerall = (anim=[1075,1076])||(anim=[1080,1081])
trigger1= animelemtime(1)=1
x = 0
y = 0
;ignorehitpause =
;persistent =



;ignorehitpause =
;persistent =


[State 0, VelSet]
type = VelSet
trigger1= animelem=10 &&(anim=1070||anim=1080)
trigger2= animelem=15&&(anim=1071)
trigger3= animelem=16 &&anim=1081
x=0
y = 0

;=====================

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =(animelem=9 &&anim=1075)|| (animelem=16 && anim=1076)
id = 8003

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(1)=1 && ((anim=[1070,1071])||(anim=[1080,1081])||(anim=[1075,1076]))
id = 8003

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =vel y >=0 && pos y <0 && (anim!=[1075,1076])
id = 8003
[State 0, Explod]
type = Explod
trigger1 = animelem = 2 && (anim=1075||anim=1076)
anim =1055
ID =8003
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
removetime=-1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit =0
ignorehitpause =1

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(2)>=0 && animelemtime(9)<0 && (anim=1075)
trigger2 = animelemtime(2)>=0 && animelemtime(16)<0 && (anim=1076)
x = ifelse(var(3)=0,10.25,10.75)
y=0
[State 0, VelSet]
type = VelSet
trigger1 = animelem=9&& (anim=1075)
trigger2 =animelem=16&& (anim=1076)
x = 0
[State 1055, 5]
type = HitDef
trigger1 = animelemtime(2)>=0 && animelemtime(9)<0 && (anim=1075)
trigger2 = animelemtime(2)>=0 && animelemtime(16)<0 && (anim=1076)
attr = S, SA
animtype  = Med
damage = 57,12
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = -25,-67
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = ifelse(var(3)=0,-1,3),ifelse(var(3)=0,-14,-16)
guard.velocity = -7
guard.ctrltime = 12
air.velocity =  -1, -19
airguard.velocity = -4,-4.5
givepower = 100
getpower = 80
air.hittime=99
fall=var(3)
fall.recover=0
yaccel=.75
id=1050
nochainid=1050
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =1050
ignorehitpause =1 
[State 0, Width]
type = Width
trigger1 = animelemtime(2) > 0 && (anim=[1075,1076])
edge = 55,0



;=======================
[State 1052, 1] ;Reset y-position to ground level
type = PosSet
trigger1 =  anim=1054
y = 0
[State 1051, 3] ;Change state when KFM is close to ground
type = Changeanim
trigger1 = Pos Y >= 0 && ((anim=[1070,1071]) || (anim=[1075,1076])||(anim=[1080,1081]))&& (vel y >0&&animelemtime(3)>0)
value = 1054
[State 1052, 1] ;Reset y-position to ground level
type = PosSet
trigger1 =  anim=1054
y = 0
[State 0, StateTypeSet]
type = StateTypeSet
triggerall =anim=1054
trigger1= animelemtime(1)=1
statetype = C      ;S,A,C,L
movetype = I        ;I,A,H
physics = C
[State 0, VelSet]
type = VelSet
triggerall =anim=1054
trigger1=1
x = 0
y = 0
[State 1052, 5]
type = ChangeState
trigger1 = AnimTime = 0 && ( anim=1054)
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 1050]
type    = S
movetype= A
physics = S
juggle  =0; 0
poweradd= 60
ctrl = 0
sprpriority = 2
[State 0, CtrlSet]
type = CtrlSet
trigger1 =1
value = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 1050
[State 1050, 1]
type = PlaySnd
triggerall = prevstateno!=9000
trigger1 = time = 1 && anim=1050
value = 0, 2

[State 0, VarSet]
type = VarSet
triggerall = AILEvel=0
trigger1 =time=0
v = 3  ;fv = 10
value = ifelse(command="Gous1",0,1)
[State 0, VarSet]
type = VarSet
triggerall = AIlevel>0
trigger1 =time=0
v = 3  ;fv = 10
value = ifelse(p2bodydist x <120&&var(1)=0,0,1)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time=1 && var(3)!=0 && prevstateno!=9000
value = 1060



[State 0, Explod]
type = Explod
triggerall = prevstateno != 9000
trigger1 = animelem = 2  && (anim=1050||anim=1060)
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 = 0
ignorehitpause =1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1
id=8002
removeongethit = 1


[State 0, Explod]
type = Explod
trigger1 = animelem = 4 && (anim=1050||anim=1060)
anim =1055
ID =8003
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
removetime=-1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit =0
ignorehitpause =1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1
id=8003
removeongethit = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel>0
triggerall = random<249  || power <1000
trigger1 = animelemtime(8)>=0 && animelemtime(9)<6&& anim=1050   && ((p2bodydist x<-0||(p2bodydist y<=0 && (p2bodydist x =[-30,0]))) ||(movecontact&&p2bodydist x<15) )
trigger2 = animelemtime(8)>=0 && animelemtime(18)<11 && anim=1060 &&  ((p2bodydist x<-0 ||(p2bodydist y<=0 && (p2bodydist x =[-30,0])))||(movecontact&&p2bodydist x<15) )
value = 1051
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel>0
triggerall = random<249 || power <1000
trigger1 = animelemtime(8)>=0 && animelemtime(9)<6&& anim=1050   && (p2bodydist x<-35&&p2bodydist y<-20 )
trigger2 = animelemtime(8)>=0 && animelemtime(18)<11 && anim=1060 &&   (p2bodydist x<-35&&p2bodydist y<-20 )
value = 1052
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel>0
triggerall = random<249 || power <1000
trigger1 = animelemtime(8)>=0 && animelemtime(9)<6&& anim=1050   && ((p2bodydist x>=5&&p2bodydist y<0 ) ||movecontact)
trigger2 = animelemtime(8)>=0 && animelemtime(18)<11 && anim=1060 &&   ((p2bodydist x>=5&&p2bodydist y<0 )||movecontact)
value = 1053


[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel=0
triggerall = (command!="holdback" &&command!="holdfwd")
trigger1 = animelemtime(8)>=0 && animelemtime(9)<6&& anim=1050   && (command="a" || command="b" || (command="c" && var(57)=0))
trigger2 = animelemtime(8)>=0 && animelemtime(18)<11 && anim=1060 && (command="a" || command="b" || (command="c" && var(57)=0))
value = 1051
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel=0
triggerall = (command="holdback" &&var(59)=0)
trigger1 = animelemtime(8)>=0 && animelemtime(9)<6&& anim=1050   && (command="a" || command="b" || (command="c" && var(57)=0))
trigger2 = animelemtime(8)>=0 && animelemtime(18)<11 && anim=1060 && (command="a" || command="b" || (command="c" && var(57)=0))
value = 1052
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILevel=0
triggerall = (command="holdfwd" &&var(59)=0)
trigger1 = animelemtime(8)>=0 && animelemtime(9)<6&& anim=1050   && (command="a" || command="b" || (command="c" && var(57)=0))
trigger2 = animelemtime(8)>=0 && animelemtime(18)<11 && anim=1060 && (command="a" || command="b" || (command="c" && var(57)=0))
value = 1053

[State 200, 1]
type = PlaySnd
trigger1 = animelem=4  &&  (anim=1050||anim=1060)
trigger2 = animelem=2 && (anim=1051)
trigger3 = animelem=3  &&  (anim=1052||anim=1053)
value = 2, 6
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = animelem=4  &&  (anim=1050||anim=1060)
trigger2 = animelem=2 && (anim=1051)
trigger3 = animelem=3  &&  (anim=1052||anim=1053)
value = 2, 3
channel=0

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(4)>=0 && animelemtime(9)<3 && (anim=1050)
trigger2 = animelemtime(4)>=0 && animelemtime(18)<0 && (anim=1060)
x = ifelse(var(3)=0,10.25,10.75)
;ignorehitpause =
;persistent =


[State 1055, 5]
type = HitDef
trigger1 = !movecontact && (anim=1050||anim=1060)
attr = S, SA
animtype  = Med
damage = 128,12
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = -25,-67
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = ifelse(var(3)=0,-1,3),ifelse(var(3)=0,-14,-16)
guard.velocity = -7
guard.ctrltime = 12
air.velocity =  -1, -14
airguard.velocity = -4,-4.5
givepower = 100
getpower = 80
air.hittime=99
fall=var(3)
fall.recover=0
yaccel=.75
id=200
nochainid=200

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



[State 0, Width]
type = Width
trigger1 = animelemtime(2) > 0 && (anim=1050||anim=1060)
edge = 55,0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =(animelem=9 &&anim=1050)|| (animelem=18 && anim=1060)
id = 8003
;==============================

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(1)=1 && (anim=1051||anim=1052||anim=1053)
id = 8003
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1= anim=1051 && animelem=2
anim =1056
ID =8003
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
removetime=-1
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit =0
ignorehitpause =1

[State 0, Explod]
type = Explod
trigger1= (anim=1052||anim=1053) && animelem=3
anim =1057
ID =8003
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = ifelse(anim=1052,1,-1)
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
removetime=-1
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit =0
ignorehitpause =1



[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =vel y >=0 && pos y <0
id = 8003
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1
id=8003
removeongethit = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1= anim=1051 && animelem=2
trigger2= (anim=1052||anim=1053) && animelem=3
statetype = A       ;S,A,C,L
physics =N
[State 0, Width]
type = Width
trigger1 = animelemtime(2) > 0 && anim=1053
edge = 55,0
[State 0, Width]
type = Width
trigger1 = animelemtime(2) > 0 && anim=1052
edge = 0,55

[State 330, 5]
type = VelAdd
triggerall =anim!=1054
trigger1 = anim=1051 && animelemtime(2)>0 && animelemtime(13)<0
trigger2 =(anim=1052||anim=1053) && animelemtime(3)>0  && animelemtime(15)<0
y = .97

[State 330, 5]
type = VelAdd
triggerall =anim!=1054
trigger1 = anim=1051 &&  animelemtime(13)>=0
trigger2 =(anim=1052||anim=1053)  && animelemtime(15)>=0
y = .48
[State 0, VelSet]
type = VelSet
trigger1 = animelem=2 && anim=1051
trigger2 = animelem=3 && (anim=1052||anim=1053)
x =ifelse(anim=1051,0,ifelse(anim=1052,-7,7))
y =-20.5
ignorehitpause = 1
persistent = 1
[State 1055, 5]
type = HitDef
trigger1 = animelemtime(2)>=0 && animelemtime(13)<0 && anim=1051
trigger2 =  animelemtime(3)>=0 && animelemtime(15)<0 && (anim=1052||anim=1053)
attr = A, SA
animtype  = Med
damage = 57,7
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = -25,-67
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -6, -19
guard.velocity = -7
guard.ctrltime = 12
air.velocity =  -6, -25
airguard.velocity = -4,-4.5
givepower = 100
getpower = 80
air.hittime=65
forcenofall=1
fall.recover=0
yaccel=.75
id=1051
nochainid=1051
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =1051
ignorehitpause =1 
[State 0, StateTypeSet]
type = StateTypeSet
triggerall =anim=1052 || anim=1053 || anim=1051
trigger1= animelemtime(1)=1
statetype = S      ;S,A,C,L       ;I,A,H
physics = S         ;A,C,S,N
;ignorehitpause =
;persistent =
[State 0, VelSet]
type = VelSet
triggerall =anim=1052 || anim=1053||anim=1051
trigger1= animelemtime(1)<=4
x = 0
y = 0
;ignorehitpause =
;persistent =
[State 0, PosSet]
type = PosSet
triggerall =anim=1052 || anim=1053||anim=1051
trigger1= animelemtime(1)<=4
y = 0
;ignorehitpause =
;persistent =




[State 0, VelSet]
type = VelSet
trigger1= animelem=15 &&(anim=1052 ||anim=1053)
trigger2= animelem=13 &&anim=1051
x=0
y = 0

;=======================
[State 1052, 1] ;Reset y-position to ground level
type = PosSet
trigger1 =  anim=1054
y = 0


[State 1051, 3] ;Change state when KFM is close to ground
type = Changeanim
trigger1 = Pos Y >= 0 && ((anim=1052 && animelemtime(16)>=0) ||(anim=1053 && animelemtime(16)>=0)||(anim=1051 && animelemtime(14)>=0))&& (vel y >0)
value = 1054
[State 0, StateTypeSet]
type = StateTypeSet
triggerall =anim=1054
trigger1= animelemtime(1)=1
statetype = C      ;S,A,C,L
movetype = I        ;I,A,H
physics = C
[State 0, VelSet]
type = VelSet
triggerall =anim=1054
trigger1=1
x = 0
y = 0
[State 1052, 5]
type = ChangeState
trigger1 = AnimTime = 0 && ( anim=1050 || anim=1054||anim=1060)
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 1100]
type    = S
movetype= A
physics = N
juggle  =0; 4
poweradd= 60
velset=0,0
ctrl = 0
sprpriority = 2
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 1100
[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
trigger1 =time=0
v = 3  ;fv = 10
value = ifelse(command="sk1",0,1)
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
trigger1 =time=0
v = 3  ;fv = 10
value = ifelse(p2movetype=H,1,0)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time=1 && var(3)!=0  && prevstateno!=9000
value = 1101



[State 0, Explod]
type = Explod
triggerall = prevstateno != 9000
trigger1 = animelem = 2
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 = 0
ignorehitpause =1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1
id=8002
removeongethit = 11

[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelemtime(3)=1
value = 0, 1
channel=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelemtime(3)=1
value = 2, 2
channel=0
[State 230, 2]
type = HitDef
;triggerall = var(59)=0 || (var(59)=1 && var(2)>=0)
trigger1=animelem=4
attr = S, ST
animtype  =heavy
damage    = 0,7
guardflag = MA
hitflag=M
guard.pausetime = 8,8
priority=5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -19,-64
hitsound   = S800,0
guardsound = S3,1
ground.type = high
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -6,-3
guard.velocity=-7
air.velocity = -3.5,-4.5
fall.recover=0
fall=1
p1stateno=1101
p1sprpriority=-4
p2stateno=1102
p2facing=1

[State 0, ChangeAnim]
type = Changestate
trigger1 = animtime=0
value = 0
ctrl=1



;---------------------------------------------------------------
[Statedef 1101]
type    = S
movetype= A
physics =S
velset=0,0
juggle = 4
poweradd= 62
anim = ifelse(var(3)=0,1110,1111)
ctrl = 0
sprpriority = -4

[State 4001, bind]
type=targetbind
trigger1=animelemtime(1)>=0 && animelemtime(2)<0
pos=145,-56


[State 4001, bind]
type=targetbind
trigger1=animelemtime(2)>=0 && animelemtime(3)<0
pos=139,-155
[State 0, SprPriority]
type = SprPriority
trigger1 =animelem=3
value = 2
;ignorehitpause =
;persistent =
[State 200, 1]
type = PlaySnd
trigger1=animelem=3
trigger2=animelem=10
trigger3=animelem=17 &&  anim=1111
trigger4=animelem=24 &&  anim=1111
value = 0, 2
channel=1

[State 200, 1]
type = PlaySnd
trigger1=animelem=12  && anim=1110
trigger2=animelem=26  && anim=1111
value = 2, 1
channel=0
[State 4001, bind]
type=targetbind
trigger1=animelemtime(3)>=0 && animelemtime(4)<0
trigger2=animelemtime(10)>=0 && animelemtime(11)<0
trigger3=animelemtime(17)>=0 && animelemtime(18)<0 &&  anim=1111
trigger4=animelemtime(24)>=0 && animelemtime(25)<0 &&  anim=1111
pos=148,-133

[State 4001, bind]
type=targetbind
trigger1=animelemtime(4)>=0 && animelemtime(5)<0
trigger2=animelemtime(11)>=0 && animelemtime(12)<0  &&  anim=1111
trigger3=animelemtime(18)>=0 && animelemtime(19)<0  &&  anim=1111
pos=83,-185

[State 4001, bind]
type=targetbind
trigger1=animelemtime(5)>=0 && animelemtime(6)<0
trigger2=animelemtime(12)>=0 && animelemtime(13)<0 && anim=1111
trigger3=animelemtime(19)>=0 && animelemtime(20)<0 && anim=1111
pos=6,-185

[State 4001, bind]
type=targetbind
trigger1=animelemtime(6)>=0 && animelemtime(7)<0
trigger2=animelemtime(13)>=0 && animelemtime(14)<0&& anim=1111
trigger3=animelemtime(20)>=0 && animelemtime(21)<0&& anim=1111
pos=-55,-119
[State 4001, bind]
type=targetbind
trigger1=animelemtime(7)>=0 && animelemtime(8)<0
trigger2=animelemtime(14)>=0 && animelemtime(15)<0  && anim=1111
trigger3=animelemtime(21)>=0 && animelemtime(22)<0  && anim=1111
pos=-1,-97


[State 4001, bind]
type=targetbind
trigger1=animelemtime(8)>=0 && animelemtime(9)<0
trigger2=animelemtime(15)>=0 && animelemtime(16)<0  && anim=1111
trigger3=animelemtime(22)>=0 && animelemtime(23)<0  && anim=1111
pos=68,-90

[State 4001, bind]
type=targetbind
trigger1=animelemtime(9)>=0 && animelemtime(10)<0
trigger2=animelemtime(16)>=0 && animelemtime(17)<0&& anim=1111
trigger3=animelemtime(23)>=0 && animelemtime(24)<0&& anim=1111
pos=122,-105


;=============
[State 4001, bind]
type=targetbind
trigger1=animelemtime(11)>=0 && animelemtime(12)<0  && anim=1110
trigger2=animelemtime(25)>=0 && animelemtime(26)<0  && anim=1111
pos=104,-84

[State 4001, bind]
type=targetbind
trigger1=animelem=12  && anim=1110
trigger2=animelem=26  && anim=1111
pos=-112,-173



[State 0, Turn]
type = Turn
trigger1 =animtime=0 && anim!=1130
;ignorehitpause =
;persistent =
[State 0, TargetState]
type = TargetState
trigger1 = animelem=12  && anim=1110
trigger2=animelem=26  && anim=1111
value =1103

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem=12  && anim=1110
trigger2=animelem=26  && anim=1111
value =  -ifelse(var(3)=0,135,184)
;ignorehitpause =
;persistent =
[State 1027, No scroll]
type = ScreenBound
trigger1 = animelemtime(12)>0 && anim=1110
trigger2 = animelemtime(26)>0 && anim=1111
trigger3=anim=1130
value = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = backedgebodydist<-10 && animelemtime(13)>0
value = 1130
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =anim=1130 && backedgebodydist <-20
flag = invisible


[State 0, VarSet]
type = Varadd
trigger1 =var(29)=1
v = 31    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
triggerall = p2statetype=L
trigger1 =anim=1130
v = 29    ;fv = 10
value = 1
[State 0, ChangeAnim]
type = Changestate
trigger1 = (animtime=0 && anim!=1130) ||  ( var(31)>=19 && var(29)=1 && anim=1130)
value = ifelse(anim=1130,101,0)
ctrl=1
;---------------------------------------------------------------
[Statedef 1102]
type    = A
movetype= H
physics =N
ctrl = 0
sprpriority = -2

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time=0
value =ifelse(enemy,var(3)=1,1121,1120)
;elem = 1
;ignorehitpause =
;persistent =

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

[State 1050, 5]
type = selfState
trigger1 =p2stateno!=1101
value = 5050
;---------------------------------------------------------------------------
[Statedef 1103]
type    = A
movetype=H
physics = N
velset =8,-14
poweradd = 40
[State 0, Turn]
type = Turn
trigger1 =time=0
;ignorehitpause =
;persistent =

[State 0, HitAdd]
type = HitAdd
triggerall=anim=1120||anim=1121
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1

[State 0, EnvShake]
type = EnvShake
triggerall=anim=1120||anim=1121
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
time = 10
freq = 60
ampl = 4
phase = 90

[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .67
[State 0, NotHitBy]
type = NotHitBy
trigger1 = anim=1120||anim=1121
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=5101|| stateno=614||stateno=612
statetype = L      ;S,A,C,L

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5101)
trigger1 = pos y>=0 && (anim=1120||anim=1121) && time>3
value = 5101
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5101)
trigger1 = pos y>=0 &&(anim=1120||anim=1121) && 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=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)=19 && anim=612
value =ifelse(alive,5120,5110)
ctrl=1


;---------------------------------------------------------------
[Statedef 1104]
type    = S
movetype= A
physics =N
velset=0,0
juggle = 4
poweradd= 62
anim = 1101
ctrl = 0
sprpriority = 2
[State 9000, ChangeAnim]
type = ChangeAnim
triggerall = prevstateno = 9000
trigger1 = Time =0
value = Anim
elem  = var(33)
ignorehitpause=1
persistent=1
[State 0, Explod]
type = Explod
trigger1 =animelem = 2
anim =1103
ID =1103
pos = 172,12
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
ignorehitpause =0
removeongethit = 1

[State 0, VarSet]
type = VarSet
triggerall =prevstateno = 9000
trigger1 = 1
v = 23    ;fv = 10
value =  var(23) + time
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
triggerall =prevstateno != 9000
trigger1 = 1
v = 23   ;fv = 10
value =  time

[State 0, VarSet]
type = VarSet
triggerall =prevstateno = 1103
trigger1 = time=0
v = 23    ;fv = 10
value =  0


[State 0, Explod]
type = Explod
trigger1 =animelem = 2
anim =1104
ID =1103
pos = 172,12
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
ignorehitpause =0

[State 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 = animelem = 2
value = 2, 5
[State 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 = animelem = 2
value = 2, 5

[State 1060, 4]
type = HitDef
trigger1 = animelem = 2
attr = A, SA
animtype  = Medium
damage = ceil(176), 4
priority  = 5
guardflag = MA
pausetime = 7,7
sparkxy = -6,-6
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 40
ground.hittime  = 40
guard.ctrltime = 29
ground.velocity = -6,-16.5
guard.velocity = -7
air.velocity = -5,-14.5
air.hittime=40
yaccel=.69
[State 0, EnvShake]
type = EnvShake
trigger1 = animelemtime(2)=0
time = 16
freq = 85
ampl = 4
phase = 90
[State 0, ChangeAnim]
type = Changestate
trigger1 = time >= 27 && anim=1101
trigger2= var(23) >= 27 && prevstateno = 9000
value = 1102
ignorehitpause=1

;---------------------------------------------------------------
[Statedef 1106]
type    = S
movetype= A
physics = N

juggle = 4
poweradd=65
anim = 1100
ctrl = 0
sprpriority = 2

[State 9000, ChangeAnim]
type = ChangeAnim
triggerall = prevstateno = 9000
trigger1 = Time =0
value = Anim
elem  = var(33)
ignorehitpause=1
persistent=1
[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem = 2
value = 2, 7
volume=255

[State 200, 1]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = animelem = 2
value = 2, 7
volume=255



[State 0, Width]
type = Width
trigger1 = 1
edge = 40,40
player = 70,0



[State 1061, 1]
type = Velset
trigger1 = animelemtime(6)> 0
x = 9



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



[State 0, Explod]
type = Explod
trigger1 =time = 0
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 =prevstateno = 9000
trigger1 = 1
v = 23    ;fv = 10
value =  var(23) + time
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
triggerall =prevstateno != 9000
trigger1 = 1
v = 23   ;fv = 10
value =  time

[State 0, ChangeAnim]
type = Changestate
trigger1 = time = 24
trigger2=  var(23) >= 24 && prevstateno = 9000
trigger3 = p2bodydist x <55&& (time >8 ||var(23) >= 8)
value = 1107
ignorehitpause=1



;---------------------------------------------------------------
[Statedef 1107]
type    = S
movetype= A
physics =N
velset=0,0
juggle = 4
poweradd= 62
anim = 1101
ctrl = 0
sprpriority = 2
[State 9000, ChangeAnim]
type = ChangeAnim
triggerall = prevstateno = 9000
trigger1 = Time =0
value = Anim
elem  = var(33)
ignorehitpause=1
persistent=1
[State 0, Explod]
type = Explod
trigger1 =animelem = 2
anim =1103
ID =1103
pos = 172,12
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
ignorehitpause =0
removeongethit = 1

[State 0, VarSet]
type = VarSet
triggerall =prevstateno = 9000
trigger1 = 1
v = 23    ;fv = 10
value =  var(23) + time
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
triggerall =prevstateno != 9000
trigger1 = 1
v = 23   ;fv = 10
value =  time

[State 0, VarSet]
type = VarSet
triggerall =prevstateno = 1107
trigger1 = time=0
v = 23    ;fv = 10
value =  0

[State 0, EnvShake]
type = EnvShake
trigger1 = animelemtime(2)=0
time = 16
freq = 85
ampl = 4
phase = 90
[State 0, Explod]
type = Explod
trigger1 =animelem = 2
anim =1104
ID =1103
pos = 172,12
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
ignorehitpause =0

[State 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 = animelem = 2
value = 2, 5
[State 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 = animelem = 2
value = 2, 5

[State 1060, 4]
type = HitDef
trigger1 = animelem = 2
attr = A, SA
animtype  = Medium
damage = ceil(194), 4
priority  = 5
guardflag = MA
pausetime = 7,7
sparkxy = -6,-6
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 40
ground.hittime  = 40
guard.ctrltime = 29
ground.velocity = -6,-17
guard.velocity = -7
air.velocity = -5,-15
air.hittime=40
yaccel=.69
[State 0, ChangeAnim]
type = Changestate
trigger1 = time >=32 && anim=1101
trigger2= var(23) >= 32 && prevstateno = 9000
value = 1102
ignorehitpause=1


;---------------------------------------------------------------------------
;
[Statedef 3000]
type    = S
movetype= A
physics = S
velset = 0,0
juggle  =0; ifelse((prevstateno = 435),0,8)
ctrl = 0

sprpriority = 0
[State 0, Turn]
type = Turn
trigger1 =time=0 && p2bodydist x <0 && p2movetype=H
;ignorehitpause =
;persistent =
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 3000

[State 200, 1]
type = PlaySnd
triggerall = anim=3000
trigger1 = animelem=1
value = 180,1
channel=0
[State 200, 1]
type = PlaySnd
triggerall = anim=3000
trigger1 = animelem=8
value = 2, 1
channel=0


[State 0, PlaySnd]
type = PlaySnd
triggerall = (prevstateno != 9000||(animelemtime(1)>=0 &&animelemtime(3)<0))     && anim=3000
trigger1 =animelem=2
value = S3001,0

[State 3000, Super A]
type = SuperPause
triggerall = (prevstateno != 9000||(animelemtime(1)>=0 &&animelemtime(3)<0))     && anim=3000
trigger1 = animelem=2
poweradd = -1000
anim = -1
time = 45
p2defmul=1


[State 0, Explod]
type = Explod
triggerall =  anim=3000
trigger1 =animelemtime(1)=  5
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,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
supermovetime = 4
pausemovetime  = 4
removeongethit = 0
ignorehitpause =1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1     && anim=3000
id=8002
removeongethit = 1
[State 182, 2]
type = NotHitBy
triggerall =    anim=3000
trigger1 =animelem=2
value = SCA
time =4

[State 3000, Hyperbg]
type = Explod
triggerall =    anim=3000
trigger1 =animelem=2
anim = 6004
ID = 6001
pos = 14,-89
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
triggerall =anim=3000
trigger1 = animelem=3
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 =150
supermovetime = 90
pausemovetime  = 90
scale = .5,ifelse(GameHeight = 180,.4,.5)
sprpriority = -6
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit =0
ignorehitpause=1


[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1      && anim=3000
id=6001
removeongethit = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =numhelper(3001)>=1    && anim=3000
trigger2= time =[7,32]
flag = noBG
flag2=noFG
ignorehitpause=1
[State 0, AssertSpecial]
type = AssertSpecial
triggerall = prevstateno != 9000   && anim=3000
trigger1 =(time=7)
flag = noBG
flag2=noFG
ignorehitpause=1



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

[State 0, VarSet]
type = VarSet
trigger1= animelemtime(8) = 1     && anim=3000
v =41   ;fv = 10
value = 1
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 =animelem=1   && anim=3000
v = 40    ;fv = 10
value = 0
[State 0, VarSet]
type = VarSet
trigger1 =animelem=1    && anim=3000
fv = 6    ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
triggerall =prevstateno != 9000   && anim=3000
trigger1 = time=0
v = 23    ;fv = 10
value =  0

[State 0, VarSet]
type = VarSet
triggerall =prevstateno = 9000 && anim=3000
trigger1 = 1
v = 23    ;fv = 10
value =  var(23) + time
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
triggerall =prevstateno != 9000 && anim=3000
trigger1 = 1
v = 23   ;fv = 10
value =  time


[State 0, Helper]
type = Helper
triggerall = numhelper(3001) < 1    && anim=3000
triggerall = prevstateno != 9000 || var(23)<21
trigger1 =animelemtime(8) = 1
helpertype = normal ;player
name ="Hadouken"
ID = 3001
stateno = 3001
pos = 85,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.yscale= 1
size.xscale= .833333333333333333333333333333


;persistent =
[State 1027, No scroll]
type = ScreenBound
trigger1 = animelemtime(8)>0 && anim=3000&&p2movetype=H&&(p2stateno!=[120,155])
trigger2=anim=0
value = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = backedgebodydist<0 && animelemtime(16)>=6&&p2movetype=H&&(p2stateno!=[120,155])
value = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =anim=1130
flag = invisible


[State 0, VarSet]
type = Varadd
trigger1 =var(29)=1
v = 31    ;fv = 10
value = 1
ignorehitpause=1
[State 0, VarSet]
type = VarSet
triggerall = p2statetype=L
trigger1 =anim=0
v = 29    ;fv = 10
value = 1
ignorehitpause=1
[State 0, ChangeAnim]
type = Changestate
trigger1 = (animtime=0 && anim!=0) ||  ( p2statetype=L&&var(31)>=19 && var(29)=1 && anim=0)
value = ifelse(anim=0,101,0)
ctrl=1
;---------------------------------------------------------------------------
;
[Statedef 3050]
type    = S
movetype= A
physics = S
velset = 0,0
juggle  =0; ifelse((prevstateno = 435),0,8)
ctrl = 0
sprpriority = 0
[State 0, Turn]
type = Turn
trigger1 =time=0 && p2bodydist x <0 && p2movetype=H
;ignorehitpause =
;persistent =
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 3050

[State 200, 1]
type = PlaySnd
triggerall = anim=3050
trigger1 = animelem=1
value = 2,1
channel=0
[State 200, 1]
type = PlaySnd
triggerall = anim=3050
trigger1 = animelem=24
value = 2,2
channel=0


[State 0, PlaySnd]
type = PlaySnd
triggerall = (prevstateno != 9000||(animelemtime(1)>=0 &&animelemtime(2)<0))     && anim=3050
trigger1 =animelem=2
value = S3001,0

[State 3000, Super A]
type = SuperPause
triggerall = (prevstateno != 9000||(animelemtime(1)>=0 &&animelemtime(2)<0))     && anim=3050
trigger1 = animelem=2
poweradd = -1000
anim = -1
time = 45
movetime=45
p2defmul=1


[State 0, Explod]
type = Explod
triggerall =    anim=3050
trigger1 =animelemtime(1) =  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,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
supermovetime = 0
pausemovetime  = 0
removeongethit = 0
ignorehitpause =1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1     && anim=3050
id=8002
removeongethit = 1
[State 182, 2]
type = NotHitBy
triggerall =anim=3050
trigger1 = Time = 7
value = SCA
time =4

[State 3000, Hyperbg]
type = Explod
triggerall =  anim=3050
trigger1 = time = 5
anim = 6004
ID = 6001
pos = 14,-89
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
triggerall = anim=3050
trigger1 = animelem=24
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 =150
supermovetime = 90
pausemovetime  = 90
scale = .5,ifelse(GameHeight = 180,.4,.5)
sprpriority = -6
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit =0
ignorehitpause=1


[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1      && anim=3050
id=6001
removeongethit = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =animelemtime(25)>=0&&animelemtime(29)<0
trigger2= time =[5,99]
flag = noBG
flag2=noFG
ignorehitpause=1
[State 0, AssertSpecial]
type = AssertSpecial
triggerall = prevstateno != 9000   && anim=3050
trigger1 =(time=5)
flag = noBG
flag2=noFG
ignorehitpause=1



[State 3000, helper]
type = Helper
triggerall =  anim=3050
trigger1 = animelemtime(2)=1
pos = 0,-240
postype = back
id = 4000
name = "Hyperportrait"
stateno = 4000
ownpal = 1
size.xscale = 1
size.yscale = 1.25
supermovetime = 90
pausemovetime  = 90
[State 831, Shake]
type  = envshake
trigger1 = animelem = 27
freq  =80
time  = 22
ampl  = 4
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 27
value = S15,0
channel = 1
;abspan =
;ignorehitpause =
;persistent =

[State 0, Helper]
type = Helper
triggerall =animelemtime(25)>=0 && animelemtime(29)<0
trigger1= time%5=0
helpertype = normal ;player
name ="uselessrocks"
ID = 3010
stateno = 3002
pos = -10+(random%140),-260
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.yscale= 1
size.xscale= .833333333333333333333333333333


[State 0, Helper]
type = Helper
triggerall =animelemtime(25)>=0 && animelemtime(29)<0
trigger1= time%4=0
helpertype = normal ;player
name ="rocksthatdoshit"
ID = 3011
stateno = 3003
pos =-10+(random%145),ifelse((enemy, pos y < -180),((enemy,pos y-(random%20))),(-220-(random%60)))
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.yscale= 1
size.xscale= .833333333333333333333333333333

[State 200, 1]
type = PlaySnd
triggerall = anim=3050
trigger1 = animelem=27
value = 2,10
channel=0

[State 0, ChangeAnim]
type = Changestate
trigger1 = (animtime=0 && anim!=0)
value = 0
ctrl=1

;---------------------------------------------------------------------------
;
[Statedef 3100]
type    = S
movetype= A
physics = S
velset = 0,0
juggle  =0; ifelse((prevstateno = 435),0,8)
ctrl = 0
sprpriority =2

;ignorehitpause =
;persistent =
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0 && prevstateno!=9000
value = 3100

[State 200, 1]
type = PlaySnd
triggerall = anim=3100
trigger1 = animelem=1
value = 2,1
channel=0
[State 200, 1]
type = PlaySnd
triggerall =  anim=3100
trigger1 = animelem=8
value = 2,4
channel=0


[State 0, PlaySnd]
type = PlaySnd
triggerall = (prevstateno != 9000||(animelemtime(1)>=0 &&animelemtime(8)<0))     && anim=3100
trigger1 =animelem=7
value = S3001,0

[State 3000, Super A]
type = SuperPause
triggerall = (prevstateno != 9000||(animelemtime(1)>=0 &&animelemtime(8)<0))     && anim=3100
trigger1 = animelem=7
poweradd = -1000
anim = -1
time = 45
p2defmul=1


[State 0, Explod]
type = Explod
triggerall = (prevstateno != 9000||(animelemtime(1)>=0 &&animelemtime(8)<0))   && anim=3100
trigger1 =animelem=6
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,1
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
supermovetime = 0
pausemovetime  = 0
removeongethit = 0
ignorehitpause =1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1     && anim=3100
id=8002
removeongethit = 1
[State 182, 2]
type = NotHitBy
triggerall =  anim=3100
trigger1 = Time = 7
value = SCA
time =4

[State 3000, Hyperbg]
type = Explod
triggerall =  anim=3100
trigger1 = animelem=7
anim = 6004
ID = 6001
pos = 14,-89
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
triggerall =  anim=3100
trigger1 = animelem=8
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 =0
ignorehitpause=1


[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =var(9)=1      && anim=3100
id=6001
removeongethit = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =numhelper(3001)>=1    && anim=3100
trigger2= time =[11,99]
flag = noBG
ignorehitpause=1
[State 0, AssertSpecial]
type = AssertSpecial
triggerall =  anim=3100
trigger1 = animelem=7
flag = noBG
ignorehitpause=1



[State 3000, helper]
type = Helper
triggerall =  anim=3100
trigger1 = animelem=7
pos = 0,-240
postype = back
id = 4000
name = "Hyperportrait"
stateno = 4000
ownpal = 1
size.xscale = 1
size.yscale = 1.25
supermovetime = 90
pausemovetime  = 90
[State 831, Shake]
type  = envshake
trigger1 = var(35)=1
freq  = 75
time  = 20
ampl  = 4
[State 0, PlaySnd]
type = PlaySnd
trigger1 = var(35)=1
value = S15,0
channel = 1

[State 0, VelSet]
type = VelSet
trigger1 =(animelem= 9||(vel x=0 &&animelemtime(10)>0)) &&anim=3100
x = 2
y = -15
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =(animelem= 9||(vel x=0 &&animelemtime(10)>0)) &&anim=3100
statetype = A        ;I,A,H
physics = N
;ignorehitpause =
;persistent =

[State 0, VelAdd]
type = VelAdd
;trigger1 = animelemtime(10)>=0  &&anim=3100
trigger1 = var(35)>9  &&(anim=[3101,3102])
trigger2 = var(35)=0  &&(anim=[3101,3102])
trigger3= anim=3103
y = .65

[State 0, VelSet]
type = VelSet
trigger1 =(animelemtime(1)= 1) &&(anim=[3101,3102])
x = ifelse(anim=3102,0,6)*var(36)
y = 7

[State 0, VelSet]
type = VelSet
trigger1 =(animelemtime(1)= 1) && anim=3103
x = -2
y = -10

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0
ignorehitpause=1
[State 0, VarSet]
type = Varset
trigger1 =time=1&& anim=3100
v = 35   ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 =time=1&& anim=3100
v = 36    ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 =command="holdback" && pos y <-330&& animelemtime(10)>=0&&anim=3100 &&!AIlevel
trigger2= p2bodydist x <-40  && pos y <-330&& animelemtime(10)>=0&&anim=3100 && AIlevel>0
v = 36    ;fv = 10
value = -1
;ignorehit
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILEvel=0
trigger1 =pos y <-355&& animelemtime(10)>=0&&anim=3100
value = ifelse(command="holddown",3102,3101)

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = AILEvel>0
trigger1 =pos y <-355&& animelemtime(10)>=0&&anim=3100
value = ifelse((p2bodydist x =[-40,40]),3102,3101)

[State 0, VarSet]
type = Varadd
trigger1 = pos y>=-25&& (anim=[3101,3102])
v = 35   ;fv = 10
value = 1
ignorehitpause =1
;persistent =
[State 0, PosSet]
type = PosSet
trigger1 =var(35)=[1,9]
y = -25
;ignorehitpause =
;persistent =
[State 0, VelSet]
type = VelSet
trigger1 =var(35)=[1,9]
x = -0
y = -0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =var(35)>=10&& animelemtime(10)>=0&&(anim=[3101,3102])
value = 3103


[State 0, Turn]
type = Turn
trigger1 = var(36)=-1 && anim=3101 && animelemtime(1)=1
;ignorehitpause =
;persistent =

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=3103
statetype = A        ;I,A,H
movetype = I
[State 1055, 5]
type = HitDef
triggerall =anim=3100
trigger1 = p2stateno!=3101 && animelemtime(10)<=0
attr = A, HA
animtype  = Med
damage =50,12
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = -25,-67
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = 3,-8
guard.velocity = -7
guard.ctrltime = 12
air.velocity =  -1, -14
airguard.velocity = -4,-4.5
givepower = 0
getpower = 0
fall=1
fall.recover=0
air.hittime=99
id=3100
nochainid=3100
yaccel=.75
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
[State 1055, 5]
type = HitDef
triggerall =anim=3100
trigger1 = p2stateno!=3101 && animelemtime(10)>0 && !movecontact
attr = A, HA
animtype  = Med
damage =50,12
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = -25,-67
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = 3,-8
guard.velocity = -7
guard.ctrltime = 12
air.velocity =  -1, -14
airguard.velocity = -4,-4.5
givepower = 0
getpower = 0
fall=1
fall.recover=0
air.hittime=99
id=3100
yaccel=.75
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 1055, 5]
type = HitDef
triggerall =anim=[3101,3102]
triggerall = var(35)=0
trigger1 = time%2=0
attr = A, HA
animtype  = Med
damage = 28,12
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = -25,-67
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -4,0
guard.velocity = -7
guard.ctrltime = 12
air.velocity =  -4, 4
airguard.velocity = -4,-2
givepower = 0
air.fall=1
fall.recover=0
getpower = 0
air.hittime=99
yaccel=.75
id=3102
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 1055, 5]
type = HitDef
triggerall =anim=[3101,3102]
trigger1 = var(35)=1
attr = A, HA
animtype  = Med
damage = 248,54
priority  = 4
hitflag=MAFD
guardflag = MA
pausetime = 8,8
sparkxy = -25,-67
sparkno = S7005+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -4,-12
guard.velocity = -7
guard.ctrltime = 12
air.velocity =  -4, -12
airguard.velocity = -4,-4.5
givepower = 0
getpower = 0
fall=1
fall.recover=0
air.hittime=99
chainid=3102
id=3101
nochainid=3101
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
yaccel=.75


[State 3000, Hyperbg]
type = Explod
triggerall =  anim!=3100&&anim!=3103
trigger1 =animelem=1
anim = ifelse(anim=3102,3105,3104)
ID = 3104
pos = 0, ifelse(anim=3101,-8,-6)
postype = p1
facing = var(36)
vfacing = 1
bindtime = -1
removetime=-1
vel = 0,0
accel = 0,0
random = 0,0
supermovetime = 90
pausemovetime  = 90
scale = 1.1,.9
sprpriority =1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit =0
ignorehitpause=1


[State 0, ModifyExplod]
type = ModifyExplod
triggerall = var(35)=0
trigger1 =var(9)=1      && anim=3101
id=3104
removeongethit = 1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =(var(35)=[1,9])      && anim=3101
bindtime=0
id=3104
removeongethit = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =var(35)>=10
id = 3104
;ignorehitpause =
;persistent =

;ignorehitpause =
;persistent =


[State 3000, Hyperbg]
type = Explod
triggerall = anim!= 3103
triggerall = anim!= 3100
triggerall =  numexplod(3105)=0
trigger1 =(var(35)>=9)
anim =ifelse(anim=3102,3107,3106)
ID = 3105
pos = 0,0
postype = p1
facing = var(36)
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
supermovetime = 90
pausemovetime  = 90
scale = 1.1,.9
sprpriority =1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit =0
ignorehitpause=1
[State 0, TargetState]
type = TargetState
trigger1 =movehit && anim=3100 && p2stateno!=3101
value =3101
ID =3100
;ignorehitpause =
persistent = 1



[State 0, ChangeAnim]
type = Changestate
trigger1 =pos y >=0 && anim=3103 && animelemtime(4)>=0
value = 52
ctrl=1

;---------------------------------------------------------------------------
[Statedef 3101]
type    = A
movetype=H
physics = N
velset =-5,-9
poweradd = 40
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time=0
value = 1200
;elem = 1
;ignorehitpause =
;persistent =

[State 0, NotHitBy]
type = HitBy
trigger1 =1
value = SCA,HA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =


;ignorehitpause =
;persistent =



[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .77
;ignorehitpause =
;persistent =


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

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

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5101)
trigger1 = pos y>=0 && (anim=1200) && time>3
value = 5101
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5101)
trigger1 = pos y>=0 &&(anim=1200) && 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=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)=45 && anim=612
value =ifelse(alive,5120,5110)
ctrl=1

;---------------------------------------------------------------------------
[Statedef 9000]
type = U
movetype = H
physics = U
[State 0, VarSet]
type = VarSet
trigger1 =time=0
v = 9   ;fv = 10
value = 1
;ignorehitpause =
;persistent =

[State 9000, PalFX]
type = PalFX
trigger1 = Alive
trigger1 = !Time
trigger2 = Time = 1
trigger3 = Time = 5
trigger4 = Time = 9
trigger5 = Time = 13
time = 2
add = 240,50,0
mul = 250,224,120
color = 128
ignorehitpause = 1

[State 0, AssertSpecial]
type = AssertSpecial
triggerall = prevstateno = 3000
trigger1 =1
flag = noBG
flag2=noFG
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1 =time=0
fv = 10   ;fv = 10
value = vel x

[State 0, VarSet]
type = VarSet
trigger1 =time=0
fv = 11   ;fv = 10
value = vel y
;ignorehitpause =
;persistent =
[State 9000, CtrlSet]
type = CtrlSet
triggerall = prevstateno!=20
trigger1 = (floor(gethitvar(hittime) * 0.8)<time ) || !alive
value = 1



[State 9000, ChangeAnim]
type = ChangeAnim
trigger1 =1
value = Anim
elem  = var(33)

[State 0, VelAdd]
type = VelAdd
triggerall = vel x=0
trigger1 =(floor(gethitvar(hittime) * 0.5)<time ) || !alive
x = ifelse(statetype=A,0,fvar(5))
persistent=0

[State 0, VelSet]
type = posadd
triggerall = alive
triggerall =floor(gethitvar(hittime) * 0.5)<time
trigger1=time%3=0
x = 9
[State 0, VelSet]
type = posadd
triggerall = alive
triggerall =floor(gethitvar(hittime) * 0.5)<time
trigger1=time%2=0
x =-9
[State 0, VelSet]
type = VelSet
triggerall = alive
trigger1 = time=0
x = 0
y=0
[State 0, VelSet]
type = VelSet
triggerall = alive
trigger1 = statetype=A
trigger2= prevstateno=100
x = 0
y=0
;ignorehitpause =
;persistent =
[State 0, VarSet]
type = VarSet
trigger1 = time=0
fv = 5    ;fv = 10
value = hitvel x*.75
;ignorehitpause =
;persistent =

;ignorehitpause =
;persistent =


;ignorehitpause =
;persistent =

[State 9000, End]
type = ChangeState
trigger1 = !Alive
value = ifelse(statetype=A,5020,5000)
ctrl=0
[State 0, VelSet]
type = VelSet
triggerall = Alive
triggerall = fvar(10)!=0
trigger1 = Time >= floor(gethitvar(hittime) * 0.8)
x = fvar(10)
[State 0, NotHitBy]
type = NotHitBy
trigger1 =time=0
value = SCA
;value2 = S,NA
time = 4
[State 0, VelSet]
type = VelSet
triggerall = Alive
triggerall = fvar(11)!=0
trigger1 = Time >= floor(gethitvar(hittime) * 0.8)
y = fvar(11)
[State 0, ChangeState]
type = ChangeState
triggerall = Alive
trigger1 = Time >= floor(gethitvar(hittime) * 0.8)
trigger1 = pos y >0 && stateno=[1050,1051]
value =52
[State 9000, End]
type = ChangeState
triggerall = Alive
trigger1 = Time >= floor(gethitvar(hittime) * 0.8)
value = var(46)




;ignorehitpause =
;persistent =

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

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]
[State 0, PosSet]
type = PosSet
trigger1 = prevstateno=100 && statetype!=A 
y = 0
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1 =p2statetype!=A
v = 20   ;fv = 10
value = 0
[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, RemoveExplod]
type = RemoveExplod
trigger1 =statetype!=A 
id = 56
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = numhelper(6000)
flag = nokoslow
[State 0, VarSet]
type = VarSet
trigger1 =  p2stateno=411
v = 24   ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H
v =24  ;fv = 10
value = 0
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=9000 && stateno!=[1050,1051]
id = 8003
;ignorehitpause =
;persistent =
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =stateno!=3100 &&stateno!=9000
id = 3104
;ignorehitpause =
;persistent =
[State 0, VarSet]
type = VarSet
trigger1 =p2movetype!=H
v = 1  ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State 0, PlaySnd]
type = PlaySnd
triggerall = enemynear,anim!=5160
triggerall = enemynear,movetype=H
trigger1 =enemynear,pos y>=0 && enemynear,anim=1205 && enemynear,time>3
trigger2 = enemynear,stateno=1030 && enemynear,time=1
trigger3 =enemynear,pos y>=0 && enemynear,anim=841 && enemynear,time>3
trigger4 =enemynear,pos y>=0 && enemynear,anim=1120 && enemynear,time>3
trigger5 =enemynear,pos y>=0 && enemynear,anim=1121 && enemynear,time>3
value = S15,0
[State 0, Explod]
type = Explod
triggerall = enemynear,anim!=5160
triggerall = enemynear,movetype=H
trigger1 =enemynear,pos y>=0 && enemynear,anim=1205 && enemynear,time>3
trigger2 = enemynear,stateno=1030 && enemynear,time=1
trigger3 =enemynear,pos y>=0 && enemynear,anim=841 && enemynear,time>3
trigger4 =enemynear,pos y>=0 && enemynear,anim=1120 && enemynear,time>3
trigger5 =enemynear,pos y>=0 && enemynear,anim=1121 && enemynear,time>3
anim =6006
ID =8002
pos = 0,-20
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 = var(41)=1
triggerall =var(40)<10
triggerall = enemy,backedgebodydist >10||var(40)<3
trigger1 =  (gametime%9=0)
helpertype = normal ;player
name ="Hadouken"
ID = 3001
stateno = 3001
pos = ceil(85+fvar(6)),0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.yscale= 1
size.xscale= .833333333333333333333333333333
 
[State 0, VarSet]
type = Varadd
triggerall = var(41)=1
trigger1 = (time%8=0)
fv = 6   ;fv = 10
value = 55
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 =var(40)=10
v = 41   ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State 0, VarSet]
type =Varadd
triggerall = var(41)=1
trigger1 =(gametime%9=0)
v = 40    ;fv = 10
value = 1



persistent = 1

[State 0, VarSet]
type = Varset
trigger1 = stateno !=3000
trigger1= stateno!=9000
v = 16   ;fv = 10
value = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =stateno !=215
id =221


[State 0, VarSet]
type = VarSet
trigger1 = stateno != [1050,3801]
trigger1= stateno!=9000
v = 8   ;fv = 10
value = 0





[State 0, VarSet]
type = VarSet
trigger1 = numhelper(1002) >= 1
v = 2    ;fv = 10
value = 0
;ignorehitpause =
;persistent =
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno !=410
id =  7011
;ignorehitpause =
;persistent =

;[State 0, RemoveExplod]
;type = RemoveExplod
;trigger1 = stateno !=100
;id =  6003
;ignorehitpause =
;persistent =



[State -2, Helper]
type = Helper
trigger1 = winko && (stateno = 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


[State -2, Helper]
type = Helper
trigger1 = winko && stateno = [4004,4007]
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
[State 0, VarSet]
type = VarSet
trigger1 = authorname= "Kamekaze" && p1name = "MvC2 Hulk By Kamekaze"
v = 50    ;fv = 10
value = 1
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 =  1
text = "var2 = %d y= %d  pos x = %d "
params = var(19),var(31),floor(gethitvar(hittime) * 0.8)

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

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = var(20)=1
time = 1
value = 1.16
ignorehitpause = 1
persistent = 1

[State 0, VarSet]
type = VarSet
triggerall = enemy,movetype = H  ||var(20)=1
trigger1 =(stateno !=[3000,4007]) ||var(20)=1
fv =2 ;fv = 10
value = ifelse(fvar(2)>.1,1-((enemy,gethitvar(hitcount)) * .033),.09)

[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
trigger1 =p2movetype!=H
v =20 ;fv = 10
value = 0
ignorehitpause=1


[State 0, VarSet]
type = VarSet
triggerall = stateno !=[1050,1099]
trigger1 = statetype = A
v =6    ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
triggerall = stateno !=[1050,1099]
trigger1 =statetype != A
v = 6    ;fv = 10
value = 0


[State 0, VarSet]
type = VarSet
triggerall = (movehit ||p2movetype=H) && (!var(24))
triggerall=p2movetype =H  && (p2stateno != [120,199])
trigger1 = 1
v = 12  ;fv = 10
value = enemy,gethitvar(hitcount)
ignorehitpause=1

[State 0, VarSet]
type = VarSet
triggerall = movehit
trigger1 = (var(24))
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
trigger6 = p2statetype=L  || p2stateno=5120
trigger5 = (p2stateno=[5090,5119]) &&(p2stateno=[5121,5899])
trigger1 = (p2bodydist x = [0,40])||(p2bodydist x >110)
trigger2= enemynear,hitdefattr = SA,NA,SA,HA
trigger3 = statetype= A
trigger4 = (p2movetype=A && p2bodydist x <70)
trigger8= p2bodydist x <60 && p2statetype!=L
v=30
value = 0

[State 0, VarSet]
type = VarSet
triggerall = p2statetype !=L
triggerall = (p2stateno!=[5090,5119]) &&(p2stateno!=[5121,5899])
triggerall = statetype != A
triggerall = p2bodydist x >70 || p2movetype=H
trigger1 = ctrl && p2movetype=A && p2statetype=C  && random<119
trigger2 =p2statetype = C && (p2bodydist x = [50,120]) && ctrl && random<119
trigger3= enemy,hitdefattr=SC,AT  && ctrl
trigger4= p2bodydist x >80 && ctrl&& random<249 && p2movetype=A
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 = movehit
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,movehit
v = 11  ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 = numhelper(3001) < 1
v = 32  ;fv = 10
value = 0
[State 0, VarSet]
type = VarSet
trigger1 = (numhelper(3001) < 1 && anim =1002) || stateno !=3000
v = 5  ;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 -2, PalFX]
type = PalFX
triggerall = var(20) = 1
trigger1 =time%8 = 0
time = 4
add = 164,0,0
mul = 266,256,256
invertall = 0
color = 256
ignorehitpause = 1


[State 0, Helper]
type = Helper
triggerall=(p2stateno!=[120,155])
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 0, VarSet]
type = VarSet
trigger1 =  var(48)=1 
v = 47    ;fv = 10
value = 0
ignorehitpause =1 
[State 0, VarSet]
type = VarSet
trigger1 =var(47)>0 && command!="holddown" &&var(19)=0 &&AILevel=0
trigger2=var(47)>0 &&(statetype=S&&movetype=I&&ctrl||(vel x >0&&statetype!=A&&movetype!=A)||stateno=[800,899])&&AILEvel>0&&var(48)=0  
v = 48    ;fv = 10
value =7
ignorehitpause =1 
[State 0, VarSet]
type = Varadd
;triggerall = var(17)=0
trigger1 = command="holddown"&&AILevel=0 && stateno!=[800,899] 
trigger2 = (statetype=C||statetype=A||(movetype=A)||statetype=L||stateno=105)&&AILevel>0&&stateno!=[800,899] 
v =47    ;fv = 10
value = 1
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = var(47)>0 && command="holddown"&&AILevel=0
trigger2 =var(47)>0 &&(statetype=C||statetype=A||(movetype=A)||statetype=L)&&AILevel>0&&stateno!=[800,899] 
v = 48    ;fv = 10
value = 0
[State 0, VarSet]
type = Varadd
trigger1 =var(48)>0 && command!="holddown" &&AILevel=0
trigger2 =var(48)>0 &&(statetype=S&&movetype=I&&ctrl||(vel x >0&&statetype!=A&&movetype!=A)||stateno=[800,899])&&AILEvel>0&&AILEvel>0 
v =48    ;fv = 10
value = -1

[State 0, VarSet]
type = VarSet
trigger1 =  var(52)=1 
v = 51    ;fv = 10
value = 0
ignorehitpause =1 
[State 0, VarSet]
type = VarSet
trigger1 =var(51)>0 && command!="holddown" &&var(19)=0 &&AILevel=0
trigger2=var(51)>0 &&(statetype=S&&movetype=I&&ctrl||(vel x >0&&statetype!=A&&movetype!=A)||stateno=[800,899])&&AILEvel>0&&var(48)=0  
v = 52    ;fv = 10
value =7
ignorehitpause =1 
[State 0, VarSet]
type = Varadd
;triggerall = var(17)=0
trigger1 = command="holdback"&&AILevel=0 && stateno!=[800,899] 
trigger2 = (statetype=C||statetype=A||(movetype=A)||statetype=L||stateno=105)&&AILevel>0&&stateno!=[800,899] 
v =51    ;fv = 10
value = 1
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = var(51)>0 && command="holdback"&&AILevel=0
trigger2 =var(51)>0 &&(statetype=C||statetype=A||(movetype=A)||statetype=L)&&AILevel>0&&stateno!=[800,899] 
v = 52    ;fv = 10
value = 0
[State 0, VarSet]
type = Varadd
trigger1 =var(52)>0 && command!="holdback" &&AILevel=0
trigger2 =var(52)>0 &&(statetype=S&&movetype=I&&ctrl||(vel x >0&&statetype!=A&&movetype!=A)||stateno=[800,899])&&AILEvel>0&&AILEvel>0 
v =52   ;fv = 10
value = -1
[State 0, VarSet]
type = VarSet
trigger1 = p2movetype !=H
v = 15  ;fv = 10
value = 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, Landing Dust]
type = Explod
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 1052 ;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 0, VarSet]
type = VarSet
trigger1 =stateno != 3000
trigger1= stateno!=9000
v = 21 ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 =stateno != [1100,1109]
trigger1=stateno!=9000
v = 23;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 =stateno != [1000,1005]
trigger1=stateno!=9000
v = 22;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 = stateno!=9000 && gametime%80=0 && movetype!=H
v = 9    ;fv = 10
value = 0
;ignorehitpause =
;persistent =
[State -2]
type = VarSet
trigger1 = Life > 1
trigger1 = StateNo != 9000
var(46) = StateNo
ignorehitpause = 1


[State 0, VarSet]
type = VarSet
trigger1 =movetype !=H ||stateno=9000
v = 33    ;fv = 10
value = animelemno(0)
ignorehitpause = 1
[State -3]
type = HitOverride
trigger1 =var(9)=0
triggerall = MoveType != H
triggerall = Anim != 5300
triggerall= statetype!=A
triggerall = StateNo != [120,159]
triggerall = gethitvar(animtype)<3
;trigger1 = PrevStateNo != 9000
time = 1
slot = 7
attr = SCA, NA, NP, SP
stateno = 9000

[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)
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)
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 )
trigger1 = (stateno != 3050 )
trigger1 = (stateno != 3100 )
trigger1 = stateno !=9000 && time >= 0
trigger2 = Winko
trigger3= movetype=H&&stateno!=9000
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 = !numhelper(4001)
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

