; MvC2 Ryu By Kamekaze
;-----------------------------------------------------------------------------
;---------------------- Integer variable list ----------------------

; var(0):= -3
; var(1):= -1
; var(2):= -2, 1001, 1006, 1008
; var(3):= 1001, 1006, 1008
; var(4):= -2
; var(5):= -2, 3002
; var(6):= -2
; var(7):= -2
; var(8):= 1050, 1060, 3800, -2
; var(9):= -2
;var(10):= -2, 56, 1001, 1006
;var(11):= -2
;var(12):= 840, -2, 57, 3001
;var(13):= 3011
;var(14):= -2
;var(15):= -3, 1001, 1006, 1008
;var(17):= 4005
;var(18):= -2, 1006
;var(19):= 3001
;var(20):= -2
;var(23):= -2
;var(29):= 610, 640, 1000, 1004, 1005, 1100, 1101, 1102, 101
;var(30):= -2
;var(31):= 610, 640, 1000, 1004, 1005, 1100, 1101, 1102, 101
;var(32):= -2, 3001
;var(50):= -2
;var(57):= 10000
;var(58):= 190, 4001, 190, 5900

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

; fvar(2):= -2


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

[Size]
xscale = .83
yscale = 1
ground.back = 15
ground.front = 18
air.back = 12
air.front = 12
height = 86
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = -5, -86
mid.pos = -5, -56
shadowoffset = 0
draw.offset = 0,2

[Velocity]
walk.fwd  = 2.4
walk.back = -2.35
run.fwd  = 18, 0
run.back = -18,0
jump.neu = 0,-9.85
jump.back = -2.55
jump.fwd = 2.5
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 = "Forget about a rematch. Practice more instead."
victory2 = "I thought I would find a good challenge here..."
victory3 = "So many I have fought... What was your name again?"
victory4 = "The world is waiting. I must leave you now."
victory5 = "Who was your instructor? Next time, listen to him."
victory6 = "You must defeat my Aerial Rave to stand a chance."
victory7 = "You need to learn the way of the World Warrior."
victory8 = "I will find a better challenge somewhere else!"
victory9 = "Look into your soul in order to find the way."
victory10= "Never stop improving yourself!"
victory11= "Strive to be the best you can be!"
victory12 = "To live is to fight, to fight is to live!"
victory13 = "Unless you believe in yourself, you cannot win!"
victory14= "We all have potential. Few will ever realize it."
victory15 = "With discipline comes the rewards you seek."
victory16= "Don't be so reckless! You must focus on the fight!"
victory17= "Fight your absolute best, or don't fight at all!"
victory18 = "I hope you have learned well from our battle!"
victory19 = "Not bad... Don't restrain yourself next time!"
victory20= "Power, determination, and skill decide the victory."
victory21= "Train yourself well, then challenge me again!"
victory22= "You have great potential! Continue your training!"
victory23 = "You must believe that you can win, in order to win!"

;---------------------------------------------------------------------------
; 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
triggerall =var(58) <7
trigger1 = random >= 499
value = 181

[State 180, 1]
type = ChangeState
triggerall =var(58) <7
trigger1 =random < 499
value = 183


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


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

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


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

;---------------------------------------------------------------------------
[Statedef 183]
type = S
ctrl = 0
anim = 182
velset = 0,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 0, VarSet]
type = VarSet
trigger1 = var(58)=0
v = 58    ;fv = 10
value = palno
[State 180, 1]
type = ChangeState
triggerall =var(58) = [7,12]
trigger1 = random <499
value = 192
[State 180, 1]
type = ChangeState
triggerall= var(58) = [7,12]
trigger1 = random >=499
value = 193

[State 180, 1]
type = ChangeState
trigger1 = var(58) <7
value = 191

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

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


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


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

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

[State 200, 1]
type = PlaySnd
trigger1 = time = 14
value = 40, 1
channel = 1

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


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



