

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

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

[Velocity]
walk.fwd  = 4.3
walk.back = -3
run.fwd  = 18, 0
run.back = -18,0
jump.neu = 0,-9.7
jump.back = -2.55
jump.fwd = 2.5
runjump.back = -2.55,-8.1
runjump.fwd = 4,-8.1
airjump.neu = 0,-8.6
airjump.back = -2.55
airjump.fwd = 2.5
air.gethit.groundrecover = -.15,-3.5  ;Velocity for ground recovery state (x, y) **MUGEN 1.0**
air.gethit.airrecover.mul = .5,.2     ;Multiplier for air recovery velocity (x, y) **MUGEN 1.0**
air.gethit.airrecover.add = 0,-4.5    ;Velocity offset for air recovery (x, y) **MUGEN 1.0**
air.gethit.airrecover.back = -1       ;Extra x-velocity for holding back during air recovery **MUGEN 1.0**
air.gethit.airrecover.fwd = 0         ;Extra x-velocity for holding forward during air recovery **MUGEN 1.0**
air.gethit.airrecover.up = -2         ;Extra y-velocity for holding up during air recovery **MUGEN 1.0**
air.gethit.airrecover.down = 1.5
[Movement]
airjump.num = 0
airjump.height = 35
yaccel = .55
stand.friction = .85
crouch.friction = .82
air.gethit.groundlevel = 15          ;Y-position at which a falling player is considered to hit the ground **MUGEN 1.0**
air.gethit.groundrecover.ground.threshold = -20 ;Y-position below which falling player can use the recovery command **MUGEN 1.0**
air.gethit.groundrecover.groundlevel = 10   ;Y-position at which player in the ground recovery state touches the ground **MUGEN 1.0**
air.gethit.airrecover.threshold = -1  ;Y-velocity above which player may use the air recovery command **MUGEN 1.0**
air.gethit.airrecover.yaccel = .35    ;Vertical acceleration for player in the air recovery state **MUGEN 1.0**
air.gethit.trip.groundlevel = 10      ;Y-position at which player in the tripped state touches the ground **MUGEN 1.0**
down.bounce.offset = 0, 20            ;Offset for player bouncing off the ground (x, y) **MUGEN 1.0**
down.bounce.yaccel = .4               ;Vertical acceleration for player bouncing off the ground **MUGEN 1.0**
down.bounce.groundlevel = 12          ;Y-position at which player bouncing off the ground touches the ground again **MUGEN 1.0**
down.friction.threshold = .05

[Quotes]
; Up to 100 victory quotes can be specified per language (victory0 - victory99)
victory1 = "Get ready for another whuppin', boy!"
victory2 = "Next time, I won't go easy on you, punk!"
victory3= "Next time, I'll tear your heart out!"
victory4 = "Now, watch the Birdie! Ha ha ha.."
victory5 = "Shut your trap, punk!"
victory6 = "This ain't no street fight! You lose..."
victory7 = "You cannot stop the beast within me!"
victory8 = "You couldn't have beat me. Why'd ya even try?"



;---------------------------------------------------------------------------
; 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
triggerall =numhelper(1101)<1
trigger1 =(random =[333,667])
value = 182
[State 180, 1]
type = ChangeState
triggerall =numhelper(1101)<1
trigger1 =random =[667,999]
value = 183

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


