; MvC3 Ken By Kamekaze
;---------------------- Integer variable list ----------------------
;Root
; var(0):= Get hits
; var(1):= assists to be used?
; var(2):=mashing on supers
; var(3):= determine directions during that one blue thing
; var(4):= Am I doing this from the air?
; var(5):= P2's size for anchor wrap
; var(6):= unused
; var(7):= unused
; var(8):= 630 canot combo into itself more than once
; var(9):= AI dash stuff
;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):= unused
;var(26):= unused
;var(27):= -2
;var(28):= -2
;var(29):= 101
;var(30):= -2
;var(31):= 101
;var(32):= 3001
;var(33):= -2, 56
;var(34):= -2
;var(35):= -2
;var(36):= -2
;var(37):= 55
;var(38):= -2, 10000
;var(39):= 800, 830, -2
;var(40):= -2, 10000, 10001, -1
;var(41):= -2
;var(42):= -2
;var(43):= -2
;var(44):= unused
;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, 840, 3049, -2
; fvar(4):= -2, 4004
;fvar(10):= 10005
;fvar(11):= 10005
;fvar(12):= 10005
;fvar(37):= -2
;fvar(38):= -2, 10001
;fvar(39):= -2


;Helpers
; var(0) - various things I don't fucking know.
; var(1) = fuck if I know. Something to do with the anchor helpers
;var(2)= clean up for anchors
 







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

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

[Size]
xscale = .833333333333333333333333333333
yscale = 1
ground.back = 15
ground.front = 18
air.back = 10
air.front = 10
height = 60
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = 0, -94
mid.pos = 0, -65
shadowoffset = -1
draw.offset = 0,0

[Velocity]
walk.fwd  = 2.65
walk.back = -2.35
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 = 0         ;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 = "..."
victory2 = "Plunder!"




;---------------------------------------------------------------------------
; 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 =backedgebodydist <=80;(random =[333,667])
value = 181
[State 180, 1]

type = ChangeState
trigger1 =backedgebodydist >80;(random =[333,667])
value = 182


;[State 180, 1]
;type = ChangeState
;trigger1 =random =[667,999]
;value = 183


;---------------------------------------------------------------------------
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0
sprpriority=2
[State 195, Ya Ta De!]
type = PlaySnd
trigger1 = animelem=2
value = S2,2
channel=0

[State 0, Helper]
type = Helper
trigger1 =time=10
helpertype = normal ;player
name ="Hadouken"
ID = 183
stateno =183
pos =-5,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
[State 0, Helper]
type = Helper
trigger1 =time=10
helpertype = normal ;player
name ="Hadouken"
ID = 184
stateno =184
pos =10,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
[State 0, Helper]
type = Helper
trigger1 =time=10
helpertype = normal ;player
name ="Hadouken"
ID = 185
stateno =185
pos =10,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
[State 0, Helper]
type = Helper
trigger1 =time=10
helpertype = normal ;player
name ="Hadouken"
ID = 186
stateno =186
pos =10,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
[State 0, Helper]
type = Helper
trigger1 =time=10
helpertype = normal ;player
name ="Hadouken"
ID = 187
stateno =187
pos =10,-93
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

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





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


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

name = "choice"
ID = 11013
stateno = 11013
pos = 0,-30
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
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, Ikuze!]
type = PlaySnd
trigger1 = AnimElem = 11
value = S2,4
channel=0
[State 191, Ikuze!]
type = PlaySnd
trigger1 = AnimElem = 14
value = S1,2
channel=2
[State 0, Explod]
type = Explod
trigger1 = animelem=14
anim = 7000
ID =7006
pos = -57,-29
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = (const(size.xscale)),(const(size.yscale))
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, Helper]
type = Helper
trigger1 =time=0
helpertype = normal ;player
name ="Hadouken"
ID = 192
stateno =192
pos =-5,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
[State 0, Helper]
type = Helper
trigger1 =time=0
helpertype = normal ;player
name ="Hadouken"
ID = 193
stateno =193
pos =-20,-75
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[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 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, PosSet]
type = PosSet
trigger1 = 1
y = 0
ignorehitpause=1

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

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 25
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
value = 0, 0
channel=1



[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, PosSet]
type = Posadd
trigger1 = p2stateno=1101 && time=0
y = -enemy,const(size.mid.pos.y)-10

[State 0, ScreenBound]
type = ScreenBound
trigger1 = enemy,stateno=3020
value = 1
movecamera=1,0
[State 0, HitBy]
type = HitBy
trigger1 = enemy,stateno=3020
value = SCA,HP
;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, ScreenBound]
type = ScreenBound
trigger1 = enemy,stateno=3020
value = 1
movecamera=1,0
ignorehitpause=1
[State 0, HitBy]
type = HitBy
trigger1 = enemy,stateno=3020
value = SCA,HP
;value2 = S,NA
time = 1
ignorehitpause=1
[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1
[State 5030, 2]
type = VelSet
trigger1 =  enemy,stateno=3020&&backedgebodydist <35
x = 0

[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 && vel y >=0 ;.
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 5030, 2]
type = VelSet
trigger1 =  enemy,stateno=3020&&backedgebodydist <35
x = 0
[State 0, ScreenBound]
type = ScreenBound
trigger1 = enemy,stateno=3020
value = 1
movecamera=1,0
ignorehitpause=1
[State 0, HitBy]
type = HitBy
trigger1 = enemy,stateno=3020
value = SCA,HP
;value2 = S,NA
time = 1
ignorehitpause=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  && vel y >=0 ;.;&& vel y >=0 ;..
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, 7
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, PosSet]
type = PosSet
trigger1 = 1
y = 0
ignorehitpause=1

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

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=3
x = 15
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=4
x = 10
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=8
trigger2 = animelem=9
x = -5
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=10
x = -15
;ignorehitpause = 
;persistent = 

[State 210, 2]
type = HitDef
trigger1 = animelem=5
attr = S, NA
animtype  = Medium
damage    =65
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 = -7.5
air.velocity = -2.5,-2
air.cornerpush.veloff=0
air.hittime = ifelse(32-var(20) <0,10,32-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 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 0, PosSet]
type = PosSet
trigger1 = 1
y = 0
ignorehitpause=1

