; MvC3 Ken By Kamekaze
;---------------------- Integer variable list ----------------------

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

; var(0):= -3
; var(1):= -2, 10000, 10001
; var(2):= -2
; var(3):= -2, 1001, 1003
; var(4):= 1100, 1101, 1102
; var(5):= 1100, -2
; var(6):= 200, 205, 210, 206, 500, 400, 405
; var(7):= 200, 205, 210, 206, 500, 400, 405
; var(8):= 630, 1050, 1060, 1062, -2
; var(9):= 600, 601
;var(10):= -2, 3003, 3053, 4005, 10001
;var(11):= -2, 4005
;var(12):= -2, 57
;var(13):= 3011
;var(14):= -2
;var(15):= -2
;var(16):= -2
;var(17):= -2
;var(18):= -2, 4004
;var(19):= -2
;var(20):= -2
;var(21):= -2
;var(23):= 3001
;var(24):= 3001
;var(25):= air lights proation
;var(26):= -2
;var(27):= -2
;var(28):= -2, 1101
;var(29):= 101
;var(30):= -2
;var(31):= 101
;var(32):= 3001
;var(33):= -2, 56
;var(35):= -2
;var(36):= -2
;var(37):= 55
;var(38):= -2, 10000
;var(39):= 800, 830, -2
;var(40):= 810, 840, -2, 10000, 10001, -1
;var(41):= -2
;var(42):= -2
;var(43):= -2
;var(44):= -2
;var(46):= -2
;var(48):= -3
;var(50):= -2
;var(56):= 4, 5
;var(57):= 11013
;var(59):= 11013

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

; fvar(2):= 810, 672, 3049, -2, 1101
; fvar(4):= -2, 4004
;fvar(10):= 10005
;fvar(11):= 10005
;fvar(12):= 10005
;fvar(37):= -2
;fvar(38):= -2, 10001
;fvar(39):= -2



; Launcher should knock them away some
; they fall too fast
; air combo ender should knock them further away
;
;
;
;
;
;
;
;
;



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