;---------------------------------------------------------------------------
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0
sprpriority=-2
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=4
value = S180,0
channel=0
[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

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



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =var(4)=1 && anim=182
value = 183

[State 0, VarAdd]
type =VarAdd
;triggerall = time >7
trigger1 =time%2=0
fv =39     ;fv =
value = -3.25
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=5 && anim=183
value = S180,1
channel=0

[State 0, Helper]
type = Helper
trigger1 =time=8
helpertype = normal ;player
name = "birdie"
ID =185
stateno =185
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 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =anim=182  && (anim=183 && animelemtime(7)>10)
flag = roundnotover
;---------------------------------------------------------------------------
[Statedef 183]
type = S
ctrl = 0
anim = 181
velset = 0,0

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

[State 0, Helper]
type = Helper
trigger1 =time=17
helpertype = normal ;player
name = "birdie"
ID =184
stateno =184
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 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1= time <190
flag = roundnotover
;---------------------------------------------------------------------------
[Statedef 190]
type = S

[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "choice"
ID = 11013
stateno = 11013
pos = 0,-30
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale =.5
size.yscale =.5
[State 180, 1]
type = ChangeState
trigger1 = random >=499
value = 191
[State 180, 1]
type = ChangeState
trigger1 = random <499
value = 192

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

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




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


[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = animtime = 0
value = 0
;--------------------------------------------------------------------------------
[Statedef 192]
type = S
ctrl = 0
anim = 191
velset = 0,0

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


[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem=3
value = S190,2
channel = 0

[State 0, Helper]
type = Helper
trigger1 =animelem=1
helpertype = normal ;player
name = "birdie"
ID =193
stateno =193
pos = 20 ,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 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = animtime = 0
value = 0

;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

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

[State 0, PowerAdd]
type = PowerAdd
trigger1 = time = 34
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
ctrl = 0
anim = 200
poweradd = 14
sprpriority = 2


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

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0
[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 21
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 2,2
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10, -95
hitsound = S1, 5
guardsound = S3,1
ground.type = High
ground.slidetime = 6
ground.hittime  = 14
ground.velocity = -1.5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 10
ground.cornerpush.veloff=-7
forcenofall=1
id=200




[State 200, 1]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
damage = 14
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 2, 2
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10, -95
hitsound = S1, 5
guardsound = S3,1
ground.type = High
ground.slidetime = 8
ground.hittime  = 12
ground.velocity = -8
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime =9
ground.cornerpush.veloff=-13
forcenofall=1
id=200


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

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


[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 201]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
anim = 200
poweradd = 0
sprpriority = 2


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

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


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

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
damage = 14
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime =  floor(4*(ifelse(var(18),.75,1))), floor(4*(ifelse(var(18),.75,1)))
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10, -95
hitsound = S1, 5
guardsound = S3,1
ground.type = High
ground.slidetime = 5
ground.hittime  = 9
ground.velocity = -3
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-1
air.hittime = ifelse(12-var(20) <0,0,12-var(20))
forcenofall=1
id=200




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


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

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

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
triggerall = selfanimexist(5061)
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5061
[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim2
triggerall = !selfanimexist(5061)
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5061

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

[State 5020, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 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 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

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

[State 5030, 4]
type = selfState
triggerall = HitFall
trigger1 = HitOver&& (gethitvar(hittime)<time) 
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
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 = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5061)
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5061

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


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

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

[State 5035, 4]
type=selfState
triggerall = HitFall
trigger1 = HitOver && (gethitvar(hittime)<time) 
trigger2 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger5 = Anim != 5061 ;.
value = 5110 ;HITA_FALL
;-------------------------------
;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 302]
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 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 303
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 303]
type    = A
movetype= H
physics = N
ctrl = 0


[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1
[State 40, 2]
type = VarSet
triggerall = AILevel =0
trigger1 = command = "holdfwd"
sysvar(1) = 1
[State 40, 2]
type = VarSet
triggerall = AILevel >0
trigger1 = random > 75*AILevel
trigger1= backedgebodydist <35
sysvar(1) = 1
[State 40, 2]
type = VarSet
triggerall = AILevel >0
trigger1 = random > 75*AILevel
trigger1= backedgebodydist >75
sysvar(1) = -1
[State 40, 2]
type = VarSet
triggerall = AILevel =0
trigger1 = command = "holdback"
sysvar(1) = -1
[State 0, VelSet]
type = VelSet
triggerall = alive
triggerall= !hitfall
trigger1 = HitOver && (time>gethitvar(hittime)) 
x = ifelse(sysvar(1)=0,0,ifelse(sysvar(1)=1,3.5,-3.5))
y = -6

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

;ignorehitpause = 
;persistent = 

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

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


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


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

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

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

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

;ignorehitpause = 
;persistent = 

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

;ignorehitpause = 
;persistent = 

[State 5030, 4]
type = selfState
trigger1= Pos Y >= 15  ;.
value = 5110 ;HITA_FALL
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 205]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 30
ctrl = 0

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

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

[State 210, 2]
type = HitDef
trigger1 = !movecontact
attr = S, NA
animtype  = Medium
damage    =35
priority = 5, Hit
guardflag = MA
pausetime = 5,5
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,6
guardsound = S3,1
ground.type = low
ground.slidetime =14
ground.hittime  = 15
ground.velocity = -5.5
air.velocity = -2.5,-5
guard.ctrltime=13
ground.cornerpush.veloff=-14
forcenofall=1
id=200


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

[State 0, Width]
type = Width
trigger1 = animelemtime(4)>=0 && animelemtime(7)<0
player = 35,0
;value = 0,0
;ignorehitpause =
;persistent =

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 206]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0

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

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

[State 210, 2]
type = HitDef
trigger1 = !movecontact
attr = S, NA
animtype  = Medium
damage    =60
priority = 5, Hit
guardflag = MA
pausetime =  floor(7*(ifelse(var(18),.75,1))), floor(7*(ifelse(var(18),.75,1)))
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,6
guardsound = S3,1
ground.type = low
ground.slidetime =15
ground.hittime  = 19
guard.ctrltime=15
ground.velocity = -5.5
air.velocity = -2.5,-4
air.hittime = ifelse(22-var(20) <0,0,22-var(20))
yaccel = .57
forcenofall=1
id=200


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

[State 0, Width]
type = Width
trigger1 = animelemtime(4)>=0 && animelemtime(7)<0
player = 25,0
;value = 0,0
;ignorehitpause =
;persistent =

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

;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 59
ctrl = 0

anim = 210
sprpriority = 2
[State 210, 1]
type = PlaySnd
trigger1 = animelem=2
trigger2 = animelem=9
value = S2, 2
channel=0
[State 210, 1]
type = PlaySnd
trigger1 = animelem=2
trigger2 = animelem=9
value = 0, 2
channel=1
[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && movehit
v = 6 ;fv = 10
value = ifelse(p2stateno=1003,2,1)
;ignorehitpause =
persistent =0

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


[State 210, 2]
type = HitDef
trigger1 =animelem=4
attr = S, NA
animtype  = Medium
damage    =63
priority = 5, Hit
guardflag = MA
pausetime = 4,4
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,5
guardsound = S3,1
ground.type = High
ground.slidetime = 4
ground.hittime  = 12
ground.velocity = -5.5
air.velocity = -2.5,-5
ground.cornerpush.veloff=-7
forcenofall=1
id=200

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


[State 210, 2]
type = HitDef
trigger1 = animelem= 12
attr = S, NA
animtype  = heavy
damage    =28
guardflag = MA
priority =5, Hit
pausetime = 4,4
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-91
hitsound   = S1,6
guardsound = S3,1
guard.ctrltime = 10
ground.type = High
ground.slidetime = 30
guard.ctrltime = 10
ground.hittime  = 30
ground.velocity = -0,-17.5
air.velocity = -0,-17
fall.recovertime = 35
yaccel=.55
id=410

[State 0, Width]
type = Width
trigger1 = animelem=4
player = 15,0
[State 0, Helper]
type = Helper
trigger1 = movehit && numtarget(410)
helpertype = normal ;player
name = "launch"
ID = 7011
stateno =7011
pos = 50,-85
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 40
pausemovetime = 40
ignorehitpause=1
persistent=0
[State 0, TargetState]
type = TargetState
triggerall = var(6)!=3
trigger1 =movehit&&enemy,stateno!=411
value = 411
ID = 410
ignorehitpause =0
[State 0, Width]
type = Width
trigger1 = animelem=4
player = 18,0



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

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

;ignorehitpause =
;persistent =

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

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = alive
trigger1 = animelemtime(1)>7 && anim!=5200 && anim=5160
value = 5200
[State 0, SelfState]
type = SelfState
trigger1 =pos y >=0 &&anim=5200  &&alive
value =52
ctrl=1
[State 0, SelfState]
type = SelfState
trigger1 =pos y >=0 &&!alive  && time>5
value =5100
ctrl=1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 212]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0

anim = 211
sprpriority = 2
[State 210, 1]
type = PlaySnd
trigger1 = animelem=2
trigger2 = animelem=9
value = S2, 2
channel=0
[State 210, 1]
type = PlaySnd
trigger1 = animelem=2
trigger2 = animelem=9
value = 0, 2
channel=1
[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && movehit
v = 6 ;fv = 10
value = ifelse(p2stateno=1003,2,1)
;ignorehitpause =
persistent =0

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


[State 210, 2]
type = HitDef
trigger1 =animelem=4
attr = S, NA
animtype  = Medium
damage    =ifelse(var(59)=1,35,63)
priority = 5, Hit
guardflag = MA
pausetime =  floor(4*(ifelse(var(18),.75,1))), floor(4*(ifelse(var(18),.75,1)))
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,5
guardsound = S3,1
ground.type = High
ground.slidetime = 4
ground.hittime  = 12
ground.velocity = 0
air.velocity = -0,-5
ground.cornerpush.veloff=0
forcenofall=1
id=200


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

[State 210, 2]
type = HitDef
trigger1 = animelem= 9
attr = S, NA
animtype  = heavy
damage    =ifelse(var(59)=1,35,28)
guardflag = MA
priority =5, Hit
pausetime =  floor(4*(ifelse(var(18),.75,1))), floor(4*(ifelse(var(18),.75,1)))
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-91
hitsound   = S1,6
guardsound = S3,1
guard.ctrltime = 10
ground.type = High
ground.slidetime = 30
guard.ctrltime = 10
ground.hittime  = 30
ground.velocity = -0,-17.5
air.velocity = -0,-17
fall.recovertime = 35
yaccel=.55
id=410

[State 0, Width]
type = Width
trigger1 = animelem=4
player = 15,0
[State 0, Helper]
type = Helper
trigger1 = movehit && numtarget(410)
helpertype = normal ;player
name = "launch"
ID = 7011
stateno =7011
pos = 50,-85
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 40
pausemovetime = 40
ignorehitpause=1
persistent=0
[State 0, TargetState]
type = TargetState
triggerall = var(6)!=3
trigger1 =movehit&&enemy,stateno!=411
value = 411
ID = 410
ignorehitpause =0
[State 0, Width]
type = Width
trigger1 = animelem=4
player = 18,0



[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 14
ctrl = 0

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

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0
[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 0
channel=1
[State 230, 1]
type = PlaySnd
trigger1 = Time = 4
value =S2, 0
channel=0
[State 230, 2]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
animtype  = Medium
damage    = 28
priority=2
hitflag=MAFD
guardflag = MA
pausetime = 6,6
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-62
hitsound   = S1,0
guardsound = S3,1
ground.type = Low
ground.slidetime = 6
ground.hittime  = 12
air.hittime=11
ground.velocity = -3.4
air.velocity = -2.5,-3.5
down.velocity=-3,-3.5
ground.cornerpush.veloff=-6
forcenofall=1
id=200


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

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 235]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 30
ctrl = 0

anim = 235
sprpriority = 2

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


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

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

[State 400, 2]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage    = 47
priority  = 3
animtype  = med
priority=3
hitflag = MAF
guardflag = M
pausetime = 8,8
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-60
hitsound   = S1,1
guardsound = S3,1
ground.type = Low
ground.slidetime = 8
guard.ctrltime =12
ground.hittime  = 15
ground.velocity = -8
air.velocity = -5,-2.5
ground.cornerpush.veloff=-13
yaccel=.55
forcenofall=1
id=200


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


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

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

anim = 235
sprpriority = 2

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


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

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

[State 400, 2]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage    = 45
priority  = 3
animtype  = med
priority=3
hitflag = MAF
guardflag = M
pausetime =  floor(8*(ifelse(var(18),.75,1))), floor(8*(ifelse(var(18),.75,1)))
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-60
hitsound   = S1,9
guardsound = S3,1
ground.type = Low
ground.slidetime = 8
guard.ctrltime =12
ground.hittime  = 16
ground.velocity = -6
air.velocity = -2,-4
air.hittime = ifelse(18-var(20) <0,0,18-var(20))
yaccel = .57
forcenofall=1
id=200


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

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


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

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

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

[State 230, 1]
type = PlaySnd
trigger1 =animelem=2
value = 0, 2
channel=1
[State 230, 1]
type = PlaySnd
trigger1 =animelem=2
value =S2, 2
channel=0
[State 230, 2]
type = HitDef
trigger1=animelem=4
attr = S, NA
animtype  =heavy
damage    = 90
guardflag = MA
pausetime = 11,11
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -15,-85
hitsound   = S1,2
guardsound = S3,1
ground.type = high
ground.slidetime = 8
ground.hittime  = 14
ground.velocity = -8
air.velocity = -3.5,-5.5
fall.recovertime=10
ground.cornerpush.veloff=-14
forcenofall=1
id=200


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

[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------
;Crouching light punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 0
poweradd= 12
ctrl = 0
anim = 400
sprpriority = 2
[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && movehit
v = 6 ;fv = 10
value = ifelse(p2stateno=1003,2,1)
;ignorehitpause =
persistent =0

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0
[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0
channel=1
[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = S2,0
channel=0
[State 400, 2]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage    =28
priority  = 2
animtype  = Light
hitflag = MAF
guardflag = M
pausetime = 6,6
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-54
hitsound   = S1,5
guardsound = S3,1
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -3
air.velocity = -1.5,-3
forcenofall=1
id=200


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


[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl =1
;-------------------------------------------------------------
;Crouching light punch
[Statedef 401]
type    = C
movetype= A
physics = C
juggle  = 0
poweradd= 0
ctrl = 0
anim = 400
sprpriority = 2
[State 0, VarSet]
type = VarSet
trigger1 = p2statetype=A && movehit
v = 6 ;fv = 10
value = ifelse(p2stateno=1003,2,1)
;ignorehitpause =
persistent =0

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0
[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0
channel=1
[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = S2,0
channel=0
[State 400, 2]
type = HitDef
trigger1 = animelem = 2
attr = S, NA
damage    =38
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,5
guardsound = S3,1
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
air.hittime = ifelse(13-var(20) <0,6,13-var(20))
ground.velocity = -3
air.velocity = -1.5,-3
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value=ifelse(var(59)=1,302,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
poweradd= 28
ctrl = 0
anim = 405
sprpriority = 2

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

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

[State 210, 1]
type = PlaySnd
trigger1 = animelem=2
value = S2, 0
channel=0
[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1
channel=1
[State 360, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage    = 49
animtype  = medium
hitflag = MAF
guardflag = M
priority=5
pausetime = 8,8
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-69
hitsound   = S1,6
guardsound = S3,1
ground.type = Low
ground.slidetime = 8
guard.ctrltime = 8
ground.hittime  = 14
ground.velocity = -6
air.velocity = -5,-5
forcenofall=1
id=200

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



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

;---------------------------------------------------------------------------
;Crouching light punch
[Statedef 406]
type    = C
movetype= A
physics = C
juggle  = 0
poweradd= 0
ctrl = 0
anim = 405
sprpriority = 2

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

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

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

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



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

;---------------------------------------------------------------------------
;Crouching strong punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 0
poweradd= 55
ctrl = 0
anim = 410
sprpriority = 2

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

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


[State 0, Helper]
type = Helper
trigger1 = movehit
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 = animelem=3
attr = S, NA
damage    = 90
priority  = 5
animtype  = up
hitflag = MAF
guardflag =M
pausetime = 6,6
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-94
hitsound   = S1,6
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
yaccel=.55
id=410

[State 0, Width]
type = Width
trigger1 = animelem=4
player = 15,0

[State 0, TargetState]
type = TargetState
triggerall = var(6)!=3
trigger1 =movehit&&enemy,stateno!=411
value = 411
ID = 410
ignorehitpause =0
;persistent =

[State 360, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 411]
type    = A
movetype= H
physics = N
juggle  = 0
velset=-1,-16.7
poweradd= 59
ctrl = 0
sprpriority = 2
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .65



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

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

[State 0, SelfState]
type = SelfState
trigger1 =time>=26
value =5040
ctrl=1
;---------------------------------------------------------------------------
;Crouching light kick
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 0
poweradd= 12
ctrl = 0
anim = 430
sprpriority = 2

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

[State 0, VarSet]
type = Varadd
trigger1 = p2statetype=A && movehit
v = 7 ;fv = 10
value = 1
persistent =0
[State 430, 2]
type = HitDef
trigger1 = animelem=2 && p2statetype!=L  && var(59)=0
trigger2 = animelem= 2  && var(59)=1
attr = C, NA
damage    = 28
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 9,9
priority=2
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-8
hitsound   = S1,0
guardsound = S3,1
ground.type = Low
ground.slidetime =7
ground.hittime  = 11
ground.velocity = -4
air.velocity = -2,-3
down.velocity = -5,-3
down.hittime = 20
nochainid=430
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value=ifelse(var(59)=1,302,202)
ID =200
ignorehitpause =1 
[State 430, 2]
type = HitDef
trigger1 = animelem=2  && p2statetype=L
attr = C, NA
damage    = 28
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 9,9
priority=2
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-8
hitsound   = S1,0
guardsound = S3,1
ground.type = Low
ground.slidetime =7
ground.hittime  = 11
ground.velocity = -4
air.velocity = -2,-3
down.velocity = -7,-3
down.hittime = 20
chainid=1001
forcenofall=1
id=1002
[State 0, VarSet]
type = VarSet
trigger1 =movehit && numtarget(1002)=1 
v = 36    ;fv = 10
value = 1
ignorehitpause = 1
;persistent = 




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

;---------------------------------------------------------------------------
;Crouching light kick
; CNS difficulty: easy
[Statedef 435]
type    = C
movetype= A
physics = C
juggle  = 0
poweradd= 28
ctrl = 0
anim = 435
sprpriority = 2

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

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

[State 430, 2]
type = HitDef
trigger1 = !movecontact
attr = C, NA
damage    = 49
animtype  = medium
hitflag = MAF
guardflag = L
pausetime = 4,9
priority=3
sparkno = S8100+(random%4)
guard.sparkno = S7009
sparkxy = -10,-85
hitsound   = S1,0
guardsound = S3,1
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -8
air.velocity = -2,-4.5
down.velocity = -4,0
down.hittime = 20
forcenofall=1
yaccel=.5
id=200

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

[State 230, 1]
type = PlaySnd
trigger1 =animelem=2
value = 0, 2
channel=1
[State 230, 1]
type = PlaySnd
trigger1 =animelem=2
value =S2, 0
channel=0
[State 430, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Crouch Strong Kick
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 0
poweradd=55
ctrl = 0
anim = 440
sprpriority = 2

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

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

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

[State 440, 3]
type = HitDef

trigger1 = animelem = 4
attr = C, NA
damage    =92
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-37
hitsound   = S1,2
guardsound = S3,1
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -2,-1.5
air.velocity = -1.2,-2
guard.velocity = -5
fall = 1
fall.recover=0
yaccel=.4
id=440
[State 440, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
;Crouch Strong Kick
[Statedef 441]
type    = C
movetype= A
physics = C
juggle  = 0
poweradd=0
ctrl = 0
anim = 440
sprpriority = 2

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


[State 440, 3]
type = HitDef

trigger1 = animelem = 4
attr = C, NA
damage    =70
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,9
guardsound = S3,1
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -2,-3.5
air.velocity = -1.2,-2
guard.velocity = -5
fall = 1
fall.recover=0
yaccel=.4
[State 440, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 442]
type    = A
movetype=H
physics = N
velset =0,-2.3
poweradd = 40
anim=5070


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


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

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

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

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

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

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

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

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value=ifelse(var(59)=1,302,202)
ID =200
ignorehitpause =1 
[State 600, 3]
type = changestate
trigger1 = animtime=0
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
;Jump Light Punch
; CNS difficulty: easy
[Statedef 601]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 601
sprpriority = 2
[State 0, VarSet]
type = VarSet
trigger1 = movecontact
v = 9  ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
;persistent =
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  

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

[State 600, 2]
type = HitDef
trigger1 = animelem = 2
attr = A, NA
animtype=medium
air.animtype=up
damage    = 55
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,5
guardsound = S3,1
ground.type = High
ground.slidetime = 5
ground.hittime = 28
air.hittime = ifelse(20-var(20) <0,0,20-var(20))
ground.velocity = -4
air.velocity = -.2,-5.5
yaccel=.5
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value=ifelse(var(59)=1,302,202)
ID =200
ignorehitpause =1 
[State 600, 3]
type = changestate
trigger1 = animtime=0
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
;Jump Light Punch
; CNS difficulty: easy
[Statedef 602]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 635
sprpriority = 2


[State 230, 1]
type = PlaySnd
trigger1 =animelem=1
value = S0, 0
channel=1
[State 230, 1]
type = PlaySnd
trigger1 =animelem=1
value =S2, 0
channel=0
;persistent =
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
[State 600, 2]
type = HitDef
trigger1 = animelem =3
attr = A, NA
animtype=medium
air.animtype=up
damage    = 55
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,-83
hitsound   = S1,8
guardsound = S3,1
ground.type = High
ground.slidetime = 5
ground.hittime = 28
air.hittime = ifelse(20-var(20) <0,0,20-var(20))
ground.velocity = -4
air.velocity = -.2,-2
yaccel=.5
forcenofall=1
id=200

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value=ifelse(var(59)=1,302,202)
ID =200
ignorehitpause =1 
[State 600, 3]
type = changestate
trigger1 = animtime=0
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
;Jump Light Punch
; CNS difficulty: easy
[Statedef 605]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 29
ctrl = 0
anim = 605
sprpriority = 2
;persistent =
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  

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


[State 600, 2]
type = HitDef
trigger1 = animelem = 2
attr = A, NA
damage    = 49
guardflag = HA
animtype=medium
air.animtype=up
priority = 5
pausetime =  10, 10
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-70
hitsound   = S1,6
guardsound = S3,1
ground.type = High
ground.slidetime = 9
ground.hittime = 15
air.hittime = 24
guard.ctrltime = 15
ground.velocity = -4
air.velocity =-.2,-8.5
yaccel=.8
forcenofall=1
id=200
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value=ifelse(var(59)=1,302,202)
ID =200
ignorehitpause =1 

[State 600, 3]
type = changestate
trigger1 =  animtime=0
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
;Jump Light Punch
; CNS difficulty: easy
[Statedef 606]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 605
sprpriority = 2
[State 0, VarSet]
type = VarSet
trigger1 = prevstateno=606
v = 9
value = 1
;persistent =
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
[State 230, 1]
type = PlaySnd
trigger1 =animelem=1
value = S0, 1
channel=1
[State 230, 1]
type = PlaySnd
trigger1 =animelem=1
value =S2, 1
channel=0


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

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

[State 600, 3]
type = changestate
trigger1 =  animtime=0
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
;Jump Strong Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 58
ctrl = 0
anim = 610
sprpriority = 2
;persistent =
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
[State 0, VarSet]
type = Varset
trigger1 =time=0
v = 31    ;fv = 10
value = 0
[State 0, VarSet]
type = Varset
trigger1 =time=0
v = 29    ;fv = 10
value = 0

[State 230, 1]
type = PlaySnd
trigger1 =animelem=2
value = S0, 2
channel=1
[State 230, 1]
type = PlaySnd
trigger1 =animelem=2
value =S2, 1
channel=0
[State 0, Width]
type = Width
trigger1 = 1
player = 30,0


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

[State 640, 3]
type = HitDef
triggerall =!var(19)
trigger1 =!movecontact
attr = A, NA
damage    =90
guardflag = HA
priority = 5
pausetime = 14,14
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-50
hitsound   = S1,2
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -11
air.velocity = -3,13
air.fall  =1
fall.recover = 0
yaccel=.63
id=641

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

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

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


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

[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = anim!=5160
trigger1 =pos y>=0 && anim=1202 && time>3
value = 5160
[State 0, PosSet]
type = PosSet
trigger1 = anim=5160&& animelem=1
y = 0
[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=1 && anim=5160
y = -7
x=0
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,1
;ignorehitpause =
;persistent =

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


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

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

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

[State 0, SelfState]
type = SelfState
trigger1 =animelemtime(1)=20 && anim=612
value =ifelse(alive,5120,5110)
ctrl=1
;---------------------------------------------------------------------------
;Jump Strong Punch
; CNS difficulty: easy
[Statedef 611]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 613
sprpriority = 2

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

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



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

[State 640, 3]
type = HitDef
triggerall =!var(19)
trigger1 =!movecontact
attr = A, NA
damage    =80
guardflag = HA
priority = 5
pausetime = floor(14*(ifelse(var(18),.75,1))), floor(14*(ifelse(var(18),.75,1)))
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-50
hitsound   = S1,9
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 12
ground.hittime  = 35
ground.velocity = -11
air.velocity = -3,-3
fall.recover = 0
air.hittime = ifelse(26-var(20) <0,0,26-var(20))
air.velocity = ifelse(var(19)=1,-15,-3),ifelse(var(19)=1,10,-8)
yaccel = .7
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 = 0
ignorehitpause=1


[State 600, 3]
type = changestate
trigger1 = animtime=0
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 10612]
type    = A
movetype= H
physics = N
juggle  = 0
velset=-4,11
poweradd= 59
ctrl = 0
sprpriority = -2
facep2=1
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .67
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0
value = 1202

[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = anim!=5160
trigger1 =pos y>=0 && anim=1202 && time>3
value = 5160
[State 0, PosSet]
type = PosSet
trigger1 = anim=5160&& animelem=1
y = 0
[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=1 && anim=5160
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=5160
statetype = L      ;S,A,C,L


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

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

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

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

;persistent =
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
[State 230, 1]
type = PlaySnd
trigger1 =animelem=1
value = S0, 0
channel=1
[State 230, 1]
type = PlaySnd
trigger1 =animelem=1
value =S2, 1
channel=0

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

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value=ifelse(var(59)=1,302,202)
ID =200
ignorehitpause =1 
[State 600, 3]
type = changestate
trigger1 = Time = 14
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
;Jump Light Kick
; CNS difficulty: easy
[Statedef 631]
type    = A
movetype= A
physics =N
juggle  = 0
poweradd= 0
ctrl = 0
anim = 630
sprpriority = 2
;persistent =
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  
[State 0, VarSet]
type = VarSet
trigger1 = prevstateno=631
v = 8   ;fv = 10
value = 1
;ignorehitpause =
;persistent =

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

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

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value=ifelse(var(59)=1,302,202)
ID =200
ignorehitpause =1 
[State 600, 3]
type = changestate
trigger1 = Time = 14
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
;Jump Strong Kick
; CNS difficulty: easy
[Statedef 635]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 29
ctrl = 0
anim = 635
sprpriority = 2
;persistent =
[state 9000, VelAdd]
type = VelAdd
trigger1 = numexplod(56)
x = 0
y = .455
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  !numexplod(56)
physics = A  

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



[State 640, 3]
type = HitDef
trigger1 = !movecontact
attr = A, NA
animtype=medium
air.animtype=up
damage    = 50
guardflag = HA
priority = 4
pausetime = 9,9
sparkno = S7000+(random%4)
guard.sparkno = S7009
sparkxy = -10,-83
hitsound   = S1,1
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime =8
ground.hittime = 12
air.hittime =17
ground.velocity = -4
air.velocity = -.2,-6.35
yaccel=.8
forcenofall=1
id=200
[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && movehit=1 && (p2stateno!=[202,204])
value=ifelse(var(59)=1,302,202)
ID =200
ignorehitpause =1 

[State 600, 3]
type = changestate
trigger1 = Time = 17
value = 57
ctrl=1
[state 9000, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
;---------------------------------------------------------------------------
;Jump Strong Kick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 58
ctrl = 0
anim = 640
sprpriority = 2

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


[State 230, 1]
type = PlaySnd
trigger1 =animelem=2
value = S0, 2
channel=1
[State 230, 1]
type = PlaySnd
trigger1 =animelem=2
value =S2, 2
channel=0
[State 640, 3]
type = HitDef
triggerall = var(19)
trigger1 = !movecontact
attr = A, NA
damage    = 92
guardflag = HA
priority = 4
pausetime = 6,6
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-60
hitsound   = S1,2
guardsound = S3,1
animtype = Med
ground.type = High
ground.slidetime = 10
ground.hittime  = 18
ground.velocity = -5
air.velocity = -5,12
yaccel = .7
fall  =1
fall.recover = 0
yaccel=.63
id=640
[State 640, 3]
type = HitDef
triggerall = !var(19)
trigger1 = !movecontact
attr = A, NA
damage    = 92
guardflag = HA
priority = 4
pausetime = 6,6
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -10,-60
hitsound   = S1,2
guardsound = S3,1
animtype=medium
air.animtype=up
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -7
air.velocity = -3,10
air.fall  =1
fall.recover = 0
yaccel=.63
id=641


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


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

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


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

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


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

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

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

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

[State 8300, ChangeState]
type = ChangeState
trigger1 = time = 35
value = ifelse(command="holdback",120,11)
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 703]
type    = C
movetype= I
physics = N
poweradd= 0
velset = -6,0
ctrl = 0
anim = 701
sprpriority = -1



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

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

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

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

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

[State 8300, ChangeState]
type = ChangeState
trigger1 = time = 35
value =ifelse(command="holdback",120,11)
ctrl = 1
;-------------------------------------------------------------
[Statedef 800]
type = S
movetype= A
physics = S
juggle = 0
ctrl = 0
anim = 800

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

[State 0, VarSet]
type = VarSet
trigger1 =p2movetype=A 
v = 39    ;fv = 10
value = 1
[State 800, 1]
type = HitDef
triggerall = statetype!=A
Trigger1 = Time = 0
attr = S, NT
hitflag = M
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 810
p2stateno = 820
hitsound = S800,0
fall = 1


[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = ifelse(statetype=A,57,0)
ctrl = 1
;-------------------------------------------------------------
[Statedef 801]
type = A
movetype= A
physics = N
juggle = 0
ctrl = 0
velset=0,0
anim = 801

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

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

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

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

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

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

[State 0, SprPriority]
type = SprPriority
trigger1 =time=0
value = 2
;ignorehitpause =
;persistent =
[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 200, 1]
type = PlaySnd
trigger1 =time=0
value = 800, 0

[State 230, 1]
type = PlaySnd
trigger1 =time=0
trigger2 = animelem = 4
trigger3 = animelem = 9
trigger4 = animelem = 14
value =S2, 0
channel=0

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

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemtime(1)>=0&&animelemtime(2)<0
pos = 72, -102
[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemtime(2)>=0&&animelemtime(3)<0
pos = 98, -103
[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemtime(3)>=0&&animelemtime(4)<0
trigger2 = AnimElemtime(8)>=0&&animelemtime(9)<0
trigger3 = AnimElemtime(13)>=0&&animelemtime(14)<0
pos = 75, -112
[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemtime(4)>=0&&animelemtime(5)<0
trigger2 = AnimElemtime(9)>=0&&animelemtime(10)<0
trigger3 = AnimElemtime(14)>=0&&animelemtime(15)<0
pos = 22, -10
[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemtime(5)>=0&&animelemtime(6)<0
trigger2 = AnimElemtime(10)>=0&&animelemtime(11)<0
trigger3 = AnimElemtime(16)>=0&&animelemtime(17)<0
pos = 16, -14
[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemtime(6)>=0&&animelemtime(7)<0
trigger2 = AnimElemtime(11)>=0&&animelemtime(12)<0
trigger3 = AnimElemtime(17)>=0&&animelemtime(18)<0
pos = 14, -14

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemtime(18)>=0&&animelemtime(19)<0
pos = 75, -71
[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemtime(19)>=0&&animelemtime(20)<0
pos = 57, -89
[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem=20
pos = 61, -55
;[State 810, Bind 1]
;type = TargetBind
;trigger1 = AnimElemtime(4)>=0&&animelemtime(5)<0
;trigger2 = AnimElemtime(6)>=0&&animelemtime(8)<0
;trigger3 = AnimElemtime(9)>=0&&animelemtime(10)<0
;pos = 43, -81


[State 810, Hurt]
type = TargetLifeAdd
trigger1 = animelem = 4
trigger2 = animelem = 9
trigger3 = animelem = 14
value = -21

[State 810, Hurt]
type = TargetLifeAdd
trigger1 = animelem = 20
value = -49



[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 20
value = ifelse(var(59)=1,675,821)

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

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
trigger2 = animelem = 9
trigger3 = animelem = 14
anim =6006
ID =8010
pos = 20,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333, 1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
trigger2 = animelem = 9
trigger3 = animelem = 14
value = S1,7
volume = 0
[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 4
trigger2 = animelem = 9
trigger3 = animelem = 14
time =4
freq = 60
ampl = 4
phase = 90
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim =812
ID =8010
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = .833333333333333333333333333333, 1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, VarAdd]
type = Varset
trigger1 =animelemtime(14)>2 &&var(59)=1 
fv = 2    ;fv = 
value = ifelse(fvar(11)=1,.3,.5)

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

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

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


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

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






[State 0, NotHitBy]
type = NotHitBy
trigger1 =  enemy,var(59)=0
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =

[State 3545, 1]
type = ChangeAnim2
trigger1 =  time =4
value = 1200


[State 821, 4] ;Hit ground
type = SelfState
triggerall = enemy,var(59)=0
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 5110 ;Hit ground


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


[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = anim!=5160&&enemy,var(59)=1
trigger1 =pos y>=0 && anim=1200&& time>20
value = 5160

[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(1)=1 && anim=5160&&enemy,var(59)=1
y = -9
x=0
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1
value = 1
movecamera=1,0

;ignorehitpause =
;persistent =

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =anim=5160&&enemy,var(59)=1
statetype = L      ;S,A,C,L

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

[State 0, PosSet]
type = PosSet
triggerall = enemy,var(59)=1
trigger1 =anim=5101 || anim=612 ||anim=614
y = 0
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
triggerall =  enemy,var(59)=1
trigger1 = anim=5101 || anim=612||anim=614
x = 0
y = 0
;ignorehitpause =
;persistent =

[State 0, SelfState]
type = SelfState
trigger1 =animtime=0 && anim=612&&enemy,var(59)=1
value =ifelse(alive,5120,5110)
ctrl=1

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
[Statedef 675]
type    = A
movetype= H
physics = N
velset = 0,0
[State 0, Turn]
type = Turn
trigger1 = facing=enemy,facing&time=0
;ignorehitpause =
;persistent =

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

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

[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 830]
type = A
movetype= A
physics = N
juggle = 0
ctrl = 0
anim = 800
[State 0, VarSet]
type = VarSet
trigger1 =p2movetype=A 
v = 39    ;fv = 10
value = 1

[State 800, 1]
type = HitDef

Trigger1 = Time = 0
attr = A, NT
hitflag = A
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 840
p2stateno = 850
hitsound = S800,0
fall = 1

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

;----------------------------------------------------------------------
[Statedef 840]
type = A
movetype= A
physics = N
anim = 811
poweradd = 60
velset=0,0

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

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

[State 230, 1]
type = PlaySnd
trigger1 =time=0
value =S2, 0
channel=0
[State 230, 1]
type = PlaySnd
triggerall =anim=811
trigger1 = AnimElem=1
value =S2, 2
channel=0
[State 4001, bind]
type=targetbind
triggerall = anim=811
trigger1=animelemtime(1)>=0 && animelemtime(2) <0
pos=53,-124


[State 4001, bind]
type=targetbind
triggerall =  anim=811
trigger1=animelemtime(2)>=0 && animelemtime(3) <0
pos=92,-131
[State 4001, bind]
type=targetbind
triggerall =  anim=811
trigger1=animelemtime(3)>=0 && animelemtime(4) <0
pos=61,-146

[State 4001, bind]
type=targetbind
trigger1=animelemtime(4)>=0 && anim=811
pos=8,3

[State 4001, bind]
type=targetbind
triggerall = statetype!=A && anim=813
trigger1=animelemtime(1)>=0 && animelemtime(2) <0
pos=14,-9


[State 810, Hurt]
type = TargetLifeAdd
triggerall =anim=813
trigger1 = AnimElemtime(1)=1
value = -112

[State 810, Throw]
type = TargetState
triggerall = anim=813
trigger1 = AnimElem = 2
value = ifelse(var(59)=1,854,863)

[State 0, SprPriority]
type = SprPriority
triggerall = statetype!=A
trigger1 = animelem=1
trigger2= anim=813
value = -3


[State 0, VelSet]
type = VelSet
trigger1 = anim=811 &&animelem=4
y = 5

[State 0, VelSet]
type = VelSet
trigger1 = anim=813 &&animelem=2
x = -2
y = -4
[State 0, VelAdd]
type = VelAdd
trigger1 =anim=811 &&animelemtime(3)>0
trigger2 =anim=813 &&animelemtime(2)>0
y = .59

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim=811 && pos y >=0 && animelemtime(3)>5
value = 813


[State 200, 1]
type = PlaySnd
triggerall = statetype=A
trigger1 = animelemtime(1) = 1
value = 1, 7

[State 0, VelSet]
type = VelSet
trigger1=anim=813  && animelemtime(2)<0
x = 0
y = 0


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

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

[State 0, EnvShake]
type = EnvShake
trigger1=animelem = 1 && anim=813
time =8
freq = 60
ampl = 4
phase = 90
[State 0, VarAdd]
type = Varset
trigger1 =animelemtime(4)>2 &&var(59)=1 && anim=813
fv = 2    ;fv = 
value = ifelse(fvar(11)=1,.3,.5)
[State 810, State End]
type = ChangeState
trigger1 = pos y >=0 && animelemtime(5)>0
value = 52
ctrl = 1

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

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



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

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


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

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

[State 821, 4] ;Hit ground
type = SelfState
trigger1 =animtime=0
value = 5120



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

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

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




[State 821, 4] ;Hit ground
type = SelfState
triggerall = time>5
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 5100
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 854]
type    = A
movetype= H
physics = N
juggle  = 0
velset=-5,-6
poweradd= 59
ctrl = 0
sprpriority = -2
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .67
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 =time=0
value = 1200

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

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

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = selfanimexist(5101)
trigger1 = pos y>=0 && anim=5160 && animelemtime(1)>10
value = 5101
[State 0, ChangeAnim]
type = ChangeAnim2
triggerall = !selfanimexist(5101)
trigger1 = pos y>=0 && anim=5160 && animelemtime(1)>10
value = 614
[State 0, ChangeAnim]
type = ChangeAnim2
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
;---------------------------------------------------------------------------
[Statedef 1000]
type    =S
movetype= A
physics = N
juggle  = 0
poweradd=  ifelse(var(59)=1,0,13 )
velset=0,0
anim = 1000
ctrl = 0
sprpriority = 1

;elem = 1
;ignorehitpause =
;persistent =
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = var(59)=0
triggerall = var(2)!=0
trigger1 = time=1
value = 1001
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = var(59)=1
triggerall = var(2)!=0
trigger1 = time=1
value = ifelse(var(2)=1,1001,1006)

[State 100, Explod]
type = Explod
triggerall = var(59)=0
trigger1 = movehit
ID = 10001
anim = 10000
postype = p1
pos = -52, -36
bindtime = 1
vel = -1, 0
ownpal = 1
random = 20,90
removetime=-1
sprpriority = 2
scale = 1,1
removeongethit=1
ignorehitpause=1
persistent=0
[State 1000, 1]
type = PlaySnd
trigger1 = animelem =3 &&   ((anim=[1000,1001])||anim=1006)
value = S2,3
channel=0
;--mvc2
[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
triggerall = var(59)=0
trigger1 =time=0
v = 2    ;fv = 10
value = ifelse((command="gou1" && var(57)=1),0,ifelse((command="gou1"||command="gou2")&&var(57)=0,0,1))
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = var(59)=0
trigger1 = time=0
v = 2   ;fv = 10
value = ifelse((((p2bodydist x >180)||(p2movetype=H && numproj>0))&&(prevstateno!=[200,441])),1,0)
;ignorehitpause =
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = var(59)=0
trigger1 = movecontact && (anim=[1000,1001]) && (p2stateno=1001)
value =1002+var(2)
;elem = 1
ignorehitpause =1
;-------------------------------------
[State 0, VarSet]
type = VarSet
triggerall = var(59)=1
triggerall = var(57)=0
trigger1 =time=0
v =2    ;fv = 10
value = ifelse(command="gou1A",0,ifelse(command="gou2A",1,2))
[State 0, VarSet]
type = VarSet
triggerall = var(59)=1
triggerall = var(57)=1
trigger1 =time=0
v = 2   ;fv = 10
value = ifelse(command="gou1",0,ifelse(command="gou2",1,2))
[State 0, VarSet]
type = VarSet
triggerall = var(59)=1
triggerall = var(57)=2
trigger1 =time=0
v = 2   ;fv = 10
value = ifelse(command="gou1G",0,ifelse(command="gou2G",1,2))

[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = var(59)=1
triggerall = (prevstateno=[200,441]) && var(18)=0
trigger1 = time=0
v = 2   ;fv = 10
value = 0
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = var(59)=1
triggerall = (prevstateno!=[200,441]) || var(18)=1
triggerall = time=0
trigger1 = (p2bodydist y =[-65,0]) && enemy,vel y>=0 && p2movetype=H
trigger2=  numproj>=1 && p2movetype=H
trigger3=var(28)=2
v = 2   ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = var(59)=1
triggerall = (prevstateno!=[200,441]) && var(18)=0
triggerall = time=0
trigger1 = (p2bodydist y =[-65,0]) && enemy,vel y>=0 && p2movetype=H
trigger2=  numproj>=1 && p2movetype=H &&p2statetype!=L
trigger3 = var(28)=3
v = 2   ;fv = 10
value = 2
[State 0, Explod]
type = Explod
trigger1 =var(2)=2&& var(59)=1&&movehit=1
anim =10000
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
scale = 1.5,1.5
sprpriority = 5
removetime=-1
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause=1
persistent=0
[State 0, VelSet]
type = VelSet
triggerall = var(18)=0
trigger1 =animelem=3  &&  ((anim=[1000,1001])||anim=1006)
x = ifelse(var(2)=0,16,ifelse(var(2)=1,20.5,22.5))
[State 0, VelSet]
type = VelSet
triggerall = var(18)=1
trigger1 =animelem=3  &&  ((anim=[1000,1001])||anim=1006)
x = ifelse(var(2)=0,16,ifelse(var(2)=1,19,20.5))*1.5
[State 0, VelSet]
type = VelSet
triggerall = moveguarded
trigger1 =animelem=5 &&  ((anim=[1000,1001])||anim=1006)
x = 0
[State 0, VelSet]
type = VelSet
triggerall = !moveguarded
trigger1 =animelem=5 &&  ((anim=[1000,1001])||anim=1006)
trigger2= animelem=3 && ((anim=[1002,1003])||anim=1007)
x =.45



[State 100, Explod]
type = Explod
trigger1 =animelem=4 && ((anim=[1000,1001])||anim=1006)
ID = 1001
anim = 1004
postype = p1
pos = 0, 0
bindtime = -1
vel = 0, 0
ownpal = 1
sprpriority = 2
scale = .833333333333333333333333333333, 1
removetime=-1
removeongethit=1
ignorehitpause=1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =((anim=[1002,1003])||anim=1007)
trigger2 = time>14 && anim=1000
trigger3 = time>20 && anim=1001
trigger4 = time>23 && anim=1006
trigger5 = moveguarded
id =1001
[State 100, Explod]
type = Explod
trigger1 =animelemtime(1)=1 && ((anim=[1002,1003])||anim=1007)
trigger2 =time=15 && (anim=1000)
trigger3 =time=21 && (anim=1001)
trigger4 =time=23 && (anim=1006)
ID = 1002
anim = 1005
postype = p1
pos = 0, 0
bindtime = -1
vel = 0, 0
ownpal = 1
sprpriority = 2
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[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, PosAdd]
type = PosAdd
trigger1 = animelem=4 &&anim=1007
x = -14


[State 230, 2]
type = HitDef
triggerall = var(59)=0
triggerall = !movecontact
trigger1=animelemtime(3)>=0 && animelemtime(5)<0
attr = S, SA
animtype  =up
damage    = ifelse(var(2)=0,111,125),28
guardflag = MA
pausetime = 0,10
guard.pausetime=12,12
priority=5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -19,-33
hitsound   = S1,6
guardsound = S3,1
ground.type = high
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -6,-3
air.velocity = -3.5,-4.5
fall.recover=0
fall=1
yaccel=.58
id=1001

[State 230, 2]
type = HitDef
triggerall = var(59)=1
triggerall = !movecontact
trigger1=animelemtime(3)>=0 && animelemtime(5)<0
attr = S, SA
animtype  =up
damage    = ifelse(var(2)=0,85,ifelse(var(2)=1,115,145)),28
guardflag = MA
pausetime = 0,10
guard.pausetime=12,12
priority=5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -19,-33
hitsound   = S1,6
guardsound = S3,1
ground.type = high
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -6,-3
air.velocity = -3.5,-4.5
fall.recover=0
fall=1
yaccel=.58
id=1001

;persistent =
[State 0, TargetState]
type = TargetState
trigger1 = movehit &&((anim=[1000,1001])||anim=1006)
value = 1001
ID = 1001
ignorehitpause = 1
;persistent =
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = var(59)=1
trigger1 = movecontact &&  ((anim=[1000,1001])||anim=1006) && (p2stateno=1001)
value =ifelse(var(2)=0,1002,ifelse(var(2)=1,1003,1007))
;elem = 1
ignorehitpause =1
[State 0, PosFreeze]
type = PosFreeze
trigger1 =animelemtime(1)>=1 && animelemtime(1)<11 && anim=1002
trigger2 =animelemtime(1)>=1 && animelemtime(1)<13 && anim=1003
trigger3 =animelemtime(1)>=1 && animelemtime(1)<9 && anim=1007
value = 1

[State 100, Explod]
type = Explod
trigger1 =animelemtime(1)=1 &&((anim=[1002,1003])||anim=1007)
ID = 1002
anim = 1012
postype = p2
pos = 0, 0
bindtime =1
facing=-1
removetime=12
vel = 0, 0
ownpal = 1
sprpriority = -6
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 100, Explod]
type = Explod
trigger1 =animelemtime(1)=1 &&((anim=[1002,1003])||anim=1007)
ID = 1002
anim = 1013
postype = p2
facing=-1
removetime=12
pos = 0, 0
bindtime = 1
vel = 0, 0
ownpal = 1
sprpriority = -5
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1


[State 100, Explod]
type = Explod
trigger1 =animelemtime(1)=12 &&((anim=[1002,1003])||anim=1007)
ID = 1002
anim = 1014
postype = p2
pos =0, 0
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 1001]
type    =A
movetype=H
physics = N
juggle  = 0
poweradd= 63
velset=0,0
ctrl = 0
sprpriority = 0
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time=0
value = 1020
[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = enemy,var(59)=0
trigger1 = time=11 && enemy,var(2)=0
trigger2 = time=13 && enemy,var(2)=1
value = 1201
[State 0, VelSet]
type = VelSet
triggerall = enemy,var(59)=0
trigger1 = time=11 && enemy,var(2)=0
trigger2 = time=13 && enemy,var(2)=1
x =ifelse(enemy,numexplod(10001)>1,7,ifelse(enemy,var(2)=0,.75,2.4)*ifelse(enemy,var(36)=1,1.75,1))
y = -ifelse(enemy,var(2)=0,8,11)

[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = enemy,var(59)=1
trigger1 = time=11 && enemy,var(2)=0
trigger2 = time=13 && enemy,var(2)=1
value = 1201
[State 0, ChangeAnim2]
type = ChangeAnim
triggerall = enemy,var(59)=1
triggerall = selfanimexist(5052)
trigger1 = time=9 && enemy,var(2)=2
value = 5052
[State 0, ChangeAnim2]
type = ChangeAnim2
triggerall = enemy,var(59)=1
triggerall = !selfanimexist(5052)
trigger1 = time=9 && enemy,var(2)=2
value = 1201
[State 0, Turn]
type = Turn
trigger1 = facing=enemy,facing && time=0
;ignorehitpause =
;persistent =

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

[State 0, VelSet]
type = VelSet
triggerall = enemy,var(59)=1
trigger1 = time=11 && enemy,var(2)=0
trigger2 = time=13 && enemy,var(2)=1
trigger3 = time=9 && enemy,var(2)=2
x =ifelse(enemy,var(2)=0,2.35,ifelse(enemy,var(2)=1,3,1))
y = -ifelse(enemy,var(2)=0,11,ifelse(enemy,var(2)=2,13,12))

[State 0, VelAdd]
type = VelAdd
trigger1 = time>=11 && enemy,var(2)=0
trigger2 = time>=13 && enemy,var(2)=1
trigger3 = time>=9 && enemy,var(2)=2
y = ifelse(enemy,var(2)=1,.8,ifelse(enemy,var(2)=0&&enemy,var(59)=1,.625,.55))
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
;ignorehitpause =
;persistent =
[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
trigger1 = time >35 && enemy,var(59)=1 && enemy,numexplod(1000)>1
x = ifelse(sysvar(1)=0,0,ifelse(sysvar(1)=1,3.5,-3.5))
y = -6

[State 5030, 3]
type = selfState
triggerall = alive
trigger1 = time >35 && enemy,var(59)=1 &&enemy,numexplod(1000)>1
value = 5040 ;HITA_RECOV
[State 1000, 7]
type = changestate
trigger1 = pos y >10 && time >17
value =1008
ctrl = 0
;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 1008]
type    = L
movetype= H
physics = N

[State 5110, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = F7, (sysvar(1) > Const720p(20)) + (sysvar(1) > Const720p(56))

[State 5110, 7]
type = Explod
trigger1 = Time = 0
trigger1 = !SysVar(0)
anim = F(60 + (sysvar(1) > Const720p(20)) + (sysvar(1) > Const720p(56)))
pos = 0, 0
sprpriority = ifelse (sysvar(1) <= Const720p(56), -10, 10)

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150
[State 5110, 11] ;If just died
type = selfState
triggerall = alive
trigger1 = time = ifelse(enemy,var(59)=0,18,12)
trigger1= Anim = [5110,5119]
value = 5120
[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5110, 14] ;Friction
type = VelSet
trigger1 = abs(Vel x) < Const(movement.down.friction.threshold)
persistent = 0
x = 0

[State 5110, 15]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

[State 5110, 16]
type = ForceFeedback
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine

;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 1049]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= ifelse(var(59)=1,0,60)
velset = 0,0
anim =1050
ctrl = 0
sprpriority = 1
[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 1000, 1]
type = PlaySnd
trigger1 = animelem =2 &&  (anim=1050 ||anim=1054)
value = S2,4
channel=0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time=1 && var(2)=0 && var(59)=1
value = 1054
;elem = 1
;ignorehitpause =
;persistent =
[State 0, VarSet]
type = VarSet
triggerall = var(59)=1
triggerall = AILevel>0
trigger1 =time=0
v = 2    ;fv = 10
value = ifelse(p2stateno=10612,0,ifelse(p2bodydist x <120,1,2))
[State 0, VarSet]
type = VarSet
triggerall = var(59)=1 && var(57)=0
triggerall = AILevel=0
trigger1 =time=0
v = 2    ;fv = 10
value = ifelse(command="DP1A",0,ifelse(command="DP2A",1,2))
[State 0, VarSet]
type = VarSet
triggerall = var(59)=1 && var(57)=1
triggerall = AILevel=0
trigger1 =time=0
v = 2    ;fv = 10
value = ifelse(command="DP1B",0,ifelse(command="DP2B",1,2))
[State 0, VarSet]
type = VarSet
triggerall = var(59)=1 && var(57)=2
triggerall = AILevel=0
trigger1 =time=0
v = 2    ;fv = 10
value = ifelse(command="DP1G",0,ifelse(command="DP2G",1,2))
[State 0, VelSet]
type = VelSet
triggerall = var(59)=1
trigger1 = animelem=2 && (anim=1050 ||anim=1054)
x = ifelse(var(2)=0,2,ifelse(var(2)=1,4,7.5))*(ifelse(var(18),1.5,1))
y = -ifelse(var(2)=0,10,ifelse(var(2)=1,11.5,13.5))*(ifelse(var(18),1.5,1))
;----------------------------mvc2
[State 0, VelSet]
type = VelSet
triggerall = var(59)=0
trigger1 = animelem=2 && (anim=1050 ||anim=1054)
x = ifelse(var(2)=0,3.35,7.5)
y = -ifelse(var(2)=0,13.5,13.5)
[State 0, VarSet]
type = VarSet
triggerall = var(59)=0
triggerall = AILevel=0
trigger1 =time=0
v = 2    ;fv = 10
value = ifelse(command="DP1",0,1)
[State 0, VarSet]
type = VarSet
triggerall = var(59)=0
triggerall = AILevel>0
trigger1 =time=0
v = 2    ;fv = 10
value = ifelse(p2bodydist x <120,0,1)
;------------------------
;ignorehitpause =
;persistent =
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2)>=0 && (anim=1050 ||anim=1054)
y = .87 *(ifelse(var(18),2,1))
;ignorehitpause =
;persistent =

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =animelemtime(2)>=0 && (anim=1050 ||anim=1054)
statetype = A       ;S,A,C,L
physics = N         ;A,C,S,N
;ignorehitpause =
;persistent =

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =animelemtime(1)>=0 && anim=1053
statetype = C
movetype=I       ;S,A,C,L
physics = C
[State 1000, 7]
type = Changeanim
trigger1 = pos y >=0 && time >4 && (anim=1050 ||anim=1054)
value = 1053
[State 0, VelSet]
type = VelSet
trigger1 = anim=1053
x = 0
y = 0
[State 0, PosSet]
type = PosSet
trigger1 =  anim=1053
y = 0
;ignorehitpause =
;persistent =

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

[State 230, 2]
type = HitDef
triggerall = var(59)=0 || (var(59)=1 && var(2)>=0)
triggerall = time >7
trigger1=!movecontact
attr = S, SA
animtype  =up
damage    = 0,28
guardflag = MA
guard.pausetime = 12,12
priority=5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -19,-64
hitsound   = S1,5
guardsound = S3,1
ground.type = high
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -6,-3
air.velocity = -3.5,-4.5
fall.recover=0
fall=1
p1stateno=1050
p2stateno=1051

[State 230, 2]
type = HitDef
triggerall = var(59)=1
triggerall = var(2)=0
triggerall = time >7
trigger1=!movecontact
attr = S, SA
animtype  =up
damage    = 0,28
guardflag = MA
hitflag=MAFD
guard.pausetime = 12,12
priority=5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -19,-64
hitsound   = S1,5
guardsound = S3,1
ground.type = high
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -6,-3
air.velocity = -3.5,-4.5
fall.recover=0
fall=1
p1stateno=1050
p2stateno=1051
nochainid=1050
id=ifelse(var(16)=1,1050,10)
[State 1000, 7]
type = ChangeState
trigger1 = moveguarded
value = 57


;ignorehitpause =
;persistent =


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

;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 1050]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= ifelse(var(59)=1,0,60)
velset = 0,0
anim =1051
ctrl = 0
sprpriority = 1

[State 810, Bind 1]
type = TargetBind
triggerall = anim=1051
trigger1 = AnimElemtime(1)>=0&&animelemtime(2)<0
pos = -23, -51
[State 810, Bind 1]
type = TargetBind
triggerall = anim=1051
trigger1 = AnimElemtime(2)>=0&&animelemtime(3)<0
pos = -35, -57
[State 810, Bind 1]
type = TargetBind
triggerall = anim=1051
trigger1 = AnimElemtime(3)>=0&&animelemtime(4)<0
pos = -34, -46
[State 810, Bind 1]
type = TargetBind
triggerall = anim=1051
trigger1 = AnimElemtime(4)>=0&&animelemtime(5)<0
pos = -49, -76
[State 810, Bind 1]
type = TargetBind
triggerall = anim=1051
trigger1 = AnimElemtime(5)>=0
pos =-58, -94



[State 0, VelSet]
type = VelSet
triggerall = anim=1051
trigger1 =animelem=2
x = 2
y = -3

[State 0, VelAdd]
type = VelAdd
triggerall = anim=1051
trigger1 =animelemtime(2)>=0
y = .4

[State 0, VelSet]
type = VelSet
trigger1 = anim=1052
x = 0
y = 0
[State 0, PosSet]
type = PosSet
trigger1 =  anim=1052
y = 0
;ignorehitpause =
;persistent =

[State 0, PosSet]
type = PosSet
trigger1 =  pos y >-65 && time <2
y = -65


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=0 && anim=1051 && animelemtime(4)>=0  && p2stateno=1052
value = 1052
[State 0, TargetState]
type = TargetState
trigger1 = pos y >=0 && anim=1051 && animelemtime(4)>=0
value =1052

[State 810, Bind 1]
type = TargetBind
triggerall = anim=1052
trigger1 = AnimElemtime(1)>=0&&animelemtime(2)<0
pos = -58, -87
[State 810, Bind 1]
type = TargetBind
triggerall = anim=1052
trigger1 = AnimElemtime(2)>=0&&animelemtime(3)<0
pos = 14, -110
[State 810, Bind 1]
type = TargetBind
triggerall = anim=1052
trigger1 = AnimElem=4
pos = 36, -104
[State 0, TargetState]
type = TargetState
triggerall = anim=1052
trigger1 =animelem=4
value =1053

[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall = anim=1052
trigger1 =animelem=4
value = -floor(ifelse(var(59)=0,104,95)*fvar(2))
[State 0, Width]
type = Width
trigger1 =1
edge = 90,0
;value = 0,0
;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 1051]
type    = A
movetype= H
physics = N
sprpriority = -2
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 1,0
;ignorehitpause =
;persistent =

[State 0, Turn]
type = Turn
trigger1 = facing = enemy,facing
;ignorehitpause =
;persistent =
[State 0, SelfState]
type = SelfState
trigger1 = p2stateno!=1050
value =5050
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = time=0
value = 1060


;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 1052]
type    = A
movetype= H
physics = N
sprpriority = -2
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = time=0
value = 1061

;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 1053]
type =A
movetype = H
physics =N
velset = ifelse(enemy,var(59)=0,-6,-12),ifelse(enemy,var(16)=1,-5,ifelse(enemy,var(59)=0,-6,11))
poweradd = 40

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



[State 0, NotHitBy]
type = NotHitBy
trigger1 = Pos Y < 0 && Vel Y <0
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =
[State 821, 4] ;Hit ground
type = changeState
triggerall = enemy,var(59)=1 && enemy,var(16)=0
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1030

[State 821, 4] ;Hit ground
type = SelfState
triggerall = enemy,var(59)=0 || enemy,var(16)=1
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 5110 ;Hit ground

;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 1030]
type    = A
movetype= H
physics = N
poweradd= 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=-8
x=0

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



[State 0, SelfState]
type = SelfState
trigger1 = pos y>10 && time>24
value =5100
;---------------------------------------------------------------------------
[Statedef 1100]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= ifelse(var(59)=1,0,60)
anim = 1100
velset=0,0
ctrl = 0
sprpriority = 1

[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
triggerall = var(59)=0
trigger1 =time=0
v = 3    ;fv = 10
value = ifelse(command="sk1",0,1)
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = var(59)=0
trigger1 =time=0
v = 3    ;fv = 10
value = ifelse((p2statetype=A&& p2bodydist y <-55),1,0)

[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
triggerall = var(59)=1
triggerall= var(57)=0
trigger1 =time=0
v = 3    ;fv = 10
value = ifelse(command="sk1A",0,ifelse(command="sk2A",1,2))

[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
triggerall = var(59)=1
triggerall= var(57)=1
trigger1 =time=0
v = 3    ;fv = 10
value = ifelse(command="sk1B",0,ifelse(command="sk2B",1,2))
[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
triggerall = var(59)=1
triggerall= var(57)=2
trigger1 =time=0
v = 3    ;fv = 10
value = ifelse(command="sk1G",0,ifelse(command="sk2G",1,2))
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
triggerall = var(59)=1
trigger1 =time=0
v = 3    ;fv = 10
value = ifelse((p2statetype=A&& p2bodydist y <-55),1,ifelse(p2stateno=10612|| p2stateno= 854,2,0))

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim =8000
ID =8002
pos = 1,-11
postype = p1  ;p2,front,back,left,right
facing = ifelse(facing=-1,-1,1)
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,ifelse(GameHeight = 180,.75,1)
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
[State 0, Explod]
type = Explod
trigger1 =time=0 && var(59)=1
anim =10000
ID = 1100
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.5,1.5
sprpriority = 5
removetime=-1
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause=1
persistent=0
[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 0, Helper]
type = Helper
trigger1 =animelem=3
helpertype = normal ;player
name = "birdie"
ID =1101
stateno =1101
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 1050, 5]
type = ChangeState
trigger1 =animtime=0
value = 0
ctrl=1



;---------------------------------------------------------------------------
;
[Statedef 3000]
type    = S
movetype= A
physics = N
velset = 0,0
juggle  = 0
anim = 3000
ctrl = 0
sprpriority = 0
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =1
id =1001

[State 0, VelSet]
type = VelSet
triggerall = moveguarded
trigger1 =animelem=44 && (anim=3000)
x = .75
[State 0, PlayerPush]
type = PlayerPush
trigger1 =moveguarded
value = 0
;ignorehitpause =
;persistent =




[State 0, NotHitBy]
type = NotHitBy
trigger1 =  animelem=6 && (anim=3000)
value = SCA
;value2 = S,NA
time = ifelse(var(59)=1,62,51)
;ignorehitpause = 
;persistent = 

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

[State 0, Pause]
type = Pause
trigger1 = animelem=6 && (anim=3000)
time = ifelse(var(59)=1,55,48)
movetime = ifelse(var(59)=1,55,48)
;endcmdbuftime = 0
;pausebg = 1
;ignorehitpause = 
;persistent = 


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=6 && (anim=3000)
value = S3001,ifelse(var(59)=1,2,0)

[State 182, 2]
type = NotHitBy
trigger1 = animelem=4  && (anim=3000)
value = SCA
time =55

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

[State 3000, Hyperbg]
type = Explod
trigger1 =animelem=40  && (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
trigger1 =anim=3000&& animelemtime(6)>=0 &&animelemtime(44)<0
trigger2 =anim=3001 ||anim=3002 || anim=3003
trigger3= anim=3004 && animelemtime(16)>=0
flag = noBG


[State 3000, helper]
type = Helper
trigger1 =animelem=7 && (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 1050, 1]
type = PlaySnd
trigger1 = animelem=6  && (anim=3000)
trigger2 = animelem=2  && (anim=3004)
value = S190, 1
channel=0

[State 1050, 1]
type = PlaySnd
trigger1 = animelemtime(1)=1  && (anim=3001||anim=3002||anim=3003)
value = S2, 2
channel=0

[State 0, VelSet]
type = VelSet
trigger1 =animelem=42 && (anim=3000)
trigger2 =animelem=8 && (anim=3001||anim=3002||anim=3003)
x = 19


[State 0, VelSet]
type = VelSet
trigger1 =animelem=44 && (anim=3000)  && !moveguarded
trigger2 =animelem=2 && (anim=3001||anim=3002||anim=3003)
trigger3 =animelem=16 && (anim=3004)
x = 5

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


[State 0, VelSet]
type = VelSet
trigger1 =animelem=4 && (anim=3001||anim=3002||anim=3003)
x = 0

[State 0, Turn]
type = Turn
trigger1 = animelem=6 && (anim=3001||anim=3002||anim=3003)


[State 100, Explod]
type = Explod
trigger1 =animelem=42 && (anim=3000)
trigger2 =animelem=8 && anim=3001
trigger3 =animelem=8 && anim=3002
trigger4 =animelem=8 && anim=3003
ID = 1003
anim = 1004
postype = p1
pos = 0, 0
bindtime = -1
vel = 0, 0
ownpal = 1
sprpriority = 2
scale = .833333333333333333333333333333, 1
removetime=-1
removeongethit=1
ignorehitpause=1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time>83 && anim=3000
trigger2 = animelemtime(1)>=15 &&  animelemtime(2)<1&& (anim=3001||anim=3003)
trigger3 = animelemtime(1)>=13&&  animelemtime(2)<1 && anim=3002
trigger4 = animelemtime(14)>=1&&  animelemtime(16)<1 && anim=3004
id =1003
[State 100, Explod]
type = Explod
trigger1 =animelemtime(43)=2 && (anim=3000)
trigger2 =animelemtime(1)=15 && (anim=3001||anim=3003)
trigger3 =animelemtime(1)=13 && (anim=3002)
trigger4 =animelem=14 && (anim=3004)
ID = 1002
anim = 1005
postype = p1
pos = 0, 0
bindtime = -1
vel = 0, 0
ownpal = 1
sprpriority = 2
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 0, Explod]
type = Explod
trigger1 = animelem = 4  && (anim=3000)
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 230, 2]
type = HitDef
trigger1=animelem=43 && anim=3000
attr = S, HA
animtype  =hard
damage    =56,28
guardflag = MA
pausetime = 0,9
priority=7
getpower=0
givepower=75
guard.pausetime=5,5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -19,-33
hitsound   = S1,6
guardsound = S3,1
ground.type = high
ground.slidetime = 35
ground.hittime  = 35
guard.ctrltime=8
ground.velocity = -0
air.velocity = -3.5,-4.5
fall.recover=0
forcenofall=1
kill=0
id=3000
[State 230, 2]
type = HitDef
trigger1=animelem=9 && anim=3001
attr = S, HA
animtype  =hard
damage    =56,28
guardflag = MA
getpower=0
givepower=75
pausetime = 0,6
priority=5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -19,-33
hitsound   = S1,6
guardsound = S3,1
ground.type = high
ground.slidetime = 35
ground.hittime  = 35
ground.velocity = -0
air.velocity = -3.5,-4.5
fall.recover=0
p2facing=-enemy,facing
forcenofall=1
kill=0
[State 230, 2]
type = HitDef
trigger1=animelem=9 && anim=3002
attr = S, HA
animtype  =hard
damage    =56,28
guardflag = MA
pausetime = 0,8
givepower=75
priority=5
sparkno = S7005+(random%4)
guard.sparkno = S7009
getpower=0
sparkxy = -19,-33
hitsound   = S1,6
guardsound = S3,1
ground.type = high
ground.slidetime = 35
ground.hittime  = 35
ground.velocity = -0
air.velocity = -3.5,-4.5
fall.recover=0
p2facing=enemy,facing
forcenofall=1
kill=0
[State 230, 2]
type = HitDef
trigger1=animelem=8 && anim=3003
attr = S, HA
animtype  =up
damage    =ifelse(var(59)=1,100,160),28
guardflag = MA
pausetime = 0,24
priority=5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -19,-33
hitsound   = S1,6
getpower=0
givepower=75
guardsound = S3,1
ground.type = high
ground.slidetime = 35
ground.hittime  = 35
ground.velocity = .5,-13
air.velocity = -3.5,-4.5
fall.recover=0
fall=1
yaccel=.67
id=430
;persistent =



;ignorehitpause =
;persistent =

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit=1 && (anim=3000)   && !winko
value =3001
ignorehitpause =1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit=1 && (anim=3001) && (animelemtime(9)>=0) ;&& var(4)=1
value =3002
ignorehitpause =1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit=1 && (anim=3002) && (animelemtime(9)>=0); && var(4)=3
value =3003
ignorehitpause =1
;persistent =
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit=1 && (anim=3003) && (animelemtime(3)>=0)
value =3004
ignorehitpause =1

[State 0, TargetState]
type = TargetState
trigger1 =  movehit && (anim=3001)    && !winko
value = 3051
ID = 3000
;ignorehitpause =
;persistent =


[State 0, TargetBind]
type = TargetBind
trigger1 =movehit && animelem=1   && (anim=3001)
pos = 30,0
ignorehitpause = 1
;persistent =

[State 0, PosFreeze]
type = PosFreeze
trigger1 =animelemtime(1)>=0 && animelemtime(1)<10 && anim=3001
trigger2 =animelemtime(1)>=0 && animelemtime(1)<7 && anim=3002
trigger3 =animelemtime(1)>=0 && animelemtime(1)<9 && anim=3003
trigger4 =animelemtime(1)>=0 && animelemtime(13)<1 && anim=3004
value = 1
;ignorehitpause =
;persistent =


[State 100, Explod]
type = Explod
trigger1 =animelemtime(1)=1 && (anim=3001||anim=3003)
ID = 1002
anim = 1012
postype = p2
pos = 0, 0
bindtime =1
facing=-1
removetime=12
vel = 0, 0
ownpal = 1
sprpriority = -6
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 100, Explod]
type = Explod
trigger1 =animelemtime(1)=1 && (anim=3001||anim=3003)
ID = 1002
anim = 1013
postype = p2
facing=-1
removetime=12
pos = 0, 0
bindtime = 1
vel = 0, 0
ownpal = 1
sprpriority = -5
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 100, Explod]
type = Explod
trigger1 =animelemtime(1)=12&& (anim=3001||anim=3003)
ID = 1002
anim = 1014
postype = p2
pos =0, 0
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(1)=1 && (anim=3002||anim=3004)
ID = 1002
anim = 1010
postype = p2
pos =  ifelse(anim=3002,0,0), 0
bindtime =1
facing=ifelse(anim=3004,1,-1)
removetime=ifelse(anim=3002,6,24)
vel = 0, 0
ownpal = 1
sprpriority = ifelse(anim=3004,3,-4)
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 100, Explod]
type = Explod
trigger1 =animelemtime(1)=1  && (anim=3002||anim=3004)
ID = 1002
anim = 1011
postype = p2
facing=ifelse(anim=3004,1,-1)
removetime=ifelse(anim=3002,6,24)
pos = ifelse(anim=3002,0,0), 0
bindtime = 1
vel = 0, 0
ownpal = 1
sprpriority = ifelse(anim=3004,-2,-5)
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 100, Explod]
type = Explod
trigger1 =animelemtime(1)=12 && (anim=3002)
trigger2 =animelemtime(12)=2 && (anim=3004)
ID = 1002
anim = 1015
postype = p2
pos=ifelse(anim=3002,-20,20), -30
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(1)=1 && (anim=3004)
ID = 1002
anim = 1010
postype = p2
pos = 40, 0
bindtime =1
facing=-1
removetime=24
vel = 0, 0
ownpal = 1
sprpriority = 3
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 100, Explod]
type = Explod
trigger1 =animelemtime(1)=1  && (anim=3004)
ID = 1002
anim = 1011
postype = p2
facing=-1
removetime=ifelse(anim=3002,6,24)
pos = 40, 0
bindtime = 1
vel = 0, 0
ownpal = 1
sprpriority = -2
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 100, Explod]
type = Explod
trigger1 =animelemtime(12)=2 && (anim=3004)
ID = 1002
anim = 1015
postype = p2
pos=30, -30
facing=1
bindtime = 1
vel = 0, 0
ownpal = 1
sprpriority = -6
scale = .833333333333333333333333333333, 1
removeongethit=1
ignorehitpause=1
[State 1051, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = animtime=0 && (anim=3004 ||anim=3000)
value = 0
ctrl=1


;---------------------------------------------------------------------------
;Gou Shoryuken - start
[Statedef 3049]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 0
velset = 0,0
anim =3050
ctrl = 0
sprpriority = 1
facep2=ifelse(p2bodydist x <-30,1,0)

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =1
id =1001
[State 0, VarSet]
type = Varset
trigger1 =var(59)=1
fv = 2    ;fv = 10
value =1
;ignorehitpause = 
;persistent = 


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

[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelem=6 && (anim=3050)
value =  -ifelse(var(59)=0,1000,3000)
;ignorehitpause = 
;persistent = 

[State 0, Pause]
type = Pause
trigger1 = animelem=6 && (anim=3050)
time = 48
movetime = 48
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=6 && (anim=3050)
value = S3001,ifelse(var(59)=1,1,0)
[State 1050, 1]
type = PlaySnd
trigger1 = animelem=6  && (anim=3050)
value = S190, 1
channel=0
[State 182, 2]
type = NotHitBy
trigger1 = animelem=41  && (anim=3050) && var(59)=1
value = SCA
time =20
[State 182, 2]
type = NotHitBy
trigger1 = animelem=4  && (anim=3050)
value = SCA
time =55
[State 3000, Hyperbg]
type = Explod
trigger1 = animelem=7  && (anim=3050)
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=40  && (anim=3050)
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=3050&& animelemtime(6)>=0
flag = noBG



[State 3000, helper]
type = Helper
trigger1 =animelem=7 && (anim=3050)
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

;ignorehitpause =
;persistent =


[State 0, VelSet]
type = VelSet
trigger1 = animelem=43 && anim=3050
x = 8
y = -13.5
;ignorehitpause =
;persistent =
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(43)>=0 && anim=3050
y = .87
;ignorehitpause =
;persistent =

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =animelemtime(43)>=0 && anim=3050
statetype = A       ;S,A,C,L
physics = N         ;A,C,S,N
;ignorehitpause =
;persistent =

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =animelemtime(1)>=0 && anim=1053
statetype = C
movetype=I       ;S,A,C,L
physics = C
[State 1000, 7]
type = Changeanim
trigger1 = pos y >=0 && time >74 && anim=3050
value = 1053
[State 0, VelSet]
type = VelSet
trigger1 = anim=1053
x = 0
y = 0
[State 0, PosSet]
type = PosSet
trigger1 =  anim=1053
y = 0
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = Varadd
triggerall = enemy,movetype = H
triggerall = var(59)=1
triggerall = fvar(2)  <.65
trigger1= time=0
fv =2 ;fv = 10
value = .3
[State 230, 2]
type = HitDef
triggerall = animelemtime(43)>=3
trigger1=!movecontact
attr = S, HA
animtype  = heavy
damage    = 0,28
guardflag = MA
pausetime=10,10
guard.pausetime = 12,12
priority=5
sparkno = S7005+(random%4)
guard.sparkno = S7009
sparkxy = -19,-64
getpower=0
hitsound   = S1,2
guardsound = S3,1
ground.type = high
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = 0,0
air.velocity = -3.5,-4.5
p1stateno=3050
p2stateno=3051

[State 1000, 7]
type = ChangeState
trigger1 = moveguarded
value = 57



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





;---------------------------------------------------------------------------
[Statedef 3050]
type    = S
movetype= A
physics =N
juggle  = 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 0, VarSet]
type = Varset
trigger1 =var(59)=1
fv = 2    ;fv = 10
value =1
[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,6
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,6
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, 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= 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,6
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,6
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,125,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
poweradd= 63
velset=0,0
ctrl = 0
sprpriority = 0

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time=0
value = 5002
[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
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, AssertSpecial]
type = AssertSpecial
trigger1 = numhelper(6000)
flag = nokoslow
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1 = stateno!=[120,155]
v = 55   ;fv = 10
value = life
ignorehitpause = 1
persistent = 1

[State 0, VarSet]
type = VarSet
trigger1 =p2statetype!=A
v = 20   ;fv = 10
value = 0
[State 0, LifeSet]
type = LifeSet
trigger1 = stateno=[120,155]
value = var(55)
ignorehitpause =1 
persistent =1 

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = p2movetype!=H || p2stateno=[120,155] 
id =1100
ignorehitpause = 1
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = p2movetype!=H || p2stateno=[120,155] 
id =1000
ignorehitpause = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =statetype!=A 
id = 56
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =p2movetype!=H
id = 10001
ignorehitpause=1
[State 0, TargetState]
type = TargetState
trigger1 =movehit &&p2statetype=A && p2stateno!=211 
value =211
ID = 641
ignorehitpause=1
[State 0, TargetState]
type = TargetState
trigger1 =movehit &&p2statetype=A && p2stateno!=10613  
value =10613
ID = 640
ignorehitpause=0

[State 0, TargetState]
type = TargetState
trigger1 =p2statetype= A && (projhit1110=1||projhit1109=1||projhit1111=1) && (p2stateno!=[201,304])
value =ifelse(var(59)=1,302,202)
ID =200
ignorehitpause =1

[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 0, TargetState]
type = TargetState
trigger1 =movehit&&enemy,stateno!=442 &&animelemtime(5)<0
value = 442
ID = 440
ignorehitpause =0
[State 0, VelAdd]
type = VelAdd
trigger1 =statetype=A &&(stateno=[600,641])&&movetype!=H&&var(33)=0
y = (ifelse(var(18),.28,0))
[State 0, VelAdd]
type = VelAdd
trigger1 =statetype=A &&(stateno=50)&&movetype!=H
y = (ifelse(var(18),.61,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=1000&&p2stateno=1001) && (p2life < enemy,lifemax/3)
trigger2 = stateno=3000 &&  animelemtime(13)=1 && anim=3004 && (p2life < enemy,lifemax/3)
trigger3 = life <= lifemax/3 && ctrl
value =4
ctrl = 0
ignorehitpause=0
[State 0, ChangeState]
type = ChangeState
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= 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 = p2movetype!=H
v = 19   ;fv = 10
value = 0


[State 0, VarSet]
type = Varadd
triggerall = movehit=1
triggerall = stateno!=631
triggerall = stateno!=201
triggerall = stateno!=401
triggerall = var(20)<13
trigger1 = p2statetype=A && (enemy,gethitvar(hitcount)%5)
v = 20    ;fv = 10
value = 1
[State 0, VarSet]
type = Varadd
triggerall = movehit=1
triggerall = stateno!=631
triggerall = stateno!=201
triggerall = stateno!=401
triggerall = var(20)<13
trigger1 = p2statetype!=A && (enemy,gethitvar(hitcount)%5)
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 = var(20)-(var(21)/2)


[State 0, VarSet]
type = Varadd
triggerall = movehit=1
triggerall = stateno=631
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=201||stateno=401
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 = 6
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,anim=5160 && enemynear,animelemtime(1)=1 && enemy,stateno=821
trigger4= enemynear,stateno=676 && enemynear,anim=614 && enemynear,animelemtime(1)=1&&enemynear,anim!=5160
value = S15,0
[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,anim=5160 && enemynear,animelemtime(1)=1 && enemy,stateno=821
trigger5= enemynear,stateno=676 && enemynear,anim=614 && enemynear,animelemtime(1)=1&&enemynear,anim!=5160
anim =6006
ID =8002
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 2
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 2
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1

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


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

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

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






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

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



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



[State 0, VarSet]
type = VarSet
trigger1 = authorname= "Kamekaze" && p1name = "MvC2 Sabretooth By Kamekaze"
v = 50    ;fv = 10
value = 1

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

[State 0, VarSet]
type = VarSet
trigger1 =fvar(2) <.09&& var(59)=0
fv = 2    ;fv = 10
value = .09
;ignorehitpause =
;persistent =

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

[State 0, VarSet]
type = VarSet
triggerall =var(18)=0&&stateno =[1000,1103]
trigger1 =fvar(2) <.2 && var(59)=1
fv = 2    ;fv = 10
value = .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 = .3
ignorehitpause=1
[State 0, VarSet]
type = VarSet
triggerall = enemy,movetype = H
triggerall = var(59)=1
trigger1 = prevstateno =3000 || prevstateno=3050
fv =2 ;fv = 10
value =fvar(3)
persistent=0

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



;--------
[State 0, VarSet]
type = Varset
triggerall = enemy,movetype = H
triggerall = var(59)=1
triggerall = stateno !=[3000,4007]
triggerall =stateno =401 || stateno=201 || stateno=631
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 =406|| stateno=236|| 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 =441|| stateno=211 || stateno=606
trigger1= movehit=1
fv =2 ;fv = 10
value =  fvar(2)*.85
[State 0, VarSet]
type = Varset
triggerall = enemy,movetype = H
triggerall = var(59)=1
triggerall = stateno !=[3000,4007]
triggerall =stateno=210||stateno =[1000,1103]
trigger1= movehit=1
fv =2 ;fv = 10
value = fvar(2)*.90

[State 0, VarSet]
type = Varset
triggerall = enemy,movetype = H
triggerall = var(59)=1
triggerall = stateno =[3000,4007]
trigger1= movehit=1
fv =2 ;fv = 10
value = fvar(2)*.95
;------


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

[State 0, VarSet]
type = VarSet
triggerall = stateno !=1050
triggerall = movehit
trigger1 = (var(19))
v = 12  ;fv = 10
value = 999

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



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

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

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

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

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

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

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

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


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

[State 0, Helper]
type = Helper
triggerall = var(59)=0
trigger1 = numhelper(3006) < 1 && var(14) = 1
helpertype = normal ;player
name ="danger"
ID = 3006
stateno = 3012
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing =1
keyctrl = 0
ownpal = 0
[State 0, VarSet]
type = VarSet
trigger1 = projcontact1110=1
v = 28   ;fv = 10
value = 1
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1 = projcontact1111=1
v = 28   ;fv = 10
value = 2
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1 = projcontact1109=1 &&p2statetype=L
v = 28   ;fv = 10
value = 3
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1 =p2movetype!=H
v = 28   ;fv = 10
value = 0

[State 0, Helper]
type = Helper
triggerall=(p2stateno!=[120,155])
triggerall = var(59)=0
trigger1 = numhelper(3005) < 1 && (enemy,gethitvar(hitcount) >2)
helpertype = normal ;player
name ="combo"
ID = 3005
stateno = 3011
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing =1
keyctrl = 0
ownpal = 0
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 =  1
text = "frontedge = %d fvar1= %d  pos x = %f "
params =numexplod(10001),(enemy,numexplod(10001)), p2bodydist x
[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
triggerall = var(18)=1
trigger1 = stateno!=[120,155]
v = 55   ;fv = 10
value = life
ignorehitpause = 1
persistent = 1

[State 0, LifeSet]
type = LifeSet
triggerall = var(18)=1
triggerall = roundstate=2
trigger1 = stateno=[120,155]
value = var(55)
ignorehitpause =1 
persistent =1 


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

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



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

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





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

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



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

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



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

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

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


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