[State 0, VelSet]
type = VelSet
trigger1 = 1
y = 0
[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, 6
channel=0
;-----------------
;[State 0, Null]
;type = Null
;trigger1=var(40):=ifelse((var(40)=[5,6]),6,2)
;triggerall=movehit;=1
;ignorehitpause = 1
;-----------------------




[State 0, PosAdd]
type = PosAdd
trigger1 =animelem=5 
x = 20
[State 0, PosAdd]
type = PosAdd
trigger1 =animelem=9
x = -20



[State 210, 2]
type = HitDef
trigger1 = animelem=5
attr = S, NA
animtype  = Medium
damage    =25
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 = -1.5
air.velocity = -2.5,-4
air.cornerpush.veloff=0
air.hittime = ifelse(20-var(20) <0,10,20-var(20))
yaccel = .57
forcenofall=1
id=200

[State 210, 2]
type = HitDef
trigger1 = animelem=6
attr = S, NA
animtype  = Medium
damage    =35
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(20-var(20) <0,10,20-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 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, 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, 7
channel=0
[State 0, PosAdd]
type = PosAdd
triggerall=time=0
trigger1 =prevstateno!=[1,199] 
x = 15
[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0
ignorehitpause=1

[State 0, VelSet]
type = VelSet
trigger1 = 1
y = 0
;[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, 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    = 65
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 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 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, PosSet]
type = PosSet
trigger1 = 1
y = 0
ignorehitpause=1

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

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

[State 400, 2]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage    =15
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, PosSet]
type = PosSet
trigger1 = 1
y = 0
ignorehitpause=1

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



[State 210, 1]
type = PlaySnd
triggerall = random<500
trigger1 = animelem=1
value = S2, 6
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    = 40
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,9,16-var(20))
ground.velocity = -6
air.velocity = -2,-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=4
value = 1, 6
channel=0
[State 230, 1]
type = PlaySnd
trigger1 =animelem=1
value =S2, 7
channel=1
[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0
ignorehitpause=1

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

[State 440, 3]
type = HitDef

trigger1 = animelem = 4
attr = C, NA
damage    =55
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)=15 && 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=ifelse(p2statetype=A,1,0)

[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, 6
channel=0
[State 600, 2]
type = HitDef
trigger1 =!movecontact
attr = A, NA
animtype=medium
air.animtype=up
damage    = 40
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,-8.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=ifelse(p2statetype=A,1,0)

[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, 6
channel=0


[State 600, 2]
type = HitDef
trigger1 =!movecontact
attr = A, NA
animtype=medium
air.animtype=up
damage    = 35
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,-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=ifelse(p2statetype=A,1,0)

[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, 7
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    = 55
guardflag = HA
animtype=medium
air.animtype=up
priority = 3
pausetime =  floor(8*(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=ifelse(p2statetype=A,1,0)
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = S2, 7
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    =60
guardflag = HA
priority = 5
pausetime =  floor(11*(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    =60
guardflag = HA
priority = 5
pausetime = floor(9*(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  = 21
ground.velocity = -6.5
fall.recover = 0
air.hittime = ifelse(21-var(20) <0,16,21-var(20))
air.velocity = -2,-6
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=ifelse(p2statetype=A,1,0)
[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 630, 2]
type = HitDef
trigger1 = animelem =2
attr = A, NA
animtype=medium
air.animtype=up
damage = 37
guardflag = HA
priority = 2
pausetime = floor(8*(ifelse(var(18),.75,1))), floor(8*(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,6,11-var(20))
ground.velocity = -4
air.velocity = -.2,-6.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 = Time = 14
value = 57
ctrl=1


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

;ignorehitpause = 
;persistent = 



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

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

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

[State 8300, ChangeState]
type = ChangeState
trigger1 = animtime=0
value = ifelse(command="holdback",120,0)
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 703]
type    = C
movetype= H
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
anim = 700
sprpriority = -1
[State 0, Turn]
type = Turn
trigger1 = time=0
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = time=1
x = 8
y = 0
;ignorehitpause = 
;persistent = 




[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, PosSet]
type = PosSet
trigger1 = 1
y = 0
;ignorehitpause = 
;persistent = 

[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
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= I
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= 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, 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 = 810
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 *(enemy,AILevel)
value =804
[State 0, SprPriority]
type = SprPriority
trigger1 =time=0
value = 2
;ignorehitpause =
;persistent =

[State 0, Width]
type = Width
trigger1 =1 
edge=35,0
[State 0, TargetBind]
type = TargetBind
trigger1 = p2stateno=820
id = 100
pos = 0,-(enemynear,const(size.mid.pos.y))-10
ignorehitpause = 1

[State 691, Yeah!]
type = PlaySnd
trigger1 = animelem=5
value = S2,7
channel=0
[State 691, No Pushing]
type = PlayerPush
trigger1 = 1
value = 0

;[State 0, VarSet]
;type = VarSet
;trigger1 = power >=2000
;v = 40    ;fv = 10
;value = 22
;ignorehitpause = 
;persistent = 
[State 0, TargetBind]
type = TargetBind
trigger1 = time=0
pos = 50,0
;ignorehitpause = 
;persistent = 

[State 953, 1]
type = HitDef
trigger1 = AnimElem = 6
attr = S, NT
animtype  = up
damage    = 70
guardflag = MA
pausetime = 0,3
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -15,-57
hitsound   = S1,3
ground.type = Low
ground.slidetime = 50
ground.hittime  = 50
ground.velocity = -7,-5
air.velocity = -7,-5
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 = 1
;persistent = 
[State 0, VarAdd]
type = Varset
trigger1 =animelemtime(6)>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 =0
value = 820

[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 953, 1]
type = HitDef
trigger1 = AnimElem = 6
attr = S, NT
animtype  = up
damage    = 70
guardflag = MA
pausetime = 3,3
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -15,-57
hitsound   = S1,3
ground.type = Low
ground.slidetime = 50
ground.hittime  = 50
ground.velocity = -7,-5
air.velocity = -7,-5
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


;---------------------------------------------------------------------------
; 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
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
anim=840
[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 691, Yeah!]
type = PlaySnd
trigger1 = animelem=5
value = S2,7
channel=0
[State 822, 3]
type = TargetBind
trigger1 = time=0
pos = 59,-91
[State 822, 3]
type = TargetBind
trigger1 = animelem=2
pos = 59,-92
[State 822, 3]
type = TargetBind
trigger1 = animelem=3
pos =37,-103



[State 953, 1]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NT
animtype  = up
damage    = 85
guardflag = MA
pausetime = 0,3
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -15,-57
hitsound   = S1,3
ground.type = Low
ground.slidetime = 50
ground.hittime  = 50
ground.velocity = -7,-5
air.velocity = -7,-5
fall = 1
fall.recover = 0
fall.yvelocity = -.2
id = 100
down.bounce=0
p2facing =1
p2stateno=10612
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
[State 0, VarAdd]
type = Varset
trigger1 =animelemtime(8)>0 
fv = 2    ;fv = 
value = ifelse(fvar(11)=1,.3,.5)
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=8
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N
;ignorehitpause = 
;persistent = 





;---------------------------------------------------------------------------
; 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 0, HitBy]
type = HitBy
trigger1 =1 
value = SCA,NT
;value2 = S,NA
time = 1
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
;ignorehitpause = 
;persistent = 



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

;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

[State 0, VelSet]
type = VelSet
trigger1 = p2stateno=810 &&time=0
x = -7
y =-5
;ignorehitpause = 
;persistent = 

[State 0, HitVelSet]
type = HitVelSet
trigger1 = p2stateno!=810&&time=0
x = 1
y = 1
;ignorehitpause = 
;persistent =
[State 0, Turn]
type = Turn
trigger1 = facing=enemy,facing&time=0&& prevstateno!=10013 
;ignorehitpause =
;persistent =


[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 1200
[State 0, PosSet]
type = Posadd
trigger1 = p2stateno=1104 && time=0
y = -enemy,const(size.mid.pos.y)-10


[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    =S
movetype= A
physics = S
juggle  =0;
poweradd= 13
anim = 1050
velset=0,0
ctrl = 0
sprpriority = 1
facep2=1



[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1


[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
channel=0


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

[State 0, Helper]
type = Helper
trigger1 = animelem=7
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos =100,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 0, Explod]
type = Explod
trigger1 = numhelper(1001)>0&& p2movetype=H
anim = 6007
ID = 1010
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
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent=0


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



;---------------------------------------------------------------------------
[Statedef 1006]
type    =S
movetype= A
physics = S
juggle  =0;
poweradd= 13
anim = 1050
ctrl = 0
velset=0,0
sprpriority = 1
facep2=1



[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1

[State 0, Explod]
type = Explod
trigger1 = numhelper(1001)>0&& p2movetype=H
anim = 6007
ID = 1010
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
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent=0


[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
channel=0

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

[State 0, Helper]
type = Helper
trigger1 = animelem=7
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos =210,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)




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

;---------------------------------------------------------------------------
; CNS difficulty: medium
[Statedef 1007]
type    = S
movetype= A
physics = S
juggle  =0;
poweradd= 13
facep2=1
velset=0,0
anim = 1051
ctrl = 0
sprpriority = 1


[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1

[State 0, Explod]
type = Explod
trigger1 = numhelper(1001)>0 && p2movetype=H
anim = 6007
ID = 1010
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
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
persistent=0


[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
channel=0

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

[State 0, Helper]
type = Helper
trigger1 = animelem=7
helpertype = normal ;player
name ="Hadouken"
ID = 1001
stateno = 1001
pos =ceil(p2dist x),0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = 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 = 1000
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 = statetype=A && time=0
v = 4    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = statetype!=A && time=0 || prevstateno=[100,105]
v = 4    ;fv = 10
value = 0
[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1

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


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

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

;elem = 1
;ignorehitpause = 
;persistent = 


[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = animtime=0
value = 1052

;------------------
;Gou Shoryuken - land
[Statedef 1052]
type    = A
movetype= A
physics = N
sprpriority = 1
velset = 0,0

[State 0, Gravity]
type = Gravity
trigger1 = anim=1005
;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 

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


[State 0, Null]
type = Null
triggerall = time=0||AILevel=0
triggerall = time=0||anim=[1010,1014]
triggerall =time=0||command="mashableA"&&var(57)!=1||command="mashableB"&&var(57)=1
trigger1 =( command!="holdfwd" )&& command!="holddown" && command="holdup" && command="holdback"&& time!=0   || time=0 && prevstateno=1060 && var(4)=0
trigger1 = var(3):=7
trigger2=( command!="holdfwd" )&& command="holddown" && command!="holdup" && command="holdback"&& time!=0
trigger2=var(3):=1
trigger3=( command!="holdfwd" )&& command="holddown" && command!="holdup" && command!="holdback" && time!=0 || time=0 && prevstateno=1062&& var(4)=1
trigger3= var(3):=2
trigger4= ( command="holdfwd" )&& command="holddown" && command!="holdup" && command!="holdback" && time!=0 || time=0 && prevstateno=1060 && var(4)=1
trigger4=var(3):=3
trigger5=( command!="holdfwd" )&& command!="holddown" && command!="holdup" && command="holdback" && time!=0 
trigger5=var(3):=4
trigger6=( command!="holdfwd" )&& command!="holddown" && command="holdup" && command!="holdback"&& time!=0 || time=0 && prevstateno=1062&& var(4)=0
trigger6=var(3):=8
trigger7=( command="holdfwd" )&& command!="holddown" && command="holdup" && command!="holdback"&& time!=0 
trigger7=var(3):=9
trigger8=( command="holdfwd" )&& command!="holddown" && command!="holdup" && command!="holdback" && time!=0 || time=0 && prevstateno=1050
trigger8=var(3):=6
[State 0, Null]
type = Null
triggerall = roundstate=2
triggerall = AILevel>0
triggerall = var(40)!=3
triggerall = time=0||anim=[1010,1014]
triggerall = time <3||movehit|| animelemtime(3)<0 && anim=[1010,1014]
trigger1 = p2bodydist x <-40 && p2bodydist y <-30 ||((  var(9)||p2stateno=[120,155])&& AILevel *35&&backedgebodydist >50) || time=0 && prevstateno=1060 && var(4)=0
trigger1 = var(3):=7
trigger2=p2bodydist x <-60 && p2bodydist y >30 
trigger2=var(3):=1
trigger3=(p2bodydist x =[-60,60]) && p2bodydist y >30 || time=0 && prevstateno=1062&& var(4)=1
trigger3= var(3):=2
trigger4= p2bodydist x >60 && p2bodydist y >30|| time=0 && prevstateno=1060 && var(4)=1
trigger4=var(3):=3
trigger5=(p2bodydist x <-10 && p2bodydist y =[-30,30])||((  var(9)||p2stateno=[120,155])&& AILevel *35&&backedgebodydist >50)
trigger5=var(3):=4
trigger6=(p2bodydist x =[-40,40]) && p2bodydist y <-30|| time=0 && prevstateno=1062&& var(4)=0
trigger6=var(3):=8
trigger7=(p2bodydist x >40) && p2bodydist y <-30||(( var(9)||p2stateno=[120,155])&& AILevel *35&&backedgebodydist <50)
trigger7=var(3):=9
trigger8=(p2bodydist x >-10 && p2bodydist y =[-30,30])|| time=0 && prevstateno=1050
trigger8=var(3):=6
[State 0, Turn]
type = Turn
trigger1 = animelemtime(1)=1 && anim=1012 && var(3)=1
trigger2 = animelemtime(1)=1 && anim=1011 && var(3)=7
trigger3 = animelemtime(1)=1 && anim=1010 && var(3)=4


[State 0, VarSet]
type = VarSet
triggerall = roundstate=2
triggerall = AILevel>0
triggerall = var(40)=3
triggerall = time=0||anim=[1010,1014]
triggerall = time <3||movehit|| animelemtime(3)<0 && anim=1011
trigger1 = var(40)=3 && numexplod(1000) =0
trigger2 = var(40)=3 && numexplod(1000) =1
v = 3    ;fv = 10
value = ifelse(numexplod(1000) =0,9,3)
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 9   ;fv = 10
value = 0
[State 0, VarSet]
type = VarSet
trigger1 = moveguarded
v = 9   ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=var(3)=6|| var(3)=4
triggerall = numexplod(1000) <3
trigger1 = time=0||(((random<250||var(40)>0)&&AIlevel>0&&animelemtime(2)=[10,17])||AILevel=0&&animelemtime(2)=[5,17]) && anim=[1010,1014]
value =1010
elem=ifelse(time=0,2,1)
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim!=[1005,1006]
triggerall=var(3)=1 ||var(3)=3
triggerall = numexplod(1000) <3
trigger1 = time=0||((var(40)>0&&AIlevel>0&&animelemtime(2)>=6)||((random<250||var(40)>0)&&AIlevel>0&&animelemtime(2)=[10,17])||AILevel=0&&animelemtime(2)=[5,17]) && anim=[1010,1014]
value =1012
elem=ifelse(time=0,2,1)
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim!=[1005,1006]
triggerall = numexplod(1000) <3
triggerall=var(3)=9|| var(3)=7
trigger1 = time=0||(((random<250||var(40)>0)&&AIlevel>0&&animelemtime(2)=[10,17])||AILevel=0&&animelemtime(2)=[5,17])&& anim=[1010,1014]
value =1011
elem=ifelse(time=0,2,1)
[State 0, ChangeAnim]
type = ChangeAnim
triggerall=var(3)=2&& anim!=[1005,1006]
triggerall = numexplod(1000) <3
trigger1 = time=0||(((random<250||var(40)>0)&&AIlevel>0&&animelemtime(2)=[10,17])||AILevel=0&&animelemtime(2)=[5,17])&& anim=[1010,1014]
value =1014
elem=ifelse(time=0,2,1)
[State 0, ChangeAnim]
type = ChangeAnim
triggerall=var(3)=8&& anim!=[1005,1006]
triggerall = numexplod(1000) <3
trigger1 = time=0||(((random<250||var(40)>0)&&AIlevel>0&&animelemtime(2)=[10,17])||AILevel=0&&animelemtime(2)=[5,17]) && anim=[1010,1014]
value =1013
elem=ifelse(time=0,2,1)
[State 0, VarSet]
type = VarSet
trigger1 = anim=1006
v = 17   ;fv = 10
value = 15
;ignorehitpause = 
;persistent = 

;persistent = 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2&& anim=[1010,1014]
value = S1,11
channel=2
 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =anim=1011 &&animelemtime(2)>=0  
value = 45
ignorehitpause =1 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =anim=1012 &&animelemtime(2)>=0  
value = -45
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =anim=1013 &&animelemtime(2)>=0  
value = 90
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =anim=1014 &&animelemtime(2)>=0  
value = -90
ignorehitpause =1 
[State 0, Helper]
type = Helper
trigger1 = animelem=2
helpertype = normal ;player
name = "stuff"
ID = 1051
stateno = 1051
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
ignorehitpause =1 
[State 0, Helper]
type = Helper
trigger1 = animelem=2
helpertype = normal ;player
name = "stuff"
ID = 1051
stateno = 1054
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
ignorehitpause =1 
[State 0, VarSet]
type = VarSet
triggerall = anim=[1010,1014]
trigger1 = animelem=2
v = 3    ;fv = 10
value = 0
[State 0, Explod]
type = Explod
trigger1 =animelem=1&& anim=[1010,1014]
anim = 1019
ID = 1
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 = (const(size.xscale)),(const(size.yscale))
sprpriority = -1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, Explod]
type = Explod
trigger1 = animelem=1 && anim=[1010,1014]
anim = 1018
ID = 1
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 = (const(size.xscale)),(const(size.yscale))
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, Explod]
type = Explod
trigger1 = time=0
trigger2 = animelemtime(1)=1 && anim=[1010,1014]
anim = 6007
ID = 1000
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
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
[State 0, PosSet]
type = PosSet
trigger1 = anim=1006
y = 0
;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=-20 && (anim=1014||anim=1012)
trigger2 = pos y >=-55 && anim=1010&&animelemtime(2)>17
value = 1006
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y <-10 &&animelemtime(2)>17&& anim=[1011,1014]
trigger2 = pos y <-55 &&animelemtime(2)>17&& anim=1010
value = 1005
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 17   ;fv = 10
value =0
[State 0, VarSet]
type = VarSet
trigger1 = anim=1005 && animelemtime(1)=0&& var(17)=0 && var(4)=0
v = 17   ;fv = 10
value = 26
[State 0, VarAdd]
type = VarAdd
trigger1 = var(17)>1
v = 17
value = -1
;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y>=0 && anim=1005
value = 1006
elem = 3
[State 0, AngleDraw]
type = AngleDraw
trigger1 =anim=1005
value = 0
ignorehitpause =1
[State 0, PosAdd]
type = PosAdd
trigger1 =animelem=2 && anim=[1010,1014]
y = -55

[State 0, PosAdd]
type = PosAdd
trigger1 =time>=4&&animelem=1&& anim=[1010,1014]
trigger2=animelem=1&&anim=[1005,1006]
y = 55

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

[State 1000, 2]
type = velset
triggerall= anim=1010|| anim=1012 || anim=1011
trigger1 = AnimElem = 2
x = 9

[State 1000, 2]
type = velset
triggerall= anim=1013|| anim=1011 
trigger1 = AnimElem = 2
y= -9
[State 1000, 2]
type = velset
triggerall= anim=1014|| anim=1012
trigger1 = AnimElem = 2
y= 9

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=1 && anim=[1010,1014]
trigger2 = animelemtime(3)>=0 && anim=1006
x = 0
y = 0
[State 0, Explod]
type = Explod
trigger1 = movecontact=1
anim = 6007
ID = 1001
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
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause=0
[State 1055, 5]
type = HitDef
triggerall = numexplod(1001)<3
trigger1 = animelemtime(2)%4=0
attr = A, SA
animtype  = up
damage    = 30,7
priority  = 4
guardflag = MA
pausetime = floor(5*(ifelse(var(18),.75,1))), floor(5*(ifelse(var(18),.75,1)))
sparkxy = 5,-0
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
ground.velocity = -2.5,-5.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =ifelse(32-var(20) <0,15,32-var(20))+(4*var(4))
guard.ctrltime = 15
air.hittime=ifelse(32-var(20) <0,15,32-var(20))+(4*var(4))
air.velocity = -3.5,-5.5
airguard.velocity = -4,-4.5
palfx.add = 50,80,255 ;Generated by Fighter Factory PalFX Editor
palfx.mul = 256,200,200
palfx.sinadd = 64,32,5,1
palfx.time = 20
yaccel=.57
id=1050
forcestand=1
forcenofall=1
down.bounce=0


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelem=1
id = 1001
;ignorehitpause = 
;persistent = 

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

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=[1010,1014]
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = N
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=1005
statetype =A      ;S,A,C,L
movetype = I        ;I,A,H
physics = N
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=1006
statetype = S      ;S,A,C,L
movetype = I        ;I,A,H
physics = S


[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = animtime=0 && anim=1006
value = 0
ctrl=1

[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = animelem=3&&var(4)=1 && anim=1005
trigger2 = var(17)=1&&var(4)=0 && anim=1005
value = 57
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= 60
velset = 0,0
anim = 1000
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 = statetype=A && time=0
v = 4    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = statetype!=A && time=0 || prevstateno=[100,105]
v = 4    ;fv = 10
value = 0
[State 200, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2, 0
channel=0
[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1


[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



;elem = 1
;ignorehitpause = 
;persistent = 


[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = animtime=0
value = 1052


;---------------------------------------------------------------------------
;Gou Shoryuken - z
[Statedef 1062]
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 = 1000
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 = statetype=A && time=0
v = 4    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = statetype!=A && time=0 || prevstateno=[100,105]
v = 4    ;fv = 10
value = 0
[State 200, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 2, 0
channel=0


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


;elem = 1
;ignorehitpause = 
;persistent = 


[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = animtime=0
value = 1052

;---------------------------------------------------------------------------
[Statedef 1100]
type    = S
movetype= A
physics = S
juggle  =0;6
poweradd= 60
velset=0,0
anim = 1100
ctrl = 0
sprpriority = 2
[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, Width]
type = Width
trigger1 = 1
edge = 55,0
player = 25,0
;value = 0,0
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1


[State 0, Helper]
type = Helper
trigger1 = animelem=4
helpertype = normal ;player
name = "2chains"
ID = 1110
stateno =1110 
pos = 72,-79
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 0, NotHitBy]
type = NotHitBy
trigger1 =  p2stateno=1102 && numhelper(1110)>0 && p2movetype=H
value = SCA
;value2 = S,NA
time = 1
[State 0, ChangeState]
type = ChangeState
trigger1 = p2stateno=1102 && numhelper(1110)>0 && p2movetype=H
value =1101
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S2,6
channel=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S1,4
channel=2
 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = numhelper(1110)=0 &&animelemtime(4)>0 && animelemtime(6)<0
value = 1100
elem = 6


[State 1030, back]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 1101]
type    =S
movetype= A
physics = S
juggle  =0;6
poweradd= 60
anim =1103
ctrl = 0
sprpriority = 2
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1,5
channel=2
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S2,7
channel=0
[State 0, Explod]
type = Explod
trigger1 =time=0
anim = 6007
ID = 1103
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
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = p2stateno!=1102
id = 1115
ignorehitpause =1 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = p2bodydist x<=25 && animelemtime(3)<0
value = 1103
elem = 3
;ignorehitpause = 
;persistent = 
;[State 0, TargetBind]
;type = TargetBind
;trigger1=numhelper(1110)>0 && p2stateno=1102
;;id = 100
;pos = ceil(helper(1110),pos x),ceil(-enemy,const(size.mid.pos.y)-30)
;ignorehitpause = 
;persistent = 

[State 1055, 5]
type = HitDef
trigger1 = animelem=7
attr = S, ST
animtype  = diagup
damage    = 70,10
priority  = 4
guardflag = MA
pausetime = floor(7*(ifelse(var(18),.75,1))), floor(7*(ifelse(var(18),.75,1)))
sparkxy = -15,-81
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,3
guardsound = S3,1
ground.type = High
ground.velocity = -4.5,-13
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -4.5,-13
airguard.velocity = -4,-4.5
yaccel=.62
id=200
forcestand=1
forcenofall=ifelse(numexplod(1103)>1,1,0)
fall=ifelse(numexplod(1103)>1,0,1)
fall.recover=0
down.bounce=0


[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
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 1102]
type    =A
movetype= H
physics = N
juggle  =0;6
poweradd= 0
ctrl = 0
sprpriority = 2
facep2=1 
;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 =1
value = 1105
;ignorehitpause = 
;persistent = 
[State 0, HitBy]
type = HitBy
trigger1 =1 
value = SCA,ST
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 


[State 0, PosSet]
type = PosSet
trigger1 = 1
y = enemy,const(size.mid.pos.y)-10
;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = p2bodydist x >15
x = ifelse(p2stateno=1104,14,8)
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = p2bodydist x <15
x = 0
y = 0
;ignorehitpause = 
;persistent = 
[State 0, SelfState]
type = SelfState
trigger1 = p2stateno!=[1101,1104]
value =5050
;anim =
;ctrl =
;ignorehitpause = 0
;persistent = 1
;---------------------------------------------------------------------------
[Statedef 1103]
type    = S
movetype= A
physics = S
juggle  =0;6
poweradd= 60
velset=0,0
anim = 1101
ctrl = 0
sprpriority = 2
[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, Width]
type = Width
trigger1 = 1
edge = 55,0
player = 25,0
[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1

[State 0, Helper]
type = Helper
trigger1 = animelem=4
helpertype = normal ;player
name = "2chains"
ID = 1110
stateno =1111 
pos = 72,-79
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S2,6
channel=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S1,4
channel=2
[State 0, ChangeState]
type = ChangeState
trigger1 = p2stateno=1102 && numhelper(1110)>0 && p2movetype=H
value =1104


[State 0, NotHitBy]
type = NotHitBy
trigger1 =  p2stateno=1102 && numhelper(1110)>0 && p2movetype=H
value = SCA
;value2 = S,NA
time = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = numhelper(1110)=0 &&animelemtime(4)>0 && animelemtime(6)<0
value = 1101
elem = 6


[State 1030, back]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 1104]
type    =S
movetype= A
physics = S
juggle  =0;6
poweradd= 60
anim =1104
ctrl = 0
sprpriority = 2
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1,5
channel=2
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S2,8
channel=0
[State 0, Helper]
type = Helper
trigger1 =  animelem=7
helpertype = normal ;player
name = "kaboom"
ID = 1110
stateno =1112 
pos = -2,-81
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 1115
ignorehitpause =1
[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = p2stateno!=1102 && p2stateno!=1105
id = 1115
ignorehitpause =1 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = p2bodydist x<=25 && animelemtime(3)<0
value = 1104
elem = 3
;ignorehitpause = 
;persistent = 
;[State 0, TargetBind]
;type = TargetBind
;trigger1=numhelper(1110)>0 && p2stateno=1102
;;id = 100
;pos = ceil(helper(1110),pos x),ceil(-enemy,const(size.mid.pos.y)-30)
;ignorehitpause = 
;persistent = 
[State 1055, 5]
type = HitDef
trigger1 = animelem=3
attr = S, ST
animtype  = diagup
damage    = 0,0
priority  = 4
numhits=0
sparkno=-1
hitsound=-1
p2stateno=1105

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(4)>=0 && animelemtime(5)<0
pos = 41,-69
[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(5)>=0 && animelemtime(6)<0
pos = 35,-81
[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(6)>=0 && animelemtime(7)<0
pos = 19,-101
;ignorehitpause = 
;persistent = 


[State 1055, 5]
type = HitDef
trigger1 = animelem=7
attr = S, ST
animtype  = diagup
damage    = 110,10
priority  = 4
guardflag = MA
pausetime = floor(7*(ifelse(var(18),.75,1))), floor(7*(ifelse(var(18),.75,1)))
sparkxy = -15,-81
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,10
guardsound = S3,1
ground.type = High
ground.velocity = -4.5,-13
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =25
guard.ctrltime = 15
air.hittime=25
air.velocity = -4.5,-13
airguard.velocity = -4,-4.5
yaccel=.62
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
id=200
envshake.time = 12
envshake.ampl = 3
envshake.freq=60
fall.recover=0
fall=1
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=1 && (p2stateno!=[675,676])
value =675
ID =200
ignorehitpause =1


[State 1030, back]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 1105]
type    =A
movetype= H
physics = N
juggle  =0;6
poweradd= 0
ctrl = 0
sprpriority = 2

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

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 =1
value = 1105
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, ChangeState]
type = selfState
trigger1 = p2stateno!=1104
value =5050
;anim =
;ignorehitpause = 
;persistent = 
;---------------------------------------------------------------------------
[Statedef 1106]
type    = S
movetype= A
physics = S
juggle  =0;6
poweradd= 60
velset=0,0
anim = 1102
ctrl = 0
sprpriority = 2
[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, Width]
type = Width
trigger1 = 1
edge = 70,0
player = 25,0
[State 0, Explod]
type = Explod
trigger1 = animelemtime(2)=1
anim = 6007
ID = 1109
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
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem=10 && numexplod(1109)<8 && (command="HoldHA"&&var(57)=0||command="HoldHB"&&var(57)=1||command="HoldHG"&&var(57)=2) && AIlevel=0
trigger2=animelem=10 && numexplod(1109)=1
trigger2=animelem=10 && numexplod(1109)<8 && AIlevel>0 && p2bodydist x<55
value =  1102
elem =2
;ignorehitpause = 
;persistent = 

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

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=11
x = 15
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=13
x = 10
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=14
x = -10
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=15
x = -15

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10
value = S2,6
channel=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 13
value = S1,4
channel=2
[State 0, Helper]
type = Helper
trigger1 = animelem=13
helpertype = normal ;player
name = "2chains"
ID = 1111
stateno =1113
pos = 67,-118
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1030, back]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 1107]
type    =A
movetype= H
physics = N
juggle  =0;6
poweradd= 0
ctrl = 0
velset=0,0
sprpriority = 2

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

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 =1
value = 1106
;ignorehitpause = 
;persistent = 

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



[State 0, ChangeState]
type = changeState
trigger1 =pos y >=0
value =1108
;---------------------------------------------------------------------------
[Statedef 1108]
type    =A
movetype= H
physics = N
juggle  =0;6
poweradd= 0
ctrl = 0
velset=0,0
sprpriority = 2

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

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



[State 0, ChangeState]
type = selfState
trigger1 = time=35 
value =0
ctrl=1
;---------------------------------------------------------------------------
[Statedef 1150]
type    =S
movetype= A
physics = S
juggle  =0;
poweradd= 13
anim = 1150
velset=0,0
ctrl = 0
sprpriority = 1
facep2=1


[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1



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

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

[State 0, Helper]
type = Helper
trigger1 = animelem=1
helpertype = normal ;player
name ="ghots"
ID = 1155
stateno = 1155
pos =55,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=1
x = 10
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=4
x = -10

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = ifelse(statetype=A,57,0)
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 1151]
type    =S
movetype= A
physics = S
juggle  =0;
poweradd= 13
anim = 1150
velset=0,0
ctrl = 0
sprpriority = 1
facep2=1


[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1



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



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

[State 0, Helper]
type = Helper
trigger1 = animelem=1
helpertype = normal ;player
name ="ghots"
ID = 1155
stateno = 1155
pos =55,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)


[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=1
x = 10
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=4
x = -10

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = ifelse(statetype=A,57,0)
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 1152]
type    =S
movetype= A
physics = S
juggle  =0;
poweradd= 13
anim = 1150
velset=0,0
ctrl = 0
sprpriority = 1
facep2=1




[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1

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


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

[State 0, Helper]
type = Helper
trigger1 = animelem=1
helpertype = normal ;player
name ="ghots"
ID = 1155
stateno = 1155
pos =55,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=1
x = 10
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=4
x = -10


[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = ifelse(statetype=A,57,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    = U
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, PosAdd]
type = PosAdd
trigger1 =time=0&& anim=[1010,1014]
y = 55
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=0
value = 3000
;elem = 1
;ignorehitpause = 
;persistent = 

[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1

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



[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,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) && statetype!=A
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, VarSet]
type = VarSet
trigger1 = statetype=A && time=0
v = 4    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = statetype!=A && time=0
v = 4    ;fv = 10
value = 0


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

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

;elem = 1
;ignorehitpause = 
;persistent = 


[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = animtime=0
value = 3001

;------------------
;Gou Shoryuken - land
[Statedef 3001]
type    = A
movetype= A
physics = N
sprpriority = 1
velset = 0,0

[State 0, Gravity]
type = Gravity
trigger1 = anim=1005
;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 

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


[State 0, Null]
type = Null
triggerall = time=0||AILevel=0
triggerall = time=0||anim=[1010,1014]
triggerall =time=0||command="mashableA"&&var(57)!=1||command="mashableB"&&var(57)=1
trigger1 =( command!="holdfwd" )&& command!="holddown" && command="holdup" && command="holdback"&& time!=0 ;  || time=0 && prevstateno=1060 && var(4)=0
trigger1 = var(3):=7
trigger2=( command!="holdfwd" )&& command="holddown" && command!="holdup" && command="holdback"&& time!=0
trigger2=var(3):=1
trigger3=( command!="holdfwd" )&& command="holddown" && command!="holdup" && command!="holdback" && time!=0; || time=0 && prevstateno=1062&& var(4)=1
trigger3= var(3):=2
trigger4= ( command="holdfwd" )&& command="holddown" && command!="holdup" && command!="holdback" && time!=0 ;|| time=0 && prevstateno=1060 && var(4)=1
trigger4=var(3):=3
trigger5=( command!="holdfwd" )&& command!="holddown" && command!="holdup" && command="holdback" && time!=0 
trigger5=var(3):=4
trigger6=( command!="holdfwd" )&& command!="holddown" && command="holdup" && command!="holdback"&& time!=0; || time=0 && prevstateno=1062&& var(4)=0
trigger6=var(3):=8
trigger7=( command="holdfwd" )&& command!="holddown" && command="holdup" && command!="holdback"&& time!=0 
trigger7=var(3):=9
trigger8=( command="holdfwd" )&& command!="holddown" && command!="holdup" && command!="holdback" && time!=0 || time=0 && prevstateno=3000
trigger8=var(3):=6

[State 0, Null]
type = Null
triggerall = roundstate=2
triggerall = AILevel>0
triggerall = time=0||anim=[1010,1014]
triggerall = time <3||movehit ||animelemtime(3)<0 && anim=[1010,1014]
trigger1 = (p2bodydist x <-40 && p2bodydist y <-20 ||(( p2stateno=[120,155])&& AILevel *65&&backedgebodydist >50)) && time!=0
trigger1 = var(3):=7
trigger2=p2bodydist x <-30 && p2bodydist y >50 && time!=0
trigger2=var(3):=1
trigger3=(p2bodydist x =[-30,30]) && p2bodydist y >50&& time!=0
trigger3= var(3):=2
trigger4= (p2bodydist x >30|| frontedgebodydist <40) && p2bodydist y >50 && time!=0
trigger4=var(3):=3
trigger5=(p2bodydist x >-10 && p2bodydist y =[-20,50]) || time=0
trigger5=var(3):=6
trigger6=((p2bodydist x <0 && p2bodydist y =[-20,50])||(( p2stateno=[120,155])&& AILevel *65&&backedgebodydist >50) )&& time!=0
trigger6=var(3):=4
trigger7=(p2bodydist x =[-30,30]) && p2bodydist y <-20 && time!=0
trigger7=var(3):=8
trigger8=((p2bodydist x >30) && p2bodydist y <-20||(( p2stateno=[120,155])&& AILevel *65&&backedgebodydist <50)) && time!=0
trigger8=var(3):=9

[State 0, Turn]
type = Turn
trigger1 = animelemtime(1)=1 && anim=1012 && var(3)=1
trigger2 = animelemtime(1)=1 && anim=1011 && var(3)=7
trigger3 = animelemtime(1)=1 && anim=1010 && var(3)=4

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=var(3)=6|| var(3)=4
triggerall = numexplod(3000) <6
trigger1 = time=0||((random<250&&AIlevel>0&&animelemtime(2)=[9,17])||AILevel=0&&(animelemtime(2)=[9,22]) && anim=[1010,1014]) && anim=[1010,1014]
value =1010
elem=ifelse(time=0,2,1)
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim!=[1005,1006]
triggerall=var(3)=1 ||var(3)=3
triggerall = numexplod(3000) <6
trigger1 =((var(40)>0&&AIlevel>0&&animelemtime(2)>=6)||(random<250&&AIlevel>0&&animelemtime(2)=[10,17])||AILevel=0&&(animelemtime(2)=[9,22]) && anim=[1010,1014]) && anim=[1010,1014]
value =1012
elem=ifelse(time=0,2,1)
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim!=[1005,1006]
triggerall = numexplod(3000) <6
triggerall=var(3)=9|| var(3)=7
trigger1 = ((random<250&&AIlevel>0&&animelemtime(2)=[10,17])||(animelemtime(2)=[9,22]) && anim=[1010,1014])&& anim=[1010,1014]
value =1011
elem=ifelse(time=0,2,1)
[State 0, ChangeAnim]
type = ChangeAnim
triggerall=var(3)=2&& anim!=[1005,1006]
triggerall = numexplod(3000) <6
trigger1 = ((random<250&&AIlevel>0&&animelemtime(2)=[10,17])||AILevel=0&&(animelemtime(2)=[9,22]) && anim=[1010,1014])&& anim=[1010,1014]
value =1014
elem=ifelse(time=0,2,1)
[State 0, ChangeAnim]
type = ChangeAnim
triggerall=var(3)=8&& anim!=[1005,1006]
triggerall = numexplod(3000) <6
trigger1 = ((random<250&&AIlevel>0&&animelemtime(2)=[10,17])||AILevel=0&&(animelemtime(2)=[9,22]) && anim=[1010,1014]) && anim=[1010,1014]
value =1013
elem=ifelse(time=0,2,1)






;persistent = 

[State 200, 1]
type = PlaySnd
trigger1 = animelem=1 && anim=[1010,1014]
value = 2, 7
channel=0
 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =anim=1011 &&animelemtime(2)>=0  
value = 45
ignorehitpause =1 

[State 0, AngleDraw]
type = AngleDraw
trigger1 =anim=1012 &&animelemtime(2)>=0  
value = -45
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =anim=1013 &&animelemtime(2)>=0  
value = 90
ignorehitpause =1 
[State 0, AngleDraw]
type = AngleDraw
trigger1 =anim=1014 &&animelemtime(2)>=0  
value = -90
ignorehitpause =1 
[State 0, Helper]
type = Helper
trigger1 = animelem=2&&anim!=[1005,1006]
helpertype = normal ;player
name = "stuff"
ID = 1051
stateno =3007
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
ignorehitpause =1 
[State 0, Helper]
type = Helper
trigger1 = animelem=2&&anim!=[1005,1006]
helpertype = normal ;player
name = "stuff"
ID = 1051
stateno =3009
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
ignorehitpause =1 
[State 0, Helper]
type = Helper
trigger1 = animelem=1 &&anim!=[1005,1006]
helpertype = normal ;player
name = "stuff"
ID = 1051
stateno =3010
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 999
pausemovetime = 999
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
ignorehitpause =1
[State 0, VarSet]
type = VarSet
triggerall = anim=[1010,1014]
trigger1 = animelem=2
v = 3    ;fv = 10
value = 0

[State 0, Explod]
type = Explod
trigger1 = time=0
trigger2 = animelemtime(1)=1 && anim=[1010,1014]
anim = 6007
ID = 3000
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
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
[State 0, PosSet]
type = PosSet
trigger1 = anim=1006
y = 0
;ignorehitpause = 
;persistent = 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2&& anim=[1010,1014]
value = S1,11
channel=2
 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=-20 && (anim=1014||anim=1012)
trigger2 = pos y >=-55 && anim=1010&&animelemtime(2)>22
value = 1006
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y <-10 &&animelemtime(2)>17&& anim=[1011,1014]
trigger2 = pos y <-55 &&animelemtime(2)>17&& anim=1010
value = 1005
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y>=0 && anim=1005
value = 1006
elem = 3
[State 0, AngleDraw]
type = AngleDraw
trigger1 =anim=1005
value = 0
ignorehitpause =1
[State 0, PosAdd]
type = PosAdd
trigger1 =animelem=2 && anim=[1010,1014]
y = -55

[State 0, PosAdd]
type = PosAdd
trigger1 =time>=4&&animelem=1&& anim=[1010,1014]
trigger2=animelem=1&&anim=[1005,1006]
y = 55

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

[State 1000, 2]
type = velset
triggerall= anim=1010|| anim=1012 || anim=1011
trigger1 = AnimElem = 2
x = 9

[State 1000, 2]
type = velset
triggerall= anim=1013|| anim=1011 
trigger1 = AnimElem = 2
y= -9
[State 1000, 2]
type = velset
triggerall= anim=1014|| anim=1012
trigger1 = AnimElem = 2
y= 9

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=1 && anim=[1010,1014]
trigger2 = animelemtime(3)>=0 && anim=1006
x = 0
y = 0
[State 0, Explod]
type = Explod
trigger1 =animelem=1&& anim=[1010,1014]
anim =3002
ID = 1
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 = (const(size.xscale)),(const(size.yscale))
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, Explod]
type = Explod
trigger1 = movecontact=1
anim = 6007
ID = 3001
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
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause=0
[State 1055, 5]
type = HitDef
triggerall = numexplod(3001)<3
trigger1 = animelemtime(2)%4=0
attr = A, SA
animtype  = up
damage    = 20,5
priority  = 4
guardflag = MA
pausetime = floor(2*(ifelse(var(18),.75,1))), floor(2*(ifelse(var(18),.75,1)))
sparkxy = 5,-0
sparkno = S7005+(random%3)
guard.sparkno = S7009
hitsound   = S1,2
guardsound = S3,1
ground.type = High
getpower=0
ground.velocity = -2.5,-5.5
guard.velocity = -3
ground.slidetime = 22
ground.hittime  =ifelse(28-var(20) <0,20,28-var(20))
guard.ctrltime = 15
air.hittime=ifelse(28-var(20) <0,20,28-var(20))
air.velocity = -2.5,-6.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=.57
id=1050
forcestand=1
forcenofall=1
down.bounce=0


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelem=1
id = 3001
;ignorehitpause = 
;persistent = 

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


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=[1010,1014]
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = N
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=1005
statetype =A      ;S,A,C,L
movetype = I        ;I,A,H
physics = N
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=1006
statetype = S      ;S,A,C,L
movetype = I        ;I,A,H
physics = S

[State -2, RemoveExplod]    ;remove hyper bg
type = RemoveExplod
trigger1 = (anim= [1005,1006]  )
id = 6001
[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = animtime=0 && anim=1006
value = 0
ctrl=1
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 17   ;fv = 10
value =0
[State 0, VarSet]
type = VarSet
trigger1 = anim=1005 && animelemtime(1)=0&& var(17)=0 
v = 17   ;fv = 10
value =8
[State 0, VarAdd]
type = VarAdd
trigger1 = var(17)>1
v = 17
value = -1
[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = var(17)=1&& anim=1005
value = 57
ctrl=1
;---------------------------------------------------------------------------
;
[Statedef 3020]
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, PosFreeze]
type = PosFreeze
trigger1 = time<49
value = 1
ignorehitpause = 1
;persistent = 

[State 0, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1

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

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



[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=2&& (anim=3010)
time = 50
movetime = 50
;endcmdbuftime = 0
;pausebg = 1
;ignorehitpause = 
;persistent = 



[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=2&& (anim=3010)
value = S2,9
channel=0


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

[State 3000, Hyperbg]
type = Explod
trigger1 = time=2&& (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 =time=48&& (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 && time>2
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, PosAdd]
type = PosAdd
trigger1 =animelem=2 
x = 10
[State 0, PosAdd]
type = PosAdd
trigger1 =animelem=3 
x = -5
;ignorehitpause = 
;persistent = 

[State 0, Helper]
type = Helper
trigger1 = animelem=3
helpertype = normal ;player
name ="ghots"
ID = 3021
stateno = 3021
pos =0,-90
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)*1.5
size.yscale = const(size.yscale)*1.5

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = numhelper(3021)>0
trigger1 = (helper(3021),vel x<0) && animelemtime(5)<0
value = 3010
elem = 5
;ignorehitpause = 
;persistent = 
[State 0, NotHitBy]
type = NotHitBy
triggerall = numhelper(3021)>0
trigger1 = p2stateno=3074 || (helper(3021),vel x=0)
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause = 
;persistent = 



[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = animtime=0
value = 0
ctrl=1

;---------------------------------------------------------------------------
;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, PosSet]
type = PosSet
trigger1 = (prevstateno=100||prevstateno=105)
y = 0
ignorehitpause=1


[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=1 && (anim=3020)
x = 5
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=4 && (anim=3020)
x = -5


[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=1&& (anim=3020)
value =  -3000
;ignorehitpause = 
;persistent = 

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

;ignorehitpause = 
;persistent = 

[State 3000, Hyperbg]
type = Explod
trigger1 = animelem=1  && (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 =time=49  && (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(2)>=0
flag = noBG
flag=noFG



[State 3000, helper]
type = Helper
trigger1 =animelem=2&& (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 && anim=3020
ID =8002
pausemovetime = 99
;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0


[State 0, Helper]
type = Helper
trigger1 = animelem=4 && numhelper(3050)=0&& anim=3020
helpertype = normal ;player
name ="ghots1"
ID = 3050
stateno = 3052
pos =55,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)*1.25
size.yscale = const(size.yscale)*1.25

[State 0, PosSet]
type = PosSet
triggerall = numhelper(3050)=1
trigger1 = helper(3050),stateno=3053
x = -85*facing
;ignorehitpause = 
persistent =0 

;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = numhelper(3050)=1
triggerall = p2stateno=3054
trigger1 = AnimTime = 0&& (anim=3020) && helper(3050),stateno=3053
value = 0
;ignorehitpause = 



[State 0, ChangeAnim]
type = ChangeAnim
triggerall = numhelper(3050)=1
trigger1 = (anim=0) && helper(3050),stateno=3053
value = 3022
;ignorehitpause = 
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = (anim=3022) && p2stateno=3057 && enemy,time>=45
value = 3023
;ignorehitpause = 
persistent = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = (anim=3023) && animtime=0
value = 3024
;ignorehitpause = 
persistent = 0


[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=1&& (anim=3023)
value = S2,5
channel=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=1&& (anim=3024)
value = S2,11
channel=0

[State 0, Explod]
type = Explod
trigger1 = animelem=1 && anim=3023
anim = 3027
ID = 3027
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 =1.1,1.1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
[State 0, Helper]
type = Helper
trigger1 = animelem=4 && anim=3023
helpertype = normal ;player
name ="ghots1"
ID = 3057
stateno = 3058
pos =0,-63
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)*1.1
size.yscale = const(size.yscale)*1.1
[State 0, RemoveExplod]
type = RemoveExplod
triggerall = numhelper(3057)>0
trigger1 = helper(3057),movehit && anim=3023
id = 6001
;ignorehitpause = 
;persistent = 
[State 0, Helper]
type = Helper
trigger1 =  animelem=4 && anim=3023
helpertype = normal ;player
name = "kaboom"
ID = 1110
stateno =1112 
pos = -2,-81
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)
[State 0, BGPalFX]
type = BGPalFX
triggerall =numhelper(3057)=1
trigger1 = helper(3057),movehit && anim=3023
time = 75
add = 255,256,256
mul = 256,256,256
sinadd = -256,-256,-256,250
invertall = 0
color = 256
ignorehitpause = 1
persistent=0
[State 0, BGPalFX]
type = PalFX
triggerall =numhelper(3057)=1
trigger1 = helper(3057),movehit && anim=3023
time = 75
add = 255,256,256
mul = 256,256,256
sinadd = -256,-256,-256,250
invertall = 0
color = 256
ignorehitpause = 1
persistent=0
[State 1052, 5]
type = ChangeState
trigger1 = AnimTime = 0&& (anim=3024||anim=3020) 
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, Helper]
type = Helper
trigger1 =numhelper(10003)=0
helpertype = normal ;player
name = "neutrality"
ID =  10003
stateno = 9999
pos = 61,-37
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale =1*const(size.xscale)
size.yscale =1*const(size.yscale)
ignorehitpause=1
 [State 0, VarSet]
type = VarSet
triggerall=var(42)=0
trigger1 = statetype = A
trigger2 = movetype=H && stateno!=[120,155]
trigger3= prevstateno=40
trigger4= (p2stateno=[5090,5119]) &&(p2stateno=[5121,5899])
trigger5 = var(41)>0
trigger6 = (prevstateno=52 ||prevstateno=5120) && p2statetype=A && var(40)=0
trigger7 = p2bodydist x <55 && frontedgebodydist >50 && p2statetype!=L
trigger8 = var(40)=6 || var(40)=12 || var(40)=21 || var(40)=45  || var(40)=85|| var(40)=83||var(40)=40 ||var(40)=80
trigger9 = numhelper(10003)
trigger9=helper(10003),var(8)>0
trigger10 = p2stateno!=10003&& var(40)=0
trigger11 = numhelper(10003)
trigger11 = helper(10003),var(19)>0 && var(40)=0
trigger12 = stateno=1100
trigger13= stateno=200
trigger14= (p2stateno=10003)
v=30
value = 0

[State 0, VarSet]
type = VarSet
triggerall = statetype != A
triggerall = roundstate=2 
triggerall = var(41)=0
triggerall = stateno!=1100
triggerall = (helper(10003),var(8)<=0)
triggerall = (p2stateno!=10003)
triggerall = p2stateno =5120||random <149|| p2movetype=A&& p2bodydist x >100|| p2stateno=4999 && p2bodydist x >40||enemy,hitdefattr=SC,AT || var(40)>0
trigger1= enemy,hitdefattr=SC,AT && ctrl
trigger2 = p2bodydist x >130 && ctrl && movetype!=H&&(p2movetype!=H) && var(40)=0 
trigger3 = stateno=210 && movehit 
trigger4 = var(42)
;trigger7 =  var(40)=
v = 30   ;fv = 10
value = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = frontedgedist <70 && p2stateno=[10013,10014] 
flag = noautoturn


[State 0, Helper]
type = Helper
trigger1 = (p2stateno=[1107,1108])&& numhelper(1109)=0 && p2movetype=H
trigger2 = stateno=1101 && time=1 
trigger3 = stateno=1104 && time=1 
helpertype = normal ;player
name ="coiled up"
ID = 1109
stateno = 1109
pos =0,0
postype =p2    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 0, VarSet]
type = VarSet
trigger1 = numhelper(3021)=0
v = 49   ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 
[State 0, Explod]
type = Explod
trigger1 = (p2stateno=1107)&& enemy,time=1 && p2movetype=H
anim = 6007
ID = 1106
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = 7
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1= stateno!=1106
id = 1109
ignorehitpause =1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1=p2movetype!=H
id = 1010
ignorehitpause =1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1=p2movetype!=H
id = 1103
ignorehitpause =1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1=p2movetype!=H
id = 1106
ignorehitpause =1
[State 0, VarSet]
type = VarSet
trigger1 =p2movetype!=H
v = 34  ;fv = 10
value = ceil(enemynear,const(size.head.pos.y))
ignorehitpause =1
[State 0, VarSet]
type = VarSet
trigger1 =var(34)= [-69,0]
v = 5   ;fv = 10
value = 0
ignorehitpause =1

[State 0, VarSet]
type = VarSet
trigger1 =var(34)=[-99,-70]
v = 5  ;fv = 10
value = 1
ignorehitpause =1

[State 0, VarSet]
type = VarSet
trigger1 =var(34)<= -100
v = 5   ;fv = 10
value = 2
ignorehitpause =1




[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=810 
id = 800
;ignorehitpause = 
;persistent = 
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=1052
id = 1000
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=1052
id = 1001
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=3001
id = 3000
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=3001
id = 3001
[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(3) = %d evar(3) = %d  var(2) = %f  Evar(4) = %d var(3)=%d Evar(3)=%d "
params =var(30),(var(40)),p2bodydist y,(backedgebodydist),var(42),(var(45))
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


;persistent = 





[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H
trigger2 = !movehit&&stateno=[800,810]
trigger3 = var(40)=32
trigger4 = var(40)=18 && stateno=3000
trigger5 = var(40)=118
trigger6 = p2stateno=5100
v = 40    ;fv = 10
value = 0
ignorehitpause = 1
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 = var(40)>0
trigger2 = movetype=A
v = 46    ;fv = 10
value = stateno
;ignorehitpause = 
;persistent = 

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

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

;---AI buffer var
[State 0, VarSet]
type = VarSet
trigger1 =var(40)=9 && stateno=52 &&time<3 
v = 41    ;fv = 10
value =10 ;-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
v = 42    ;fv = 10
value = 1

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


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


;persistent = 


[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,3049]
trigger1 = (command="mashableA"&&var(57)!=1||command="mashableB"&&var(57)=1)
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 && p2movetype=A || var(40)=0&&stateno=[200,410] 
trigger1 = command="b" &&var(57)=1&&AILevel=0
trigger2=command="z" &&(var(57)=0||var(57)=2)&&AILevel=0
trigger3= (var(40)=16) && (p2stateno=10612) &&AILevel>0 && statetype!=A 
trigger4=(p2statetype=A && p2bodydist x >100||p2statetype!=A&& p2bodydist x >150) &&AILevel>0 && statetype!=A &&var(40)=0&& random<20*AIlevel
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= const(size.yscale)
size.xscale= const(size.xscale)
[State 0, Helper]
type = Helper
triggerall = var(1)<2
triggerall = var(33)=0
triggerall = statetype!=A || var(19)=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&&stateno!=5040|| stateno=40||stateno=50 || AIlevel =0 &&stateno=[200,410]
trigger1 = command="c" && AILevel=0
trigger2= var(40)=22 &&AILevel>0&& (p2stateno=10612) && statetype!=A 
trigger3=((p2bodydist x =[60,140])) &&AILevel>0 && statetype!=A &&var(40)=0 && random<20*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 <= 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=1052
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!=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, 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
trigger2 = winko && (stateno = 3020) &&numhelper(3022)>0
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 = 1
supermovetime =999
pausemovetime = 999
ignorehitpause = 1
persistent=0



[State 0, VarSet]
type = VarSet
trigger1 = authorname= "Kamekaze" && p1name = "MvC3 Ruby Heart 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,1106]
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|| stateno=601
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
triggerall = var(59)=1
triggerall = numhelper(3021)=1
triggerall = numhelper(3027)=1
triggerall = stateno =[3000,4007]
trigger1= helper(3027),movehit=1
fv =2 ;fv = 10
value = fvar(2)*.98
[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 = 1

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


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

[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 0, VarSet]
type = VarSet
trigger1 = p2stateno!=3054
v = 44    ;fv = 10
value = enemy,animelemno(0)
;ignorehitpause = 
;persistent = 

[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
trigger1 = stateno = 52 &&Time = 1 ;Jump land
trigger2 = stateno = 106&&Time = 1 ;Run-back land
trigger3=  pos y>=0 && anim=1005
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 = (time >= 0&&stateno != [3000,3003]  )
trigger1 = stateno !=3100 && time >= 0
trigger1 = stateno !=3049 && time >= 0 || (stateno=3049 && anim=3024)
trigger1 = stateno !=3050 && time >= 0
trigger1 = stateno !=3020 && 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, 1
channel=0
[State -3, Hit2]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [41,50]
trigger1 = stateno = 5070
trigger2 = stateno = 5080
value = 5000, 0
channel=0
[State -3, Hit2]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [51,60]
trigger1 = stateno = 5070
trigger2 = stateno = 5080
value = 5000, 1
channel=0
;----------------------

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


[State -3, Landing Sound]
type = PlaySnd
trigger1 = stateno = 52 &&Time = 1 ;Jump land
trigger2 = stateno = 106&&Time = 1 ;Run-back land
trigger3=  pos y>=0 && anim=1005
value = 40, 0