[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 = 60
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
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

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

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


[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 38
value = 75

[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
anim = 200
poweradd = 14
sprpriority = 2

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 28;,3
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 = 5
ground.hittime  = 9
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
id=200

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

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 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

anim = 205
sprpriority = 2

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 49;,8
guardflag = MA
pausetime = 10,8
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -5,-90
hitsound   = S1,4
guardsound = S3,1
ground.type = High
ground.slidetime = 9
ground.hittime  = 14
ground.velocity = -3.5
air.velocity = -2.5,-4
id=200
[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
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

anim = 210
sprpriority = 2

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2


[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 2, ifelse(var(58)<7,1,11)

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 2, ifelse(var(58)<7,1,11)


[State 210, 2]
type = HitDef
trigger1 = AnimElem = 2&& !movecontact
attr = S, NA
animtype  = heavy
damage    =90;,12
guardflag = MA
pausetime = 8,8
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-75
hitsound   = S1,2
guardsound = S3,1
guard.ctrltime = 10
ground.type = High
ground.slidetime = 12
ground.hittime  = 18
ground.velocity = -8
air.velocity = -2.5,-4
id=200
[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 211]
type    = A
movetype= H
physics = N
juggle  =0; 0
poweradd= 59
ctrl = 0
sprpriority = 2
facep2=1

[State 0, VelSet]
type = VelSet
triggerall = time=0
trigger1 = enemy,stateno!=[1100,1101]
x = -10
y = 6
;ignorehitpause = 
;persistent = 

[State 0, VelAdd]
type = VelAdd
trigger1 =anim=5200||enemy,stateno!=[1100,1101]
y = .69


[State 5030, 2]
type = HitVelSet
triggerall = time=0
trigger1 = enemy,stateno=[1100,1101]
x = 1
y = 1
[State 0, VelAdd]
type = VelAdd
triggerall = anim!=5200
trigger1 =  enemy,stateno=[1100,1101]
y = gethitvar(yaccel)

[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>=5 && 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

;ignorehitpause = 
;persistent = 

[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 215]
type    = S
movetype= A
physics = S
juggle  =0; 8
poweradd= 56
ctrl = 0

anim = 215
sprpriority = 2

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 2
[State 210, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 2, 19
channel=0

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(5)> 0 && animelemtime(8) <0
x = 2

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

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



[State 210, 2]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
animtype  = Medium
damage    =42;,12
guardflag = HMA
pausetime = 8,8
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-65
guard.ctrltime = 10
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 13
ground.velocity = -6.7
air.velocity = -2.5,-4
id=200

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

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 6
attr = S, NA
animtype  = Medium
damage    =42;,12
guardflag = MA
pausetime = 8,8
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-55
hitsound   = S1,2
guardsound = S3,1
guard.ctrltime = 10
ground.type = High
ground.slidetime = 15
ground.hittime  = 13
ground.velocity = -6.7
air.velocity = -2.5,-4
id=200

[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0
[State 210, 5]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  =0; 8
poweradd= 14
ctrl = 0

anim = 230
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 0

[State 230, 2]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
animtype  = Medium
damage    = 28;,6
guardflag = MA
pausetime = 10,10
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-48
hitsound   = S1,0
guardsound = S3,1
ground.type = Low
ground.slidetime =11
ground.hittime  = 11
ground.velocity = -3.4
air.velocity = -2.5,-3.5
air.hittime=11
forcenofall=1
id=200
[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
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

anim = 235
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1



[State 240, 2]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
animtype  = Medium
damage    = 49;,7
guardflag = MA
pausetime = 10,7
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -12,-110
hitsound   = S1,1
guardsound = S3,1
ground.type = high
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -6.2
air.velocity = -2.2,-3.2
air.hittime=14
forcenofall=1
id=200
[State 240, 2]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
animtype  = Medium
damage    = 21;,7
guardflag = MA
pausetime = 10,10
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -15,-76
hitsound   = S1,1
guardsound = S3,1
ground.type = high
ground.slidetime = 12
ground.hittime  = 14
ground.velocity = -6.5
air.velocity = -2.2,-3.2
air.hittime=14
forcenofall=1
id=200
[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
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

anim = 240
sprpriority = 2


[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = 2, ifelse(var(58)<7,0,15)


[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 2, ifelse(var(58)<7,0,15)


[State 230, 2]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
animtype  = heavy
damage    = 90;,3
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 = 20
ground.hittime  = 20
ground.velocity = -6
air.velocity = -2.5,-3.5
air.hittime=20
forcenofall=1
id=200
[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 

[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 245]
type    = A
movetype= A
physics = N
juggle  =0; 8
poweradd= 56
ctrl = 0

anim = 645
sprpriority = 2

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 5
value = 0, 2
[State 210, 1]
type = PlaySnd
trigger1 = animelem = 5
value = 2, 19
channel=0

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

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


[State 210, 2]
type = HitDef
trigger1 = AnimElem = 6
attr = S, NA
animtype  = heavy
damage    =90;,12
guardflag = MA
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-60
hitsound   = S1,2
guardsound = S3,1
guard.ctrltime = 10
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -6.7
air.velocity = -2.5,-4
air.hittime=16
forcenofall=1
id=200
[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 



[State 210, 5]
type = ChangeState
trigger1 = pos y > 0 ;&& vel y < -1
value =52
ctrl = 1
;---------------------------------------------------------------------------
;Crouching light punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  =0; 5
poweradd= 12
ctrl = 0
anim = 400
sprpriority = 2

[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 400, 2]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage    = 28;,3
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = MA
pausetime = 8,8
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-58
hitsound   = S1,0
guardsound = S3,1
ground.type = Low
ground.slidetime = 4
ground.hittime  = 10
ground.velocity = -2
air.velocity = -1.5,-3
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
air.hittime=15
forcenofall=1
id=200
[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
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
anim = 405
sprpriority = 2

[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1

[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0
[State 400, 2]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
damage    = 49;,9
priority  = 3
animtype  = medium
hitflag = MAF
guardflag = MA
pausetime = 10,10
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-57
hitsound   = S1,4
guardsound = S3,1
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5.7
air.velocity = -1.5,-3
air.hittime=15
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
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
anim = 410
sprpriority = 2

[State 410, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 2

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 2, ifelse(var(58)<7,0,15)

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 2, ifelse(var(58)<7,0,15)



[State 0, Helper]
type = Helper
trigger1 = movehit
helpertype = normal ;player
name = "launch"
ID = 7011
stateno =7011
pos = 40,-76
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 = var(9)=0
trigger1 = AnimElem = 2 && !movecontact
attr = S, NA
damage    = 90;,15
animtype  = up
hitflag = MAF
guardflag = M
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-77
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 30
guard.ctrltime = 10
ground.hittime  = 30
ground.velocity = -1,-18
air.velocity = -2,-16.5
fall.recovertime = 35
yaccel=.55
id=410

[State 410, 3]
type = HitDef
triggerall = var(9)=0
trigger1 = AnimElem = 3 && !movecontact
attr = S, NA
damage    = 90;,15
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 = 30
ground.hittime  = 30
guard.ctrltime = 10
ground.velocity = -1,-18
air.velocity = -2,-16.5
fall.recovertime = 35
yaccel=.55
id=410

[State 0, TargetState]
type = TargetState
trigger1 =movehit&&enemy,stateno!=411
value = 411
ID = 410
ignorehitpause =0
;persistent =
[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 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; 8
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
anim = 430
sprpriority = 2

[State 430, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0
[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0
[State 430, 2]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage    = 28;,6
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  = 10
ground.velocity = -2
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

[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
anim = 435
sprpriority = 2

[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0
[State 430, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1

[State 430, 2]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage    = 49;,8
animtype  = medium
hitflag = MAFD
guardflag = L
pausetime = 10,10
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-6
hitsound   = S1,1
guardsound = S3,1
ground.type = Low
ground.slidetime = 16
ground.hittime  = 16
ground.velocity = -3.5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

[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
anim = 440
sprpriority = 2
[State 210, 1]
type = PlaySnd
trigger1 = Time = 0
value = 2, ifelse(var(58)<7,0,15)

[State 210, 1]
type = PlaySnd
trigger1 = Time = 0
value = 2, ifelse(var(58)<7,0,15)


[State 440, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2

[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0

[State 440, 3]
type = HitDef
triggerall = var(9)=0
trigger1 = animelem = 2
attr = C, NA
damage    = 90;,12
hitflag = MAFD
guardflag = L
pausetime = 14,14
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-12
hitsound   = S1,2
guardsound = S3,1
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -.4,-3.25
air.velocity = -1.2,-4
guard.velocity = -5
fall = 1
id=440
[State 440, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 441]
type    = A
movetype=H
physics = N
velset =0,-2.3
poweradd = 40
anim=5070


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


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

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

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

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

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


[State 600, 2]
type = HitDef
trigger1 = animelem = 2
attr = A, NA
damage    = 28;,10
guardflag = HA
priority = 3
pausetime = 8,8
animtype=medium
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-58
hitsound   = S1,0
guardsound = S3,1
ground.type = High
ground.slidetime =6
ground.hittime = 12
air.hittime = 9
ground.velocity = -4
air.velocity = -.2,-8
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
;---------------------------------------------------------------------------
;Jump Light Punch
; CNS difficulty: easy
[Statedef 605]
type    = A
movetype= A
physics = N
juggle  =0; 1
poweradd= 29
ctrl = 0
anim = 605
sprpriority = 2
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A 

[State 600, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1



 [State 600, 2]
type = HitDef
trigger1 = animelem = 3
attr = A, NA
damage    = 28;,10
guardflag = HA
priority = 3
pausetime = 9,9
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-53
hitsound   = S1,4
guardsound = S3,1
animtype=medium
ground.type = High
ground.slidetime = 9
ground.hittime = 15
air.hittime = 28
guard.ctrltime = 15
ground.velocity = -4
air.velocity =-.2,-5.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, 2]
type = HitDef
trigger1= animelem = 5
attr = A, NA
damage    = 14;,10
guardflag = HA
animtype=medium
priority = 3
pausetime = 10,10
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-83
hitsound   = S1,4
guardsound = S3,1
ground.type = High
ground.slidetime = 9
ground.hittime = 15
air.hittime = 28
guard.ctrltime = 15
ground.velocity = -4
air.velocity =-.2,-6.5
yaccel=.8
forcenofall=1
id=200
[State 600, 3]
type = changestate
trigger1 = Time = 20
value = 57
ctrl=1
;---------------------------------------------------------------------------
;Jump Strong Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = N
juggle  =0; 2
poweradd= 58
ctrl = 0
anim = 610
sprpriority = 2
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A 

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2




[State 640, 3]
type = HitDef
triggerall = var(23)
trigger1 = animelem = 3
attr = A, NA
damage    = 90;,3
guardflag = HA
priority = 4
pausetime = 16,16
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-67
hitsound   = S1,2
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -15,14
yaccel = .7
fall  =1
fall.recover = 0
id=640

[State 640, 3]
type = HitDef
triggerall = !var(23)
trigger1 = animelem = 3
attr = A, NA
damage    = 90;,8
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 = 10
ground.hittime  = 13
ground.velocity = -5
air.velocity = -3,14
id=641
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = frontedgebodydist >50
trigger1 = movehit &&p2statetype=A  && (prevstateno= [600,635])  && var(23)
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(23)
 triggerall =prevstateno= [600,635]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = pos y < -190 && enemy,pos y >-10 &&movehit
v = 29    ;fv = 10
value = 1

[State 0, VelSet]
type = VelSet
triggerall =  var(23)
 triggerall =prevstateno= [600,635]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = movehit  &&  pos y < -190
x = 0
y = 0
[State 600, 3]
type = changestate
triggerall = var(29)=0
trigger1 = animtime=0
value = 57
ctrl=1

;---------------------------------------------------------------------------
; 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, 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
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
statetype = L      ;S,A,C,L

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5100)
trigger1 = pos y>=0 && anim=5160 && animelemtime(1)>10
value = 5100
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5100)
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=5100 && animtime=0
value = 612

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

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

[State 0, SelfState]
type = SelfState
trigger1 =animelemtime(1)=31 && 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
anim = 630
sprpriority = 2
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A 
[State 630, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0


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

[State 0, 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
;---------------------------------------------------------------------------
;Jump Strong Kick
; CNS difficulty: easy
[Statedef 635]
type    = A
movetype= A
physics = N
juggle  =0; 1
poweradd= 29
ctrl = 0
anim = ifelse(command="holdup",635,636)
sprpriority = 2
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A 
[State 640, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 640, 3]
type = HitDef
trigger1 = animelem = 3 && anim=635
trigger2 = animelem = 2 && anim=636
attr = A, NA
damage    = 49;,5
guardflag = HA
priority = 4
pausetime = 9,9
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-75
animtype=medium
hitsound   = S1,1
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime =8
ground.hittime = 12
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
;---------------------------------------------------------------------------
;Jump Strong Kick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = N
juggle  =0; 2
poweradd= 58
ctrl = 0
anim = ifelse(command="holdup",642,640)
sprpriority = 2
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A 
[State 640, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2

[State 640, 3]
type = HitDef
triggerall = var(23)
trigger1 = animelem = 3
attr = A, NA
damage    = 90;,9
guardflag = HA
priority = 4
pausetime = 16,16
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-48
hitsound   = S1,2
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -15,14
yaccel = .7
fall  =1
fall.recover = 0
id=640

[State 640, 3]
type = HitDef
triggerall = !var(23)
trigger1 = animelem =3
attr = A, NA
damage    = 90;,9
guardflag = HA
priority = 4
pausetime = 10,10
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-48
hitsound   = S1,2
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 10
ground.hittime  = 13
ground.velocity = -5
air.velocity = -3,14
id=641
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = frontedgebodydist >50
triggerall = anim!=641 && anim!=643
trigger1 = movehit &&p2statetype=A  && (prevstateno= [600,635])  && var(23)
value = ifelse(anim=642,643,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(23)
 triggerall =prevstateno= [600,635]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = pos y < -190 && enemy,pos y >-10 &&movehit
v = 29    ;fv = 10
value = 1


[State 0, VelSet]
type = VelSet
triggerall =  var(23)
 triggerall =prevstateno= [600,635]
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
trigger1 = movehit  &&  pos y < -190
x = 0
y = 0
[State 600, 3]
type = changestate
triggerall = var(29)=0
trigger1 = animtime=0
value = 57
ctrl=1
;---------------------------------------------------------------------------
[Statedef 702]
type    = C
movetype= I
physics = N
poweradd= 0
velset = 5,0
ctrl = 0
anim = 702
sprpriority = -1

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



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

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

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

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

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



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

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

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

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

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

[State 8300, ChangeState]
type = ChangeState
trigger1 = time = 35
value = 11
ctrl = 1
;-------------------------------------------------------------
[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, 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 = 21  ;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(21)=1
value =802
[State 200, 1]
type = PlaySnd
trigger1 = animelem =4
value = 2, ifelse(var(58) < 7,1,15)


[State 200, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 2, ifelse(var(58) < 7,1,15)



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


[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 35,0

[State 810, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 29,-86

[State 810, Bind 3]
type = TargetBind
trigger1 = AnimElem = 3
pos =2,-89
[State 810, Bind 3]
type = TargetBind
trigger1 = AnimElem = 4
pos = -40,-59


[State 810, Bind 3]
type = TargetBind
trigger1 = AnimElem = 5
pos = -37,0


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

[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 6
value = 821

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

[State 0, Explod]
type = Explod
trigger1 = animelem = 5
anim =6006
ID =8002
pos = -88,3
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
removeongethit = 1
ignorehitpause =1
[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
[State 0, SelfState]
type = SelfState
trigger1 = enemy,stateno !=810
value = 5050

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

[State 0, PosSet]
type = PosSet
trigger1 =enemy, animelem = 5
y = 0


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

;----------------------------------------------------------------------
[Statedef 821]
type = S
movetype = H
velset =0,0
poweradd = 40

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

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

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

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = time = 6
value = ifelse(Alive,5201,5150)
ctrl=0

;------------------
; 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 = 800

[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 = 1, Miss
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 = 640

;----------------------------------------------------------------------
[Statedef 840]
type = A
movetype= A
physics = N
anim = 840
poweradd = 60
[State 0, VarSet]
type = VarSet
trigger1 = random<33*AIlevel&&AIlevel>0&&time=0
v = 21   ;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(21)=1
value =802
;[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 = 2
value = 2,ifelse(var(58)<7,0,10)


[State 200, 1]
type = PlaySnd
trigger1 =animelem = 2
value = 2, ifelse(var(58)<7,0,10)


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

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


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

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

[State 4001, bind]
type=targetbind
trigger1=animelem=4
pos=-42,-27


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

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

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(3)<0 && pos y <-30

x = -.5
y = .45

[State 0, VelSet]
type = VelSet
trigger1 =pos y >-30
x = 0
y = 0

[State 0, VelSet]
type = Veladd
trigger1 = animelemtime(5)>0 && pos y <-30
y = .5


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

;persistent = 


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

;----------------------------------------------------------------------
[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 = 5,5
poweradd = 40

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

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

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



[State 821, 4] ;Hit ground
type = SelfState
trigger1 = time >25
value = 5040 ;Hit ground
;-------------------------------------------------------------
[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 = 240

;----------------------------------------------------------------------
[Statedef 861]
type = S
movetype= A
physics = N
anim = 830
poweradd = 60
[State 0, VarSet]
type = VarSet
trigger1 = random<33*AIlevel&&AIlevel>0&&time=0
v = 21   ;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(21)=1
value =802
[State 0, Width]
type = Width
trigger1 =animelemtime(3)>0&&animelemtime(7)<0
edge = 0,40
player = 0,0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 2, ifelse(var(58)<7,0,10)


[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 2,ifelse(var(58)<7,0,10)



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


[State 4001, bind]
type=targetbind
trigger1=animelem=1
pos=30,0


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

[State 4001, bind]
type=targetbind
trigger1=animelem=3
pos=-6,-59

[State 4001, bind]
type=targetbind
trigger1=animelem=4
pos=-63,-27

[State 0, PosAdd]
type = PosAdd
trigger1 =animelem=3 
x = -39
[State 0, PosAdd]
type = PosAdd
trigger1 =animelem=4
x = -22

[State 0, PosAdd]
type = PosAdd
trigger1 =animelem=5
x = 12

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

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

[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 = 1
movecamera=1,0

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


;----------------------------------------------------------------------
[Statedef 863]
type = A
movetype = H
physics = N
velset = 7,-9
poweradd = 40

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

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



;ignorehitpause = 
;persistent = 


[State 821, 4] ;Hit ground
type = SelfState
trigger1 = animtime=0;Vel Y > 0
;trigger1 = Pos Y >= 0
value = ifelse(alive,5040,5050) ;Hit ground
;---------------------------------------------------------------------------
[Statedef 1000]
type    =U
movetype= A
physics = S
juggle  =0; 4
poweradd= 13

anim = ifelse(var(4) = 0,1000,1004)
ctrl = 0
sprpriority = 1

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

;persistent =
[State 0, Width]
type = Width
trigger1 = animelemtime(2)=[0,8]
edge = 0,0
player = 45,0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4) = 1 
statetype = A       ;S,A,C,L
ignorehitpause = 1
persistent =1

[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)& var(4) = 1
x = 0
y = .435
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56) && var(4) = 1
physics = A 

;ignorehitpause =
;persistent =


[State 1000, 1]
type = PlaySnd
trigger1 = animelem =2 && (anim = 1000 || anim = 1004)
value = S0,4

[State 200, 1]
type = PlaySnd
trigger1 = time =7
value = 2, ifelse((var(58) = [7,12]),10,8)

[State 200, 1]
type = PlaySnd
trigger1 = time =7
value = 2, ifelse((var(58) = [7,12]),10,8)


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

[State 0, Helper]
type = Helper
triggerall = var(4) =0
triggerall = var(18) = 0
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos = 88,-53
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 = var(4) =1
triggerall = var(18) = 0
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos = 51,-68
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 = var(4) =0
triggerall = var(18) = 1
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1006
pos = 85,-58
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.yscale= 1
size.xscale= .833333333333333333333333333333


[State 1000, 7]
type = ChangeState
triggerall = var(4) = 0
trigger1 = AnimTime = 0 && anim = 1000
value = 0
ctrl = 1


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time =55 && statetype=A
value = 1005

[State 0, ScreenBound]
type = ScreenBound
trigger1 =  var(29)=1
value = 0
[State 600, 3]
type = changestate
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 = pos x <40&&facing=1|| pos x>-40&&facing=-1
triggerall=((prevstateno!=[600,640])&&var(15)=1)||var(15)=1
trigger1 = pos y < -250 && enemy,pos y >-10
v = 29    ;fv = 10
value = 1
[State 0, VelSet]
type = VelSet
trigger1 = movehit  &&  pos y < -260
x = 0
y = 0
[State 600, 3]
type = changestate
triggerall =  (pos y >= -240)|| (pos x >=40&&facing=1|| pos x<=-40&&facing=-1)||!var(15)
triggerall = var(4) = 1
trigger1 = AnimTime = 0 && anim = 1005
value = 57

;---------------------------------------------------------------------------
[Statedef 1004]
type    =U
movetype= A
physics = S
juggle  =0; 4
poweradd= 13

anim = ifelse(var(4) = 0,1002,1004)
ctrl = 0
sprpriority = 1
;fuck you 6 button mode people you're retarded
[State 0, ChangeState]
type = ChangeState
trigger1 =time=0 
value =1005
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 =  statetype=A
x = 0
y = 0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4) = 1
physics = N         ;A,C,S,N
ignorehitpause =1
persistent =1

[State 0, Width]
type = Width
trigger1 = animelemtime(2)=[0,8]
edge = 0,0
player = 45,0
[State 0, VelSet]
type = VelSet
trigger1 =var(4) = 1 && animelemtime(1) > 0
y = .45
;ignorehitpause =
;persistent =


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


[State 200, 1]
type = PlaySnd
trigger1 = time =7
value = 2, ifelse((var(58) = [7,12]),10,8)


[State 200, 1]
type = PlaySnd
trigger1 = time =7
value = 2, ifelse((var(58) = [7,12]),10,8)


[State 0, Explod]
type = Explod
triggerall = var(4) = 0
trigger1 = animelem = 1
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, Helper]
type = Helper
triggerall = var(4) =0
triggerall = var(18) = 0
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos = 88,-53
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 = var(4) =1
triggerall = var(18) = 0
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos = 51,-68
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 = var(4) =0
triggerall = var(18) = 1
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1006
pos = 85,-58
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.yscale= 1
size.xscale= .833333333333333333333333333333

[State 1000, 7]
type = ChangeState
triggerall = var(4) = 0
trigger1 = AnimTime = 0 && anim = 1002
value = 0
ctrl = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = statetype=A
trigger1 = time =55
value = 1005



[State 0, ScreenBound]
type = ScreenBound
triggerall = pos x <40&&facing=1|| pos x>-40&&facing=-1
triggerall = movehit  &&  pos y < -240
trigger1 = 1
value = 0
[State 600, 3]
type = changestate
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 = pos x <40&&facing=1|| pos x>-40&&facing=-1
triggerall=((prevstateno!=[600,640])&&var(15)=1)||var(15)=1
trigger1 = pos y < -250 && enemy,pos y >-10
v = 29    ;fv = 10
value = 1
[State 0, VelSet]
type = VelSet
trigger1 = movehit  &&  pos y < -260
x = 0
y = 0
[State 600, 3]
type = changestate
triggerall =  (pos y >= -240)|| (pos x >=40&&facing=1|| pos x<=-40&&facing=-1) ||!var(15)
triggerall = var(4) = 1
trigger1 = AnimTime = 0 && anim = 1005
value = 57

;---------------------------------------------------------------------------
; CNS difficulty: medium
[Statedef 1005]
type    = U
movetype= A
physics = S
juggle  =0; 4
poweradd= 13

anim = ifelse(var(4) = 0,1002,1004)
ctrl = 0
sprpriority = 1
[State 0, VelSet]
type = VelSet
trigger1 =  statetype=A
x = 0
y = 0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4) = 1
physics = N         ;A,C,S,N
ignorehitpause =1
persistent =1

[State 0, VelSet]
type = VelSet
trigger1 =var(4) = 1 && animelemtime(1) > 0
y = .45
;ignorehitpause =
;persistent =
[State 0, Width]
type = Width
trigger1 = animelemtime(2)=[0,8]
edge = 0,0
player = 45,0

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


[State 200, 1]
type = PlaySnd
trigger1 = time =7
value = 2, ifelse((var(58) = [7,12]),10,8)


[State 200, 1]
type = PlaySnd
trigger1 = time =7
value = 2, ifelse((var(58) = [7,12]),10,8)



[State 0, Explod]
type = Explod
triggerall = var(4) = 0
trigger1 = animelem = 1
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, Helper]
type = Helper
triggerall = var(4) =0
triggerall = var(18) = 0
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos = 88,-53
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 = var(4) =1
triggerall = var(18) = 0
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos = 51,-68
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 = var(4) =0
triggerall = var(18) = 1
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1006
pos = 85,-58
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.yscale= 1
size.xscale= .833333333333333333333333333333
[State 1000, 7]
type = ChangeState
triggerall = var(4) = 0
trigger1 = AnimTime = 0 && anim = 1002
value = 0
ctrl = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = statetype=A
trigger1 = time =55
value =1005



[State 0, ScreenBound]
type = ScreenBound
trigger1 =  var(29)=1
value = 0
[State 600, 3]
type = changestate
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 = pos x <40&&facing=1|| pos x>-40&&facing=-1
triggerall=((prevstateno!=[600,640])&&var(15)=1)||var(15)=1
trigger1 = pos y < -250 && enemy,pos y >-10
v = 29    ;fv = 10
value = 1

[State 0, VelSet]
type = VelSet
trigger1 = movehit  &&  pos y < -260
x = 0
y = 0
[State 600, 3]
type = changestate
triggerall =  (pos y >= -240)|| (pos x >=40&&facing=1|| pos x<=-40&&facing=-1) ||!var(15)
triggerall = var(4) = 1
trigger1 = AnimTime = 0 && anim = 1005
value = 57


;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 1050]
type    = S
movetype= A
physics = S
juggle  =0; ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8)
poweradd= 60
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2

[State 1050, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 0, 2
[State 0, VarSet]
type = VarSet
trigger1 = movecontact
v = 8    ;fv = 10
value = 1

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2, ifelse((var(58) = [7,12]),13,9)

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2, ifelse((var(58) = [7,12]),13,9)



[State 0, PlaySnd]
type = PlaySnd
triggerall = (var(58) = [7,12])
trigger1 = animelem = 2
value = S2,6



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




;--------
[State 0, Explod]
type = Explod
triggerall =(var(58) = [7,12])
triggerall = numexplod(1054)=0
trigger1 = animelem = 1
anim =1054
ID =1054
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(2)>=0 
id = 1054
ignorehitpause =1 
persistent = 1

[State 0, Explod]
type = Explod
triggerall =(var(58) = [7,12])
triggerall = numexplod(1055)=0
trigger1 = animelem = 2
anim =1055
ID =1055
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1





;---------

[State 1055, 5]
type = HitDef
triggerall = (var(58) = [7,12])
trigger1 = animelem = 2
attr = S, SA
animtype  = up
damage    = 111,10
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = 25,-61
sparkno = S8100+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.velocity = -6.5,-19
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =45
guard.ctrltime = 15
air.hittime=38
air.velocity = -6.5,-19
airguard.velocity = -4,-4.5
palfx.add = 40,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,256,256
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.83
id=1050
nochainid=1050
forcenofall=1

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit && (p2stateno!=[201,203])
value =201
ID =1050
ignorehitpause =1
[State 1055, 5]
type = HitDef
triggerall = var(58) < 7
trigger1 = animelem = 2
attr = S, SA
animtype  = hard
damage    = 111,10
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = 25,-61
sparkno = S8100+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 22
ground.hittime  = 35
guard.ctrltime = 15
air.hittime=38
ground.velocity = -6.5,-19
guard.velocity = -3
air.velocity = -6.5,-15
airguard.velocity = -4,-4.5
yaccel=.83
id=1050
nochainid=1050
forcenofall=1

[State 1050, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1051

;------------------
;Gou Shoryuken - jump
[Statedef 1051]
type    = A
movetype= A
physics = N
velset = 3,-12
anim = 1051

[State 330, 4]
type = VelMul
trigger1 = Time >=8
x = .9

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(3)>0
x = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =1
id = 1055
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall =(var(58) = [7,12])
triggerall = numexplod(1056)=0 
trigger1 = animelem = 1
anim =1056
ID =1056
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(2)>=0 
id = 1056
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall =(var(58) = [7,12])
triggerall = numexplod(1057)=0
trigger1 = animelem = 2
anim =1057
ID =1057
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
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1



[State 1055, 5]
type = HitDef
triggerall =var(58) < 7
triggerall = var(8) = 0
trigger1 = animelem = 1
attr = A, SA
animtype  = up
damage    = 111,10
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = 25,-97
sparkno = S8100+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.velocity = -6.5,-19
guard.velocity = -3
ground.slidetime = 22
ground.hittime  = 34
guard.ctrltime = 15
air.hittime=33
air.velocity = -6.5,-15
airguard.velocity = -4,-4.5
yaccel=.83
nochainid=1050
forcenofall=1

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit && (p2stateno!=[201,203])
value =201
ID =1050
ignorehitpause =1
[State 1055, 5]
type = HitDef
triggerall = (var(58) = [7,12])
triggerall = var(8) = 0
trigger1 = animelem = 1
attr = A, SA
animtype  = hard
damage    = 111,10
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = 25,-97
sparkno = S8100+(random%4)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 22
ground.hittime  = 33
guard.ctrltime = 15
air.hittime=33
ground.velocity = -6.5,-19
guard.velocity = -3
air.velocity = -6.5,-15
airguard.velocity = -4,-4.5
yaccel=.83
palfx.add = 40,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,256,256
palfx.sinadd = 64,32,5,1
palfx.time = 20
id=1050
nochainid=1050

[State 330, 5]
type = VelAdd
trigger1 = time = [0,11]
y = .95

[State 330, 5]
type = VelAdd
trigger1 = time> 11
y = .59

[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;------------------
;Gou Shoryuken - land
[Statedef 1052]
type    = S
movetype= I
physics = S
anim = 1052
sprpriority = 1
velset = 0,0

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

[State 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 = Time = 0
value = 40, 0

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

;---------------------------------------------------------------------------
;Gou Shoryuken - z
[Statedef 1061]
type    = S
movetype= A
physics = N
juggle  =0; ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8)
poweradd= 75
velset = 0,0
anim = 1058
ctrl = 0
sprpriority = 2

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = (var(58) = [7,12])
trigger1 = animelem = 2
value = S2,6

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2, ifelse((var(58) = [7,12]),13,9)
volume=255

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2, ifelse((var(58) = [7,12]),13,9)
volume=255


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

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(2)>=0 
id = 1054
ignorehitpause =1 
persistent = 1

[State 0, Explod]
type = Explod
triggerall =(var(58) = [7,12])
triggerall = numexplod(1055)=0
trigger1 = animelem = 2
anim =1055
ID =1055
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 1055, 5]
type = HitDef
triggerall =var(58) < 7
trigger1 = animelem = 3
attr = S, SA
animtype  = up
damage    = 125,10
priority  = 4
guardflag = MA
pausetime = 12,12
sparkxy = 30,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 22
ground.hittime  =60
guard.ctrltime = 15
air.hittime=60
ground.velocity = -6.5,-25
guard.velocity = -3
air.velocity = -6.5,-18
airguard.velocity = -4,-4.5
yaccel=.75
id=1050
nochainid=1050
forcenofall=1

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit && (p2stateno!=[201,203])
value =201
ID =1050
ignorehitpause =1
[State 1055, 5]
type = HitDef
triggerall = (var(58) = [7,12])
trigger1 = animelem = 2
attr = S, SA
animtype  = hard
damage    = 111,10
priority  = 4
guardflag = MA
pausetime = 10,10
sparkxy = 30,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 22
ground.hittime  = 60
guard.ctrltime = 15
air.hittime=60
ground.velocity = 1,-2
guard.velocity = -3
air.velocity = -1,-2
airguard.velocity = -4,-4.5
palfx.add = 40,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,256,256
palfx.sinadd = 64,32,5,1
palfx.time = 30
forcenofall=1
[State 1055, 5]
type = HitDef
triggerall = (var(58) = [7,12])
trigger1 = animelem = 3
attr = S, SA
animtype  = hard
damage    = 28;,10
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = 30,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 22
ground.hittime  = 60
guard.ctrltime = 15
air.hittime=60
ground.velocity = -1.2,-13
guard.velocity = -3
air.velocity = -1.5,-13
airguard.velocity = -4,-4.5
palfx.add = 40,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,256,256
palfx.sinadd = 64,32,5,1
palfx.time = 30
forcenofall=1

[State 1050, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1062

;------------------
;Gou Shoryuken - jump
[Statedef 1062]
type    = A
movetype= A
physics = N
velset = 6,-16
anim = 1053

[State 330, 4]
type = VelMul
trigger1 = Time >=9
x = .9
[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(3)>0
x = 0
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =1
id = 1055
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall =(var(58) = [7,12])
triggerall = numexplod(1056)=0 
trigger1 = animelem = 1
anim =1056
ID =1056
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(2)>=0 
id = 1056
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall =(var(58) = [7,12])
triggerall = numexplod(1057)=0
trigger1 = animelem = 2
anim =1057
ID =1057
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
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 1055, 5]
type = HitDef
triggerall =var(58) < 7
trigger1 = animelem = 1
attr = A, SA
animtype  = Med
damage    = 125,10
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = 30,-97
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 22
ground.hittime  =55
guard.ctrltime = 15
air.hittime=55
ground.velocity = -6.5,-25
guard.velocity = -3
air.velocity = -6.5,-19
airguard.velocity = -4,-4.5
yaccel=.75
id=1050
nochainid=1050
forcenofall=1

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit && (p2stateno!=[201,203])
value =201
ID =1050
ignorehitpause =1
[State 1055, 5]
type = HitDef
triggerall =(var(58) = [7,12])
trigger1 = animelem = 1
attr = A, SA
animtype  = Med
damage    = 28;,4
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = 30,-97
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 22
ground.hittime  = 55
guard.ctrltime = 15
air.hittime=55
ground.velocity = -6.5,-25
guard.velocity = -3
air.velocity = -6.5,-26
airguard.velocity = -4,-4.5
yaccel=.75
palfx.add = 40,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,256,256
palfx.sinadd = 64,32,5,1
palfx.time = 30
id=1050
nochainid=1050
forcenofall=1

[State 330, 5]
type = VelAdd
trigger1 = time = [0,15]
y = .65


[State 330, 5]
type = VelAdd
trigger1 = time > 15
y = .59
[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052
;---------------------------------------------------------------------------
[Statedef 1100]
type    = A
movetype= A
physics = N
juggle  =0;6
poweradd= 60
anim = 1100
ctrl = 0
sprpriority = 2


[State 200, 1]
type = PlaySnd
triggerall = anim = 1100 && var(58)<7
trigger1 = animelem = 2
value = 2, 7



[State 200, 1]
type = PlaySnd
triggerall = anim = 1100 && var(58)<7
trigger1 = animelem = 2
value = 2, 7



[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4) = 1 
statetype = A       ;S,A,C,L
ignorehitpause = 1
persistent =1

[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)&& var(4)=1
x = 0
y = -.05
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56) && var(4)=1
physics = A

[State 0, VelAdd]
type = VelAdd
trigger1 = var(4)=1 && time=0
x = ifelse(vel x >=0,2.5,-2.5)
;ignorehitpause = 
;persistent = 


[State 1061, 1]
type = Velset
triggerall = var(4) = 0
triggerall =anim = 1100
trigger1 = animelemtime(1) > 0 && animelemtime(5) < 0
y = -4.5

[State 1061, 1]
type = Velset
triggerall = var(4) = 0
triggerall = anim = 1100
trigger1 = animelem = 6
y = 0

[State 1061, 1]
type = Velset
triggerall = var(4) = 0
trigger1 = animelemtime(2) > 0
x = 2.25


[State 640, 2]
type = PlaySnd
triggerall = anim=1100
trigger1 = animelem =4
value = 0, 1

[State 640, 2]
type = PlaySnd
triggerall = var(58) =[7,12]
triggerall = anim=1100
trigger1 = animelem = 4
value = 4, 0

[State 0, Explod]
type = Explod
triggerall = var(58) = [7,12]
triggerall = anim=1100
trigger1 =animelem = 5
anim =1104
ID =1104
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
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =0

[State 0, Explod]
type = Explod
triggerall = var(6) = 1
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 1060, 4]
type = HitDef
triggerall = (var(58) = [7,12])
triggerall = !var(23)
trigger1 = animelem = 2
attr = A, SA
animtype  = Medium
damage    = 62, 4
priority  = 5
guardflag = MA
pausetime = 7,7
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 37
guard.ctrltime=15
ground.velocity =-ifelse(var(6)=0,3,1),-ifelse(var(6)=0,-3,3)
guard.velocity = -7
air.velocity = -ifelse(var(6)=0,3,1),-ifelse(var(6)=0,-3,3)
air.hittime=37
id=200
fall=1
fall.recover=0



[State 1060, 4]
type = HitDef
triggerall =(var(58) < 7)
triggerall = !var(23)
trigger1 = animelem = 5
attr = A, SA
animtype  = Medium
damage    = 111, 4
priority  = 5
guardflag = MA
pausetime = 9,9
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 34
guard.ctrltime=18
ground.velocity =-ifelse(var(6)=0,3,5.5),-ifelse(var(6)=0,-3,5.5)
guard.velocity = -7
air.velocity = -ifelse(var(6)=0,3,5.5),-ifelse(var(6)=0,-3,5.5)
air.hittime=24
yaccel = .7
id=ifelse(var(4),641,200)
fall=1
fall.recover=0

[State 1060, 4]
type = HitDef
triggerall = (var(58) = [7,12])
triggerall =  !var(23)
trigger1 = animelem = 5
attr = A, SA
animtype  = Medium
damage    = 49;, 4
priority  = 5
guardflag = MA
pausetime = 9,9
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 34
guard.ctrltime=18
ground.velocity =-ifelse(var(6)=0,3,5.5),-ifelse(var(6)=0,-3,5.5)
guard.velocity = -7
air.velocity = -ifelse(var(6)=0,3,5.5),-ifelse(var(6)=0,-3,5.5)
air.hittime=24
yaccel = .7
id=ifelse(var(4),641,200)
fall=1
fall.recover=0


[State 1060, 4]
type = HitDef
triggerall = !var(23)
triggerall = p2bodydist x < 0
trigger1 = animelem = 7
attr = A, SA
animtype  = Medium
damage    = 111, 4
priority  = 5
guardflag = MA
pausetime = 9,9
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity =ifelse(var(6)=0,3,7),-ifelse(var(6)=0,-3,6)
guard.velocity = -7
air.velocity =ifelse(var(6)=0,3,7),-ifelse(var(6)=0,-3,6)
air.hittime=20
id=200
fall=1
fall.recover=0
yaccel = .7
[State 0, TargetState]
type = TargetState
triggerall = var(6)=1
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=211) && enemy,hitshakeover
value =211
ID =200
ignorehitpause =0
[State 1060, 4]
type = HitDef
triggerall =  var(23)
trigger1 =animelem = 5
attr = A, SA
animtype  = Medium
damage    = 111, 4
priority  = 5
guardflag = MA
pausetime = 14,14
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   =  S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6
guard.velocity = -7
air.velocity = -7,10
air.hittime=20
id=640
forcenofall=1
yaccel = .7
[State 1060, 4]
type = HitDef
triggerall =var(23)
triggerall = p2bodydist x < 0
trigger1 = animelem = 7
attr = A, SA
animtype  = Medium
damage    = 111, 4
priority  = 5
guardflag = MA
pausetime = 14,14
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   =  S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6
guard.velocity = -7
air.velocity = 7,10
id=640
forcenofall=1
yaccel = .7

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animtime=0 && anim !=1101 && anim!=1105
value = 1101

[State 0, VelAdd]
type = VelAdd
trigger1 =anim=1101&& var(4)=0
y = .55
[State 0, TargetState]
type = TargetState
trigger1 =movehit &&p2statetype=A && p2stateno!=10613  && var(23)
value =10613
ID = 201
ignorehitpause=0
[State 0, ScreenBound]
type = ScreenBound
trigger1 =  var(29)=1
value = 0
[State 600, 3]
type = changestate
trigger1 = p2statetype=L&&var(31)=19 && var(29)=1&&p2stateno=10613
trigger2= var(31)>70 ;failsafe
value = 101

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



[State 1030, typeset]
type = StateTypeSet
trigger1 = Anim = 1105
trigger1 = AnimElem = 1
movetype = I

[State 1030, Vel3]
type = VelSet
trigger1 =Anim = 1105
X = 0
y = 0

[State 1030, Pos]
type = PosSet
trigger1 = Anim = 1105
y = 0
[State 1030, ground]
type = ChangeAnim
trigger1 = anim=1101&& Pos Y >= -10 && anim!=1105
value = 1105

[State 1030, back]
type = ChangeState
trigger1 = Anim = 1105
trigger1 = AnimTime = 0
trigger1 = Pos y >= 0
value = 0
ctrl = 1

;---------------------------------------------------------------
[Statedef 1101]
type    = A
movetype= A
physics = N
juggle = 6
poweradd=65
anim = 1102
ctrl = 0
sprpriority = 2
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4) = 1 
statetype = A       ;S,A,C,L
ignorehitpause = 1
persistent =1

[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)&& var(4)=1
x = 0
y = -.05
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56) && var(4)=1
physics = A

[State 0, VelAdd]
type = VelAdd
trigger1 = var(4)=1 && time=0
x = ifelse(vel x >=0,2.5,-2.5)
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56) && var(4) = 1 
physics = A 

[State 200, 1]
type = PlaySnd
triggerall = anim = 1102
trigger1 = animelem = 2 && var(58)<7
value = 2, ifelse((var(58) = [7,12]),10,7)

[State 200, 1]
type = PlaySnd
triggerall = anim = 1102
trigger1 = animelem = 2 && var(58)<7
value = 2, ifelse((var(58) = [7,12]),10,7)


[State 1061, 1]
type = Velset
triggerall = var(4) = 0
triggerall = anim = 1102
trigger1 = animelemtime(1) > 0 && animelemtime(5) < 0
y = -4.4

[State 1061, 1]
type = Velset
triggerall = var(4) = 0
triggerall = anim = 1102
trigger1 = animelem = 6
y = 0

[State 1061, 1]
type = Velset
triggerall = var(4) = 0
trigger1 = animelemtime(1) > 0
x = 4



[State 640, 2]
type = PlaySnd
triggerall = anim=1102
trigger1 = animelem = 4
trigger2 = animelem = 8
trigger3 = animelem = 12
value = 0, 1

[State 640, 2]
type = PlaySnd
triggerall = var(58) =[7,12]
triggerall = anim=1102
trigger1 = animelem =4
trigger2 = animelem = 8
trigger3 = animelem = 12
value = 4, 0

[State 0, Explod]
type = Explod
triggerall = var(6) = 1
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, Explod]
type = Explod
triggerall = (var(58) = [7,12])
triggerall = anim = 1102
trigger1 =animelem = 5
trigger2 = animelem = 9
trigger3 = animelem = 13
anim =1104
ID =1104
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
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =0

[State 1060, 4]
type = HitDef
triggerall = (var(58) = [7,12])
triggerall = !var(23)
trigger1 = animelem = 2
attr = A, SA
animtype  = Medium
damage    = 35, 4
priority  = 5
guardflag = MA
pausetime = 7,7
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 23
air.hittime=23
ground.velocity =-ifelse(var(6)=0,3,1),-ifelse(var(6)=0,-3,3)
guard.velocity = -7
air.velocity = -ifelse(var(6)=0,3,1),-ifelse(var(6)=0,-3,3)
id=200
fall=1
fall.recover=0




[State 1060, 4]
type = HitDef
triggerall =var(58) < 7
triggerall = !var(23)
trigger1 =animelem=5
trigger2 =animelem=9
trigger3 =animelem=13
attr = A, SA
animtype  = Medium
damage    = 111, 4
priority  = 5
guardflag = MA
pausetime = 9,9
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.velocity =-ifelse(var(6)=0,3,9.5),-ifelse(var(6)=0,-3,9)
guard.velocity = -7
air.velocity = -ifelse(var(6)=0,3,9.5),-ifelse(var(6)=0,-3,9)
air.hittime=23
id=200
fall=1
fall.recover=0
yaccel=.65

[State 1060, 4]
type = HitDef
triggerall =(var(58) = [7,12])
triggerall = !var(23)
trigger1 =animelem=5
attr = A, SA
animtype  = Medium
damage    = 35, 4
priority  = 5
guardflag = MA
pausetime = 7,7
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 23
ground.velocity =-ifelse(var(6)=0,3,1),-ifelse(var(6)=0,-3,3)
guard.velocity = -7
air.velocity = -ifelse(var(6)=0,3,1),-ifelse(var(6)=0,-3,3)
air.hittime=23
yaccel=.7
id=200
fall=1
fall.recover=0

[State 1060, 4]
type = HitDef
triggerall = (var(58) = [7,12])
triggerall = !var(23)
trigger1 =animelem=9
attr = A, SA
animtype  = Medium
damage    = 28;, 4
priority  = 5
guardflag = MA
pausetime = 7,7
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 23
ground.velocity =-ifelse(var(6)=0,3,1),-ifelse(var(6)=0,-3,3)
guard.velocity = -7
air.velocity = -ifelse(var(6)=0,3,1),-ifelse(var(6)=0,-3,3)
air.hittime=23
yaccel=.7
id=200
fall =1
fall.recover = 0
[State 1060, 4]
type = HitDef
triggerall = (var(58) = [7,12])
triggerall = !var(23)
trigger1 =animelem=13
attr = A, SA
animtype  = Medium
damage    = 28;, 4
priority  = 5
guardflag = MA
pausetime = 9,9
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.velocity =-ifelse(var(6)=0,3,11),-ifelse(var(6)=0,-3,6)
guard.velocity = -7
air.velocity = -ifelse(var(6)=0,3,11),-ifelse(var(6)=0,-3,6)
air.hittime=23
yaccel=.7
id=200
fall =1
fall.recover = 0

[State 1060, 4]
type = HitDef
triggerall = !var(23)
triggerall = p2bodydist x < 0
trigger1 =animelem= 7
trigger2 =animelem= 11
trigger3 =animelem= 15
attr = A, SA
animtype  = Medium
damage    = 111, 4
priority  = 5
guardflag = MA
pausetime = 9,9
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 9,-5.5
guard.velocity = -7
air.velocity = 9,-5.5
yaccel=.7
fall =1
fall.recover = 0
id=641

[State 1060, 4]
type = HitDef
triggerall = var(23)
trigger1 =animelem=5
trigger2 =animelem=9
trigger3 =animelem=13
attr = A, SA
animtype  = Medium
damage    = 111, 4
priority  = 5
guardflag = MA
pausetime = 14,14
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6
guard.velocity = -7
air.velocity = -8,10
id=201
forcenofall=1
yaccel = .7
[State 1060, 4]
type = HitDef
triggerall = var(23)
triggerall = p2bodydist x < 0
trigger1 =animelem= 7
trigger2 =animelem= 11
trigger3 =animelem= 15
attr = A, SA
animtype  = Medium
damage    = 111, 4
priority  = 5
guardflag = MA
pausetime = 14,14
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6
guard.velocity = -7
air.velocity = 8,10
id=201
forcenofall=1
yaccel = .7

[State 0, TargetState]
type = TargetState
triggerall = var(6)=1
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=211) && enemy,hitshakeover
value =211
ID =200
ignorehitpause =0

[State 0, TargetState]
type = TargetState
trigger1 =movehit &&p2statetype=A && p2stateno!=10613  && var(23)
value =10613
ID = 201
ignorehitpause=0


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animtime=0 && anim !=1101 && anim!=1105
value = 1101

[State 0, VelAdd]
type = VelAdd
trigger1 = anim=1101 && var(4)=0
y = .55
[State 0, TargetState]
type = TargetState
trigger1 =movehit &&p2statetype=A && p2stateno!=10613  && var(23)
value =10613
ID = 201
ignorehitpause=0
[State 0, ScreenBound]
type = ScreenBound
trigger1 =  var(29)=1
value = 0

[State 600, 3]
type = changestate
trigger1 = p2statetype=L&&var(31)=19 && var(29)=1&&p2stateno=10613
trigger2= var(31)>70 ;failsafe
value = 101

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




[State 1030, ground]
type = ChangeAnim
trigger1 = anim=1101&& Pos Y >= -10 && anim!=1105
value = 1105
[State 1030, typeset]
type = StateTypeSet
trigger1 = Anim = 1105
trigger1 = AnimElem = 1
movetype = I

[State 1030, Vel3]
type = VelSet
trigger1 =Anim = 1105
X = 0
y = 0

[State 1030, Pos]
type = PosSet
trigger1 = Anim = 1105
y = 0
[State 1030, back]
type = ChangeState
trigger1 = Anim = 1105
trigger1 = AnimTime = 0
trigger1 = Pos y >= 0
value = 0
ctrl = 1



;----------------------------------------------------------------------------
[statedef 1500]
type = S
Movetype = I
physics = S
Anim = 3013
poweradd = 0
ctrl = 0

[State 4110, 6]
type = Velset
trigger1 = AnimElem = 3
x = -3

[State 1400, afterimage]
type=afterimage
triggerall = var(2) = 0
trigger1=animelem=3
time= 2
length= 15
palcolor= 256
palinvertall= 0
palbright=  0, 0, 0
palcontrast  = 254,254,254
palpostbright= 0, 0, 0
paladd = 0, 0, 0
palmul= 1,1,1
timegap = 4
framegap  = 4
trans = add1

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


[State 182, 2]
type = NotHitBy
trigger1 = Time >= 10
value = SCA
time = 1

[State 210, 3]
type = ChangeState
trigger1 = Time =19
value = 1501
;--------------------------------------------------
[Statedef 1501]
type    = S
movetype= I
physics = N
juggle  =0; 0
poweradd= 0
ctrl = 0
anim = 1500
velset = 9,0

[State 4110, 6]
type = Sprpriority
trigger1 = time >= 0
value = -1

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

[State 182, 2]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 210, 3]
type = Turn
trigger1 = p2bodydist x < -20

[State 1, Shadow Effect]
type = AfterImage
triggerall = var(2) = 0
trigger1 = AnimElem = 1 ;frame shadow should start
time = 2
timegap = 1
framegap = 8
length = 30
palcolor= 256
palinvertall= 0
palbright=  0, 0, 0
palcontrast  = 254,254,254
palpostbright= 0, 0, 0
paladd = 0, 0, 0
palmul= 1,1,1
trans = add1


[State 210, 1]
type = AfterImageTime
trigger1 = time > 0
Time = 2

[State 182, 2]
type = Playsnd
trigger1 = Time = 0
value = 15,0


[State 182, 2]
type = Velmul
trigger1 = time = 26
x = .5

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
[state 702 ,5]
type = changestate
trigger1 = time = 40
trigger2 = (frontedgedist <= 0 || backedgedist <= 0) && time > 5
value = 0
ctrl = 0
;----------------------------------------------------------------------------
[statedef 1502]
type = S
Movetype = I
physics = S
Anim = 3013
poweradd = 0
ctrl = 0

[State 4110, 6]
type = Velset
trigger1 = AnimElem = 4
x = 3

[State 1, Shadow Effect]
type = AfterImage
triggerall = var(2) = 0
trigger1 = AnimElem = 1 ;frame shadow should start
time = 2
timegap = 1
framegap = 8
length = 30
palcolor= 256
palinvertall= 0
palbright=  0, 0, 0
palcontrast  = 254,254,254
palpostbright= 0, 0, 0
paladd = 0, 0, 0
palmul= 1,1,1
trans = add1



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


[State 182, 2]
type = NotHitBy
trigger1 = Time >= 10
value = SCA
time = 1

[State 210, 3]
type = ChangeState
trigger1 = Time = 16
value = 1503
;--------------------------------------------------
[Statedef 1503]
type    = S
movetype= I
physics = N
juggle  =0; 0
poweradd= 0
ctrl = 0
anim = 1500
velset = -9,0


[State 4110, 6]
type = Sprpriority
trigger1 = time >= 0
value = -1

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

[State 182, 2]
type = Velmul
trigger1 = time = 26
x = .25

[State 182, 2]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1
[State 1, Shadow Effect]
type = AfterImage
triggerall = var(2) = 0
trigger1 = AnimElem = 1 ;frame shadow should start
time = 2
timegap = 1
framegap = 8
length = 30
palcolor= 256
palinvertall= 0
palbright=  0, 0, 0
palcontrast  = 254,254,254
palpostbright= 0, 0, 0
paladd = 0, 0, 0
palmul= 1,1,1
trans = add1

[State 210, 1]
type = AfterImageTime
trigger1 = time > 0
Time = 2

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

[State 182, 2]
type = Playsnd
trigger1 = Time = 0
value = 15,0


[state 702 ,5]
type = changestate
trigger1 = time = 40
trigger2 = frontedgedist <= 0 || backedgedist <= 0
value = 0
ctrl = 0
;----------------------------------------------------------------------------
[statedef 1504]
type = S
Movetype = I
physics = S
Anim =3013
poweradd = 0
ctrl = 0

[State 4110, 6]
type = Velset
trigger1 = AnimElem = 4
x = -3

[State 1, Shadow Effect]
type = AfterImage
triggerall = var(2) = 0
trigger1 = AnimElem = 1 ;frame shadow should start
time = 2
timegap = 1
framegap = 8
length = 30
palcolor= 256
palinvertall= 0
palbright=  0, 0, 0
palcontrast  = 254,254,254
palpostbright= 0, 0, 0
paladd = 0, 0, 0
palmul= 1,1,1
trans = add1

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


[State 182, 2]
type = NotHitBy
trigger1 = Time >= 10
value = SCA
time = 1



[State 210, 3]
type = ChangeState
trigger1 = Time = 16
value = 1505
;--------------------------------------------------
[Statedef 1505]
type    = S
movetype= I
physics = N
juggle  =0; 0
poweradd= 0
ctrl = 0
anim =1500
velset = 9,0

[State 182, 2]
type = Playsnd
trigger1 = Time = 0
value = 15,0


[State 4110, 6]
type = Sprpriority
trigger1 = time >= 0
value = 1

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

[State 182, 2]
type = Velmul
trigger1 = time = 15
x = .25

[State 182, 2]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 210, 3]
type = Turn
trigger1 = p2bodydist x < -20

[State 1, Shadow Effect]
type = AfterImage
triggerall = var(2) = 0
trigger1 = AnimElem = 1 ;frame shadow should start
time = 2
timegap = 1
framegap = 8
length = 30
palcolor= 256
palinvertall= 0
palbright=  0, 0, 0
palcontrast  = 254,254,254
palpostbright= 0, 0, 0
paladd = 0, 0, 0
palmul= 1,1,1
trans = add1

[State 210, 1]
type = AfterImageTime
trigger1 = time > 0
Time = 2

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
[state 702 ,5]
type = changestate
trigger1 = time = 26
trigger2 = (frontedgedist <= 0 || backedgedist <= 0) && time > 5
value = 0
ctrl = 0
;----------------------------------------------------------------------------
[statedef 1506]
type = S
Movetype = I
physics = S
Anim = 3013
poweradd = 0
ctrl = 0

[State 4110, 6]
type = Velset
trigger1 = AnimElem = 4
x = 3
[State 1, Shadow Effect]
type = AfterImage
triggerall = var(2) = 0
trigger1 = AnimElem = 1 ;frame shadow should start
time = 2
timegap = 1
framegap = 8
length = 30
palcolor= 256
palinvertall= 0
palbright=  0, 0, 0
palcontrast  = 254,254,254
palpostbright= 0, 0, 0
paladd = 0, 0, 0
palmul= 1,1,1
trans = add1

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


[State 182, 2]
type = NotHitBy
trigger1 = Time >= 10
value = SCA
time = 1

[State 210, 3]
type = ChangeState
trigger1 = Time = 16
value = 1507
;--------------------------------------------------
[Statedef 1507]
type    = S
movetype= I
physics = N
juggle  =0; 0
poweradd= 0
ctrl = 0
anim = 1500
velset = -9,0

[State 182, 2]
type = Playsnd
trigger1 = Time = 0
value = 15,0


[State 4110, 6]
type = Sprpriority
trigger1 = time >= 0
value = 1

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

[State 182, 2]
type = Velmul
trigger1 = time = 15
x = .25

[State 182, 2]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 1, Shadow Effect]
type = AfterImage
triggerall = var(2) = 0
trigger1 = AnimElem = 1 ;frame shadow should start
time = 2
timegap = 1
framegap = 8
length = 30
palcolor= 256
palinvertall= 0
palbright=  0, 0, 0
palcontrast  = 254,254,254
palpostbright= 0, 0, 0
paladd = 0, 0, 0
palmul= 1,1,1
trans = add1

[State 210, 1]
type = AfterImageTime
trigger1 = time > 0
Time = 2

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
[state 702 ,5]
type = changestate
trigger1 = time = 26
trigger2 = frontedgedist <= 0 || backedgedist <= 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;
[Statedef 3000]
type    = U
movetype= A
physics = S
velset = 0,0
juggle  =0; ifelse((prevstateno = 440),2,8)
anim = ifelse(var(4) = 0,ifelse((prevstateno =[1100,1102]),3009,3000),3009)
ctrl = 0
sprpriority = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = var(4) = 0
triggerall = (var(58) = [7,12])
triggerall = prevstateno !=[1100,1102]
trigger1 = time = 0
value = 3013

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = var(4) = 0
triggerall = (var(58) = [7,12])
trigger1 = time = 56
value = 3000


[State 200, 1]
type = PlaySnd
triggerall =var(58) < 7
trigger1 = animelem = 3
value = 2, 8


[State 200, 1]
type = PlaySnd
triggerall =var(58) < 7
trigger1 = animelem = 3
value = 2, 8


[State 200, 1]
type = PlaySnd
triggerall =var(58) < 7
trigger1 = animelem = 1
value = 2, 16


[State 200, 1]
type = PlaySnd
triggerall =var(58) < 7
trigger1 = animelem = 1
value = 2, 16



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


[State 200, 1]
type = PlaySnd
triggerall =var(58) = [7,12]
trigger1 = time = 5
value = 2, 14

[State 200, 1]
type = PlaySnd
triggerall =var(58) = [7,12]
trigger1 = time = 5
value = 2, 14


[State 3000, Super A]
type = SuperPause
trigger1 = time = ifelse(((var(58) = [7,12]) && var(4) = 0),11,3)
poweradd = -1000
anim = -1
time = 45
movetime = ifelse((var(4) = 1),0,ifelse((var(58) =[7,12]),45,0))
p2defmul=1
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4) = 1||(prevstateno =[1100,1102])
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = N         ;A,C,S,N
ignorehitpause =1
persistent =1

[State 0, VelSet]
type = VelSet
trigger1 =var(4) = 1 && animelemtime(4) > 0
y = .25

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

[State 182, 2]
type = NotHitBy
trigger1 = Time = 1
value = SCA
time =16

[State 3000, Hyperbg]
type = Explod
triggerall =var(58) < 7
triggerall = var(4) = 0
trigger1 = time = ifelse((var(58) = [7,12]),56,3)
anim = 6004
ID = 6001
pos = -18,-68
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 = (var(58) = [7,12])
triggerall = var(4) = 0
trigger1 = time = ifelse((var(58) = [7,12]),11,3)
anim = 6004
ID = 6001
pos = -7,-51
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 = var(4) = 1 ||(prevstateno =[1100,1102])
trigger1 = time = 3
anim = 6004
ID = 6001
pos = -18,-80
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
supermovetime = 90
pausemovetime  = 90
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
supermovetime = 90
pausemovetime  = 90

[State 3000, Hyperbg]
type = Explod
trigger1 = time = ifelse(((var(58) = [7,12])&& var(4) = 0),56,4)
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 =200
supermovetime = 90
pausemovetime  = 90
scale = .5,ifelse(GameHeight = 180,.4,.5)
sprpriority = -6
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1
[State 0, AssertSpecial]
type = AssertSpecial
triggerall =(var(58) = [7,12])  && var(4) = 0
trigger1 =(time=[10,55])
flag = noBG
flag=noFG
[State 0, AssertSpecial]
type = AssertSpecial
triggerall = (var(58) < 7)||((var(58) = [7,12]) && (var(4) = 1||(prevstateno =[1100,1102])))
trigger1 =(time=3)
flag = noBG
flag2=nofg

[State 3000, Hyperbg]
type = Explod
triggerall =var(58) < 7
trigger1 = time = 3
anim = ifelse(var(4) = 1,3011,ifelse((prevstateno =[1100,1102]),3011,3001))
ID = 3001
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime =45
supermovetime = 90
pausemovetime  = 90
scale =  .833333333333333333333333333333,1
sprpriority = 9
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1

[State 3000, Hyperbg]
type = Explod
trigger1 = time = ifelse((var(58) = [7,12]),60,4)
anim = ifelse(var(4) = 1,3012,ifelse((prevstateno =[1100,1102]),3012,3002))
ID = 3001
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime =12
supermovetime = 90
pausemovetime  = 90
scale =  .833333333333333333333333333333,1
sprpriority = 9
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1

[State 3000, Hyperbg]
type = Explod
trigger1 = time = ifelse((var(58) = [7,12]),67,11)
anim =  ifelse(var(4) = 1,3010,ifelse((prevstateno =[1100,1102]),3010,3003))
ID = 3001
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime =-1
supermovetime = 90
pausemovetime  = 90
scale =  .833333333333333333333333333333,1
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1

[State 3000, Hyperbg]
type = Explod
triggerall = var(4) = 0
trigger1 = time = ifelse((var(58) = [7,12]),67,11)
anim = 3007
ID = 3001
pos = 73,-52
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime =-1
supermovetime = 90
pausemovetime  = 90
scale =  .833333333333333333333333333333,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1

[State 3000, Hyperbg]
type = Explod
triggerall = var(4) = 1 || (prevstateno =[1100,1102])
trigger1 = time = 11
anim = 3007
ID = 3001
pos = 38,-67
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime =-1
supermovetime = 90
pausemovetime  = 90
scale =  .833333333333333333333333333333,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1


[State 3000, Hyperbg]
type = Explod
triggerall = var(4) = 0
trigger1 = time = ifelse((var(58) = [7,12]),67,11)
anim = 3008
ID = 3001
pos = 73,-52
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime =-1
supermovetime = 90
pausemovetime  = 90
scale =  .833333333333333333333333333333,1
sprpriority = -1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1


[State 3000, Hyperbg]
type = Explod
triggerall = var(4) = 1  || (prevstateno =[1100,1102])
trigger1 = time = 11
anim = 3008
ID = 3001
pos = 38,-67
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime =-1
supermovetime = 90
pausemovetime  = 90
scale =  .833333333333333333333333333333,1
sprpriority = -1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 3
value = S3001,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = var(5) = 0 && (anim = 3000 || anim = 3009)
flag = noBG
flag2=noFG
ignorehitpause =1
persistent = 1


[State 3000, helper]
type = Helper
trigger1 = time = ifelse(((var(58) = [7,12]) && var(4) = 0),11,3)
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, Helper]
type = Helper
triggerall =  var(4) = 0
trigger1 =(time = ifelse((var(58) = [7,12]),65,9))&& anim = 3000
helpertype = normal ;player
name ="Gou hadouken beam"
ID = 3001
stateno = 3001
pos = 60,-62
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
;supermovetime = 90
;pausemovetime  = 90
size.yscale= 1
size.xscale= .833333333333333333333333333333

[State 0, Helper]
type = Helper
triggerall =  var(4) = 1 || (prevstateno =[1100,1102])
trigger1 = time = 9 && anim = 3009
helpertype = normal ;player
name ="Gou hadouken beam"
ID = 3001
stateno = 3001
pos =  36,-68
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
;supermovetime = 90
;pausemovetime  = 90
size.yscale= 1
size.xscale= .833333333333333333333333333333

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = statetype=A
triggerall = time >60
trigger1 = numhelper(3001) < 1 && ( anim !=1005)
value = 1005

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = statetype!=A
triggerall = animelemtime(5)>0
trigger1 = numhelper(3001) = 0 && ( animelemtime(31)<0)
value = 3000
elem= 39

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =var(5) = 1
id =3001
;ignorehitpause =
;persistent =


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0 && (anim = 3000 || anim = 1005)
value = ifelse(var(4) = 0,0,57)
ctrl=1



;---------------------------------------------------------------------------
[Statedef 3100]
type    = A
movetype= A
physics = N
juggle  =0; 0
velset = 0,0
anim = 3050
ctrl = 0
sprpriority = 2

[State 182, 2]
type = NotHitBy
trigger1 = Time = 9
value = SCA
time = 18
[State 200, 1]
type = PlaySnd
trigger1 = animelem = 6
value = 2, 7
volume=255


[State 200, 1]
type = PlaySnd
trigger1 = animelem = 6
value = 2, 7
volume=255


[State 200, 1]
type = PlaySnd
trigger1 = animelem = 3 && anim = 3050
value = 2, 16
volume=255

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 3 && anim = 3050
value = 2, 16
volume=255




[State 182, 2]
type = HitBy
trigger1 = Time = 11
value = SA
time = 10



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



[State 3000, Hyperbg]
type = Explod
trigger1 = time =10
anim = 6004
ID = 6001
pos = -9,-65
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, Super A]
type = SuperPause
trigger1 = time =10
poweradd = -1000
anim = -1
time = 45
p2defmul=1
[State 0, Explod]
type = Explod
trigger1 = time =10
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
supermovetime = 4
pausemovetime  = 4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 10
value = S3001,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =  time > 11 && anim!=1101&&anim!=1105
flag = noBG
flag2=noFG
ignorehitpause = 1

[State 3000, helper]
type = Helper
trigger1 = time = 10
pos = 0,0
postype = p1
id = 4000
name = "Hyperportrait"
sprpriority = 2
stateno = 4000
ownpal = 1
size.xscale = 1
size.yscale = 1.25
supermovetime = 999
pausemovetime  =999


[State 1061, 1]
type = Velset
trigger1 = animelemtime(6) > 0 && animelemtime(9) < 0
y = -4

[State 1061, 1]
type = Velset
trigger1 = animelem = 9
y = 0


[State 640, 2]
type = PlaySnd
trigger1 = animelem = 9
trigger2 = animelem = 13
trigger3 = animelem = 17
trigger4 = animelem = 21
trigger5 = animelem = 25
trigger6 = animelem = 29
trigger7 = animelem = 33
trigger8 = animelem = 37
trigger9 = animelem = 41
value = 0, 2


[State 3000, helper]
type = Helper
trigger1 = animelem= 9
pos = 180,0
postype = p1
id = 162
name = "pusher"
stateno = 162
ownpal = 1
size.xscale = 1
size.yscale = 1.25
supermovetime = 90
pausemovetime  = 90

[State 3000, helper]
type = Helper
trigger1 = animelem= 9
pos = -180,0
postype = p1
id = 162
name = "pusher"
stateno = 163
ownpal = 1
size.xscale = 1
size.yscale = 1.25
supermovetime = 90
pausemovetime  = 90

[State 1060, 4]
type = HitDef
trigger1 = animelem = 9
attr = A, SA
animtype  = Medium
damage    = 16, 4
priority  = 5
getpower = 0
guardflag = MA
hitflag=MAF
pausetime = 2,2
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
guard.ctrltime=21
ground.velocity = 15
guard.velocity = 12
air.velocity = 15,-1
[State 0, Explod]
type = Explod
trigger1 = animelem = 9
anim =3052
ID =3052
pos = -10,20
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 = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =anim = 1101
id =  3052
;ignorehitpause =
;persistent =
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =anim = 1101
id =  6001
[State 0, Explod]
type = Explod
trigger1 = animelem = 9
trigger2 = animelem = 13
trigger3 = animelem = 17
trigger4 = animelem = 21
trigger5 = animelem = 25
trigger6 = animelem = 29
trigger7 = animelem = 33
trigger8 = animelem = 37
trigger9 = animelem = 41
anim =3051
ID =8002
pos = 53,20
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, Explod]
type = Explod
trigger1 = animelem = 11
trigger2 = animelem = 15
trigger3 = animelem = 19
trigger4 = animelem = 23
trigger5 = animelem = 27
trigger6 = animelem = 31
trigger7 = animelem = 35
trigger8 = animelem = 39
anim =3051
ID =8002
pos = -58,20
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
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 1060, 4]
type = HitDef
trigger1 = animelem = 13
trigger2 = animelem = 17
trigger3 = animelem = 21
trigger4 = animelem = 25
trigger5 = animelem = 29
trigger6 = animelem = 33
trigger7 = animelem = 37
trigger8 = animelem = 41
attr = A, SA
animtype  = Medium
damage    = 16, 4
priority  = 5
guardflag = MA
hitflag=MAFD
getpower = 0
pausetime = 4,4
sparkxy = -25,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
guard.ctrltime=14
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 9
guard.velocity = 9
air.velocity = 9,-1
down.velocity=9,-4

[State 0, Width]
type = Width
trigger1 =time=0
edge = 25,25
player = 20,20

[State 1060, 4]
type = HitDef
trigger1 = animelem = 11
trigger2 = animelem = 15
trigger3 = animelem = 19
trigger4 = animelem = 23
trigger5 = animelem = 27
trigger6 = animelem = 31
trigger7 = animelem = 35
trigger8 = animelem = 39
attr = A, SA
animtype  = Medium
damage    = 16, 4
priority  = 5
guardflag = MA
hitflag=MAF
pausetime = 4,4
sparkxy = 10,-64
getpower = 0
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime=14
ground.velocity = -9
guard.velocity = -9
air.velocity = -9,-1

[State 1060, 4]
type = HitDef
trigger1 = animelem = 43
attr = A, SA
animtype  = Medium
damage    = 20, 4
priority  = 5
hitflag=MAF
guardflag = MA
pausetime = 14,14
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
getpower = 0
ground.type = Low
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -6.5,-12
guard.velocity = -3
guard.ctrltime=18
air.velocity = -6.5,-12
airguard.velocity = -4,-4.5
yaccel=.83
fall=1
fall.recover=0
air.hittime=30
id=200

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animtime=0&& anim !=1101&& anim= 3050
value = 1101

[State 0, PlayerPush]
type = PlayerPush
trigger1 =animelemtime(6)>0
trigger2= anim=1101
value = 0
;ignorehitpause =
;persistent =

;ignorehitpause = 
;persistent = 

[State 1030, typeset]
type = StateTypeSet
trigger1 = Anim = 1105
trigger1 = AnimElem = 1
movetype = I

[State 1030, Vel3]
type = VelSet
trigger1 =Anim = 1105
X = 0
y = 0
[State 0, VelAdd]
type = VelAdd
trigger1 =anim=1101
y = .55
[State 1030, Pos]
type = PosSet
trigger1 = Anim = 1105
y = 0
[State 1030, ground]
type = ChangeAnim
trigger1 = anim=1101&& Pos Y >= -10 && anim!=1105
value = 1105

[State 1030, back]
type = ChangeState
trigger1 = Anim = 1105
trigger1 = AnimTime = 0
trigger1 = Pos y >= 0
value = 0
ctrl = 1



;---------------------------------------------------------------------------
[Statedef 3800]
type    = S
movetype= A
physics = N
juggle  =0; ifelse((prevstateno = 440|| (prevstateno = [1050,1062])),2,8)
poweradd= 0
velset = 0,0
anim = 3101
ctrl = 0
sprpriority = 2

[State 0, TargetBind]
type = TargetBind
triggerall = movecontact
triggerall = !winko
triggerall = p2bodydist x >=0
trigger1 = animelemtime(1) > 0 && animelemtime(3) < 0
pos = 50,0
ignorehitpause = 1
persistent = 1


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



[State 0, StopSnd]
type = StopSnd
trigger1 = time = 4 && !movecontact
channel = 1
[State 0, StopSnd]
type = StopSnd
trigger1 = time = 4 && !movecontact
channel = 2
;ignorehitpause =
;persistent =




[State 3000, Super A]
type = SuperPause
trigger1 = time = 11
poweradd = -3000
anim = -1
time = 45
unhittable=1
p2defmul=1

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

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


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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 11
value = S3001,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =  time>10
flag = noBG
flag2=noFG
ignorehitpause = 1

[State 3000, helper]
type = Helper
trigger1 = time = 11
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 210, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 0, 2

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, HA
animtype  = Medium
damage    = 118,12
guardflag = MA
pausetime = 35,35
getpower = 0
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-78
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 3
air.velocity = 2,-2
palfx.add = 20,40,128 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 200,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 35
[State 0, VarSet]
type = VarSet
trigger1 = movehit
v = 8    ;fv = 10
value = 1
ignorehitpause=1
[State 200, 1]
type = PlaySnd
trigger1 = animelemtime(3)<0 && var(8)
value = 2, 4
ignorehitpause=1
persistent=0
[State 200, 1]
type = PlaySnd
trigger1 =animelemtime(3)<0 && var(8)
value = 2, 4

ignorehitpause=1
persistent=0
[State 200, 1]
type = PlaySnd
trigger1 = animelem = 5
value = 2, 5
volume=255

[State 200, 1]
type = PlaySnd
trigger1 = animelem =5
value = 2, 5
volume=255

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

[State 230, 2]
type = HitDef
trigger1 = animelem = 4
attr = S, HA
animtype  = Medium
damage    =139,6
guardflag = MA
pausetime = 35,35
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-48
getpower = 0
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 2
air.velocity = -1,-2
palfx.add = 20,40,128 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 200,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 35



[State 1050, 5]
type = ChangeState
trigger1 = (AnimTime = 0 && var(8) = 1) || (var(8) = 0 && time = 22)
value = 3801
;------------------
;Gou Shoryuken - jump
[Statedef 3801]
type    = A
movetype= A
physics = N
velset = 3.5,-12.8
anim=ifelse(var(8) = 0,3103,3102)
;[State 0, ChangeAnim]
;type = ChangeAnim
;trigger1 = time=26 &&var(8)
;value = 3102
;elem = 2
;ignorehitpause = 
;persistent = 
[State 0, NotHitBy]
type = NotHitBy
trigger1 = time=12
value = SCA
;value2 = S,NA
time = 7
;ignorehitpause = 
;persistent = 

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =  animelemtime(2)<0
flag = noBG
flag2=noFG
ignorehitpause = 1


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

[State 210, 1]
type = PlaySnd
trigger1 = animelem = 1 && var(8) = 0
value = 2, 9


[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(1) >= 0
time = 2

[State 330, 4]
type = VelMul
trigger1 = Time >= 2
x = .9

[State 1055, 5]
type = HitDef
triggerall = var(8) = 1
trigger1 = animelem = 1
attr = A, SA
animtype  = up
damage    = 299,10
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = 30,-97
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = high
getpower = 0
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -5,-18.7
guard.velocity = -8
guard.ctrltime = 12
air.velocity = -5,-18.7
airguard.velocity = -4,-4.5
forcenofall=1
palfx.add = 20,40,128 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 200,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 35
yaccel=.5
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[201,203])
value =201
ID =200
ignorehitpause =1 
[State 1055, 5]
type = HitDef
triggerall = var(8) = 0
triggerall = hitcount < 8
trigger1 = time%3 = 0
attr = A, SA
animtype  = up
damage    = 28;,10
priority  = 4
guardflag = MA
pausetime = 5,5
sparkxy = 30,-97
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
getpower = 0
ground.type = high
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -5,-13
guard.velocity = -8
guard.ctrltime = 12
air.velocity = -5,-12
airguard.velocity = -4,-4.5
forcenofall=1
id=200



[State 330, 5]
type = VelAdd
trigger1 = time>10
y = .75
[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -22
value = 1052
;--------------------------------------------------------------------------------
[Statedef 3900]
type = S
movetype = A
physics = N
ctrl = 0
juggle=ifelse(prevstateno=440,2,10)
anim = 3500
velset = 0,0


[State 3000, Super A]
type = SuperPause
trigger1 = time = 0
poweradd = -1000
anim = -1
time = 45
p2defmul=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
supermovetime = 4
pausemovetime  = 4
[State 182, 2]
type = NotHitBy
trigger1 = Time = 1
value = SCA
time =8

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


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

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

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


[State 3000, helper]
type = Helper
trigger1 = time = 0
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, Explod]
type = Explod
triggerall = numexplod(1054)=0
trigger1 = animelem = 1
trigger2 = animelem = 7
trigger3 = animelem = 13
anim =1054
ID =1054
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(2)>=0 && animelemtime(7)<0 
trigger2 =animelemtime(8)>=0 && animelemtime(13)<0 
trigger3 =animelemtime(14)>=0  
id = 1054
ignorehitpause =1 
persistent = 1

[State 0, Explod]
type = Explod
triggerall = numexplod(1055)=0
trigger1 = animelem = 2
trigger2 = animelem = 8
trigger3 = animelem = 14
anim =1055
ID =1055
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(3)>=0 && animelemtime(8)<0 
trigger2 =animelemtime(9)>=0 && animelemtime(14)<0 
trigger3 =animelemtime(15)>=0  
id = 1055
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1056)=0
trigger1 = animelem = 3
trigger2 = animelem = 9
trigger3 = animelem = 15
anim =1056
ID =1056
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(4)>=0 && animelemtime(9)<0 
trigger2 =animelemtime(10)>=0 && animelemtime(15)<0 
trigger3 =animelemtime(16)>=0  
id = 1056
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1057)=0
trigger1 = animelem = 4
trigger2 = animelem = 10
trigger3 = animelem = 16
anim =1057
ID =1057
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
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(7)>=0 && animelemtime(10)<0 
trigger2 =animelemtime(13)>=0 && animelemtime(16)<0 
id = 1057
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1056)=0
trigger1 = animelem = 3
trigger2 = animelem = 9
anim =1056
ID =1056
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(4)>=0 && animelemtime(9)<0 
trigger2 =animelemtime(10)>=0 && animelemtime(15)<0 
id = 1056
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1057)=0
trigger1 = animelem = 4
trigger2 = animelem = 10
anim =1057
ID =1057
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
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
;--------------




[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(2) >= 0 && animelemtime(7) < 0
trigger2 = animelemtime(8) >=0 && animelemtime(13) <0
trigger3 = animelemtime(14) >= 0
x = 4

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 7
trigger2 = animelem = 13
x = 0

[State 1050, 1]
type = PlaySnd
trigger1 =time = 1
trigger2 = animelem = 7
trigger3 = animelem = 13
value = 0, 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 8
trigger3 = animtime = 0
value = S2,6


[State 1050, 1]
type = PlaySnd
trigger1 =time = 1
trigger2 = animelem = 7
value = 2, 11



[State 1055, 5]
type = HitDef
trigger1 = time = 1
trigger2 = animelem = 7
attr = S, SA
animtype  = low
damage    = 24,10
priority  = 4
guardflag = MA
getpower = 0
pausetime = 6,6
sparkxy = -10,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -2
guard.velocity = -3
guard.ctrltime = 12
air.velocity = -2,-2
airguard.velocity = -2,-2
palfx.add = 40,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,256,256
palfx.sinadd = 64,32,5,1
palfx.time = 30

[State 1055, 5]
type = HitDef
trigger1 = animelem = 2
trigger2 = time = 4
trigger3 = animelem = 8
attr = S, SA
animtype  = med
damage    = 24,10
priority  = 4
guardflag = MA
pausetime = 6,6
getpower = 0
sparkxy = -10,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -2
guard.velocity = -3
guard.ctrltime = 12
air.velocity = -2,-2
airguard.velocity = -2,-2
palfx.add = 40,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,256,256
palfx.sinadd = 64,32,5,1
palfx.time = 30

[State 1055, 5]
type = HitDef
trigger1 = animelem = 3
trigger2 = animelem = 4
trigger3 = animelem = 9
trigger4 = animelem = 10
attr = S, SA
animtype  = med
damage    = 24,10
priority  = 4
guardflag = MA
pausetime = 6,6
sparkxy = -10,-70
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
getpower = 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = 1
guard.velocity = -3
guard.ctrltime = 12
air.velocity = -1,-2
airguard.velocity = -2,-2
palfx.add = 40,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,256,256
palfx.sinadd = 64,32,5,1
palfx.time = 30

[State 1055, 5]
type = HitDef
trigger1 = animelem = 14
attr = S, SA
animtype  = up
damage    = 24,10
priority  = 4
guardflag = MA
pausetime = 15,15
sparkxy = -10,-61
getpower = 0
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = 1,-2
guard.velocity = -3
guard.ctrltime = 12
air.velocity = -1
airguard.velocity = -2,-2
palfx.add = 40,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,256,256
palfx.sinadd = 64,32,5,1
palfx.time = 30




[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = animelemtime(14)>=6
value = 3901
;------------------
;Gou Shoryuken - jump
[Statedef 3901]
type    = A
movetype= A
physics = N
velset = 6,-18

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

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =animelemtime(16)>=0  
id = 1056
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1057)=0
trigger1 = animelem = 16
anim =1057
ID =1057
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
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =  time = [0,5]
flag = noBG
flag2=noFG
ignorehitpause = 1

[State 1055, 5]
type = HitDef
trigger1 = animelem = 15
attr = A, SA
animtype  = Med
damage    = 25,4
priority  = 4
guardflag = MA
pausetime = 15,15
sparkxy = 30,-97
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
getpower = 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -5.5,-15
guard.velocity = -3
air.hittime=45
guard.ctrltime = 12
air.velocity = -5.5,-12
airguard.velocity = -4,-4.5

palfx.add = 40,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,256,256
palfx.sinadd = 64,32,5,1
palfx.time = 30
forcenofall=1
[State 1055, 5]
type = HitDef
trigger1 = animelemtime(15)=10
attr = A, SA
animtype  = Med
damage    = 25,4
priority  = 4
guardflag = MA
pausetime = 15,15
sparkxy = 30,-97
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
getpower = 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -5.5,-15
guard.velocity = -3
air.hittime=45
guard.ctrltime = 12
air.velocity = -5.5,-12
airguard.velocity = -4,-4.5

palfx.add = 40,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,256,256
palfx.sinadd = 64,32,5,1
palfx.time = 30
id=1050
nochainid=1050
forcenofall=1

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

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 2, 13
[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 2, 13

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time =5
id = 6001

[State 330, 5]
type = VelAdd
trigger1 = time = [0,20]
y = .6

[State 330, 4]
type = VelMul
trigger1 = Time >= 2
x = .9

[State 330, 5]
type = VelAdd
trigger1 = time > 20
y = .55

[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 52
;---------------------------------------------------------------------------
[Statedef 4001]
type    = S
movetype= A
physics = S
juggle  =0; 4
velset = 0,0
anim = 193
ctrl = 0
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = prevstateno != 9000
trigger1 = time = 10
value = S3001,0

[State 3000, Super A]
type = SuperPause
triggerall = prevstateno != 9000
trigger1 = time = 10
poweradd = -1000
anim = -1
time = 45




[State 0, Explod]
type = Explod
triggerall = prevstateno != 9000
trigger1 =time =  9
anim =8000
ID =8002
pos = 20,0
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


[State 3000, Hyperbg]
type = Explod
triggerall = prevstateno != 9000
trigger1 = time = 9
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,1
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
supermovetime = 90
pausemovetime  = 90


[State 3000, helper]
type = Helper
triggerall = prevstateno != 9000
trigger1 = time = 10
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
triggerall = prevstateno != 9000
trigger1 = time = 10
v = 58   ;fv = 10
value = ifelse(var(58)>6,var(58)-6,var(58)+6)

[State 0, 0] ;Change palette
type = RemapPal
trigger1 =time =10
source = 1,1
dest = 1,var(58)
[State 0, NotHitBy]
type = NotHitBy
trigger1 =1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =

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

;---------------------------------------------------------------------------
;
[Statedef 4004]
type    = S
movetype= A
physics = S
juggle  =0; 4
velset = 0,0
anim = 4000
ctrl = 0
sprpriority = 0
[State 182, 2]
type = NotHitBy
trigger1 = Time = 1
value = SCA
time = 18

[State 3000, Super A]
type = SuperPause
trigger1 = time = 0
poweradd = -3000
anim = -1
time = 45
[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
supermovetime = 4
pausemovetime  = 4
[State 182, 2]
type = NotHitBy
trigger1 = Time = 56
value = SCA
time = 6

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


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

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

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

[State 3000, helper]
type = Helper
trigger1 = time = 0
pos = 0,0
postype = p1
id = 4000
name = "Hyperportrait"
sprpriority = 2
stateno = 4000
ownpal = 1
size.xscale = 1
size.yscale = 1.25
supermovetime = 999
pausemovetime  =999

[State 0, VelSet]
type = VelSet
trigger1 = time > 1
x = 5

[State 182, 2]
type = Velmul
trigger1 =time > 33
x = .5



[State 1060, 4]
type = HitDef
triggerall = p2movetype!=H || (p2stateno=120||p2stateno=140)
trigger1 =animelem = 2
attr = S, HT
animtype  = Medium
damage    = 0, 0
hitflag = M
priority = 5, Miss
sparkno = -1
pausetime = 2,2
sparkxy = -50,-74
guard.sparkno = S7009
hitsound   = S800,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0
guard.velocity = 0
air.velocity = 0,0
p1stateno = 4005
p2facing = 1
p2stateno =4007
[State 200, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2,11
volume=255
[State 200, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2, 11
volume=255

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 15, 0
volume=255


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

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl=1
;---------------------------------------------------------------------------
[Statedef 4005]
type    = S
movetype= A
physics = S
juggle  =0; 4
poweradd= 0
velset = 0,0
anim = 4001
ctrl = 0
sprpriority = 1

[State 4000, bind]
type=targetbind
trigger1=animelemtime(2)>0
pos=40,0

[State 4000, bind]
type=targetbind
trigger1=animelem=1
pos=30,0


[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(50) < 0
edge = 60,0

[State 3052, 3]
type = PlaySnd
triggerall = Time = [24,85]
trigger1 = (Time%3) = 0
value = 1,0+(random%3)
channel = 5

[State 3301, Hit Explods]
type = Explod
anim = 7005+(random%4)
triggerall = Time = [24,85]
trigger1 = (Time%3) = 0
postype = p2
pos=0,(enemynear,const(size.mid.pos.y));-70
random=100,90
ownpal = 1
ontop = 1

[State 3052, HitAdd]
type = HitAdd
trigger1 = Time = 90
value = 14

[State 4000, fadeout]
type=allpalfx
trigger1=animelemtime(1)=10
time=30
sinadd=-255,-255,-255,60

[State 4000, black]
type=envcolor
trigger1=time = 25
time=65
value=0,0,0

[State 0, Explod]
type = Explod
trigger1 =time = 95
anim =ifelse(var(17)=1,4004,4003)
ID =4002
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
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
supermovetime = 90
pausemovetime  = 90



[State 0, AssertSpecial]
type = AssertSpecial
Triggerall = time = [25,180]
trigger1 =1
ignorehitpause = 1
persistent = 1
flag = nobardisplay
flag2 = nobg
flag3=noFG
[State 0, VarSet]
type = VarSet
triggerall = time = 0
trigger1 = p2life <= ceil(550*((enemynear,const(data.defence)*.01)))
v = 17 ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
triggerall = time = 0
trigger1 = p2life > ceil(550*((enemynear,const(data.defence)*.01)))
v = 17  ;f
value = 0
[State 1000, 7]
type = ChangeState
trigger1 = time  =180
value = ifelse(var(17)=1,184,0)
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 4007]
type = S
ctrl = 0
movetype=H
ctrl = 0
sprpriority = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 4002

[State 0, LifeAdd]
type = LifeAdd
trigger1 = time = 95
value = ceil(-550*((const(data.defence)*.01)/1))

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

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



[State 3063, 4] ;Hit ground
type = SelfState
trigger1 = animtime = 0
value = ifelse(Alive,5120,5150)
ctrl = 1
;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

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

[State 0, VarSet]
type = VarSet
trigger1 =p2statetype!=A
v = 20   ;fv = 10
value = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = numhelper(6000)
flag = nokoslow
[State 0, TargetState]
type = TargetState
trigger1 =movehit&&enemy,stateno!=441 &&animelemtime(5)<0
value = 441
ID = 440
ignorehitpause =0

[State 0, VarSet]
type = VarSet
trigger1 =p2movetype!=H 
v =21   ;fv = 10
value = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =statetype!=A 
id = 56
[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, VarSet]
type = VarSet
trigger1 =  p2stateno=411
v = 23   ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H
v =23   ;fv = 10
value = 0

[State 0, Explod]
type = Explod
triggerall = numexplod(13000)=0
triggerall = enemynear,movetype=H
triggerall = enemynear,anim!=5160
trigger1 =enemynear,pos y>=0 && enemynear,anim=1205 && enemynear,time>3
trigger2 = enemynear,stateno=1030 && enemynear,time=1
trigger3= enemynear,stateno=441 && enemynear,anim=612 && enemynear,animelemtime(1)=1
anim =6006
ID =13000
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, PlaySnd]
type = PlaySnd
triggerall = enemynear,movetype=H
triggerall = enemynear,anim!=5160
trigger1 =enemynear,pos y>=0 && enemynear,anim=1205 && enemynear,time>3
trigger2 = enemynear,stateno=1030 && enemynear,time=1
value = S15,2

[State 0, VarSet]
type = VarSet
triggerall = (stateno !=[1100,1103])
trigger1 = statetype = A
v = 4   ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
triggerall = stateno !=[1100,1103]
trigger1 = statetype != A
v = 4   ;fv = 10
value = 0
[State 0, VarSet]
type = VarSet
trigger1 =p2movetype!=H
v = 9   ;fv = 10
value = 0
[State 0, VarSet]
type = VarSet
trigger1 =(stateno=[1100,1103])&&movehit
trigger2= (stateno=[1050,1069])&&movehit
trigger3= (stateno=410)&&movehit
trigger4= movehit && stateno=3801 && animelemtime(2)>0
v = 9   ;fv = 10
value = 1
;ignorehitpause =
;persistent =



[State 0, StateTypeSet]
type = StateTypeSet
triggerall = var(20)=1
trigger1 = (stateno!=[1050,1059])      ;S,A,C,L
movetype = I

[State 0, VarSet]
type = VarSet
trigger1 =movehit && (stateno=[1050,1059])
trigger2= movehit && stateno=3801 && animelemtime(2)>0
v = 20   ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 =p2statetype!=A
v = 20   ;fv = 10
value = 0

      ;I,A,H

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



[State 0, VarSet]
type = VarSet
triggerall = var(58)>6
triggerall  = var(4) = 0
trigger1 = command = "SHx"||command = "SHy"||command = "SHz"
v = 18   ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
triggerall = var(58)>6
triggerall  = var(4) = 0  && statetype !=A
trigger1 = AIlevel>0 && random < 333
v = 18   ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = statetype = A || movetype = H
trigger2=var(58)<=6
v = 18   ;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 = [3500,3501])
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 = [3000,3901]
triggerall = NumHelper(6000) < 1 &&movecontact
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 Ryu By Kamekaze"
v = 50    ;fv = 10
value = 1
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 =  1
text = "frontedge = %d fvar1= %f  pos x = %f "
params = var(18),p2bodydist x , pos y
[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = 1
time = 1
value =fvar(2)
ignorehitpause = 1
persistent = 1

[State 0, VarSet]
type = VarSet
triggerall = enemy,movetype = H
trigger1 =stateno !=[3000,4007]
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
triggerall = stateno !=[1100,1103]
trigger1 = statetype != A
v =6    ;fv = 10
value = 1

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

[State 0, VarSet]
type = VarSet
triggerall = var(6) = 0
triggerall = stateno !=[1100,1103]
trigger1 =vel x < 0
v =7   ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
triggerall = var(6) = 0
triggerall = stateno !=[1100,1103]
trigger1 =vel x >= 0
v = 7    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 =statetype !=A
v = 7   ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
triggerall = (movehit ||p2movetype=H) && (!var(23))
triggerall=p2movetype =H  && (p2stateno != [120,199])
trigger1 = 1
v = 12  ;fv = 10
value = enemy,gethitvar(hitcount)
ignorehitpause=1

[State 0, VarSet]
type = VarSet
triggerall = stateno !=1050
triggerall = movehit
trigger1 = (var(23))
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
trigger7 = p2statetype=L  || p2stateno=5120
trigger6 = (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 = statetype != A
triggerall = (p2bodydist x <110)
trigger1 = ctrl && p2movetype=A && p2statetype=C
trigger2 =p2statetype = C  && ctrl
trigger3 =(p2bodydist x =[51,110]) && ctrl
trigger4= enemy,hitdefattr=SC,AT
trigger5= p2stateno =5120 && p2bodydist x <50 && ctrl
v = 30   ;fv = 10
value = 1

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

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

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

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

[State 0, 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 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 = ((p2stateno = 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 = ((p2stateno = 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
[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = (stateno != 1050 && time >= 0)
trigger1 = stateno !=1051 && time >= 0
trigger1 = stateno !=1060 && time >= 0
trigger1 = stateno !=1061 && time >= 0
trigger1 = stateno !=1062 && time >= 0
trigger1 = stateno !=1063 && time >= 0
trigger1 = stateno !=3900 && time >= 0
trigger1 = stateno !=3901 && time >= 0
id = 1054
ignorehitpause=1
[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = (stateno != 1050 && time >= 0)
trigger1 = stateno !=1051 && time >= 0
trigger1 = stateno !=1060 && time >= 0
trigger1 = stateno !=1061 && time >= 0
trigger1 = stateno !=1062 && time >= 0
trigger1 = stateno !=1063 && time >= 0
trigger1 = stateno !=3900 && time >= 0
trigger1 = stateno !=3901 && time >= 0
id = 1055
ignorehitpause=1
[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = (stateno != 4005 && time >= 0)
trigger1 = stateno !=184 && time >= 0
trigger1 = stateno !=180 && time >= 0
id = 4002
ignorehitpause=1
;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State 0, VarSet]
type = VarSet
trigger1 = p2movetype !=H
v = 15  ;fv = 10
value = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = p2stateno=10613 && enemy,time=1
value = S800,1
channel = 4
[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 -2: Helper]
type = Helper
triggerall = numhelper(10000) < 1
trigger1 = roundstate!=2
helpertype = Normal
name = "choice"
id = 10000
pos = 0,0
postype = p1
facing = 0
stateno = 10000
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 99999
ignorehitpause = 1


[State -3, Wall Hit Sound]
type = PlaySnd
triggerall = !NumExplod(9049)
triggerall =  Enemy, BackEdgeDist < 5
trigger1 = ((p2stateno = 5030) && (time = 1))
trigger2 = ((p2stateno = 5050) && (time = 1))
trigger3 = (p2stateno = 5020)
trigger4 = (p2stateno = 201)&& (time = 1)
trigger5 = (p2stateno = 863)
value = S1,3
volume = 255
ignorehitpause = 1
persistent = 0

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





[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = (stateno != 3000 && time >= 0) || (var(5) = 1 && time > 20)
trigger1 = stateno !=3100 && time >= 0
trigger1 = stateno !=3101 && time >= 0
trigger1 = stateno !=3500 && time >= 0
trigger1 = stateno !=3501 && time >= 0
trigger1 = stateno !=3800 && time >= 0
trigger1 = stateno !=3801 && time >= 0
trigger1 = stateno !=3900 && time >= 0
trigger1 = stateno !=3901 && time >= 0
trigger1 = stateno !=4004 && time >= 0
trigger1 = stateno !=4005&& time >= 0
trigger2 = Winko
id = 6001

[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = (stateno != 1050 && time >= 0)
trigger1 = stateno !=1051 && time >= 0
trigger1 = stateno !=1060 && time >= 0
trigger1 = stateno !=1061 && time >= 0
trigger1 = stateno !=1062 && time >= 0
trigger1 = stateno !=1063 && time >= 0
trigger1 = stateno !=3900 && time >= 0
trigger1 = stateno !=3901 && time >= 0
id = 1054
ignorehitpause=1
[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = (stateno != 1050 && time >= 0)
trigger1 = stateno !=1051 && time >= 0
trigger1 = stateno !=1060 && time >= 0
trigger1 = stateno !=1061 && time >= 0
trigger1 = stateno !=1062 && time >= 0
trigger1 = stateno !=1063 && time >= 0
trigger1 = stateno !=3900 && time >= 0
trigger1 = stateno !=3901 && time >= 0
id = 1055
ignorehitpause=1
[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = (stateno != 4005 && time >= 0)
trigger1 = stateno !=184 && time >= 0
trigger1 = stateno !=180 && time >= 0
id = 4002
ignorehitpause=1

;[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
[State -3, Hit0]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [0,20]
trigger1 = Stateno = 5000
trigger2 = Stateno = 5010
value = 5000, 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
[State -3, Hit1]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [21,30]
trigger1 = Stateno = 5000
trigger2 = Stateno = 5010
value = 5000, 1
;----------------------
;--------------------
[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
[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
;-----------------
[State -3, Hit2]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [41,50]
trigger1 = stateno = 5070
trigger2 = stateno = 5080
value = 5000, 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
;-----------------------
[State -3, Hit2]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [51,60]
trigger1 = stateno = 5070
trigger2 = stateno = 5080
value = 5000, 1
[State -3, Hit2]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [51,60]
trigger1 = stateno = 5070
trigger2 = stateno = 5080
value = 5000, 1
;----------------------

[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = !numhelper(4001)
id = 6005


[State -3, Landing Sound]
type = PlaySnd
trigger1 = stateno = 52 &&Time = 1
trigger2 = anim = 1105 && animelemtime(1)=1
value = 40, 0