[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 = 55
FloatPersistIndex = 38

[Size]
xscale = .833333333333333333333333333333
yscale = 1
ground.back = 19
ground.front = 22
air.back = 10
air.front = 10
height = 60
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = 5, -80
mid.pos = 0, -51
shadowoffset = -1
draw.offset = 0,0

[Velocity]
walk.fwd  = 2.7
walk.back = -2.55
run.fwd  = 18, 0
run.back = -18,0
jump.neu = 0,-9.7
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 = .55
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 = "Get up! It's too early for you to be defeated!"
victory2 = "Attack me again if you dare! I will crush you!"
victory3= "Get a life pin-head!"
victory4 = "I know Shotokan like the back of my hand!"
victory5 = "It's just soooo over for you."
victory6 = "Only one is as good as I am...no not even him!"
victory7 = "You need to learn more moves to stand a chance."
victory8 = "You are not bad, but you're not good either."
victory9 = "You are unconscious?  At least you're safe now"
victory10 = "Handsome and cheap... Can you compete with that?"
victory11 = "I had better challenges back in the day..."
victory12 = "I have beaten the best, and you're not even close!"
victory13= "My feet need exercise... Get up!!"
victory14= "So now you know what it feels like to be a loser!"
victory15 = "Washing my boat would've been a better workout!"
victory16 = "You had no chance against me, but maybe Sean...?"
victory17 = "You've got a lot to learn before you beat me!"



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



;---------------------------------------------------------------------------
; Win state decider
[Statedef 180]
type = S
[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State 180, 1]
type = ChangeState
trigger1 =(random =[333,667])
value = 182
[State 180, 1]
type = ChangeState
trigger1 =random =[667,999]
value = 183

[State 180, 1]
type = ChangeState
trigger1 =random < 333 || numhelper(1101)=1
value = 181


;---------------------------------------------------------------------------
[Statedef 181]
type = S
ctrl = 0
anim = 182
velset = 0,0
sprpriority=2
[State 195, Ya Ta De!]
type = PlaySnd
trigger1 = AnimElem = 7
value = S2,5
channel=0
[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

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





[State 195, Ya Ta De!]
type = PlaySnd
trigger1 = AnimElem = 4
value = S2,5
channel=0


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

[State 195, Yay!]
type = PlaySnd
trigger1 = AnimElem = 4
value = S2,12
channel=0



[State 0, AssertSpecial]
type = AssertSpecial
trigger1= time <190
flag = roundnotover
;---------------------------------------------------------------------------
[Statedef 190]
type = S
[State 5900, 3] ;Change palette
type = RemapPal
trigger1 = 1
source = 1,1
dest = 1,palno
[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "choice"
ID = 11013
stateno = 11013
pos = 0,-30
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale =.5
size.yscale =.5
[State 180, 1]
type = ChangeState
trigger1 = 1
value = 191


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

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



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

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

[State 191, Weak Whoosh]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
value = S0,1
channel=1
[State 191, Medium Whoosh]
type = PlaySnd
trigger1 = AnimElem = 6
value = S0,2
channel=1
[State 191, Ikuze!]
type = PlaySnd
trigger1 = AnimElem = 12
value = S2,4
channel=0
[State 191, To Standing]
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 191, Ikuze!]
type = PlaySnd
trigger1 = AnimElem = 2
value = S2,4
channel=0
[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 37
value = 143

[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; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
ctrl = 0
anim = 200
poweradd = 0
sprpriority = 2
facep2=1

;[State 0, Null]
;type = Null
;triggerall = movehit=1
;trigger1 =var(40):=ifelse((var(40)=[4,5]),5,ifelse((var(40)=[8,9]),9,1))
;ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && movehit
v = 6 ;fv = 10
value = ifelse(p2stateno=1003,2,1)
;ignorehitpause =
persistent =0

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0
[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 53
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = floor(8*(ifelse(var(18),.75,1))), floor(8*(ifelse(var(18),.75,1)))
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10, -75
hitsound = S1, 1
guardsound = S3,1
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
guard.ctrltime=1
ground.velocity = -2.5
air.cornerpush.veloff=0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-1
air.hittime = ifelse(13-var(20) <0,6,13-var(20))
forcenofall=1
id=200


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




[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
trigger2 = animelem=5
value = 0, 0
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
triggerall = random<499
value = S2, 6
channel=0


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

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

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



[State 0, ScreenBound]
type = ScreenBound
trigger1 = enemy,stateno=3049 
value = 1
movecamera=1,0
[State 0, HitBy]
type = HitBy
trigger1 = enemy,stateno=3049 
value = SCA,HA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 203

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

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)
[State 0, HitBy]
type = HitBy
trigger1 = enemy,stateno=3049 
value = SCA,HA
;value2 = S,NA
time = 1
[State 0, ScreenBound]
type = ScreenBound
trigger1 = enemy,stateno=3049 
value = 1
movecamera=1,0
[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1
[State 40, 2]
type = VarSet
triggerall = AILevel =0
trigger1 = command = "holdfwd"
sysvar(1) = 1
[State 40, 2]
type = VarSet
triggerall = AILevel >0
trigger1 = random > 75*AILevel
trigger1= backedgebodydist <35
sysvar(1) = 1
[State 40, 2]
type = VarSet
triggerall = AILevel >0
trigger1 = random > 75*AILevel
trigger1= backedgebodydist >75
sysvar(1) = -1
[State 40, 2]
type = VarSet
triggerall = AILevel =0
trigger1 = command = "holdback"
sysvar(1) = -1
[State 0, VelSet]
type = VelSet
triggerall = alive
triggerall= !hitfall
trigger1 = HitOver && (time>gethitvar(hittime)) 
x = ifelse(sysvar(1)=0,0,ifelse(sysvar(1)=1,3.5,-3.5))
y = -6

[State 5030, 3]
type = selfState
triggerall= !hitfall
trigger1 = HitOver && (time>gethitvar(hittime)) 
value = 5040 ;HITA_RECOV

;ignorehitpause = 
;persistent = 

[State 5030, 4]
type = selfState
trigger1= Pos Y >= 15  ;.
value = 5110 ;HITA_FALL

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

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 204]
type    = A
movetype= H
physics = N


[State 5035, 1]
type = ChangeAnim2
trigger1 =anim!=1200
value = 1200

[State 0, ScreenBound]
type = ScreenBound
trigger1 = enemy,stateno=3049 
value = 1
movecamera=1,0
ignorehitpause=1
[State 0, HitBy]
type = HitBy
trigger1 = enemy,stateno=3049 
value = SCA,HA
;value2 = S,NA
time = 1
[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 40, 2]
type = VarSet
triggerall = AILevel =0
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 40, 2]
type = VarSet
triggerall = AILevel =0
trigger1 = command = "holdback"
sysvar(1) = -1
[State 0, VelSet]
type = VelSet
triggerall = alive
triggerall= !hitfall
trigger1 = HitOver && (time>gethitvar(hittime)) 
x = ifelse(sysvar(1)=0,0,ifelse(sysvar(1)=1,3.5,-3.5))
y = -6

;ignorehitpause = 
;persistent = 

[State 5030, 3]
type = selfState
triggerall= !hitfall
trigger1 = HitOver && (time>gethitvar(hittime)) 
value = 5040 ;HITA_RECOV

;ignorehitpause = 
;persistent = 

[State 5030, 4]
type = selfState
trigger1= Pos Y >= 15  ;.
value = 5110 ;HITA_FALL
;-------------------------------

;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 205]
type    = S
movetype= A
physics = S
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
ctrl = 0
facep2=1
anim =210
sprpriority = 2
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = S2, 8
channel=0
;---------------
;[State 0, Null]
;type = Null
;trigger1 =var(40):=ifelse((var(40)=[6,7]),7,3)
;triggerall=movehit=1
;ignorehitpause = 1
;------------;
[State 200, 1]
type = PlaySnd
trigger1 = animelem=1
value = 0, 1
channel=1
[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && movehit
v = 6 ;fv = 10
value = ifelse(p2stateno=1003,2,1)
;ignorehitpause =
persistent =0

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0

[State 210, 2]
type = HitDef
triggerall = anim=210
trigger1 = animelem=5
attr = S, NA
animtype  = Medium
damage    =88
priority = 4, Hit
guardflag = MA
pausetime =  floor(12*(ifelse(var(18),.75,1))), floor(14*(ifelse(var(18),.75,1)))
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,3
guardsound = S3,1
ground.type = low
ground.slidetime =29
ground.hittime  = 20
guard.ctrltime=17
ground.velocity = -5.5
air.velocity = -2.5,-4
air.cornerpush.veloff=0
air.hittime = ifelse(22-var(20) <0,10,22-var(20))
yaccel = .57
forcenofall=1
id=200




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

;ignorehitpause =
;persistent =

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



;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 211]
type    = A
movetype= H
physics = N
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
velset=-10,6
poweradd= 59
ctrl = 0
sprpriority = 2
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .69
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0
value = 1202
[State 0, NotHitBy]
type = NotHitBy
trigger1 =anim!=1202
value = SCA
;value2 = S,NA
time = 1

;ignorehitpause =
;persistent =

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

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = alive
trigger1 = animelemtime(1)>7 && anim!=5200 && anim=5160
value = 5200
[State 0, SelfState]
type = SelfState
trigger1 =pos y >=0 &&anim=5200  &&alive
value =52
ctrl=1
[State 0, SelfState]
type = SelfState
trigger1 =pos y >=0 &&!alive  && time>5
value =5100
ctrl=1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
ctrl = 0
facep2=1
anim = 410
sprpriority = 2
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = S2, 8
channel=0
[State 0, PosAdd]
type = PosAdd
triggerall=time=0
trigger1 =prevstateno!=[1,199] 
x = 15


;[State 0, VarSet]
;type = VarSet
;trigger1 = movehit=1
;v = 40    ;fv = 10
;value = ifelse(var(40)=17,18,12)
;ignorehitpause =1 
;persistent =0 
[State 0, VelSet]
type = VelSet
triggerall=time=0
trigger1 =prevstateno!=[1,199] 
x = 4
;ignorehitpause = 
;persistent = 


[State 210, 1]
type = PlaySnd
trigger1 = time=0
value = 0, 2
channel=1
[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && movehit
v = 6 ;fv = 10
value = ifelse(p2stateno=1003,3,2)
;ignorehitpause =
persistent =0

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0

[State 0, Helper]
type = Helper
trigger1 = movehit && numtarget(410)
helpertype = normal ;player
name = "launch"
ID = 7011
stateno =7011
pos = 50,-65
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 40
pausemovetime = 40
ignorehitpause=1
persistent=0

[State 400, 2]
type = HitDef
trigger1 = !movecontact
attr = C, NA
damage    = 90
priority  = 5
animtype  = up
hitflag = MAF
guardflag =MA
pausetime = 12,12
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-94
hitsound   = S1,3
guardsound = S3,1
ground.type = Low
ground.slidetime = 30
guard.ctrltime = 10
ground.hittime  = 30
ground.velocity = -0,-17.5
air.velocity = -0,-17
fall.recovertime = 35
air.cornerpush.veloff=0
ground.cornerpush.veloff=0
yaccel=.55
id=410


[State 0, TargetState]
type = TargetState
trigger1 =movehit&&enemy,stateno!=411
value = 411
ID = 410
ignorehitpause =0
;persistent =


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

;---------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 206]
type    = S
movetype= A
physics = S
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
ctrl = 0
facep2=1
anim =205
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
triggerall = random<499
value = S2, 7
channel=0
;-----------------
;[State 0, Null]
;type = Null
;trigger1=var(40):=ifelse((var(40)=[5,6]),6,2)
;triggerall=movehit;=1
;ignorehitpause = 1
;-----------------------
[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && movehit
v = 6 ;fv = 10
value = ifelse(p2stateno=1003,2,1)
;ignorehitpause =
persistent =0

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0



[State 210, 2]
type = HitDef
triggerall = anim=205
trigger1 = animelem=5
attr = S, NA
animtype  = Medium
damage    =65
priority = 3, Hit
guardflag = MA
pausetime =  floor(10*(ifelse(var(18),.75,1))), floor(13*(ifelse(var(18),.75,1)))
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,2
guardsound = S3,1
ground.type = low
ground.slidetime =29
ground.hittime  = 18
guard.ctrltime=13
ground.velocity = -5.5
air.velocity = -2.5,-4
air.cornerpush.veloff=0
air.hittime = ifelse(22-var(20) <0,10,22-var(20))
yaccel = .57
forcenofall=1
id=200
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value =202
ID =200
ignorehitpause =1 


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


;---------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 500]
type    = S
movetype= A
physics = S
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
ctrl = 0
anim = 241
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = animelem=5
value = 0, 1
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = animelem=5
value = S2, 8
channel=0

[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && movehit
v = 6 ;fv = 10
value = ifelse(p2stateno=1003,2,1)
;ignorehitpause =
persistent =0

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0

[State 210, 2]
type = HitDef
trigger1 = !movecontact
attr = S, NA
animtype  = heavy
damage    =65
priority = 5, Hit
guardflag = H
pausetime =  floor(10*(ifelse(var(18),.75,1))), floor(10*(ifelse(var(18),.75,1)))
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,2
guardsound = S3,1
ground.type = low
ground.slidetime =29
ground.hittime  =25
guard.ctrltime=10
ground.velocity = -1.5
air.velocity = -2.5,-4
air.hittime = 24
air.cornerpush.veloff=0
yaccel = .57
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value =ifelse(var(16)=0,1029,202)
ID =200
ignorehitpause =1 



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


;-------------------------------------------------------------
;Crouching light punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
ctrl = 0
anim = 400
sprpriority = 2

[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && movehit
v = 6 ;fv = 10
value = ifelse(p2stateno=1003,2,1)
;ignorehitpause =
persistent =0

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
triggerall = random<499
value = S2, 6
channel=0
[State 400, 2]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage    =48
priority  = 2
animtype  = Light
hitflag = MAF
guardflag = M
pausetime =  floor(6*(ifelse(var(18),.75,1))), floor(6*(ifelse(var(18),.75,1)))
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-54
hitsound   = S1,1
guardsound = S3,1
ground.type = Low
ground.slidetime = 12
guard.ctrltime=8
ground.hittime  = 12
air.cornerpush.veloff=0
air.hittime = ifelse(12-var(20) <0,5,12-var(20))
ground.velocity = -4
air.velocity = -1.5,-3
forcenofall=1
id=200
[State 0, VelSet]
type = VelSet
trigger1 = movecontact
x = 0

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value =202
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; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
ctrl = 0
anim = 420
sprpriority = 2

[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && movehit
v = 6 ;fv = 10
value = ifelse(p2stateno=1003,2,1)
;ignorehitpause =
persistent =0

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0

[State 210, 1]
type = PlaySnd
triggerall = random<500
trigger1 = animelem=1
value = S2, 7
channel=0
[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1
channel=1
[State 360, 2]
type = HitDef
trigger1 = animelem=3
attr = C, NA
damage    = 75
animtype  = medium
hitflag = MAF
guardflag = L
priority=3
pausetime =  floor(8*(ifelse(var(18),.75,1))), floor(8*(ifelse(var(18),.75,1)))
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-15
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 16
guard.ctrltime = 13
air.cornerpush.veloff=0
ground.hittime  = 16
air.hittime= ifelse(16-var(20) <0,0,16-var(20))
ground.velocity = -6
air.velocity = -5,-5
forcenofall=1
id=200

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



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


;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 411]
type    = A
movetype= H
physics = N
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
velset=-.75,-14
poweradd= 59
ctrl = 0
sprpriority = 2
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .48



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

[State 0, Turn]
type = Turn
trigger1 =facing=enemy,facing

[State 0, SelfState]
type = SelfState
trigger1 =time>=28
value =5040
ctrl=1


;---------------------------------------------------------------------------
;Crouch Strong Kick
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd=0
ctrl = 0
anim = 430
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 =animelem=2
value = 0, 2
channel=1
[State 230, 1]
type = PlaySnd
trigger1 =animelem=2
value =S2, 8
channel=0


[State 440, 3]
type = HitDef

trigger1 = animelem = 2
attr = C, NA
damage    =85
hitflag = MAF
guardflag = L
pausetime =  floor(12*(ifelse(var(18),.75,1))), floor(12*(ifelse(var(18),.75,1)))
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-37
hitsound   = S1,3
guardsound = S3,1
ground.type = low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -2,-4.5
air.velocity = -1.2,-4
guard.velocity = -5
air.cornerpush.veloff=0
fall = 1
fall.recover=0
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,-4
poweradd = 40
anim=5070


[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .44
[State 0, NotHitBy]
type = NotHitBy
trigger1 = statetype!=A
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, SelfState]
type = SelfState
trigger1 =animelemtime(1)=25 && anim=612
value =ifelse(alive,5120,5110)
ctrl=1

;---------------------------------------------------------------------------
;Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = N
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
ctrl = 0
anim = 605
sprpriority = 2
facep2=1
[State 0, VarSet]
type = VarSet
trigger1 =movecontact
v = 9  ;fv = 10
value = 1
ignorehitpause=1
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = !numexplod(56)
physics = A         ;A,C,S,N
;ignorehitpause = 
;persistent = 

[state 9000, VelAdd]
type = VelAdd
trigger1 =numexplod(56)
x = 0
y = .425


[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
triggerall = random<499
value = S2, 7
channel=0


[State 600, 2]
type = HitDef
trigger1 =!movecontact
attr = A, NA
animtype=medium
air.animtype=up
damage    = 65
guardflag = HA
priority = 3
pausetime =  floor(10*(ifelse(var(18),.75,1))), floor(10*(ifelse(var(18),.75,1)))
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-76
hitsound   = S1, 2
guardsound = S3,1
ground.type = High
ground.slidetime = 5
ground.hittime = 25
air.hittime = ifelse(27-var(20) <0,15,27-var(20))
ground.velocity = -4
air.velocity = -.2,-7.5
yaccel=.6
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value =202
ID =200
ignorehitpause =1 
[State 600, 3]
type = changestate
trigger1 = animtime=0
value = 57
ctrl=1
;---------------------------------------------------------------------------
;Jump Light Punch
; CNS difficulty: easy
[Statedef 601]
type    = A
movetype= A
physics = N
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
ctrl = 0
anim = 606
sprpriority = 2
facep2=1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = !numexplod(56)
physics = A         ;A,C,S,N
;ignorehitpause = 
;persistent = 

[state 9000, VelAdd]
type = VelAdd
trigger1 =numexplod(56)
x = 0
y = .425


[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
triggerall = random<499
value = S2, 7
channel=0


[State 600, 2]
type = HitDef
trigger1 =!movecontact
attr = A, NA
animtype=medium
air.animtype=up
damage    = 65
guardflag = HA
priority = 3
pausetime =  floor(8*(ifelse(var(18),.75,1))), floor(8*(ifelse(var(18),.75,1)))
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-85
hitsound   = S1, 2
guardsound = S3,1
ground.type = High
ground.slidetime = 5
ground.hittime = 25
air.hittime = ifelse(27-var(20) <0,15,27-var(20))
ground.velocity = -4
air.velocity = -.2,-6
yaccel=.6
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value =202
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; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
ctrl = 0
anim = 610
sprpriority = 2
facep2=1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = !numexplod(56)
physics = A         ;A,C,S,N
;ignorehitpause = 
;persistent = 

[state 9000, VelAdd]
type = VelAdd
trigger1 =numexplod(56)
x = 0
y = .425

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = S2, 8
channel=0

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

[State 600, 2]
type = HitDef
trigger1 = !movecontact
attr = A, NA
damage    = 75
guardflag = HA
animtype=medium
air.animtype=up
priority = 3
pausetime =  floor(10*(ifelse(var(18),.75,1))), floor(10*(ifelse(var(18),.75,1)))
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.slidetime = 6
ground.hittime =27
air.hittime =  ifelse(27-ceil(var(20)/1.25) <0,18,27-ceil(var(20)/1.25))
guard.ctrltime = 20
ground.velocity = -4
air.velocity =-.2,-6.754
yaccel=.6
forcenofall=1
id=200

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

[State 600, 3]
type = changestate
trigger1 =  animtime=0
value = 57
ctrl=1



;---------------------------------------------------------------------------
;Jump Strong Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = N
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
ctrl = 0
anim = 620
sprpriority = 2
facep2=1

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = S2, 8
channel=0

[State 210, 1]
type = PlaySnd
trigger1 = time=0
value = 0, 2
channel=1
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = !numexplod(56)
physics = A         ;A,C,S,N
;ignorehitpause = 
;persistent = 

[state 9000, VelAdd]
type = VelAdd
trigger1 =numexplod(56)
x = 0
y = .425

[State 640, 3]
type = HitDef
triggerall = var(19)
trigger1 =!movecontact
attr = A, NA
damage    =85
guardflag = HA
priority = 5
pausetime =  floor(14*(ifelse(var(18),.75,1))), floor(14*(ifelse(var(18),.75,1)))
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-50
hitsound   = S1,3
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -2.5
air.hittime = ifelse(23-var(20) <0,13,23-var(20))
air.velocity = ifelse(var(19)=1,ifelse(vel x >0,-45,-13),-3),ifelse(var(19)=1,8,-6)
yaccel = .67
fall  =ifelse(var(19),1,0)
fall.recover = 0

[State 640, 3]
type = HitDef
triggerall = !var(19)
trigger1 =!movecontact
attr = A, NA
damage    =80
guardflag = HA
priority = 5
pausetime = floor(12*(ifelse(var(18),.75,1))), floor(12*(ifelse(var(18),.75,1)))
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-50
hitsound   = S1,3
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 12
ground.hittime  = 35
ground.velocity = -6.5
fall.recover = 0
air.hittime = ifelse(34-var(20) <0,16,34-var(20))
air.velocity = -2,-9
yaccel = ifelse(var(19),.8,.6)
air.fall  =ifelse(var(19),1,0)
[State 0, TargetState]
type = TargetState
trigger1 =movehit &&p2statetype=A && p2stateno!=10612  && var(19)
value =10612
ID = -1
ignorehitpause=0

[State 0, ScreenBound]
type = ScreenBound
triggerall = movehit && (prevstateno=[601,610])
trigger1 = 1
value =cond(frontedgebodydist <15,1,0)
movecamera=cond(frontedgebodydist <15,1,0),0
ignorehitpause=1


[State 600, 3]
type = changestate
trigger1 = animtime=0
value = 57
ctrl=1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 10612]
type    = A
movetype= H
physics = N
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
velset=ifelse(enemy,stateno=3049,4,-ifelse(enemy,vel x >0,13.5,5.5)),ifelse(enemy,stateno=610,8,10)
poweradd= 59
ctrl = 0
sprpriority = -2
[State 0, Turn]
type = Turn
trigger1 = enemy,stateno=3049 &&time=0
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = ifelse((anim!=[5160,5161]),.53,.58)
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0
value = 1202
[State 0, ChangeAnim2]
type = ChangeAnim2;
triggerall = (anim!=5161)
trigger1 =pos y>=0 && anim=1202 && time>3
value = 5161
[State 0, PosSet]
type = PosSet
trigger1 = anim=5161&& animelem=1
y = 0

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=1 && (anim=5160||anim=5161) && vel y >0
y = -9
x=0
[State 0, ScreenBound]
type = ScreenBound
trigger1 = enemy,stateno!=3049
value = 1
movecamera = 1,1
[State 0, ScreenBound]
type = ScreenBound
trigger1 = enemy,stateno=3049
value = 1
movecamera = 1,0

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


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

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

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

[State 0, SelfState]
type = SelfState
trigger1 =animtime=0 && 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; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
ctrl = 0
anim = 600
sprpriority = 2
facep2=1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = !numexplod(56)
physics = A         ;A,C,S,N
;ignorehitpause = 
;persistent = 

[state 9000, VelAdd]
type = VelAdd
trigger1 =numexplod(56)
x = 0
y = .425
[State 0, VarSet]
type = VarSet
trigger1 = prevstateno=631
v = 8   ;fv = 10
value = 1
;ignorehitpause =
;persistent =


[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0
channel=1
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
triggerall = random<499
value = S2, 6
channel=0

[State 630, 2]
type = HitDef
trigger1 = animelem =2
attr = A, NA
animtype=medium
air.animtype=up
damage = 50
guardflag = HA
priority = 2
pausetime = floor(9*(ifelse(var(18),.75,1))), floor(9*(ifelse(var(18),.75,1)))
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -5,-84
hitsound   = S1, 1
guardsound = S3,1
ground.type = High
ground.slidetime = 5
ground.hittime = 11
air.hittime = ifelse(11-var(20) <0,0,11-var(20))
ground.velocity = -4
air.velocity = -.2,-4
yaccel=.6
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value =202
ID =200
ignorehitpause =1 
[State 600, 3]
type = changestate
trigger1 = Time = 14
value = 57
ctrl=1


;---------------------------------------------------------------------------
[Statedef 702]
type    = C
movetype= H
physics = N
poweradd= 0
velset = 6,0
ctrl = 0
anim = 700
sprpriority = -1

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


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

[State 8300, VelSet]
type = VelSet
trigger1 =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 = ifelse(command="holdback",120,11)
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 703]
type    = C
movetype= H
physics = N
poweradd= 0
velset = -6,0
ctrl = 0
anim = 701
sprpriority = -1



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

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

[State 8300, VelSet]
type = VelSet
trigger1 = 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 = ifelse(command="holdback",120,11)
ctrl = 1

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 750]
type = A
physics = N
anim = 100
sprpriority = 1
ctrl=0

[State 100, 1]
type = VelSet
trigger1 = animelem =1
x = 7.85*(ifelse(var(18),1.5,1))

[State 100, 1]
type = Velmul
trigger1 = animelemtime(6) > 0
x = .85

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

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =animelem=5
statetype = S
movetype = I        
physics = N
[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

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

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

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

;-------------------------------------------------------------
[Statedef 800]
type = S
movetype= A
physics = S
juggle = 0
ctrl = 0
anim = 800

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

[State 0, VarSet]
type = VarSet
trigger1 =p2movetype=A 
v = 39    ;fv = 10
value = 1
[State 800, 1]
type = HitDef
triggerall = statetype!=A
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
numhits=0
fall = 1


[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value =205
ctrl = 1
;-------------------------------------------------------------
[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 = 4

[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 = -2.5
y = -5.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 = -2.25
y = -5.5

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

;-------------------------------------------------------------
[Statedef 803]
type =S
movetype= I
physics = N
juggle = 0
ctrl = 0
velset=0,0
anim = 802

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

[State 0, PlayerPush]
type = PlayerPush
trigger1 =1 
value =0
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 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 =time=0 
x = -2.5


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

;-------------------------------------------------------------
[Statedef 804]
type = S
movetype= I
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, PosSet]
type = PosSet
trigger1 = 1
y = 0
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0 
value = 803
[State 0, PlayerPush]
type = PlayerPush
trigger1 =1 
value =0

[State 0, VelSet]
type = VelSet
trigger1 =time=0 
x = -2.5

[State 0, ChangeAnim]
type = selfstate
trigger1 =animtime=0 
value =0
ctrl=1
;----------------------------------------------------------------------
[Statedef 810]
type = S
movetype= A
physics = N
anim = 870
poweradd = 60
sprpriority=0
[State 0, ChangeState]
type = ChangeState
trigger1 = p2stateno=804 
value =803

[State 0, ChangeState]
type = targetState
triggerall = time <5 && var(39)=0
trigger1= (enemy,command="z" || enemy,command="y" || enemy,command="c")&& AILevel=0
trigger2 =  enemy,AILevel >0 && random <65 *AILevel
value =804
[State 0, SprPriority]
type = SprPriority
trigger1 =time=0
value = 2
;ignorehitpause =
;persistent =

[State 691, 1]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 8
attr = S, NT
damage = 15
animtype  = diagup
guardflag = MA
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -15,-57
hitsound   = S1,2
kill = 0
id=800
[State 0, TargetState]
type = TargetState
triggerall = NumTarget(800) && p2stateno!=693
trigger1 =animelemtime(3)>=0&&animelemtime(4)<0
trigger2 = animelemtime(8)>=0&&animelemtime(9)<0
value =693
ID = 800
ignorehitpause =1 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = command="mashableB" || command="mashableA" || AIlevel >0
trigger1 = animelemtime(6)>=0 && animelemtime(7)< 0&& anim=870
trigger2 = animelemtime(10)>=0 && animelemtime(11)< 0 && anim=870
value = 871
;elem = 1
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animtime=0 &&anim= 871 && numexplod(800)<2
value = 870
elem=6
[State 0, Explod]
type = Explod
trigger1 = anim=871 && animelem=3
anim = 6007
ID = 800 
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animtime=0 &&anim= 871&& numexplod(800)=2
value = 870
elem=11
[State 0, Width]
type = Width
trigger1 =1 
edge=35,0
[State 691, Bind 1]
type = TargetBind
trigger1 = time != 0 && AnimElem != 11
trigger2 = time = 0
pos = 34, -3

[State 691, Yeah!]
type = PlaySnd
trigger1 = Time = 0
value = S2,8

[State 691, No Pushing]
type = PlayerPush
trigger1 = 1
value = 0

[State 691, Huh!]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 8
value = S2,7
channel=0

[State 691, Tuah!]
type = PlaySnd
trigger1 = animelem = 14
value = S12,13
channel=1
[State 0, VarSet]
type = VarSet
trigger1 = power >=2000
v = 40    ;fv = 10
value = 22
;ignorehitpause = 
;persistent = 

[State 0, HitAdd]
type = HitAdd
trigger1 = animelem=11
value = ifelse(numexplod(800)=0,3,ifelse(numexplod(800)=1,4,5))
ignorehitpause=1
[State 953, 1]
type = HitDef
trigger1 = AnimElem = 11
attr = S, NT
animtype  = up
damage    = 70
guardflag = MA
pausetime = 22,1
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -15,-57
hitsound   = S1,3
ground.type = Low
ground.slidetime = 50
ground.hittime  = 50
ground.velocity = -5,-10
air.velocity = -5,-10
fall = 1
fall.recover = 0
fall.yvelocity = -.2
id = 100
down.bounce=0
p2stateno=675
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0

[State 0, TargetState]
type = TargetState
triggerall = NumTarget(100)
trigger1 =movehit && animelemtime(11)>0 && p2stateno!=[675,676]
value =675
ID = 100
ignorehitpause = 0
;persistent = 
[State 0, VarAdd]
type = Varset
trigger1 =animelemtime(11)>2 
fv = 2    ;fv = 
value = ifelse(fvar(11)=1,.3,.5)

[State 691, Back to Standing with you!  Your job is over.]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Throw 3 - Knee Press Nightmare (P2 - Held in place [If it is tech hits that you desire..])
[Statedef 820]
type = S
movetype = H
physics = S
ctrl = 0
velset = 0,0

[State 692, 1]
type = ChangeAnim2
trigger1 = time = 1
value = 880

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


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

;---------------------------------------------------------------------------
; Throw 3 - Knee Press Nightmare (P2 - Ouch!)
[Statedef 693]
type = S
movetype = A
physics = S
ctrl = 0

[State 693, Ow!]
type = LifeAdd
trigger1 = Time = 0
value = -10
kill=0

[State 693, 2]
type = ChangeAnim2
triggerall = P1name = "Ken-X" || (P1Name = "Ryu-X")|| (P1Name = "MvC3 ken By Kamekaze")
trigger1 = time = 0
value = 881

[State 693, 2]
type = ChangeAnim2
triggerall = P1name != "Ken-X" && (P1Name != "Ryu-X") && (P1Name != "MvC3 ken By Kamekaze")
trigger1 = time = 0
value = 882

[State 0, HitBy]
type = HitBy
trigger1 =1 
value = SCA,NT
;value2 = S,NA
time = 1
[State 693, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 694

;---------------------------------------------------------------------------
; Throw 3 - Knee Press Nightmare (P2 - Held in place [Sorry, no more tech hits])
[Statedef 694]
type = S
movetype = H
physics = S
ctrl = 0
velset = 0,0

[State 692, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 880

[State 0, HitBy]
type = HitBy
trigger1 =1 
value = SCA,NT
;value2 = S,NA
time = 1
[State 692, 2]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

;-------------------------------------------------------------
[Statedef 830]
type = A
movetype= A
physics = N
juggle = 0
ctrl = 0
anim = 830


[State 0, VarSet]
type = VarSet
trigger1 =p2movetype=A 
v = 39    ;fv = 10
value = 1
[State 800, 1]
type = HitDef
triggerall = p2movetype!=H || (p2stateno=140)
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 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 605
ctrl = 0

;----------------------------------------------------------------------
[Statedef 840]
type = A
movetype = A
physics = N
ctrl = 0
velset = 0,-.05

[State 0, ChangeState]
type = ChangeState
trigger1 = p2stateno=802 
value =801

[State 0, ChangeState]
type = targetState
triggerall = time <5 && var(39)=0
trigger1= (enemy,command="z" || enemy,command="y" || enemy,command="c")&& AILevel=0
trigger2 = enemy,AILevel >0 && random <65 *AILevel
value =802
[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 40    ;fv = 10
value = 16
;ignorehitpause = 
;persistent = 

[State 822, 1]
type = velset 
trigger1 = Time = 15
x = 4
y = -1.5

[State 822, 3]
type = TargetBind
trigger1 = Time != 0
pos = 0,0

[State 822, 2]
type = VelAdd
triggerall = Time > 15
trigger1 = 1
y = .39



[State 822, On the Ground]
type = ChangeState
trigger1 = (pos y > 0) && (time != 0)
value = 672

[State 822, 2]
type = ChangeAnim
trigger1 = time = 0
value = 840

[State 822, Yeah!]
type = PlaySnd
trigger1 = Time = 0
value = S0,5

;---------------------------------------------------------------------------
; Throw 2 - Air Throw (P1 - Ground)
[Statedef 672]
type = S
movetype = A
physics = S
ctrl = 0
anim = 841
velset = 0,0

[State 803, 1]
type = Turn
trigger1 = Time = 0

[State 803, 1]
type = TargetBind
trigger1 = animelem = 1
pos = 11, -10

[State 803, 1]
type = TargetState
trigger1 = Time = 2
value = 674

[State 803, Huh!]
type = PlaySnd
trigger1 = time = 2
value = S2,7

[State 803, Hit+]
type = Hitadd
trigger1 = time = 2
value = 1

[State 661, Ouch!]
type = targetlifeadd
trigger1 = Time = 2
value = -102

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

[State 803, Turning is Neat]
type = Turn
trigger1 = Animtime = 0
[State 0, VarAdd]
type = Varset
trigger1 =animelemtime(3)>0 
fv = 2    ;fv = 
value = ifelse(fvar(11)=1,.3,.5)


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

;---------------------------------------------------------------------------
; Throw 2 - Air Throw (P2 State)
[Statedef 850]
type = A
movetype = H
physics = N
ctrl = 0

[State 801, 2]
type = ChangeAnim2
trigger1 = time = 0
value = 850

[State 812, 3]
type = VelSet
trigger1 = Time = 54
x = -3
y = -3


;------------------------------------
; Throw 2 - Air Throw (P2 State) Part 2
[Statedef 674]
type = A
movetype = H
physics = N
sprpriority = 1

[State 663, 1]
type = PosAdd
trigger1 =prevstateno=850 && time=0
y = -10
x = 10

[State 0, VelSet]
type = VelSet
trigger1 =prevstateno=850 && time=0
x = -7
y = -7
;ignorehitpause = 
;persistent = 

[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .64
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0
value = 1200

[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = anim!=5161
trigger1 =pos y>=0 && anim=1200&& time>20
value = 5161

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=1 && anim=5161
y = -9
x=0
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,1
;ignorehitpause =
;persistent =

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

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

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

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

[State 0, SelfState]
type = SelfState
trigger1 =animtime=0 && anim=612
value =ifelse(alive,5120,5110)
ctrl=1
;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
[Statedef 675]
type    = A
movetype= H
physics = N
velset = 0,0
[State 0, Turn]
type = Turn
trigger1 = facing=enemy,facing&time=0
;ignorehitpause =
;persistent =

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

[State 0, VelSet]
type = VelSet
trigger1 =time=0
x = -3
y = -8

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .5
[State 0, ChangeState]
type = ChangeState
trigger1 = pos y >=10&& (time >5||p2statetype=A)
value = 676
;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
[Statedef 676]
type    = L
movetype= H
physics = N

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

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

[State 0, VelMul]
type = VelMul
trigger1 =1
x = .95
[State 0, VelSet]
type = VelSet
trigger1 =time>27
x = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5101)
trigger1 = animtime=0 && anim=614
value =5101

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5101)
trigger1 = animtime=0 && anim=5101
value =5110
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = !selfanimexist(5101)
trigger1 = animtime=0 && anim=614
value =5110



[State 0, ChangeState]
type = selfState
trigger1 = time>47
value = ifelse(!alive, 5110,5120)
;---------------------------------------------------------------------------
[Statedef 1000]
type    =U
movetype= A
physics = S
juggle  =0;
poweradd= 13
anim = ifelse(statetype!=A,1000,1020)
ctrl = 0
sprpriority = 1
facep2=1
[State 0, VelSet]
type = VelSet
trigger1 =  statetype=A
x = 0
y = 0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = statetype=A
physics = N         ;A,C,S,N
ignorehitpause =1
persistent =1

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


[State 0, VelSet]
type = VelSet
trigger1 =statetype=A&& animelemtime(1) > 0
y = .45
;ignorehitpause =
;persistent =


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

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


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

[State 0, Helper]
type = Helper
triggerall = statetype!=A
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos = 68,-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 = statetype=A
trigger1 = animelem=3
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1003
pos = 61,-57
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.yscale= 1
size.xscale= .833333333333333333333333333333



[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = ifelse(statetype=A,57,0)
ctrl = 1



;---------------------------------------------------------------------------
[Statedef 1004]
type    =U
movetype= A
physics = S
juggle  =0;
poweradd= 13
facep2=1
anim =  ifelse(statetype!=A,1001,1021)
ctrl = 0
sprpriority = 1
[State 0, VelSet]
type = VelSet
trigger1 =  statetype=A
x = 0
y = 0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = statetype=A
physics = N         ;A,C,S,N
ignorehitpause =1
persistent =1

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


[State 0, VelSet]
type = VelSet
trigger1 =statetype=A&& animelemtime(1) > 0
y = .45
;ignorehitpause =
;persistent =


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


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

[State 0, Helper]
type = Helper
triggerall = statetype!=A
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos = 68,-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 = statetype=A
trigger1 = animelem=3
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1003
pos = 61,-57
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.yscale= 1
size.xscale= .833333333333333333333333333333



[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = ifelse(statetype=A,57,0)
ctrl = 1

;---------------------------------------------------------------------------
; CNS difficulty: medium
[Statedef 1005]
type    = U
movetype= A
physics = S
juggle  =0;
poweradd= 13
facep2=1
anim = ifelse(statetype!=A,1002,1022)
ctrl = 0
sprpriority = 1
[State 0, VelSet]
type = VelSet
trigger1 =  statetype=A
x = 0
y = 0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = statetype=A
physics = N         ;A,C,S,N
ignorehitpause =1
persistent =1

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


[State 0, VelSet]
type = VelSet
trigger1 =statetype=A&& animelemtime(1) > 0
y = .45
;ignorehitpause =
;persistent =


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

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


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

[State 0, Helper]
type = Helper
triggerall = statetype!=A
trigger1 = animelem=4
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos = 68,-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 = statetype=A
trigger1 = animelem=3
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1003
pos = 61,-57
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.yscale= 1
size.xscale= .833333333333333333333333333333



[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = ifelse(statetype=A,57,0)
ctrl = 1

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

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

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

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

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

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

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

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

[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 1037]
type    = A
movetype= H
physics = N

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

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

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

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

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

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

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

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

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



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

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = (p2dist x/10)
[State 0, VelMul]
type = VelMul
trigger1 =1
x = .88

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

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

[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
;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 1050]
type    = U
movetype= A
physics = S
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8)
poweradd= 60
velset = 0,0
anim = 1050+(statetype=A*2)
ctrl = 0
sprpriority = 2
facep2=1
[State 1050, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 0, 2
channel=1
[State 0, VarSet]
type = VarSet
trigger1 = movecontact
v = 8    ;fv = 10
value = 1

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

[State 0, PosAdd]
type = PosAdd
trigger1 =time=0 && statetype!=A
x = 12


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1,11
channel=2

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


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

[State 0, Explod]
type = Explod
triggerall = numexplod(1054)=0
trigger1 = animelem = 1
anim =1065
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 = numexplod(1055)=0
trigger1 = animelem = 2
anim =1066
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 
id = 1055
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1056)=0
trigger1 = animelem = 3
anim =1067
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 
id = 1056
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1057)=0
trigger1 = animelem = 4
anim =1068
ID =1057
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(5)>=0 
id = 1057
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1058)=0
trigger1 = animelem = 5
anim =1069
ID =1058
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
trigger1 = !movecontact
attr = S, SA
animtype  = up
damage    = 90,10
priority  = 4
guardflag = MA
pausetime = floor(12*(ifelse(var(18),.75,1))), floor(12*(ifelse(var(18),.75,1)))
sparkxy = 25,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -2.5,-14
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -3.5,-14
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.73
id=1050
forcestand=1
nochainid=1050
forcenofall=ifelse(anim=1050,1,0)
fall=ifelse(anim=1050,0,1)
fall.recover=0
down.bounce=0



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


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


[State 0, VelSet]
type = VelSet
trigger1 = Animelem=4
x =  3*(ifelse(var(18),1.5,1))
y = -10*(ifelse(var(18),1.5,1))
;ignorehitpause = 


[State 330, 4]
type = VelMul
trigger1 = animelemtime(4)>4
x = .9

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


[State 330, 5]
type = VelAdd
trigger1 = animelemtime(4)= [0,7]
y = .95*(ifelse(var(18),2,1))

[State 330, 5]
type = VelAdd
trigger1 = animelemtime(4)>7
y = .55*(ifelse(var(18),2,1))

[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 = ifelse(prevstateno=3000,3001,ifelse(prevstateno=3049,3022,1051))
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 - y
[Statedef 1060]
type    = U
movetype= A
physics = S
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8)
poweradd= 68
velset = 0,0
anim = 1055+(statetype=a)
ctrl = 0
facep2=1
[State 0, VarSet]
type = VarSet
trigger1 = movecontact
v = 8    ;fv = 10
value = 1

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

[State 0, PosAdd]
type = PosAdd
trigger1 =time=0 && statetype!=A
x = 16

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

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


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

[State 0, Explod]
type = Explod
triggerall = numexplod(1054)=0
trigger1 = animelem = 1
anim =1065
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 = numexplod(1055)=0
trigger1 = animelem = 2
anim =1066
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 
id = 1055
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1056)=0
trigger1 = animelem = 3
anim =1067
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 
id = 1056
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1057)=0
trigger1 = animelem = 4
anim =1068
ID =1057
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(5)>=0 
id = 1057
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1058)=0
trigger1 = animelem = 5
anim =1069
ID =1058
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
trigger1 = animelem=3
attr = S, SA
animtype  = up
damage    = 55,10
priority  = 4
guardflag = MA
pausetime = floor(8*(ifelse(var(18),.75,1))), floor(8*(ifelse(var(18),.75,1)))
sparkxy = 25,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = ifelse(p2bodydist x >15,.15,-.2)
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
forcestand=1
air.velocity = -3.5,-3
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.73
id=1050
forcenofall=1

[State 1055, 5]
type = HitDef
trigger1 = animelem=4
attr = S, SA
animtype  = up
damage    = 70,10
priority  = 4
guardflag = MA
pausetime = floor(12*(ifelse(var(18),.75,1))), floor(12*(ifelse(var(18),.75,1)))
sparkxy = 25,-75
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -4.5,-15
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -5.5,-ifelse(anim!=1060,15.5,21.5)
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.73
id=1050
forcenofall=ifelse(anim=1055,1,0)
fall=ifelse(anim=1055,0,1)
fall.recover=0
down.bounce=0


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


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


[State 0, VelSet]
type = VelSet
trigger1 = Animelem=4
x =  2.75*(ifelse(var(18),1.5,1))
y = -13*(ifelse(var(18),1.5,1))
;ignorehitpause = 


[State 330, 4]
type = VelMul
trigger1 = animelemtime(4)>7
x = .9

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


[State 330, 5]
type = VelAdd
trigger1 = animelemtime(4)= [0,7]
y = .95*(ifelse(var(18),2,1))

[State 330, 5]
type = VelAdd
trigger1 = animelemtime(4)>7
y = .55*(ifelse(var(18),2,1))

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

;---------------------------------------------------------------------------
;Gou Shoryuken - z
[Statedef 1062]
type    = U
movetype= A
physics = N
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8)
poweradd= 75
velset = 0,0
anim = 1060+(statetype=a)
ctrl = 0
sprpriority = 2
facep2=1
[State 1050, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 0, 2
channel=1
[State 0, VarSet]
type = VarSet
trigger1 = movecontact
v = 8    ;fv = 10
value = 1

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

[State 0, PosAdd]
type = PosAdd
trigger1 =time=0 && statetype!=A
x = 16


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1,11
channel=2

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


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

[State 0, Explod]
type = Explod
triggerall = numexplod(1054)=0
trigger1 = animelem = 1
anim =1065
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 = numexplod(1055)=0
trigger1 = animelem = 2
anim =1066
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 
id = 1055
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1056)=0
trigger1 = animelem = 3
anim =1067
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 
id = 1056
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1057)=0
trigger1 = animelem = 4
anim =1068
ID =1057
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(5)>=0 
id = 1057
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1058)=0
trigger1 = animelem = 5
anim =1069
ID =1058
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
trigger1 = animelem=2
attr = S, SA
animtype  = up
damage    = 50,10
priority  = 4
guardflag = MA
pausetime =floor(8*(ifelse(var(18),.75,1))), floor(8*(ifelse(var(18),.75,1)))
sparkxy = 25,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = ifelse(p2bodydist x >15,.35,-.4)
guard.velocity = -3
ground.slidetime = 22
forcestand=1
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -.5,-3
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.73
id=1050
forcenofall=1
[State 1055, 5]
type = HitDef
trigger1 = animelem=3
attr = S, SA
animtype  = up
damage    = 50,10
priority  = 4
guardflag = MA
pausetime = floor(12*(ifelse(var(18),.75,1))), floor(12*(ifelse(var(18),.75,1)))
sparkxy = 25,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity =  ifelse(p2bodydist x >15,.35,-.4),-3
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -.5,-3
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.73
id=1050
forcenofall=1

[State 1055, 5]
type = HitDef
trigger1 = animelem=4
attr = S, SA
animtype  = up
damage    = 70,10
priority  = 4
guardflag = MA
pausetime = floor(12*(ifelse(var(18),.75,1))), floor(12*(ifelse(var(18),.75,1)))
sparkxy = 25,-75
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -4.5,-18.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =42
guard.ctrltime = 15
air.hittime=42
air.velocity = -5.5,-ifelse(anim!=1060,18.5,23.5)
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.67
id=1050
forcenofall=ifelse(anim=1060,1,0)
fall=ifelse(anim=1060,0,1)
fall.recover=0
down.bounce=0


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


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


[State 0, VelSet]
type = VelSet
trigger1 = Animelem=4
x =  5.25*(ifelse(var(18),1.5,1))
y = -18.25*(ifelse(var(18),1.5,1))
;ignorehitpause = 


[State 330, 4]
type = VelMul
trigger1 = animelemtime(4)>12
x = .9

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


[State 330, 5]
type = VelAdd
trigger1 = animelemtime(4)= [0,9]
y = .75*(ifelse(var(18),2,1))

[State 330, 5]
type = VelAdd
trigger1 = animelemtime(4)>9
y = .55*(ifelse(var(18),2,1))

[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    = U
movetype= A
physics = N
juggle  =0;6
poweradd= 60
anim = ifelse(statetype=A,1102,1100)
ctrl = 0
sprpriority = 2
[State 0, PosAdd]
type = PosAdd
trigger1 =time=0 && var(4)=1
x = 12
[State 0, VarSet]
type = VarSet
trigger1 =statetype=A&&time=0 
v = 4    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =statetype!=A&&time=0 
v = 4    ;fv = 10
value = 0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=3
statetype = A       ;S,A,C,L
;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(4)=1&& time=0
value = 1100
elem = 3
;ignorehitpause = 
;persistent = 

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

[State 1061, 1]
type = Velset
triggerall = var(4) = 0

trigger1 = animelemtime(3) > 0 && animelemtime(5) < 0
y = -5.5*(ifelse(var(18),1.5,1))

[State 1061, 1]
type = Velset
triggerall = var(4) = 0

trigger1 = animelem = 5
y = 0

[State 1061, 1]
type = Velset
triggerall = var(4) = 0
trigger1 = animelem=3
x = 5.75*(ifelse(var(18),1.5,1))
[State 1061, 1]
type = Velset
triggerall = var(4) = 0
trigger1 = animelem=5
x = 3.55*(ifelse(var(18),1.5,1))
[State 0, VelSet]
type = VelSet
trigger1 =time=0 && var(4)=1 
x =2.5*(ifelse(var(18),1.5,1))
y =-5.5*(ifelse(var(18),1.5,1))
;ignorehitpause = 
;persistent = 


[State 640, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 8
value = 0, 1
channel=1


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


[State 1060, 4]
type = HitDef
trigger1 = animelem = 5
attr = A, SA
animtype  = Medium
damage    = 49,8
priority  = 5
guardflag = MA
pausetime =floor(9*(ifelse(var(18),.75,1))), floor(9*(ifelse(var(18),.75,1)))
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 =-1.5,-3.5
guard.velocity = -7
air.velocity = -1.5,-3.5
air.hittime=35
id=200
yaccel=ifelse(var(4)=1,.77,.58)
forcenofall=1
[State 1060, 4]
type = HitDef
trigger1 = animelem = 9
attr = A, SA
animtype  = Medium
damage    = 49;, 4
priority  = 5
guardflag = MA
pausetime = floor(9*(ifelse(var(18),.75,1))), floor(9*(ifelse(var(18),.75,1)))
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = ifelse(30-var(20) <0,0,30-var(20))
guard.ctrltime=15
ground.velocity =-1.5,-7.5
guard.velocity = -7
air.velocity = -1.5,ifelse(var(18)=0&&var(5)>2,7,-7.5)
air.hittime=ifelse((30+ifelse(var(4)=1,9,0))-var(20) <0,18,(30+ifelse(var(4)=1,9,0))-var(20))
id=200
forcenofall=1
fall.recover=0
yaccel=ifelse(var(18)=0&&var(5)>2,.99,ifelse(var(4)=1,.77,.58))

[State 0, VarSet]
type = Varadd
trigger1 =time=0&& p2movetype=H &&var(18)=0 
v = 5   ;fv = 10
value = 1


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



[State 1030, back]
type = ChangeState
trigger1 = AnimTime = 0 && var(4)=1
value = 57
ctrl = 1
[State 0, VelAdd]
type = VelAdd
trigger1 = time >25 && var(4)=0
trigger2= var(4)=1
y = .5*(ifelse(var(18),2,1))

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

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

[State 1030, Pos]
type = PosSet
trigger1 = Anim = 1101
y = 0
[State 1030, ground]
type = ChangeAnim
trigger1 = animelemtime(4)>=0 && Pos Y >= 0 && anim!=1101
value = 1101

[State 1030, back]
type = ChangeState
trigger1 = Anim = 1101
trigger1 = AnimTime = 0
trigger1 = Pos y >= 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 1101]
type    = U
movetype= A
physics = N
juggle  =0;6
poweradd= 60
anim = ifelse(statetype=A,1107,1105)
ctrl = 0
sprpriority = 2
[State 0, PosAdd]
type = PosAdd
trigger1 =time=0 && var(4)=1
x = 12
[State 0, VarSet]
type = VarSet
trigger1 =statetype=A&&time=0 
v = 4    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =statetype!=A&&time=0 
v = 4    ;fv = 10
value = 0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=3
statetype = A       ;S,A,C,L
;ignorehitpause = 
;persistent = 


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(4)=1&& time=0
value = 1105
elem = 3
;ignorehitpause = 
;persistent = 

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

[State 1061, 1]
type = Velset
triggerall = var(4) = 0
trigger1 = animelemtime(3) > 0 && animelemtime(5) < 0
y = -5.5*(ifelse(var(18),1.5,1))

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

[State 1061, 1]
type = Velset
triggerall = var(4) = 0
trigger1 = animelem=3
x = 7*(ifelse(var(18),1.5,1))
[State 1061, 1]
type = Velset
triggerall = var(4) = 0
trigger1 = animelem=5
x = 3.55*(ifelse(var(18),1.5,1))
[State 0, VelSet]
type = VelSet
trigger1 =time=0 && var(4)=1 
x =2.5*(ifelse(var(18),1.5,1))
y =-6.5*(ifelse(var(18),1.5,1))
;ignorehitpause = 
;persistent = 


[State 640, 2]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 8
trigger3 = animelem = 12
trigger4 = animelem = 16
value = 0, 1
channel=1


[State 0, Explod]
type = Explod
triggerall = var(4) = 0
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
trigger1 = animelem = 5
attr = A, SA
animtype  = Medium
damage    = 35, 10
priority  = 5
guardflag = MA
pausetime = floor(7*(ifelse(var(18),.75,1))), floor(7*(ifelse(var(18),.75,1)))
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 10
guard.ctrltime=10
ground.velocity =-1
guard.velocity = -7
air.velocity = -1,-3
air.hittime=12
id=200
yaccel=ifelse(var(4)=1,.77,.58)
forcenofall=1


[State 1060, 4]
type = HitDef
trigger1 = animelem = 9
attr = A, SA
animtype  = Medium
damage    = 35, 10
priority  = 5
guardflag = MA
pausetime =floor(9*(ifelse(var(18),.75,1))), floor(9*(ifelse(var(18),.75,1)))
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 18
guard.ctrltime=15
ground.velocity =-1.5
guard.velocity = -7
air.velocity = -1.5,-2.5
air.hittime=12
id=200
yaccel=ifelse(var(4)=1,.77,.58)
forcenofall=1
[State 1060, 4]
type = HitDef
trigger1 = animelem = 13
attr = A, SA
animtype  = Medium
damage    = 35, 10
priority  = 5
guardflag = MA
pausetime = floor(9*(ifelse(var(18),.75,1))), floor(9*(ifelse(var(18),.75,1)))
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
guard.ctrltime=15
ground.velocity =-1.5
guard.velocity = -7
air.velocity = -1.5,-4.5
air.hittime=12
id=200
yaccel=ifelse(var(4)=1,.77,.58)
forcenofall=1
[State 1060, 4]
type = HitDef
trigger1 = animelem = 17
attr = A, SA
animtype  = Medium
damage    =70, 13
priority  = 5
guardflag = MA
pausetime = floor(9*(ifelse(var(18),.75,1))), floor(9*(ifelse(var(18),.75,1)))
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = ifelse(36-var(21) <0,0,36-var(21))
guard.ctrltime=17
ground.velocity =-1.5
guard.velocity = -7
air.velocity = -1.5,-2.5
air.hittime=ifelse(32-var(20) <0,20,32-var(20))
id=200
forcenofall=1
fall.recover=0
yaccel=ifelse(var(4)=1,.77,.58)



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



[State 1030, back]
type = ChangeState
trigger1 = AnimTime = 0 && var(4)=1
value = 57
ctrl = 1
[State 0, VelAdd]
type = VelAdd
trigger1 = time >41 && var(4)=0
trigger2= var(4)=1
y = .5

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

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

[State 1030, Pos]
type = PosSet
trigger1 = Anim = 1101
y = 0
[State 1030, ground]
type = ChangeAnim
trigger1 = animelemtime(4)>=0 && Pos Y >= 0 && anim!=1101
value = 1101

[State 1030, back]
type = ChangeState
trigger1 = Anim = 1101
trigger1 = AnimTime = 0
trigger1 = Pos y >= 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 1102]
type    = U
movetype= A
physics = N
juggle  =0;6
poweradd= 60
anim = 1106
ctrl = 0
sprpriority = 2
[State 0, PosAdd]
type = PosAdd
trigger1 =time=0 && var(4)=1
x = 12
[State 0, VarSet]
type = VarSet
trigger1 =statetype=A&&time=0 
v = 4    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =statetype!=A&&time=0 
v = 4    ;fv = 10
value = 0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=3
statetype = A       ;S,A,C,L
;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(4)=1&& time=0
value = 1106
elem = 3
;ignorehitpause = 
;persistent = 


[State 200, 1]
type = PlaySnd
triggerall = anim=1106
trigger1 = animelem = 3
value = S2, 1
channel=0
[State 200, 1]
type = PlaySnd
triggerall = anim=1110
trigger1 = animelem = 4
value = S2, 8
channel=0
[State 1061, 1]
type = Velset
triggerall = anim=1106
triggerall = var(4) = 0
trigger1 = animelem=3
y = -5*(ifelse(var(18),1.5,1))

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

[State 1061, 1]
type = Velset
triggerall = anim=1106
triggerall = var(4) = 0
trigger1 = animelem=3
x = 5.75*(ifelse(var(18),1.5,1))

[State 0, VelSet]
type = VelSet
triggerall = anim=1106
trigger1 =time=0 && var(4)=1 
x =3.5*(ifelse(var(18),1.5,1))
y =-8.5*(ifelse(var(18),1.5,1))
;ignorehitpause = 
;persistent = 


[State 640, 2]
type = PlaySnd
trigger1 = animelem = 3&& anim=1106
trigger2 = animelem = 8&& anim=1106
trigger3 = animelem = 12&& anim=1106
trigger4 = animelem = 3 && anim=1110
value = 0, 1
channel=1


[State 0, Explod]
type = Explod
triggerall = var(4) = 0
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 = anim=1106
trigger1 = animelem = 3
attr = A, SA
animtype  = Medium
damage    = ifelse(var(4)=1,55,35), 6
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  = 15
guard.ctrltime=15
ground.velocity =-1,-5
guard.velocity = -7
air.velocity = -1,-5
air.hittime=15
id=200
fall=1
fall.recover=0


[State 1060, 4]
type = HitDef
triggerall = anim=1106
trigger1 = animelem = 5
attr = A, SA
animtype  = Medium
damage    =  ifelse(var(4)=1,55,35), 6
priority  = 5
guardflag = MA
pausetime =floor(7*(ifelse(var(18),.75,1))), floor(7*(ifelse(var(18),.75,1)))
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 =-1.5,-7.5
guard.velocity = -7
air.velocity = -1.5,-7.5
air.hittime=35
id=200
yaccel=ifelse(var(4)=1,.77,.58)
forcenofall=1

[State 1060, 4]
type = HitDef
triggerall = anim=1106
trigger1 = animelem = 9
attr = A, SA
animtype  = Medium
damage    =  ifelse(var(4)=1,55,35), 6
priority  = 5
guardflag = MA
pausetime = floor(7*(ifelse(var(18),.75,1))), floor(7*(ifelse(var(18),.75,1)))
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 15
guard.ctrltime=18
ground.velocity =-1.5,-7.5
guard.velocity = -7
air.velocity = -1.5,-7.5
air.hittime=30-var(20)
id=200
forcenofall=1
fall.recover=0
yaccel=ifelse(var(4)=1,.68,.58)
[State 1060, 4]
type = HitDef
triggerall = anim=1106
trigger1 = animelem = 13
attr = A, SA
animtype  = Medium
damage    = ifelse(var(4)=1,55,35), 6
priority  = 5
guardflag = MA
pausetime = floor(9*(ifelse(var(18),.75,1))), floor(9*(ifelse(var(18),.75,1)))
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 15
guard.ctrltime=18
ground.velocity =-1.5,-7.5
guard.velocity = -7
air.velocity = -1.5,-7.5
air.hittime=30-var(20)
id=200
forcenofall=1
fall.recover=0
yaccel=ifelse(var(4)=1,.68,.58)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit &&animelem=16 && anim!=1110 && var(4)=0
value = 1110

[State 1060, 4]
type = HitDef
triggerall = anim=1110
trigger1 = animelem = 5
attr = A, SA
animtype  = Medium
damage    = 65, 12
priority  = 5
guardflag = MA
pausetime = floor(9*(ifelse(var(18),.75,1))), floor(9*(ifelse(var(18),.75,1)))
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 15
guard.ctrltime=18
ground.velocity =-1.5,7.5
guard.velocity = -7
air.velocity = -1.5,7.5
air.hittime=15
id=200
fall=1
fall.recover=0
yaccel=ifelse(var(4)=1,.68,.58)

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204]) && p2stateno!=[1029,1030]
value =ifelse(anim=1110&&var(16)=0,1029,202)
ID =200
ignorehitpause =1



[State 1030, back]
type = ChangeState
trigger1 = AnimTime = 0 && var(4)=1
value = 57
ctrl = 1
[State 0, VelAdd]
type = VelAdd
trigger1 = time >36 && var(4)=0 && anim=1106
trigger2= var(4)=1
trigger3= anim=1110 && animelemtime(9)>0
y=.67*(ifelse(var(18),2,1))
[State 1030, typeset]
type = StateTypeSet
trigger1 = Anim = 1101
trigger1 = AnimElem = 1
movetype = I

[State 1030, Vel3]
type = VelSet
trigger1 =Anim = 1101
trigger2= anim=1110 && animelemtime(9)<0&& var(4)=0
trigger3= anim=1106 && animelem =15 && var(4)=0
X = 0
y = 0

[State 1030, Pos]
type = PosSet
trigger1 = Anim = 1101
y = 0
[State 1030, ground]
type = ChangeAnim
trigger1 = animelemtime(4)>=0 && Pos Y >= 0 && anim!=1101
value = 1101

[State 1030, back]
type = ChangeState
trigger1 = Anim = 1101
trigger1 = AnimTime = 0
trigger1 = Pos y >= 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Ground Bounce
[Statedef 1029]
type    = A
movetype= H
physics = N
poweradd =0; 0
ctrl = 0
sprpriority =-1
[State 0, Turn]
type = Turn
trigger1 =facing= enemy,facing 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0
value = 5030

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=2
value = 5160

[State 0, VelSet]
type = VelSet
trigger1 = time=0
y=7
x=0

;ignorehitpause = 
;persistent = 

[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .55
[State 0, PosAdd]
type = PosAdd
trigger1 =time=0 && pos y >-20
y = -40
ignorehitpause =1
;persistent =

[State 0, SelfState]
type = changeState
trigger1 = pos y>=-5
value =1030

;---------------------------------------------------------------------------
; Ground bounce up
[Statedef 1030]
type    = A
movetype= H
physics = N
poweradd =0; 0
ctrl = 0
sprpriority =-1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0
value = 5100

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=5
value = 5160

[State 0, VelSet]
type = VelSet
trigger1 = time=0
y=-7.75
x=0

[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .36



[State 0, SelfState]
type = SelfState
trigger1 = pos y>10 && time>24
value =5100
;---------------------------------------------------------------------------
;
[Statedef 3000]
type    = S
movetype= A
physics = N
velset = 0,0
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
anim = 3000
ctrl = 0
sprpriority = 0
facep2=1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =1
id =1001
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1055
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1054
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1057
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1056
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1057
[State 0, VelSet]
type = VelSet
triggerall = moveguarded
trigger1 =animelem=44 && (anim=3000)
x = .75

;ignorehitpause =
;persistent =
[State 0, PosFreeze]
type = PosFreeze
trigger1 = time<49
value = 1
ignorehitpause = 



[State 0, NotHitBy]
type = NotHitBy
trigger1 =  time=0&& (anim=3000)
value = SCA
;value2 = S,NA
time = 62
;ignorehitpause = 
;persistent = 

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time=0&& (anim=3000)
value = -1000
;ignorehitpause = 
;persistent = 

[State 0, Pause]
type = Pause
trigger1 = time=0&& (anim=3000)
time = 48
movetime = 48
;endcmdbuftime = 0
;pausebg = 1
;ignorehitpause = 
;persistent = 


[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=0&& (anim=3000)
value = S3001,2
channel=2

[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=0&& (anim=3000)
value = S2,4
channel=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=2&& (anim=3000)
value = S2,15
channel=0

[State 182, 2]
type = NotHitBy
trigger1 =time>=58&& (anim=3000)
value = SCA,AP
time =1
[State 3000, Hyperbg]
type = Explod
trigger1 = time=0&& (anim=3000)
anim = 6004
ID = 6001
pos = 9,-45
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 =animelem=2&& (anim=3000)
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 = -9
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1
[State 0, AssertSpecial]
type = AssertSpecial
triggerall = !winko
trigger1 =anim=3000&& animelemtime(19)<0
flag = noBG
flag=noFG



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

;-------
[State 0, Explod]
type = Explod
triggerall = numexplod(1054)=0
trigger1 = animelem = 1
trigger2=animelem=8
trigger3=animelem=15
anim =1065
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 = animelem = 2
trigger2=animelem=9
trigger3=animelem=16
id = 1054
ignorehitpause =1 
persistent = 1

[State 0, Explod]
type = Explod
triggerall = numexplod(1055)=0
trigger1 = animelem = 2
trigger2=animelem=9
trigger3=animelem=16
anim =1066
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 = animelem = 3
trigger2=animelem=10
trigger3=animelem=17
id = 1055
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1056)=0
trigger1 = animelem = 3
trigger2=animelem=10
trigger3=animelem=17
anim =1067
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 = animelem = 4
trigger2=animelem=11
trigger3=animelem=18
id = 1056
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1057)=0
trigger1 = animelem = 4
trigger2=animelem=11
trigger3=animelem=18
anim =1068
ID =1057
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 = animelem = 5
trigger2=animelem=12
trigger3=animelem=19
id = 1057
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1058)=0
trigger1 = animelem = 5
trigger2=animelem=12
trigger3=animelem=19
anim =1069
ID =1058
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=animelem=8
trigger2=animelem=15
id = 1058
ignorehitpause =1 
persistent = 1
[State 1050, 1]
type = PlaySnd
trigger1 = animelem = 2 && anim=3000
trigger2=animelem=9&& anim=3000
trigger3=animelem=16&& anim=3000
value = 0, 2
channel=1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2&& anim=3000
trigger2=animelem=9&& anim=3000
trigger3=animelem=16&& anim=3000
value = S1,11
channel=3



;-------

[State 0, VelSet]
type = VelSet
trigger1 = animelem=2
trigger2= animelem=8
x = 5.5
[State 0, VelMul]
type = VelMul
trigger1 = animelemtime(6)>=0 && animelemtime(8)<0 
trigger1 = animelemtime(13)>=0 && animelemtime(15)<0 
x = .75

[State 1055, 5]
type = HitDef
trigger1 = animelem=2
trigger2 = animelem=9
trigger3 = animelem=16
attr = S, HA
animtype  = heavy
air.animtype=up
damage    = 35,10
priority  = 4
guardflag = MA
getpower=0
pausetime = 6,6
sparkxy = 25,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -2.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -4.5,-2
airguard.velocity = -4,-2.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.53
id=1050

[State 1055, 5]
type = HitDef
trigger1 = animelem=4
trigger2 = animelem=11
attr = S, HA
animtype  = heavy
air.animtype=up
damage    = 35,10
priority  = 4
guardflag = MA
pausetime = 6,6
getpower=0
sparkxy = 25,-73
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -2.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -2.5,-2
airguard.velocity = -4,-3.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.3
id=1050

[State 1055, 5]
type = HitDef
trigger1 = animelem=3
trigger2 = animelem=10
trigger3 = animelem=17
attr = S, HA
animtype  = heavy
air.animtype=up
damage    = 35,10
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = 25,-61
sparkno =S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
getpower=0
guardsound = S3,1
ground.type = High
ground.velocity = -2.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -3.5,-6
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.73
id=1050

[State 1055, 5]
type = HitDef
trigger1 = animelem=18
trigger2= animelemtime(18)=2
trigger3= animelemtime(18)=5
trigger4= animelemtime(18)=8
trigger5= animelemtime(18)=11
trigger6= animelemtime(18)=13
attr = S, HA
animtype  = up
damage    = 11,10
priority  = 4
guardflag = MA
pausetime = 1,1
sparkxy = 25,-74
sparkno = S7005+(random%3)
guard.sparkno = S7009
getpower=0
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -.25,-4.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =35
guard.ctrltime = 15
air.hittime=35
air.velocity = .75,-9.5
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.67
id=1050
fall=1
fall.recover=0
down.bounce=0

[State 1055, 5]
type = HitDef
trigger1= animelemtime(18)=16
attr = S, HA
animtype  = up
damage    = 20,10
priority  = 4
guardflag = MA
pausetime = 1,1
sparkxy = 25,-74
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -1.5,-4.5
guard.velocity = -3
getpower=0
ground.slidetime = 22
ground.hittime  =35
guard.ctrltime = 15
air.hittime=40
air.velocity = -6.5,-11.5
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.67
id=1050
fall=1
fall.recover=0
down.bounce=0
[State 1055, 5]
type = HitDef
triggerall = animelemtime(18)=[0,15]
trigger1 = var(2)=1&& gametime%2=0 
attr = S, HA
animtype  = up
damage    = 13,10
priority  = 4
guardflag = MA
pausetime = 2,2
sparkxy = 25,-74
sparkno = S7005+(random%3)
guard.sparkno = S7009
getpower=0
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -4.5,-4.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =35
guard.ctrltime = 15
air.hittime=35
air.velocity = 1,-7
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.7
id=1050
fall=1
down.bounce=0

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


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


[State 0, VelSet]
type = VelSet
trigger1 = Animelem=18
x =  5.25
y = -19
;ignorehitpause = 


[State 330, 4]
type = VelMul
trigger1 = animelemtime(18)>12
x = .9

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


[State 330, 5]
type = VelAdd
trigger1 = animelemtime(18)= [0,12]
y = .95

[State 330, 5]
type = VelAdd
trigger1 = animelemtime(18)>12
y = .55



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

;---------------------------------------------------------------------------
;
[Statedef 3010]
type    = S
movetype= A
physics = N
velset = 0,0
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
anim = 3010
ctrl = 0
sprpriority = 0
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =1
id =1001
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1055
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1054
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1057
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1056
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1057

[State 0, PlayerPush]
type = PlayerPush
trigger1 =movecontact
value = 0
;ignorehitpause =
;persistent =
[State 0, PosFreeze]
type = PosFreeze
trigger1 = time<49
value = 1
ignorehitpause = 1
;persistent = 


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



[State 0, NotHitBy]
type = NotHitBy
trigger1 =  time=0&& (anim=3010)
value = SCA
;value2 = S,NA
time = 48
;ignorehitpause = 
;persistent = 

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time=0&& (anim=3010)
value = -1000
;ignorehitpause = 
;persistent = 

[State 0, Pause]
type = Pause
trigger1 = time=0&& (anim=3010)
time = 48
movetime = 48
;endcmdbuftime = 0
;pausebg = 1
;ignorehitpause = 
;persistent = 


[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=0&& (anim=3010)
value = S3001,2
channel=2
[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=0&& (anim=3010)
value = S2,4
channel=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=2&& (anim=3010)
value = S2,17
channel=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=3&& (anim=3010)
value = S3000,0
channel=1

[State 182, 2]
type = NotHitBy
trigger1 =animelem=2&& (anim=3010)
value = SCA
time =12

[State 3000, Hyperbg]
type = Explod
trigger1 = time=0&& (anim=3010)
anim = 6004
ID = 6001
pos = 9,-45
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 =animelem=2&& (anim=3010)
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 = -9
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =anim=3010&& animelemtime(22)<0
flag = noBG
flag=noFG



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

;-------
[State 0, Explod]
type = Explod
triggerall = numexplod(1054)=0
trigger1 = animelem = 1
anim =1065
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 = animelem = 2
id = 1054
ignorehitpause =1 
persistent = 1

[State 0, Explod]
type = Explod
triggerall = numexplod(1055)=0
trigger1 = animelem = 2
anim =1066
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 = animelem = 3
id = 1055
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1056)=0
trigger1 = animelem = 3
anim =1067
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 = animelem = 4
id = 1056
ignorehitpause =1 
persistent = 1


[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim =3011
ID =1059
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 1055, 5]
type = HitDef
trigger1 = animelem=2
attr = S, HA
animtype  = heavy
air.animtype=up
damage    = 70,10
priority  = 4
guardflag = MA
hitflag=MAFD
pausetime = 8,8
sparkxy = 25,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = 5.5
guard.velocity = -3
ground.slidetime = 22
getpower=0
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = 5.5,-3
airguard.velocity = -4,-4.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.53
id=1050

[State 1055, 5]
type = HitDef
trigger1 = animelem=3
attr = S, HA
animtype  = heavy
air.animtype=up
damage    = 30,10
priority  = 4
guardflag = MA
pausetime = 3,3
sparkxy = 25,-73
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -2.5,-5
guard.velocity = -3
ground.slidetime = 22
getpower=0
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -3.5,-7
airguard.velocity = -4,-3.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
forcenofall=1
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.53
id=1050


[State 1055, 5]
type = HitDef
trigger1 = animelem=4
trigger2 = animelem=6
trigger3 = animelem=8
trigger4 = animelem=10
trigger5 = animelem=12
trigger6 = animelem=14
trigger7 = animelem=16
trigger8 = animelem=18
trigger9 = animelem=20
attr = S, HA
animtype  = up
damage    = 25,10
priority  = 4
guardflag = MA
pausetime = 1,1
sparkxy = 25,-74
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = ifelse(p2bodydist x >15,.15,-.2),-10.25
guard.velocity = -3
ground.slidetime = 22
getpower=0
ground.hittime  =35
guard.ctrltime = 15
air.hittime=35
air.velocity = .25,-10.75
airguard.velocity = -4,-4.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.67
id=1050
forcenofall=1
down.bounce=0

[State 1055, 5]
type = HitDef
trigger1= animelem=21
attr = S, HA
animtype  = up
damage    = 20,10
priority  = 4
guardflag = MA
pausetime = 1,1
sparkxy = 25,-74
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -1.5,-4.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =35
guard.ctrltime = 15
getpower=0
air.hittime=45
air.velocity = -6.5,-18.5
airguard.velocity = -4,-4.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.67
forcenofall=1
id=1050
down.bounce=0
[State 1055, 5]
type = HitDef
triggerall = var(2)=1 && gametime%2=0
trigger1 = animelemtime(5)>=0 && animelemtime(20)<0
attr = S, HA
animtype  = up
damage    = 15,10
priority  = 4
guardflag = MA
pausetime = 2,2
sparkxy = 25,-74
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -4.5,-4.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =35
guard.ctrltime = 15
getpower=0
air.hittime=35
air.velocity = ifelse(p2bodydist x >15,.15,-.2),-5
airguard.velocity = -4,-4.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
forcenofall=1
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.67
id=1050
down.bounce=0

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


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

[State 0, VelSet]
type = VelSet
trigger1 = Animelem=4
y = -8.5

[State 0, VelSet]
type = VelSet
trigger1 = Animelem=21
y = 0
;ignorehitpause = 


[State 330, 5]
type = VelAdd
trigger1 = animelemtime(21)>0
y = .57



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


;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 3049]
type    = S
movetype= A
physics = S
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
velset = 0,0
anim =3020
ctrl = 0
sprpriority = 1
facep2=1
[State 0, VarSet]
type = VarSet
trigger1 = 1
fv =2   ;fv = 10
value = ifelse(fvar(11)=1,.7,1)
ignorehitpause = 1
;persistent = 

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =1
id =1001
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1055
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1054
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1057
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1056
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1057


[State 0, NotHitBy]
type = NotHitBy
trigger1 =  animelem=1 && (anim=3020)
value = SCA
;value2 = S,NA
time = 81
;ignorehitpause = 
;persistent = 
[State 0, NotHitBy]
type = NotHitBy
trigger1 =  movehit
trigger2= anim=3021
value = SCA
time = 100
[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelem=3&& (anim=3020)
value =  -3000
;ignorehitpause = 
;persistent = 

[State 0, Pause]
type = Pause
trigger1 = animelem=3 && (anim=3020)
time = 48
movetime = 48
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=3 && (anim=3020)
value = S3001,ifelse(var(59)=1,1,0)
[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=0&& (anim=3020)
value = S2,3
channel=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=4&& (anim=3020)
value = S2,6
channel=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=10&& (anim=3020)
value = S2,7
channel=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=16&& (anim=3020)
value = S2,13
channel=0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=26&& (anim=3020)
value = S2,0
channel=0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=34&& (anim=3020)
value = S2,15
channel=0
[State 0, StopSnd]
type = StopSnd
trigger1 = animelem=39&& (anim=3020)
channel = 0
;ignorehitpause = 
;persistent = 


[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=43&& (anim=3020)
value = S2,14
channel=0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelemtime(1)=1&& (anim=3021)
value = S2,9
channel=0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=5&& (anim=3021)
value = S2,17
channel=0
[State 3000, Hyperbg]
type = Explod
trigger1 = animelem=3  && (anim=3020)
anim = 6004
ID = 6001
pos = 9,-45
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 =animelem=4  && (anim=3020)
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 = -9
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =anim=3020&& animelemtime(4)>=0
flag = noBG
flag=noFG



[State 3000, helper]
type = Helper
trigger1 =animelem=3 && (anim=3020)
pos = 0,-240
postype = back
id = 4000
name = "Hyperportrait"
stateno = 4001
ownpal = 1
size.xscale = 1
size.yscale = 1.25
supermovetime = 110
pausemovetime  = 110


[State 0, Explod]
type = Explod
trigger1 = animelem = 1&& anim=3020
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

;ignorehitpause =
;persistent =
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 =animelem=4 
ID =8002
pausemovetime = 99
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0


[State 0, Explod]
type = Explod
triggerall = numexplod(1054)=0
trigger1 = animelem =25&& anim=3020
trigger2=animelem=33&& anim=3020
trigger3=animelem=3&& anim=3021
anim =1065
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 = animelem = 26&& anim=3020
trigger2=animelem=34&& anim=3020
trigger3=animelem=4&& anim=3021
id = 1054
ignorehitpause =1 
persistent = 1

[State 0, Explod]
type = Explod
triggerall = numexplod(1055)=0
trigger1 = animelem = 26&& anim=3020
trigger2=animelem=34&& anim=3020
trigger3=animelem=4&& anim=3021
anim =1066
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 = animelem = 27&& anim=3020
trigger2=animelem=35&& anim=3020
trigger3=animelem=5&& anim=3021
id = 1055
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1056)=0&& anim=3020
trigger1 = animelem = 27
trigger2=animelem=35
anim =1067
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 = animelem = 28&& anim=3020
trigger2=animelem=36&& anim=3020
id = 1056
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1057)=0&& anim=3020
trigger1 = animelem = 28
trigger2=animelem=36
anim =1068
ID =1057
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 = animelem = 29&& anim=3020
trigger2=animelem=37&& anim=3020
id = 1057
ignorehitpause =1 
persistent = 1
[State 0, Explod]
type = Explod
triggerall = numexplod(1058)=0&& anim=3020
trigger1 = animelem =29
trigger2=animelem=37
anim =1069
ID =1058
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=animelem=31&& anim=3020
trigger2=animelem=40&& anim=3020
id = 1058
ignorehitpause =1 
persistent = 1
[State 0, VelSet]
type = VelSet
trigger1 =animelem=4&& anim=3020
trigger2= animelem=10&& anim=3020
trigger3= animelem=17&& anim=3020
x = 6.5

[State 0, PosAdd]
type = PosAdd
trigger1 = animelemtime(24)=2 && anim=3020
x =12

[State 0, PosAdd]
type = PosAdd
trigger1 = animelemtime(23)=0 && anim=3020
x =15

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=43&& anim=3020
statetype = A       ;S,A,C,L
physics = N         ;A,C,S,N

[State 0, VelSet]
type = VelSet
trigger1 =animelem=43 && anim=3020
x = 3.5
y = -11
[State 0, VelAdd]
type = VelAdd
trigger1 =animelemtime(43)>0 && anim=3020 
y = .56
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 =animelem=26 && anim=3020
trigger2 =animelem=34 && anim=3020
x = 5.7

[State 0, VelSet]
type = VelSet
trigger1 = animelem=30 && anim=3020 
trigger2 = animelem=38 && anim=3020 
x = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =anim=3020 && pos y >=0 && animelemtime(45)>0 
value = 3021

[State 0, PosSet]
type = PosSet
trigger1 = animelemtime(4)<0 && anim=3021
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(4)<0 && anim=3021
x = 0
y = 0

[State 0, VelSet]
type = VelSet
trigger1 =animelem=6 && anim=3021
x =0
y = -20
[State 0, VelAdd]
type = VelAdd
trigger1 =animelemtime(6)>0 && anim=3021
y = .56


;persistent = 
[State 210, 2]
type = HitDef
trigger1 = animelem=5 && anim=3020
attr = S,HA
animtype  = Medium
damage    =20
priority = 5, Hit
guardflag = MA
pausetime =  5,5
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,3
guardsound = S3,1
ground.type = low
ground.slidetime =29
ground.hittime  =70
guard.ctrltime=25
ground.velocity = -5.5
air.velocity = -2.5,-4
air.cornerpush.veloff=0
air.hittime = 50
yaccel = .57
air.fall=1
fall.recover=0
forcenofall=1
p2stateno=3051
kill=0
id=200




[State 0, TargetState]
type = TargetState
triggerall = p2stateno!=3051
triggerall = animelemtime(18)<0 && anim=3020 || animelemtime(22)>0&& anim=3020 || anim=3021
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])&& (p2stateno!=[1035,1038])
value =202
ID =200
ignorehitpause =1 


[State 210, 2]
type = HitDef
trigger1 = animelem=11 && anim=3020
attr = S, HA
animtype  = Medium
damage    =20
priority = 5, Hit
guardflag = MA
pausetime =  5,5
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,2
guardsound = S3,1
ground.type = low
ground.slidetime =29
ground.hittime  =70
guard.ctrltime=25
ground.velocity = -7.5
air.velocity = -0,0
air.cornerpush.veloff=0
air.hittime = 50
yaccel = .57
forcenofall=1
id=200
kill=0

[State 0, Width]
type = Width
trigger1 = animelemtime(14)>=0 && animelemtime(22)<0 && anim=3020
edge = 95,0
player = 45,0

;persistent = 
[State 210, 2]
type = HitDef
trigger1 = animelem=18 && anim=3020
attr = S, HA
animtype  = Medium
damage    =15
priority = 5, Hit
guardflag = MA
pausetime =  5,5
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,3
guardsound = S3,1
ground.type = low
ground.slidetime =29
ground.hittime  = 20
guard.ctrltime=17
ground.velocity = -13,-10.5
air.velocity = -12,-10.5
air.cornerpush.veloff=0
air.hittime = 50
yaccel = .57
air.fall=1
fall.recover=0
id=201
kill=0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall =movehit&& p2statetype!=L
triggerall = p2bodydist y >= -67
trigger1 =  anim=3020 && animelemtime(24)>=0 && animelemtime(25)<0
value = 3020
elem = 25
;ignorehitpause = 
;persistent = 



[State 0, TargetState]
type = TargetState
trigger1 = movehit=1 && (p2stateno!=[1035,1038])&& anim=3020
value =1035
ID =201
ignorehitpause =1 

[State 1055, 5]
type = HitDef
trigger1 = animelem=28&& anim=3020
attr = S, HA
animtype  = up
damage    = 20,10
priority  = 4
guardflag = MA
pausetime =8, 8
sparkxy = 25,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -1.5,-14
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=55
air.velocity = -1.5,-7
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.6
id=200
kill=0
fall=1
fall.recover=0
down.bounce=0


[State 1055, 5]
type = HitDef
trigger1 = animelem=34&& anim=3020
attr = S, HA
animtype  = up
damage    = 20,10
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = 25,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -.5,-2
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.6
id=200
kill=0
fall=1
fall.recover=0
down.bounce=0
[State 1055, 5]
type = HitDef
trigger1 = animelem=35&& anim=3020
attr = S, HA
animtype  = up
damage    = 20,10
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = 25,-61
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = 2
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -.5,-3
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.6
id=200
kill=0
fall=1
fall.recover=0
down.bounce=0

[State 1055, 5]
type = HitDef
trigger1 = animelem=36&& anim=3020
attr = S, HA
animtype  = up
damage    = 20,10
priority  = 4
guardflag = MA
pausetime = 8,8
sparkxy = 25,-75
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -4.5,-18.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =42
guard.ctrltime = 15
air.hittime=42
air.velocity = -2.5,-12.5
airguard.velocity = -4,-4.5
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.67
id=200
kill=0
fall=1
fall.recover=0
down.bounce=0

[State 0, Width]
type = Width
trigger1 = animelemtime(45)>0&&anim=3020
edge = 45,0
[State 1060, 4]
type = HitDef
trigger1 = animelem = 45&& anim=3020
attr = S, HA
animtype  = Medium
damage    = 35, 6
priority  = 5
guardflag = MA
pausetime = 5,5
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 =-1.5,-7.5
guard.velocity = -7
air.velocity = -1.5,-4.5
air.hittime=35
id=200
kill=0
yaccel=.68
forcenofall=1

[State 1060, 4]
type = HitDef
trigger1 = animelem = 49&& anim=3020
attr = A, HA
animtype  = Medium
damage    =  25, 6
priority  = 5
guardflag = MA
pausetime = 5,5
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 15
guard.ctrltime=18
ground.velocity =-.5,-7.5
guard.velocity = -7
air.velocity = -.5,-4.5
air.hittime=55
id=200
kill=0
fall=1
fall.recover=0
yaccel=.68
[State 1060, 4]
type = HitDef
trigger1 = animelem = 53&& anim=3020
attr = A, HA
animtype  = Medium
damage    = 25, 6
priority  = 5
guardflag = MA
pausetime = 5,5
sparkxy = -5,-64
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 20
ground.hittime  = 15
guard.ctrltime=18
ground.velocity =-1.5,-3.5
guard.velocity = -7
air.velocity = -2.5,-3.5
air.hittime=15
id=200
fall=1
kill=0
fall.recover=0
yaccel=.58
[State 0, Explod]
type = Explod
trigger1 = animelem = 5&& anim=3021
anim =3011
ID =1059
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, PlaySnd]
type = PlaySnd
trigger1 =animelem=5&& (anim=3021)
value = S3000,0
channel=1
[State 1055, 5]
type = HitDef
trigger1 = animelem=4&& anim=3021
attr = S, HA
animtype  = heavy
air.animtype=up
damage    = 20,10
priority  = 4
guardflag = MA
pausetime = 15,15
sparkxy = 25,-73
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -2.5,-5
guard.velocity = -3
ground.slidetime = 22
getpower=0
kill=0
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -3.5,-3.5
airguard.velocity = -4,-3.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
forcenofall=1
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.53
id=1050
envshake.time = 12
envshake.ampl = 3
envshake.freq=60

[State 1055, 5]
type = HitDef
trigger1 = animelem=6&& anim=3021
trigger2 = animelem=8&& anim=3021
trigger3 = animelem=10&& anim=3021
trigger4 = animelem=12&& anim=3021
trigger5 = animelem=14&& anim=3021
trigger6 = animelem=16&& anim=3021
trigger7 = animelem=18&& anim=3021
trigger8 = animelem=20&& anim=3021
attr = A, HA
animtype  = up
damage    = 15,10
priority  = 4
guardflag = MA
pausetime = 1,1
sparkxy = 25,-74
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = 0,-6.25
guard.velocity = -3
ground.slidetime = 22
getpower=0
ground.hittime  =35
guard.ctrltime = 15
air.hittime=35
air.velocity = ifelse(p2bodydist x >15,.15,-.2),-8
airguard.velocity = -4,-4.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.67
id=1050
forcenofall=1
down.bounce=0


[State 1055, 5]
type = HitDef
trigger1= animelem=21&& anim=3021
attr = A, HA
animtype  = up
damage    = 20,10
priority  = 4
guardflag = MA
pausetime = 1,1
sparkxy = 25,-74
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -1.5,-4.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =35
guard.ctrltime = 15
getpower=0
air.hittime=35
air.velocity = -6.5,-25.5
airguard.velocity = -4,-4.5
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
palfx.add = 255,80,50 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.6
fall=1
fall.recover=0
id=200
down.bounce=0

[State 0, TargetState]
type = TargetState
trigger1 = anim=3022 && (p2stateno!=10612)
value =10612
ID =200
ignorehitpause =1 
[State 1000, 7]
type = ChangeState
trigger1 = animelemtime(24)=2 && anim=3020 && (!movehit||p2statetype=L)
value = 0
ctrl = 1


[State 1051, 3] ;Change state when KFM is close to ground
type = Changeanim
trigger1 = Vel Y > 0 && Pos Y >= 0&& anim=3021
value =3022


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

[State 195, Ya Ta De!]
type = PlaySnd
trigger1 = (Anim = 3022) && (AnimElem = 10)
value = S2,5
channel=0
[State 0, VelSet]
type = VelSet
trigger1 = anim=3022
x = 0
y = 0
;ignorehitpause = 
;persistent = 

[State 1052, 2] ;Play a sound for landing
type = PlaySnd
trigger1 = animelemtime(1)=1&& anim=3022
value = 40, 0

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


;---------------------------------------------------------------------------
[Statedef 3050]
type    = S
movetype= A
physics =N
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
velset = 0,0
anim = 3051
ctrl = 0
sprpriority = 2
[State 1050, 1]
type = PlaySnd
trigger1 = animelem=2
trigger2 = animelem=6
trigger3 = animelem=9
trigger4 = animelem=13
trigger5 = animelem=17
trigger6 = animelem=21
trigger7 = animelem=24
trigger8 = animelem=28
trigger9 = animelem=34
trigger10 = animelem=39
trigger11 = animelem=45
value = S2, 0+(random%3)
channel=0

[State 1050, 1]
type = PlaySnd
trigger1 = animelem=51
value = S190, 0
channel=0
[State 0, TargetBind]
type = TargetBind
trigger1 =animelemtime(40)<0
pos = 60,0

[State 0, Width]
type = Width
trigger1 = animelemtime(15)<0
edge = 50,0
;value = 0,0
;ignorehitpause =
;persistent =

;ignorehitpause =
;persistent =
[State 0, PosSet]
type = PosSet
trigger1 =animelemtime(40)<0
y = 0
[State 400, 2]
type = HitDef
trigger1 = animelem = 3
attr = C, HA
damage    =28
priority  = 2
animtype  = heavy
hitflag = MAF
guardflag = M
pausetime = 2,2
sparkno =  S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-54
getpower=0
hitsound   = S1,5
guardsound = S3,1
ground.type = Low
ground.slidetime = 40
ground.hittime  = 40
ground.velocity = 0
air.velocity = -1.5,-3
forcenofall=1
kill=0

[State 360, 2]
type = HitDef
trigger1 = AnimElem = 7
attr = C, HA
damage    = 28
animtype  = heavy
hitflag = MAF
guardflag = M
priority=5
pausetime = 2,2
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-69
getpower=0
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
ground.slidetime = 40
ground.hittime  = 40
ground.velocity = 0
air.velocity = -5,-5
forcenofall=1
kill=0


[State 400, 2]
type = HitDef
trigger1 = animelem=11
attr = C, HA
damage    =28
priority  = 5
animtype  = heavy
hitflag = MAF
guardflag =M
pausetime = 2,2
sparkno =  S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-94
hitsound   = S1,2
guardsound = S3,1
ground.type = Low
getpower=0
ground.slidetime = 40
ground.hittime  = 40
ground.velocity = 0
air.velocity = -0,-17
fall.recovertime = 35
forcenofall=1
kill=0

[State 630, 2]
type = HitDef
trigger1 = animelem =15
attr = A, HA
animtype  = heavy
damage = 21
guardflag = HA
priority = 7
getpower=0
pausetime = 2,2
sparkno =  S7005+(random%4)
guard.sparkno = S7009
sparkxy = -5,-84
hitsound   = S1,ifelse(var(59)=1,9,0)
guardsound = S3,1
ground.type = High
ground.slidetime = 40
ground.hittime  = 40
air.hittime = 40
ground.velocity = 0
air.velocity = -.2,-4
forcenofall=1
kill=0


[State 230, 2]
type = HitDef
trigger1=animelem=18
attr = S, HA
animtype  = heavy
damage    = 21
getpower=0
guardflag = MA
pausetime = 2,2
sparkno =  S7005+(random%4)
guard.sparkno = S7009
sparkxy = -15,-85
hitsound   = S1,ifelse(var(59)=1,9,2)
guardsound = S3,1
ground.type = high
ground.slidetime = 40
ground.hittime  = 40
air.hittime = 40
ground.velocity = 0
air.velocity = -.2,-4
forcenofall=1
kill=0

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 22
attr = S, HA
damage = 21
animtype=medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
getpower=0
pausetime = 2, 2
sparkno =  S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10, -95
hitsound = S1, 1
guardsound = S3,1
ground.type = High
ground.slidetime = 40
ground.hittime  = 40
air.hittime = 40
ground.velocity = 0
air.velocity = -.2,-4
forcenofall=1
kill=0


[State 210, 2]
type = HitDef
trigger1 = animelem= 26
attr = S, HA
animtype  = Medium
damage    =21
priority = 7, Hit
getpower=0
guardflag = MA
pausetime = 2,2
sparkno =  S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,7
guardsound = S3,1
ground.type = High
ground.slidetime = 40
ground.hittime  = 40
air.hittime = 40
ground.velocity = 0
air.velocity = -.2,-4
forcenofall=1
kill=0

[State 430, 2]
type = HitDef
trigger1 = animelem=30
attr = C, HA
damage    = 21
animtype  = medium
hitflag = MAF
guardflag = L
getpower=0
pausetime = 2,2
priority=7
sparkno =  S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-85
hitsound   = S1,ifelse(var(59)=1,9,0 )
guardsound = S3,1
ground.type = Low
ground.slidetime = 40
ground.hittime  = 40
air.hittime = 40
ground.velocity = 0
air.velocity = -.2,-4
forcenofall=1
kill=0



[State 640, 3]
type = HitDef
trigger1 = animelem=36
attr = A, HA
damage    =21
guardflag = HA
priority = 7
pausetime = 2,2
getpower=0
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-50
hitsound   = S1,2
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 40
ground.hittime  = 40
air.hittime = 40
ground.velocity = 0
air.velocity = -.2,-4
forcenofall=1
kill=0

[State 210, 2]
type = HitDef
trigger1 = animelem= 41
attr = S, HA
animtype  = heavy
getpower=0
damage    =21
guardflag = MA
priority =7, Hit
pausetime = 2,2
sparkno =  S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-91
hitsound   = S1,2
guardsound = S3,1
guard.ctrltime = 10
ground.type = High
ground.slidetime = 40
ground.hittime  = 40
air.hittime = 40
ground.velocity = 0
air.velocity = -.2,-4
forcenofall=1
kill=0

[State 210, 2]
type = HitDef
trigger1 =animelem=47
attr = S, HA
animtype  = Medium
damage    =14
getpower=0
priority = 7, Hit
guardflag = MA
pausetime = 2,2
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,5
guardsound = S3,1
ground.type = High
ground.slidetime = 40
ground.hittime  = 40
air.hittime = 40
ground.velocity = 0
air.velocity = -.2,-4
forcenofall=1
kill=0

[State 210, 2]
type = HitDef
trigger1 =animelem=51
attr = S, HA
animtype  = up
damage    =ifelse(Var(59)=1,257,104)
priority = 7, Hit
guardflag = MA
pausetime = 0,40
getpower=0
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-35
hitsound   = S3,0
guardsound = S3,1
ground.type = High
ground.slidetime = 30
ground.hittime = 30
air.hittime = 11
ground.slidetime = 35
ground.hittime  = 35
ground.velocity = 5,-13
air.velocity = -3.5,-4.5
fall.recover=0
fall=1


[State 0, PosFreeze]
type = PosFreeze
trigger1 = animelemtime(52)>=0 && animelemtime(72)<0
value = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelem=51
x = 19


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


[State 100, Explod]
type = Explod
trigger1 =animelemtime(52)=1
ID = 1002
anim = 3052
postype = p1
pos = 10,-45
bindtime =1
facing=1
vel = 0, 0
ownpal = 1
sprpriority = 5
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 100, Explod]
type = Explod
trigger1 =animelemtime(52)=1
ID = 1002
anim = 3052
postype = p1
facing=-1
pos =10 , -45
bindtime = 1
vel = 0, 0
ownpal = 1
sprpriority = -5
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 100, Explod]
type = Explod
trigger1 =animelemtime(52)=1
ID = 1002
anim = 3053
postype = p1
pos=0, -79
facing=1
bindtime = 1
vel = 0, 0
ownpal = 1
sprpriority = -6
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 100, Explod]
type = Explod
trigger1 =animelemtime(52)=1
ID = 1002
anim = 3053
postype = p1
pos=0, -79
facing=-1
bindtime = 1
vel = 0, 0
ownpal = 1
sprpriority = -6
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 3051]
type    =S
movetype=H
physics = N
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 63
velset=0,0
ctrl = 0
sprpriority = 0
facep2=1

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time=0
value = 5002
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time>2
value = 5002
elem=2
[State 1000, 7]
type = selfstate
trigger1 = time >35
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 3060]
type    = S
movetype= A
physics = S
juggle  =0; 0;ifelse(((enemy,stateno = 5070)||prevstateno=410),4,8) 0
poweradd= 0
velset = 0,0
anim =3060
ctrl = 0
sprpriority = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =1
id =1001
[State 3000, Super A]
type = SuperPause
trigger1 =time=12
poweradd = -1000
anim = -1
time = 48
unhittable=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=12
value = S3001,ifelse(var(59)=1,2,0)
[State 182, 2]
type = NotHitBy
trigger1 = animelem=2
value = SCA
time =5
[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = S2, 5
channel=0
[State 200, 1]
type = PlaySnd
trigger1 = animelem = 3
value = S3, 3
channel=1
[State 3000, Hyperbg]
type = Explod
trigger1 =time=12
anim = 6004
ID = 6001
pos = 9,-45
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=13
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 = -9
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =time =[12,140]
flag = noBG
flag=noFG

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

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


[State 0, 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, Helper]
type = Helper
trigger1 =animelem=3
helpertype = normal ;player
name = "superbirdie"
ID =1101
stateno =3052
pos = -0 ,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=.833333333333333333333333333333
size.yscale=1
;supermovetime = 25
;pausemovetime = 25
ignorehitpause = 1
[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=810 
id = 800
;ignorehitpause = 
;persistent = 

[State 0, TargetState]
type = TargetState
trigger1 = movehit=1 && p2stateno!=441
value =441
ID = 440
;ignorehitpause = 
;persistent = 

;---------------aI combo var
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 =1
text = "var(2) = %d var(2) = %d  Evar(4) = %d var(30)=%d "
params =(var(41)),numhelper(10010),var(40),(numexplod(800))
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1 = stateno!=[800,899]
v = 39    ;fv = 10
value = 0
ignorehitpause = 1
;persistent = 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = p2stateno=10612 && enemy,time=1&& stateno=610
value = S800,1
channel = 4
[State 0, VarSet]
type = VarSet
trigger1 =statetype!=A 
v = 9   ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =movecontact && stateno=601
v = 9  ;fv = 10
value =2
ignorehitpause=1

;persistent = 
 [State 0, VarSet]
type = VarSet
triggerall = var(42)=0
trigger7 = (p2statetype=L &&var(1)>1 || p2stateno=5120)&& var(40)=0
trigger6 = (p2stateno=[5090,5119]) &&(p2stateno=[5121,5899])&& var(40)=0
trigger1 = ((p2statetype!=L&&p2bodydist x = [0,40])||(p2bodydist x >110))&& var(40)=0
trigger2= enemynear,hitdefattr = SA,NA,SA,HA&& var(40)=0
trigger3 = statetype= A&& var(40)=0
trigger4 = (p2movetype=A && p2bodydist x <70)&& var(40)=0 
trigger8= p2bodydist x <60 && p2statetype!=L && var(40)=0
v=30
value = 0
 [State 0, VarSet]
type = VarSet
trigger1 = var(40)>=17
trigger2 = p2stateno=[10029,10030]
trigger3 = var(48)<3 && var(40)=0
v=30
value = 0

[State 0, VarSet]
type = VarSet
triggerall = statetype != A
triggerall = numhelper(10009)=0
;triggerall = (p2bodydist x <110)
trigger1 = ctrl && p2movetype=A && p2statetype=C&& var(40)=0
trigger2= enemy,hitdefattr=SC,AT&& var(40)=0
trigger3= p2stateno =5120 && p2bodydist x <50 && ctrl&& var(40)=0
trigger4= p2statetype=L && var(1)<2&& var(40)=0
trigger5=var(40)=16 && ctrl
trigger6 = var(42)=1 && ctrl
v = 30   ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H
trigger2 = stateno=[800,810]
trigger3 = var(40)=23
v = 40    ;fv = 10
value = 0
ignorehitpause = 1
;persistent = 

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




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

;---AI buffer var
[State 0, VarSet]
type = VarSet
trigger1 =var(40)=16 && stateno=50 &&time<3 
v = 41    ;fv = 10
value =34 ;-wait 34 ticks before proceeding 
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 =var(40)=31 && prevstateno=750
v = 41    ;fv = 10
value =12 ;-wait 34 ticks before proceeding 
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 =var(40)=32 && prevstateno=750
v = 41    ;fv = 10
value =7 ;-wait 34 ticks before proceeding 
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 =var(40)=33 && prevstateno=750 
v = 41    ;fv = 10
value =13 ;-wait 34 ticks before proceeding 
ignorehitpause = 1
;persistent = 
[State 0, VarSet]
type = Varadd
trigger1 = var(41)>0
v = 41    ;fv = 10
value = -1 ; subtract as soon as its not 0

;persistent = 
;------helper cool down
[State 0, VarSet]
type = VarSet
trigger1 =numhelper(10009)>0
v = 38    ;fv = 10
value = 60

[State 0, VarSet]
type = Varadd
trigger1 =var(38)>0 && numhelper(10009)=0
v = 38   ;fv = 10
value = -1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =numhelper(10010)>0
fv = 38    ;fv = 10
value = 60

[State 0, VarSet]
type = Varadd
trigger1 =fvar(38)>0 && numhelper(10010)=0
fv = 38   ;fv = 10
value = -1


[State 0, VarSet]
type = VarSet
trigger1 = var(38)=1 && (var(1)=0 ||var(1)=2)
trigger2= var(1)=0 && p2stateno=5110 && enemy,time=1
trigger3= var(1)=0 && p2stateno=5040 && enemy,time=1
fv = 39    ;fv = 10
value =1

[State 0, VarSet]
type = Varset
trigger1 =var(38)=0
fv = 39   ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 =fvar(38)=1&& var(1)<2 
trigger2= var(1)=0 && p2stateno=5110 && enemy,time=1
trigger3= var(1)=0 && p2stateno=5040 && enemy,time=1
fv = 37   ;fv = 10
value =1

[State 0, VarSet]
type = Varset
trigger1 =fvar(38)=0
fv = 37   ;fv = 10
value = 0
[State 0, Explod]
type = Explod
trigger1 = fvar(39)=1 && numexplod(13010)=0 && numhelper(10009)=0
anim = ifelse(teamside=1,13010,13011)
ID = 13010
pos = ifelse(teamside=1,10,210),fvar(12)
postype =left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime = 999
scale = .5,.5
sprpriority = 9
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1
[State 0, Explod]
type = Explod
trigger1 = fvar(37)=1 && numexplod(13011)=0 && numhelper(10010)=0
anim = ifelse(teamside=1,13020,13021)
ID = 13011
pos = ifelse(teamside=1,10,210),fvar(12)+10
postype =left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime = 999
scale = .5,.5
sprpriority = 9
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

;----AI reset grab time

[State 0, VarSet]
type = VarSet
trigger1 =p2stateno=5040
trigger2= var(43)=3
v = 42    ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = p2statetype!=A && var(43)=0
trigger2= stateno=[800,855] 
v = 42    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 


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

;----more stuff
[State 0, VarSet]
type = VarSet
trigger1 = movehit 
v = 43   ;fv = 10
value = 0
ignorehitpause =1 
;persistent = 
[State 0, VarSet]
type = Varadd
triggerall = AILevel >6
trigger1 = moveguarded=1 
v = 43   ;fv = 10
value = 1
ignorehitpause =0 
;----------
;persistent = 


[State 0, VarSet]
type = VarSet
triggerall = statetype!=A
trigger1 = stateno=1100
v = 3   ;fv = 10
value = 1
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = stateno=1101 
v = 3   ;fv = 10
value = 2
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
triggerall = statetype!=A
trigger1 = stateno=1102
v = 3   ;fv = 10
value = 3
ignorehitpause = 1
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H
v = 3   ;fv = 10
value = 0
ignorehitpause = 1
[State 0, VarSet]
type = VarSet
trigger1 = var(2)=1 && gametime%2=0
v = 2   ;fv = 10
value = 0
ignorehitpause =1 

[State 0, VarSet]
type = VarSet
triggerall= var(2)=0 && stateno=[3000,3010]
trigger1 = (command="x"||command="y"||command="z" || command="a" || command="b")
trigger2= AILevel >0 && gametime%3=0
v = 2   ;fv = 10
value = 1
ignorehitpause = 1
;persistent = 
[State 0, Helper]
type = Helper
triggerall = var(1)=0 || var(1)=2
triggerall = var(33)=0
triggerall = statetype!=A || var(19)=0 || (p2statetype!=A&& statetype!=A)
triggerall= stateno!=[1000,3051]
triggerall=movetype!=H
triggerall = stateno!=672 && stateno!=840 &&stateno!=810
triggerall = roundstate=2
triggerall = fvar(10)=1
triggerall = numhelper(10009)<1
triggerall = numhelper(10010)<1
triggerall = var(38)=0
triggerall = ctrl|| stateno=40||stateno=50 || stateno=[200,640] 
trigger1 = command="b" &&var(57)=1&&AILevel=0
trigger2=command="z" &&(var(57)=0||var(57)=2)&&AILevel=0
trigger3= (var(40)=0||var(40)=23) && (p2stateno=10612||p2stateno=674||(p2statetype=L||p2bodydist x >100|| (p2bodydist y >-100&&enemy,vel y  >0))) &&AILevel>0 && statetype!=A 
helpertype = normal ;player
name ="assist"
ID = 10009
stateno = 10000
pos = 68,-53
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.yscale= 1
size.xscale= .833333333333333333333333333333
[State 0, Helper]
type = Helper
triggerall = var(1)<2
triggerall = var(33)=0 || var(40)>0
;triggerall= stateno!=[1000,3051]
triggerall=movetype!=H
triggerall = fvar(38)=0
triggerall = stateno!=672 && stateno!=840 &&stateno!=810
triggerall = roundstate=2
triggerall = fvar(10)=1
triggerall = numhelper(10009)<1
triggerall = numhelper(10010)<1
triggerall = ctrl&&statetype!=A|| stateno=40||stateno=50 || stateno=[200,640]
trigger1 = command="c" && AILevel=0
trigger2= var(40)=16 && (var(41)=[1,3]) &&AILevel>0 && statetype=A
trigger3= var(40)=0 && p2statetype=A&&p2movetype=A &&AILevel>0 && random <40*AIlevel 
helpertype = normal ;player
name ="assist2"
ID = 10010
stateno = 10001
pos = 68,-53
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.yscale= const(size.yscale)
size.xscale=const(size.xscale)


[State 0, VarSet]
type = VarSet
triggerall = numhelper(10009)=0
triggerall = numhelper(10010)=0
trigger1 = p2movetype!=H || p2stateno=5040 
v = 1   ;fv = 10
value = 0
ignorehitpause = 1
;persistent = 

[State 0, VelAdd]
type = VelAdd
trigger1 =statetype=A &&(stateno=[600,641])&&movetype!=H&&var(33)=0
y = (ifelse(var(18),.35,0))
[State 0, VelAdd]
type = VelAdd
trigger1 =statetype=A &&(stateno=50)&&movetype!=H
y = (ifelse(var(18),.67,0))
;ignorehitpause =
;persistent =
[State 0, VarSet]
type = VarSet
trigger1 =statetype!=A
v =33   ;fv = 10
value = 0
;ignorehitpause =
;persistent =

;ignorehitpause =
;persistent =
[State 0, VarSet]
type = VarSet
trigger1 = roundsexisted = 0 && roundstate < 2
trigger1 = !AILevel && (enemy, AILevel = 0) && power = powermax && (enemy, power = enemy,powermax)
v = 35    ;fv = 10
value = 1

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


[State 0, ChangeState]
type = ChangeState
triggerall= stateno!=[3049,3051]
triggerall = AILevel>0
triggerall = var(18)=0
triggerall= stateno!=[800,899]
triggerall = movetype!=H || (stateno=[120,155])
triggerall = var(59)=1
triggerall = roundno >1
triggerall = var(56)=0
triggerall = prevstateno!=4
triggerall = statetype!=A
trigger1 = stateno=3000 &&  animelemtime(18)>=14 && (p2life < enemy,lifemax/3)
trigger2 = life <= ceil(lifemax/3) &&p2bodydist x <30 && stateno=[130,155] 
value =4
ctrl = 0
ignorehitpause=0
[State 0, ChangeState]
type = ChangeState
triggerall = roundstate=2
triggerall= stateno!=[3049,3051]
triggerall = AILevel=0
triggerall= stateno!=[800,899]
triggerall = var(18)=0
triggerall = movetype!=H || (stateno=[120,155])
triggerall = var(59)=1
triggerall = var(56)=0
triggerall = stateno!=5
triggerall = statetype=A
trigger1 =command="cancel"
value =5
ctrl = 0
ignorehitpause=0
[State 0, ChangeState]
type = ChangeState
triggerall = roundstate=2
triggerall= stateno!=[3049,3051]
triggerall = AILevel=0
triggerall= stateno!=[800,899]
triggerall = var(18)=0
triggerall = movetype!=H || (stateno=[120,155])
triggerall = var(59)=1
triggerall = var(56)=0
triggerall = stateno!=4
triggerall = statetype!=A
trigger1 =command="cancel"
value =4
ctrl = 0
ignorehitpause=0
[State 0, VarSet]
type = VarSet
trigger1 = fvar(4)<=0
fv = 4    ;fv = 10
value = 0
;ignorehitpause =
;persistent =

 [State 0, VarSet]
type = VarSet
trigger1 =fvar(4)<=0
v = 18   ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 =  p2stateno=411
v = 19   ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=L&& p2stateno!=10612 && p2stateno!=676 && p2stateno!=5080
trigger2 = p2movetype!=H
v = 19   ;fv = 10
value = 0


[State 0, VarSet]
type = Varadd
triggerall = movehit=1
triggerall = stateno!=[1050,1102]
triggerall = stateno!=630
triggerall = stateno!=200
triggerall = stateno!=400
triggerall = var(20)<16
trigger1 = p2statetype=A && (enemy,gethitvar(hitcount)%5)
v = 20    ;fv = 10
value = 1
[State 0, VarSet]
type = Varadd
triggerall = movehit=1
triggerall = stateno=[1050,1102]
triggerall = stateno!=630
triggerall = stateno!=200
triggerall = stateno!=400
triggerall = var(20)<16
trigger1 = p2statetype=A && (enemy,gethitvar(hitcount)%9)
v = 20    ;fv = 10
value = 1
[State 0, VarSet]
type = Varadd
triggerall = movehit=1
triggerall = stateno!=630
triggerall = var(20)<16
trigger1 = p2statetype!=A && (enemy,gethitvar(hitcount)%6)
v = 21    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && var(21)!=0
v = 25   ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = var(25)=1 && gametime%1=0
v = 25   ;fv = 10
value = 2
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = Varset
trigger1 = p2statetype=A && var(25)=1
v = 20    ;fv = 10
value = ceil(var(20)-(var(21)/2))


[State 0, VarSet]
type = Varadd
triggerall = movehit=1
triggerall = stateno=630
triggerall = var(20)<13
trigger1 = p2statetype=A&& (enemy,gethitvar(hitcount)%2)
v = 20    ;fv = 10
value = 3
[State 0, VarSet]
type = Varadd
triggerall = movehit=1
triggerall = stateno=200 || stateno=400
triggerall = var(20)<13
trigger1 = p2statetype=A&& (enemy,gethitvar(hitcount)%3)
v = 20    ;fv = 10
value = 1
;ignorehitpause =
;persistent =
[State 0, VarSet]
type = Varset
trigger1 =  p2movetype!=H
v = 20    ;fv = 10
value = 0
[State 0, VarSet]
type = Varset
trigger1 =  p2movetype!=H
v = 21    ;fv = 10
value = 0
[State 0, VarRangeSet]
type = VarRangeSet
trigger1 =p2statetype!=A && p2statetype!=L
value = 0 ;fvalue = 0
first = 5
last = 7 ;39
[State 0, VarRangeSet]
type = VarRangeSet
trigger1 =( p2statetype!=A) || p2movetype!=H
value = 0 ;fvalue = 0
first = 8
last = 9
[State 0, VarSet]
type = VarSet
trigger1 =( p2statetype!=A) || p2movetype!=H
v = 15   ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 =p2stateno=1030
v = 16    ;fv = 10
value = 1

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

;ignorehitpause =
;persistent =

;[State 0, StateTypeSet]
;type = StateTypeSet
;trigger1 =var(6)=1 &&
;trigger2= var(6)=2 && statetype!= A
;trigger3= var(6)=3
;movetype = I        ;I,A,H


;ignorehitpause =
;persistent =
[State 0, RemoveExplod]
type = RemoveExplod
trigger1=enemy,anim=1200&&enemy,animelemtime(1)>=2
id = 1033
[State 0, PlaySnd]
type = PlaySnd
triggerall = p2movetype=H
trigger1 =enemynear,pos y>=0 && enemynear,anim=1202 && enemynear,time>3 &&enemynear,anim!=5160
trigger2 = enemynear,stateno=1030 && enemynear,time=1&&enemynear,anim!=5160
trigger3= enemynear,stateno=442 && enemynear,anim=612 && enemynear,animelemtime(1)=1&&enemynear,anim!=5160
trigger4= enemynear,stateno=676 && enemynear,anim=614 && enemynear,animelemtime(1)=1&&enemynear,anim!=5160
trigger5= enemynear,stateno=674 && enemynear,anim=5161&& enemynear,animelemtime(1)=1
value = S15,0
channel=5
[State 0, Explod]
type = Explod
triggerall = p2movetype=H
trigger1 =enemynear,pos y>=0 && enemynear,anim=1202 && enemynear,time>3 &&enemynear,anim!=5160
trigger2 = enemynear,stateno=1030 && enemynear,time=1&&enemynear,anim!=5160
trigger3= enemynear,stateno=442 && enemynear,anim=612 && enemynear,animelemtime(1)=1&&enemynear,anim!=5160
trigger4= enemynear,stateno=676 && enemynear,anim=614 && enemynear,animelemtime(1)=1&&enemynear,anim!=5160
trigger5= enemynear,stateno=674 && enemynear,anim=5161&& enemynear,animelemtime(1)=1
anim =6006
ID =8002
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

[State 0, VarSet]
type =VarSet
triggerall = stateno!=181
trigger1 =roundstate!=2
fv = 39    ;fv = 10
value = enemy,pos x
ignorehitpause=1
persistent=1


[State 0, VarSet]
type = VarSet
trigger1 = numhelper(3001)<1
v = 17    ;fv = 10
value = 0
;ignorehitpause =
;persistent =
 [State 0, VarSet]
type = VarSet
trigger1 =p2movetype!=H
v = 44   ;fv = 10
value = 0
;ignorehitpause =
;persistent =

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

[State 0, VarSet]
type = VarSet
trigger1 =statetype!=A
v = 27  ;fv = 10
value = 0
[State 0, VarSet]
type = Varadd
trigger1 =var(26)=1
v = 25;fv = 10
value = 1
ignorehitpause =0
;persistent =
[State 0, VarSet]
type = Varset
trigger1 =statetype!=A&& var(25)>0
v = 25;fv = 10
value =0
ignorehitpause =0
[State 0, VarSet]
type = VarSet
trigger1 =stateno=653 && var(25)=0
v = 26   ;fv = 10
value = 1
ignorehitpause = 0
[State 0, VarSet]
type = VarSet
trigger1 =var(25)=500 || statetype!=A||roundstate!=2
v = 26   ;fv = 10
value = 0
ignorehitpause = 0
;persistent =
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =var(26)=1
trigger2=stateno=[650,653]
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
;






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

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



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



[State 0, VarSet]
type = VarSet
trigger1 = authorname= "Kamekaze" && p1name = "MvC3 ken By Kamekaze"
v = 50    ;fv = 10
value = 1
[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = stateno=3049 && prevstateno=440
value = ifelse(fvar(11)=0,1.45,.87)
ignorehitpause = 1
persistent = 1
[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = stateno=3049 && prevstateno!=440&& fvar(11)=0
value = ifelse(fvar(11)=1,.6,1)
ignorehitpause = 1
persistent = 1
[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = stateno!=3049 
value = fvar(2)
ignorehitpause = 1
persistent = 1

[State 0, VarSet]
type = VarSet
triggerall =var(18)=0&&stateno =[200,640]
trigger1 =fvar(2) <.1 && var(59)=1
fv = 2    ;fv = 10
value = ifelse(fvar(11)=1,.06,.1)

[State 0, VarSet]
type = VarSet
triggerall =var(18)=0&&stateno =[1000,1103]
trigger1 =fvar(2) <.2 && var(59)=1
fv = 2    ;fv = 10
value = ifelse(fvar(11)=1,.12,.2)
ignorehitpause=1
[State 0, VarSet]
type = VarSet
triggerall =var(18)=1||stateno =[3000,3010]
trigger1 =fvar(2) <.3 && var(59)=1
fv = 2    ;fv = 10
value = ifelse(fvar(11)=1,.18,.3)
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1=stateno =3049
fv = 2    ;fv = 10
value =ifelse(fvar(11)=1,.6,1)
ignorehitpause=1
[State 0, VarSet]
type = Varset
triggerall = enemy,movetype = H
triggerall = var(59)=1
triggerall = stateno !=[3000,4007]
triggerall =stateno =400 || stateno=200 || stateno=630
trigger1= movehit=1
fv =2 ;fv = 10
value =  fvar(2)*.75
[State 0, VarSet]
type = Varset
triggerall = enemy,movetype = H
triggerall = var(59)=1
triggerall = stateno !=[3000,4007]
triggerall =stateno =405|| stateno=206 || stateno=600
trigger1= movehit=1
fv =2 ;fv = 10
value =  fvar(2)*.80

[State 0, VarSet]
type = Varset
triggerall = enemy,movetype = H
triggerall = var(59)=1
triggerall = stateno !=[3000,4007]
triggerall =stateno =440|| stateno=205 || stateno=605
trigger1= movehit=1
fv =2 ;fv = 10
value =  fvar(2)*.85
[State 0, VarSet]
type = Varset
triggerall = enemy,movetype = H
triggerall = var(59)=1
triggerall = stateno !=[3000,4007]
triggerall =stateno=210||stateno =[1000,1103]
trigger1= movehit=1
fv =2 ;fv = 10
value = fvar(2)*.90

[State 0, VarSet]
type = Varset
triggerall = enemy,movetype = H
triggerall = var(59)=1
triggerall = stateno =[3000,4007]
trigger1= movehit=1
fv =2 ;fv = 10
value = fvar(2)*.95
[State 0, VarSet]
type = VarSet
triggerall = enemy,movetype != H || (p2stateno=[120,155])
trigger1 =1
fv =2 ;fv = 10
value = ifelse(fvar(11)=1,.6,1)

[State 0, VarSet]
type = VarSet
triggerall=p2statetype != L  && ((p2stateno != [120,199])||(enemy,prevstateno!=[120,199]))
trigger1 = 1
v = 12  ;fv = 10
value = enemy,gethitvar(hitcount)
ignorehitpause=1

[State 0, VarSet]
type = VarSet
triggerall = (enemy,gethitvar(hitcount) > 2)
triggerall = stateno !=1050
trigger1 = statetype = A && ((((prevstateno= [600,699])||(stateno=[600,699]))||(p2statetype=A&&stateno=57))|| (prevstateno = 1000)&&var(15))
v = 12  ;fv = 10
value = 999

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


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

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



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

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

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

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


[State 0, Helper]
type = Helper
triggerall = roundno = 1
triggerall = var(59)=0
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
triggerall = var(59)=0
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, VarSet]
type = VarSet
trigger1 = projcontact1110=1
v = 28   ;fv = 10
value = 1
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1 = projcontact1111=1
v = 28   ;fv = 10
value = 2
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1 = projcontact1109=1 &&p2statetype=L
v = 28   ;fv = 10
value = 3
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1 =p2movetype!=H
v = 28   ;fv = 10
value = 0

[State 0, Helper]
type = Helper
triggerall=(p2stateno!=[120,155])
triggerall = var(59)=0
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 = !NumExplod(9050)
trigger1 = ((enemy, stateno = 1027) && (enemy,time = 1));&& Enemy, frontEdgeDist < 25
value = S1,3
volume = 255
ignorehitpause = 1
persistent = 0

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

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

[Statedef -3]

[State -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 = 10005
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 99999
ignorehitpause = 1

[State -3, Speed]
type = ChangeAnim
triggerall = stateno!=[800,899]
triggerall = stateno!=[4000,4005]
triggerall= var(18)=1 && time%2=0
triggerall = (RoundState = 2) && (MoveType != H)
triggerall = stateno!=[3000,3050]
trigger1 = AnimElemTime(AnimElemNo(0) + 1) < 0
trigger1 = AnimElemTime(AnimElemNo(0)) > floor((AnimElemTime(AnimElemNo(0)) - AnimElemTime(AnimElemNo(0) + 1))/2)
ignorehitpause = 1
value = anim
elem = AnimElemNo(0) + 1

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



;--------
[State 0, VarSet]
type = Varadd
;triggerall = time <2
trigger1 =statetype=A && movetype=H && gethitvar(hitcount)=1
v = 48    ;fv = 10
value = 1
ignorehitpause =1 





[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = (stateno != 3000 && time >= 0)
trigger1 = stateno !=3100 && time >= 0
trigger1 = stateno !=3049 && time >= 0 || (stateno=3049 && anim=3022)
trigger1 = stateno !=3050 && time >= 0
trigger1 = stateno !=3010 && time >= 0
trigger2 = Winko
trigger3 = numhelper(1101) <1 && stateno=3060 && animelemtime(4)>=0
id = 6001

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



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

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



[State -3, VarRandom]
type = VarRandom
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
trigger4 = stateno = 5030
trigger5 = stateno = 5050
trigger6 = stateno = 5070
trigger7 = stateno = 5080
v = 0
range = 0,60
;--------------------
[State -3, Hit0]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [0,20]
trigger1 = Stateno = 5000
trigger2 = Stateno = 5010
value = 5000, 0

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

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


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

