

;VARIABLES
;var(0)-var(6): Temp
;var(7); enemynear, head pos y
;var(8);small opponent y dist
;var(9);miss target
;var(10);throw target id
;
;var(11),var(12); temp bound states
;-------
;var(13) Combo adder 
;Var(14) number and text decider 
;Var(15) is Danger 
;var(16) normalize 
;----------
;var(17);combo conditions
;var(18);ko sound
;var(19)-var(21);hit type combo
;var(22)-var(24);
;var(25)-var(27);hitcount
;var(28),  Helper, earth quake
;var(29),launcher reset
;variable below 29 will reset between rounds
;
;
;var(30); p2life /100
;var(31); p1life /100
;var(32); damage dampening
;var(33);enemy(1),life/100
; 
;var(34),max hits light atk
;var(35),max hits medium atk
;var(36);max hits hard atk
;var(37);
;var(38);
;var(39);I Beam
;var(40)-(41);
;var(42);
;var(43) - var(48); run
;var(49);
;var(50);- power up,
;var(51) - special to hyper states
;var(52) - damage to super armor
;var(54) - flight mode
;var(55) - super armor
;var(56);  sos condition
;var(57); 
;var(58); remember ai for next round
;var(59); ai activate


[Data]
;Amount of life to start with

life = 1000
;attack power (more is stronger)

attack = 100
;defensive power (more is stronger)

defence = 100
;Percentage to increase defense everytime player is knocked down
fall.defence_up = 50
;Time which player lies down for, before getting up
liedown.time = 60
;Number of points for juggling
airjuggle = 15
;Default hit spark number for HitDefs
sparkno = 7200
;Default guard spark number
guard.sparkno = 7300
;1 to enable echo on KO
KO.echo = 0
;Volume offset (negative for softer)
volume = -100 
;Variables with this index and above will not have their values
;reset to 0 between rounds or matches. There are 60 int variables,
;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
;If omitted, then it defaults to 60 and 40 for integer and float
;variables repectively, meaning that none are persistent, i.e. all
;are reset. If you want your variables to persist between matches,
;you need to override state 5900 from common1.cns.
IntPersistIndex = 29
FloatPersistIndex = 19

[Size]
xscale = 0.5    ;Horizontal scaling factor.
yscale = 0.5          ;Vertical scaling factor.
ground.back = 57    ;Player width (back, ground)
ground.front = 57   ;Player width (front, ground)
air.back = 57   ;Player width (back, air)
air.front = 57   ;Player width (front, air)
height = 50          ;Height of player (for opponent to jump over)
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
proj.doscale = 1     ;Set to 1 to scale projectiles too
head.pos = 0,-110  ;Approximate position of head
mid.pos = 0,-70   ;Approximate position of midsection
shadowoffset = 0   ;Number of pixels to vertically offset the shadow
draw.offset = 0,0    ;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 2    ;Walk forward
walk.back = -1.7     ;Walk backward
run.fwd  = 8,-5   ;Run forward (x, y)
run.back = -8,-4.8 ;Hop backward (x, y)
jump.neu = 0,-10    ;Neutral jumping velocity (x, y)
jump.back = -2.55    ;Jump back Speed (x, y)
jump.fwd = 3.5       ;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1 ;Running jump speeds (opt)
runjump.fwd = 4,-8.1     ;.
airjump.neu = 0,-8.1     ;.
airjump.back = -2.55      ;Air jump speeds (opt)
airjump.fwd = 3.5         ;.

[Movement]
airjump.num = 0      ;Number of air jumps allowed (opt)
airjump.height = 35  ;Minimum distance from ground before you can air jump (opt)
yaccel = .44        ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching

;---------------------------------------------------------------------------
; Lose by Time Over

[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0


[State 170]
type = PosSet
trigger1 = Time = 0
y = 0


[State 170]
type = null;PlaySnd
trigger1 = Time = 0
value = 170,0



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


;---------------------------------------------------------------------------
; Lose 

[Statedef 171]
type = S
ctrl = 0
velset = 0,0
anim = 170


[State 171]
type = PosSet
trigger1 = Time = 0
y = 0

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

[State 171]
type = Explod
trigger1 = Time%5 = 0
trigger1 = random < 300
anim = 7030+random%3
sprpriority = 5
scale = const(size.xscale),const(size.yscale)


[State 171]
type = NotHitBy
trigger1 = 1
value = SCA

[State 171]
type = CtrlSet
trigger1 = Time = 100
value = 1

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

[Statedef 173]
type = S
ctrl = 0
velset = 0,0
anim = 9800



[State 173]
type = PosSet
trigger1 = Time = 0
y = 0


[State 173]
type = PlaySnd
trigger1 = Time = 0
value = 170,0

[State 173]
type = NotHitBy
trigger1 = 1
value = SCA

[State 173]
type = CtrlSet
trigger1 = Time = 120
value = 1
;---------------------------------------------------------------------------
; Win state decider

[Statedef 180]
type = S
velset = 0,0

[state 180] 
type = AssertSpecial 
trigger1 = Time >= 0 
flag = NoBarDisplay

[State 180, 0]
type = PosSet
trigger1 = Time = 0
y = 0


[State 180]
type = Width
trigger1 = Time = 0
value = 50,50



[State 180]
type = null;PlaySnd
trigger1 = Time = 0 && random < 500
trigger1 = MatchOver = 0
value = 181,4


[State 180]
type = null;PlaySnd
trigger1 = Time = 0 && random < 500
trigger1 = MatchOver = 1
value = 181,3

[State 180]
type = ChangeState
trigger1 = Time >= 1
trigger1 = WinTime
value = 181


[State 180]
type = ChangeState
trigger1 = Time >= 1
trigger1 = WinKO
value = 181+random%2

;---------------------------------------------------------------------------
; Win pose 1 - Time Over

[Statedef 189]
type = S
ctrl = 0
anim = 181
velset = 0,0
sprpriority = 2

[state 189] 
type = AssertSpecial 
trigger1 = Time >= 0 
flag = NoBarDisplay

[State 189]
type = PlaySnd
trigger1 = AnimElem = 9
value = 181,1


[State 189]
type = PlaySnd
trigger1 = AnimElem = 10
value = 181,2

[State 189]
type = AssertSpecial
trigger1 = Time < 140
flag = roundnotover



;---------------------------------------------------------------------------
; Win pose 1 - Win KO

[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0
sprpriority = 2

[State 181] 
type = AssertSpecial 
trigger1 = Time >= 0 
flag = NoBarDisplay


[State 181] 
type = PlaySnd
trigger1 = AnimElem = 5
value = 182,0

[State 181] 
type = Explod
trigger1 = AnimElem = 6
anim = 6181
ownpal = 1
ontop = 1
pos = 17,-130
scale = const(size.xscale),const(size.yscale)


[State 181] 
type = PlaySnd
trigger1 = Time = 120
value = 182,1

[State 181]
type = AssertSpecial
trigger1 = Time < 240
flag = roundnotover


;---------------------------------------------------------------------------
; Win pose 2- Win KO

[Statedef 182]
type = S
ctrl = 0
physics = N
anim = 20
velset = const(velocity.walk.fwd.x),0
sprpriority = 2
facep2 = 1


[State 182] 
type = AssertSpecial 
trigger1 = Time >= 0 
flag = NoBarDisplay


[State 182] 
type = VelSet
trigger1 = abs(pos x - enemynear,pos x) < 20
x = 0

[State 182]
type = ChangeState
trigger1 = Vel X = 0
value = 184

[State 182]
type = AssertSpecial
trigger1 = Time < 700
flag = roundnotover

;---------------------------------------------------------------------------
; Win pose 2- Win KO

[Statedef 184]
type = S
ctrl = 0
anim = 182
velset = 0,0
sprpriority = 2

[State 184] 
type = AssertSpecial 
trigger1 = Time >= 0 
flag = NoBarDisplay


[State 184] 
type = NotHitBy
trigger1 = 1
value = SCA


[State 184]
type = PlaySnd
trigger1 = AnimElem = 3
value = 52,3



[State 184]
type = EnvShake
trigger1 = AnimElem = 3
time = 12


[State 184]
type = Explod
trigger1 = AnimElem = 3
anim = 8220+random%2
ownpal = 1
ontop = 1
pos = 49,-4
scale = const(size.xscale),const(size.yscale)

[State 184]
type = ChangeState
trigger1 = Time = 50
value = 183

[State 184]
type = AssertSpecial
trigger1 = Time < 240
flag = roundnotover


;---------------------------------------------------------------------------
; Win pose 3- Win KO

[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0
sprpriority = 2

[State 183] 
type = AssertSpecial 
trigger1 = Time >= 0 
flag = NoBarDisplay



[State 183]
type = AssertSpecial
trigger1 = Time < 120
flag = roundnotover


;---------------------------------------------------------------------------
; Introduction

[Statedef 191]
type = S
ctrl = 0
physics = N
anim = 9800
velset = 0,0
sprpriority = 0



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

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



[State 191, 3] ;Change to
type = ChangeState
trigger1 = Time = 1
value = 192+random%3


;---------------------------------------------------------------------------
; Introduction

[Statedef 192]
type = S
ctrl = 0
physics = N
anim = 192
velset = 0,0
sprpriority = 3


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

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


[State 192]
type = PlaySnd
trigger1 = AnimElem = 5
value = 192,0

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

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

[State 192, 3]
type = ChangeState
trigger1 = Time = 60
value = 199
ctrl = 0



;---------------------------------------------------------------------------
; Introduction 2

[Statedef 193]
type = S
ctrl = 0
physics = N
anim = 193
velset = 0,0
sprpriority = 3


[State 193]
type = Null;AssertSpecial
trigger1 = 1
flag = nobardisplay


[State 193]
type = Helper
trigger1 = AnimElem = 8
stateno = 6193
ownpal = 1
pos = 75,-95
scale = const(size.xscale),const(size.yscale)

[State 193]
type = PlaySnd
trigger1 = AnimElem = 3
value = 193,0


[State 193] ;Freeze animation until PreIntro is over
type = null;ChangeAnim
trigger1 = RoundState = 0
value = 190

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

[State 193]
type = ChangeState
trigger1 = AnimTime = 0
value = 199
ctrl = 0


;---------------------------------------------------------------------------
; Introduction 3

[Statedef 194]
type = S
ctrl = 0
physics = N
anim = 194
velset = 0,0
sprpriority = 3


[State 194]
type = Null;AssertSpecial
trigger1 = 1
flag = nobardisplay


[State 194]
type = PlaySnd
trigger1 = AnimElem = 5
value = 195,0

[State 194] 
type = Explod
trigger1 = AnimElem = 6
anim = 6181
ownpal = 1
ontop = 1
pos = 17,-130
scale = const(size.xscale),const(size.yscale)

[State 194] ;Freeze animation until PreIntro is over
type = null;ChangeAnim
trigger1 = RoundState = 0
value = 190

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

[State 194]
type = ChangeState
trigger1 = Time = 120
value = 199
ctrl = 0
;---------------------------------------------------------------------------
; Crouch to Stand
[Statedef 197]
type    = S
physics = S
anim = 12


[State 197]
type = ChangeState
trigger1 = AnimTime = 0
value = 199


;---------------------------------------------------------------------------
; Jump Land
[Statedef 198]
type    = S
physics = S
ctrl = 0
anim = 47
facep2 = 1
movehitpersist = 1


[State 198]
type = null;ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 47, ifelse((vel x)>0, 48, 49))

[State 198]
type = VelSet
trigger1 = Time = 0
y = 0

[State 198]
type = PosSet
trigger1 = Time = 0
y = 0



;This controller plays a sound everytime  lands from a jump
[State 198, Landing Sound]
type = PlaySnd
trigger1 = Time = 1
value = 52,3

[State 198]
type = Explod
trigger1 = Time = 1
anim = 7052
sprpriority = -2
pos = 0,10
scale = const(size.xscale),const(size.yscale)

[State 198]
type = null;EnvShake
trigger1 = Time = 1
time = 8


[State 198]
type = CtrlSet
trigger1 = Time = 2
value = 1


[State 198]
type = ChangeState
trigger1 = AnimTime = 0
value = 199
ctrl = 0

;----------------------------------------------- 
[Statedef 199]; Move around before match 
type = S 
physics =S 
sprpriority = 2 
anim = 0
velset = 0,0

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

[State 199]
type = VelSet 
trigger1 = Time = 0 
y = 0 


[State 199]
type = VelSet 
trigger1 = command = "holdfwd" 
x = 2.4 

[State 199]
type = VelSet 
trigger1 = command = "holdback" 
x = -2.0 

[State 199]
type = ChangeAnim 
trigger1 = command = "holdfwd" 
trigger1 = Anim != 20 
value = 20 

[State 199]
type = ChangeAnim 
trigger1 = command = "holdback" 
trigger1 = Anim != 21 
value = 21 

[State 199]
type = ChangeAnim 
trigger1 = command != "holdback" 
trigger1 = command != "holdfwd" 
trigger1 = Anim != 0 
value = 0 

[State 199] 
type = VelSet 
trigger1 = command != "holdback" 
trigger1 = command != "holdfwd" 
x = 0 

[State 199]
type = VarSet 
trigger1 = roundstate != 2 
var(1) = floor(pos x) 

[State 199]
type = posset 
trigger1 = roundstate = 2 
trigger1 = var(1) != 0 
x = var(1) 

[State 199]
type = varset 
trigger1 = roundstate = 2 
var(1) = 0 

[State 199]
type = changestate 
trigger1 = ctrl 
value = ifelse((command = "holdfwd") || (command ="holdback"),20,0)


;---------------------------------------------------------------------------
; Taunt

[Statedef 195]
type = S
ctrl = 0
movetype = I
physics = S
poweradd = 10
anim = 181
velset = 0,0
sprpriority = 2


[State 195]
type = PlaySnd
trigger1 = AnimElem = 5
value = 182,random%4


[State 195] 
type = Explod
trigger1 = AnimElem = 5
anim = 6181
ownpal = 1
ontop = 1
pos = 17,-130
scale = const(size.xscale),const(size.yscale)

[State 195]
type = ChangeState
trigger1 = Time = 60
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Standing Punch

[Statedef 200]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                      
velset = 0,0                     
ctrl = 0                        
anim = 200                        
poweradd = 14                   
sprpriority = 2      
facep2 = 1           

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


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

[State 200]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA             
damage = 5*var(30),floor(var(30)/2)    
animtype = Light                 
guardflag = MA                  
hitflag = MAF                    
priority = 3, Hit                
pausetime = 5,5                
sparkno = S(8200+random%2)                
sparkxy = -10,-70
hitsound = S1,0      
guardsound = S4,0                
guard.sparkno = S8430
ground.type = High               
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -3    
;ground.velocity = -1,-9
airguard.velocity = -1.9,-.8     
air.type = High                  
air.velocity = -1.4,-3           
air.hittime = 12                 
getpower = ifelse(MoveHit,14,7),ifelse(MoveHit,14,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 200]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0


[State 200]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


[State 200]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Standing Punch 2

[Statedef 205]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                      
velset = 0,0                     
ctrl = 0                        
anim = 205                        
poweradd = 14                   
sprpriority = 2      
facep2 = 1           

[State 205]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,0


[State 205]
type = PlaySnd
trigger1 = AnimElem = 2
value = 200,0

[State 205]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA             
damage = 5*var(30),floor(var(30)/2)    
animtype = Light                 
guardflag = MA                  
hitflag = MAF                    
priority = 3, Hit                
pausetime = 5,5                
sparkno = S(8200+random%2)                
sparkxy = -10,-70
hitsound = S1,0      
guardsound = S4,0                
guard.sparkno = S8430
ground.type = High               
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -3    
;ground.velocity = -1,-9
airguard.velocity = -1.9,-.8     
air.type = High                  
air.velocity = -1.4,-3           
air.hittime = 12                 
getpower = ifelse(MoveHit,14,7),ifelse(MoveHit,14,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 205]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0


[State 205]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


[State 205]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Stand Medium Punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 27
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 2
facep2 = 1

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


[State 210]
type = PlaySnd
trigger1 = AnimElem = 3
value = 192,0

[State 210]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Medium
damage    = 7*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 7,7
sparkno = S(8210+random%2)  
guard.sparkno = S8430
sparkxy = -10,-90
hitsound   = S1,1
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -5
air.velocity = -5
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall.animtype = Up
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 211
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;p2stateno = 9020

[State 210]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0

[State 210]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 6, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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


;---------------------------------------------------------------------------
; Stand  Strong Punch
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 2
facep2 = 1


[State 220]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,2


[State 220]
type = PlaySnd
trigger1 = AnimElem = 3
value = 193,0

[State 220]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Hard
damage    = 12*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 7,7
sparkno = S(8220+random%2)
guard.sparkno = S8430
sparkxy = -10,-70
hitsound   = S2,5
guardsound = S4,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -7
air.velocity = -7
getpower = ifelse(MoveHit,50,20),ifelse(MoveHit,50,0)
;fall.animtype = Up
;fall = 1
;air.fall = 1
;fall.recover =1
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0

[State 220]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


[State 220]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 5, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 220]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Stand  Strong Punch 2
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2
facep2 = 1


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


[State 230]
type = PlaySnd
trigger1 = AnimElem = 3
value = 192,0


[State 230]
type = Helper
trigger1 = AnimElem = 4
stateno = 6230
id = 6230
scale = const(size.xscale),const(size.yscale)

[State 230]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Hard
damage    = 14*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 7,7
sparkno = S(8220+random%2)
guard.sparkno = S8430
sparkxy = -10,-70
hitsound   = S2,5
guardsound = S4,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -12,-9
air.velocity = -12,-9
getpower = ifelse(MoveHit,50,20),ifelse(MoveHit,50,0)
;fall.animtype = Up
;fall = 1
;air.fall = 1
;fall.recover =1
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0

[State 230]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


[State 230]
type = null;VarAdd
trigger1 = !MoveContact && AnimElem = 5, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


[State 230]
type = ChangeAnim
trigger1 = Time = 40
value = 231
persistent = 0

[State 230]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 231
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Stand Kick
[Statedef 300]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 13
ctrl = 0
velset = 0,0
anim = 300
sprpriority = 2
facep2 = 1


[State 300]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,0

[State 300, 2]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Light
damage    = 5*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 5,5
sparkno = S(8200+random%2)
guard.sparkno = S8430
sparkxy = -10,-30
hitsound   = S1,4
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -3
air.velocity = -3
getpower = ifelse(MoveHit,13,7),ifelse(MoveHit,13,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020

[State 300]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0


[State 300]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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

;---------------------------------------------------------------------------
;Stand Medium Kick
[Statedef 310]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 27
ctrl = 0
velset = 0,0
anim = 310
sprpriority = 2
facep2 = 1



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


[State 310]
type = PlaySnd
trigger1 = Time = 12
value = 192,0


[State 310]
type = PlaySnd
trigger1 = Time = 15
value = 5100,4

[State 310]
type = EnvShake
trigger1 = Time = 17
time = 7

[State 310]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype = Medium
damage    = 7*var(30),floor(var(30)/2)
hitflag = MAFD
guardflag = MA
pausetime = 5,5
sparkno = S(8210+random%2)
guard.sparkno = S8430
sparkxy = -10,-10
hitsound   = S1,5
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -5
air.velocity = -5
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020


[State 310]
type = Projectile
trigger1 = Time%2 = 0 && Time = [15,40]
projid = 310
projanim = 6310+random%3
;projhitanim =
;projremanim = 
;projcancelanim = 
projremove = 1
projremovetime = 120
velocity = 0,7
projhits = 1
projpriority = 4
projsprpriority = 3
projedgebound = 100
projheightbound = -340,100
postype = back
offset = random%320,-screenpos y-200
;-----------------------------
attr = A, NP
animtype  = Medium
damage    = var(30)
hitflag = MAFD
guardflag = H
pausetime = 0,3
sparkno = S(8200+random%2)
guard.sparkno = S8430
sparkxy = -10,0
hitsound   = S1,2
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
air.hittime = 20
ground.velocity = -7
air.velocity = -7
;fall = 1
;air.fall = 1
;fall.recover =0
kill = 0



[State 310]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0


[State 310]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 6, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 310]
type = ChangeAnim
trigger1 = Time = 40
value = 311
persistent = 0

[State 310]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 311
value = 0
ctrl = 1



;---------------------------------------------------------------------------
;Stand Strong Kick
[Statedef 320]
type    = S
movetype= A
physics = N
juggle  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 320
sprpriority = 2
facep2 = 1


[State 320]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,2

[State 320]
type = PlaySnd
trigger1 = AnimElem = 2
value = 193,0

[State 320]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype = Hard
damage    = 12*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 7,7
sparkno = S(8220+random%2)
guard.sparkno = S8430
sparkxy = -10,-90
hitsound   = S2,4
guardsound = S4,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -7
air.velocity = -7
getpower = ifelse(MoveHit,50,20),ifelse(MoveHit,50,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;persistent = 0


[State 320]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


[State 320]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 320]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


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

[State 321 1]
type = VelAdd;Gravity
trigger1 = 1
y = 0.35;GetHitVar(yaccel)

[State 321, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 321, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse(SelfAnimExist(5055),5055,5050)

[State 321, 2]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 5055
value = ifelse(SelfAnimExist(5051),5051,5050)

[State 321, 3]
type = SelfState
trigger1 = Vel Y > 2
value = 5040 ;HITA_RECOV
persistent = 0

[State 321, 4]
type = null;SelfState
;triggerall = HitFall
trigger1 = Vel Y > 1 ;Anim is over
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL

[State 321, 4]
type = null;SelfState
trigger1 = Vel Y > 0 
trigger1 = Pos Y >= 0 
value = 52 

;---------------------------------------------------------------------------
;Crouch Punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 13
ctrl = 0
anim = 400
sprpriority = 2
velset = 0,0 
facep2 = 1

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

[State 400]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA             
damage = 5*var(30),floor(var(30)/2)           
animtype = Light                 
guardflag = M                
hitflag = MAF                    
priority = 3, Hit                
pausetime = 3,3             
sparkno = S(8200+random%2)                
sparkxy = -10,-40
hitsound = S1,0        
guardsound = S4,0                
guard.sparkno = S8430
ground.type = Low               
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -2    
;ground.velocity = -1,-9     
air.velocity = -1.4                    
getpower = ifelse(MoveHit,13,7),ifelse(MoveHit,13,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 400]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
persistent = 0


[State 400]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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



;---------------------------------------------------------------------------
;Crouch Medium Punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 27
ctrl = 0
anim = 410
sprpriority = 2
velset = 0,0 
facep2 = 1



[State 410]
type = PlaySnd
trigger1 = Time = 12
value = 192,0


[State 410]
type = PlaySnd
trigger1 = Time = 17
value = 5100,4

[State 410]
type = EnvShake
trigger1 = Time = 19
time = 7


[State 410]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA             
damage = 3*var(30),floor(var(30)/2)                    
animtype = Medium                 
guardflag = M                 
hitflag = MAF                    
priority = 3, Hit                
pausetime = 7,7             
sparkno = S(8200+random%2)                   
sparkxy = -10,-90
hitsound = S1,1     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = High              
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -5    
;ground.velocity = -1,-9     
air.velocity = -4                    
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 410]
type = HitDef
trigger1 = AnimElem = 5
attr = C, NA             
damage = 5*var(30),floor(var(30)/2)                    
animtype = Medium                 
guardflag = L                 
hitflag = MAFD                    
priority = 3, Hit                
pausetime = 5,5             
sparkno = S(8210+random%2)                   
sparkxy = -10,-30
hitsound = S1,1     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = Low               
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -5    
;ground.velocity = -1,-9     
air.velocity = -4                    
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 410]
type = Projectile
trigger1 = Time%2 = 0 && Time = [17,40]
projid = 410
projanim = 6310+random%3
;projhitanim =
;projremanim = 
;projcancelanim = 
projremove = 1
projremovetime = 120
velocity = 0,7
projhits = 1
projpriority = 4
projsprpriority = 3
projedgebound = 100
projheightbound = -340,100
postype = back
offset = random%320,-screenpos y-200
;-----------------------------
attr = A, NP
animtype  = Medium
damage    = var(30)
hitflag = MAFD
guardflag = H
pausetime = 0,3
sparkno = S(8200+random%2)
guard.sparkno = S8430
sparkxy = -10,0
hitsound   = S1,2
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
air.hittime = 20
ground.velocity = -7
air.velocity = -7
;fall = 1
;air.fall = 1
;fall.recover =0
kill = 0

[State 410]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0

[State 410]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 7, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


[State 410]
type = ChangeAnim
trigger1 = Time = 40
value = 411
persistent = 0

[State 410]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 411
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Crouch Strong Punch

[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 420
sprpriority = 2
velset = 0,0
facep2 = 1

[State 420]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,2


[State 420]
type = PlaySnd
trigger1 = AnimElem = 2
value = 193,0

[State 420]
type = HitDef
trigger1 = !var(29)
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
damage    = 12*var(30),floor(var(30)/2)
animtype  = Medium
hitflag = MAF
guardflag = L
pausetime = 7,7
sparkxy = -10,-70
sparkno = S(8220+random%2)
hitsound   = S2,5
guardsound = S4,0
guard.sparkno = S8430
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,-13;-11
air.velocity = 0,-12;-10
getpower = ifelse(MoveHit,50,20),ifelse(MoveHit,50,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;fall.animtype = Hard
;p2stateno = 9020
p2stateno = 321


[State 420]
type = Explod
trigger1 = MoveHit
anim = 7025
postype = p2
ontop = 1
ownpal = 1
pos = 0,-abs(EnemyNear, const(size.mid.pos.y))
persistent = 0
facing = -1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 420]
type = varset
trigger1 = MoveHit
var(29) = 1
ignorehitpause = 1
persistent = 0


[State 420]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


[State 420]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 5, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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


;---------------------------------------------------------------------------
;Crouch Kick
[Statedef 500]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 13
ctrl = 0
anim = 500
sprpriority = 2
velset = 0,0 
facep2 = 1


[State 500]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,0


[State 500]
type = PlaySnd
trigger1 = AnimElem = 2
value = 200,0

[State 500, 1]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA             
damage = 5*var(30),floor(var(30)/2)             
animtype = Light                 
guardflag = L                 
hitflag = MFD             
priority = 3, Hit                
pausetime = 4,4             
sparkno = S(8200+random%2)                
sparkxy = 0,-10
hitsound = S1,4        
guardsound = S4,0                
guard.sparkno = S8430
ground.type = Low               
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -3    
;ground.velocity = -1,-9     
air.velocity = -1.4                    
getpower = ifelse(MoveHit,13,7),ifelse(MoveHit,13,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0

[State 500]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0


[State 500]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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

;---------------------------------------------------------------------------
;Crouch Medium Kick
[Statedef 510]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 27
ctrl = 0
anim = 510
sprpriority = 2
velset = 0,0 
facep2 = 1



[State 510]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,1

[State 510]
type = PlaySnd
trigger1 = AnimElem = 2
value = 192,0


[State 510]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
animtype = Medium
damage    = 7*var(30),floor(var(30)/2)
hitflag = MFD
guardflag = L
pausetime = 5,5
sparkno = S(8210+random%2)
guard.sparkno = S8430
sparkxy = -10,-20
hitsound   = S1,5
guardsound = S4,0
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = 0,-4
air.velocity = 0,-4
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020


[State 510]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0


[State 510]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 3, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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



;---------------------------------------------------------------------------
;Crouch Strong Kick
[Statedef 520]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 520
sprpriority = 2
facep2 = 1


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

[State 520]
type = PlaySnd
trigger1 = Time = 7
value = 193,0

[State 520]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
animtype = Hard
damage    = 12*var(30),floor(var(30)/2)
hitflag = MAF
guardflag = M
pausetime = 7,7
sparkno = S(8220+random%2)
guard.sparkno = S8430
sparkxy = -10,-70
hitsound   = S2,4
guardsound = S4,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -7
air.velocity = -7
getpower = ifelse(MoveHit,50,20),ifelse(MoveHit,50,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020


[State 520]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


[State 520]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 5, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 520]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Air Punch
[Statedef 600]
type    = A
movetype= A
physics = N
juggle  = 1
poweradd= 13
ctrl = 0
anim = 600
sprpriority = 2
;velset = 0,0
facep2 = 1


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


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

[State 600]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 5*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 5,5
sparkno = S(8200+random%2)
guard.sparkno = S8430
sparkxy = -10,-99+floor(P2Dist Y)
hitsound   = S1,0
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -3
air.velocity = 0,((vel y)-.2)
getpower = ifelse(MoveHit,13,7),ifelse(MoveHit,13,0)


[State 600]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0

[State 600]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 3, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 600, 3]
type = CtrlSet
trigger1 = Time = 24
value = 1

[State 600]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 44
y = 0.3



[State 600]
type = VelSet
trigger1 = MoveContact && Var(59)
x = (p2bodydist x)*0.03
persistent = 0


[State 600]
type = null;ChangeState
trigger1 = AnimTime = 0 && var(54)
value = 1335
ctrl = 1

[State 600]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 44
elem = 7
persistent = 0

[State 600]
type = StateTypeSet
trigger1 = Anim = 44
movetype = I
persistent = 0

[State 600]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0



;---------------------------------------------------------------------------
;Air Medium Punch
[Statedef 610]
type    = A
movetype= A
physics = N
juggle  = 1
poweradd= 27
ctrl = 0
anim = 610
sprpriority = 2
;velset = 0,0
facep2 = 1


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

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

[State 610]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Medium
damage    = 7*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 7,7
sparkno = S(8210+random%2)
guard.sparkno = S8430
sparkxy = -10,-80+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = 0,((vel y)-.2)
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)


[State 610]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0


[State 610]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 610]
type = CtrlSet
trigger1 = Time = 35
value = 1

[State 610]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 44
y = 0.3


[State 610]
type = VelSet
trigger1 = MoveContact && Var(59)
x = (p2bodydist x)*0.03
persistent = 0


[State 610]
type = null;ChangeState
triggerall = var(54)
trigger1 = AnimTime = 0
trigger2 = Anim = 44
value = 1335
ctrl = 1

[State 610]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 44
elem = 7
persistent = 0


[State 610]
type = StateTypeSet
trigger1 = Anim = 44
movetype = I
persistent = 0

[State 610]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Air Strong Punch
[Statedef 620]
type    = A
movetype= A
physics = N
juggle  = 1
poweradd= 50
ctrl = 0
anim = 620
sprpriority = 2
;velset = 0,0
facep2 = 1


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

[State 620]
type = PlaySnd
trigger1 = Time = 10
value = 193,0



[State 620]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 12*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 7,7;0,17;7,10
sparkno = S(8220+random%2)
guard.sparkno = S8430
sparkxy = -20,-80+floor(P2Dist Y)
hitsound   = S2,5
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 20
air.hittime = 25
ground.velocity = -9
air.velocity = -7,17
getpower = ifelse(MoveHit,50,20),ifelse(MoveHit,50,0)
fall = (enemynear,statetype = A)
air.fall = 1
fall.recover =0


[State 620]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0

[State 620]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 5, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 620]
type = CtrlSet
trigger1 = Time = 44
value = 1

[State 620]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 44
y = 0.3


[State 620]
type = VelSet
trigger1 = MoveContact && Var(59)
x = (p2bodydist x)*0.03
persistent = 0


[State 620]
type = null;ChangeState
triggerall = var(54)
trigger1 = AnimTime = 0
trigger2 = Anim = 44
value = 1335
ctrl = 1

[State 620]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 44
elem = 7
persistent = 0


[State 620]
type = StateTypeSet
trigger1 = Anim = 44
movetype = I
persistent = 0

[State 620]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;------------------------------------------------------------------------------------------------------------
; Stand to Air transistion
[Statedef 631]
type = A
movetype = A
physics = A
anim = 44
ctrl = 1
sprpriority = 2
;poweradd= 65
velset = (p2bodydist x)*0.03,-7
facep2 = 1


[State 631]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


[State 631]
type = null;ChangeState
trigger1 = p2bodydist x < 70
trigger1 = random < 300
value = 700
ctrl = 0



[State 631]
type = null;ChangeState
trigger1 = p2bodydist x < 55
trigger1 = random < 200
value = 710
ctrl = 0


[State 631]
type = ChangeState
trigger1 = p2bodydist x < 70
trigger1 = random < 100
value = 720
ctrl = 0


[State 631]
type = null;ChangeState
trigger1 = p2bodydist x < 70
trigger1 = random < 300
value = 600
ctrl = 0



[State 631]
type = null;ChangeState
trigger1 = p2bodydist x < 100
trigger1 = random < 200
value = 610
ctrl = 0


[State 631]
type = ChangeState
trigger1 = p2bodydist x < 70
trigger1 = random < 100
value = 620
ctrl = 0


[State 631]
type = ChangeState
trigger1 = p2bodydist x < 70
value = 720
ctrl = 0


;---------------------------------------------------------------------------
;Air Kick
[Statedef 700]
type    = A
movetype= A
physics = N
juggle  = 1
poweradd= 13
ctrl = 0
anim = 700
sprpriority = 2
;velset = 0,0
facep2 = 1

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


[State 700]
type = PlaySnd
trigger1 = Time = 7
value = 200,0

[State 700]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 5*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 5,5
sparkno = S(8200+random%2)
guard.sparkno = S8430
sparkxy = -10,-80+floor(P2Dist Y)
hitsound   = S1,4
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -3
air.velocity = 0,((vel y)-.2)
getpower = ifelse(MoveHit,13,7),ifelse(MoveHit,13,0)


[State 700]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0


[State 700]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 3, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 700]
type = CtrlSet
trigger1 = Time = 24
value = 1

[State 700]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 44
y = 0.3


[State 700]
type = VelSet
trigger1 = MoveContact && var(59)
x = (p2bodydist x)*0.03
persistent = 0



[State 700]
type = null;ChangeState
triggerall = var(54)
trigger1 = AnimTime = 0
trigger2 = Anim = 44
value = 1335
ctrl = 1

[State 700]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 44
elem = 7
persistent = 0


[State 700]
type = StateTypeSet
trigger1 = Anim = 44
movetype = I
persistent = 0

[State 700] 
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Air Medium Kick
[Statedef 710]
type    = A
movetype= A
physics = N
juggle  = 1
poweradd= 27
ctrl = 0
anim = 710
sprpriority = 2
;velset = 0,0
facep2 = 1

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


[State 710]
type = PlaySnd
trigger1 = Time = 7
value = 192,0

[State 710]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Medium
damage    = 7*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 7,7
sparkno = S(8210+random%2)
guard.sparkno = S8430
sparkxy = -10,-80+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = 0,((vel y)-.2)
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)


[State 710]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0


[State 710]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 4, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 710]
type = CtrlSet
trigger1 = Time = 31
value = 1

[State 710]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 44
y = 0.3



[State 710]
type = VelSet
trigger1 = MoveContact && var(59)
x = (p2bodydist x)*0.03
persistent = 0


[State 710]
type = null;ChangeState
triggerall = var(54)
trigger1 = AnimTime = 0
trigger2 = Anim = 44
value = 1335
ctrl = 1

[State 710]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 44
elem = 7
persistent = 0


[State 710]
type = StateTypeSet
trigger1 = Anim = 44
movetype = I
persistent = 0

[State 710]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
;Air Strong Kick
[Statedef 720]
type    = A
movetype= A
physics = N
juggle  = 1
poweradd= 50
ctrl = 0
anim = 720
sprpriority = 2
;velset = 0,0
facep2 = 1


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


[State 720]
type = PlaySnd
trigger1 = Time = 7
value = 193,0

[State 720]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 12*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 7,7;0,17;7,10
sparkno = S(8220+random%2)
guard.sparkno = S8430
sparkxy = -10,-80+floor(P2Dist Y)
hitsound   = S2,4
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9
air.velocity = -17,7
getpower = ifelse(MoveHit,50,20),ifelse(MoveHit,50,0)
fall = (enemynear,statetype = A)
air.fall = 1
fall.recover =0
;down.bounce = 1
;fall.xvelocity = -5
;fall.yvelocity = -5
;fall.recovertime = 12
;yaccel = 0.4


[State 720]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


[State 720]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 3, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 720]
type = CtrlSet
trigger1 = Time = 43
value = 1

[State 720]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 44
y = 0.3



[State 720]
type = VelSet
trigger1 = MoveContact && var(59)
x = (p2bodydist x)*0.03
persistent = 0


[State 720]
type = null;ChangeState
triggerall = var(54)
trigger1 = AnimTime = 0
trigger2 = Anim = 44
value = 1335
ctrl = 1

[State 720]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 44
elem = 7
persistent = 0


[State 720]
type = StateTypeSet
trigger1 = Anim = 44
movetype = I
persistent = 0

[State 720]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0



;---------------------------------------------------------------------------
; Ground Throw - Attempt

; Description: Throws are not difficult to make, although then can be
;     tedious at times. Throw attempt states have a HitDef of a
;     special format. The key parameters in a throw are p1stateno
;     and p2stateno. If the HitDef successfully connects, then
;     the attacker will change to the state number specified by
;     p1stateno, and the opponent will be change to the state
;     number assigned to p2stateno. The special thing about p2stateno
;     is that the opponent will be temporarily brought into the
;     attacker's state file. In this case, no matter who the
;     opponent is, he will be taken to state 820 of this file (kfm.cns)
;     and remain here until the end of the throw (look at his debug
;     information when he is being thrown; the text changes to yellow
;     to mean that he is in another player's state file).
[Statedef 800]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2



; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 800]
type = HitDef
trigger1 = hitcount < 1
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face p`
p1stateno = 810       ;On success, changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
hitsound = S1,9 
id = 800


[State 800]
type = CtrlSet
trigger1 = Time = 10
value = 1

[State 800]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Throw

[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 2

[State 810]
type = null;Turn
trigger1 = Time = 0


[State 810]
type = Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
ownpal = 1
pos = 52,-127
scale = const(size.xscale),const(size.yscale)

[State 810]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 810]
type = null;NotHitBy
trigger1 = 1
value = SCA




[State 810];Bind 1
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 52,-127


[State 810];Bind 2
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 120,-75

[State 810];Bind 3
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 99,-78

[State 810];Bind 4
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 52,-127

[State 810];Bind 5
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = 120,-75


[State 810];Bind 6
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = 99,-78


[State 810]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
value = 200,0

[State 810]
type = PlaySnd
trigger1 = AnimElem = 2, = 1
trigger2 = AnimElem = 5, = 1
value = 2,5


[State 810]
type = Explod
trigger1 = AnimElem = 2, = 1
trigger2 = AnimElem = 5, = 1
anim = 8200+random%2
pos = 120,-75
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 810]
type = TargetLifeAdd
trigger1 = AnimElem = 2, = 1
trigger2 = AnimElem = 5, = 1
value = -3*var(30)

[State 810]
type = PowerAdd
trigger1 = AnimElem = 2, = 1
trigger2 = AnimElem = 5, = 1
value = 25

[State 810]
type = TargetState
trigger1 = AnimElem = 6, = 7
value = 823

[State 810]
type = ChangeState
trigger1 = AnimElem = 6, = 7
value = 420
ctrl = 0


[State 810]
type = ChangeState
trigger1 = !NumTarget(800)
value = 0
ctrl = 1



;---------------------------------------------------------------------------
; Throw End

[Statedef 811]
type    = S
movetype= I
physics = N
;anim = 811
;poweradd = 60
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 2


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

;---------------------------------------------------------------------------
;Thrown

[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -2

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

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


[State 820]
type = null;Turn
trigger1 = facing = enemynear,facing


[State 820]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 820]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown

[Statedef 823]
type    = A
movetype= H
physics = N
velset = 0,-1
poweradd = 60

[State 823]
type = ChangeAnim2
Trigger1 = Time = 0
value = 822


[State 823] ;Gravity
type = null;VelAdd
trigger1 = 1
y = .4


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


[State 823]
type = null;ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 825


[State 823]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 823]
type = null;SelfState
trigger1 = Vel Y > 2
value = 5040

[State 823] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground



;---------------------------------------------------------------------------
;Thrown

[Statedef 824]
type    = S
movetype= H
physics = N
velset = -7,0
;poweradd = 60




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


[State 824]
type = VelSet
trigger1 = BackEdgeBodyDist < 15
trigger2 = FrontEdgeBodyDist < 15
x = 0



[State 823]
type = SelfState
trigger1 = Time = 120
value = 0
ctrl = 1

;-------------------------------------------------------------------------
;Wall Smack
[Statedef 825]
type = A
movetype = H
physics = N
;velset = 0,0


[State 825, 4]
type = ChangeAnim2
trigger1 = time = 0
trigger1 = Vel Y = 0
value = 827


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

[State 825, Spark]
type = Explod
trigger1 = Time = 0
trigger1 = Anim = 827
anim = F72
pos = -20, floor(Pos Y)
sprpriority = 3
scale = const(size.xscale),const(size.yscale)

[State 825, 5]
type = null;Turn
trigger1 = time = 0

[State 825, 6]
type = VelSet
trigger1 = time = 0
x = ifelse(Vel X < 0,3,-3)
y = -5



[State 825, 7]
type = VelAdd
trigger1 = time >= 0
y = .39


[State 825, 8]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100


;-------------------------------------------------------------------------
;Hit Ground By Throw
[Statedef 826]
type = A
movetype = H
physics = N
velset = 0,0



[State 826, Spark]
type = Explod
trigger1 = Time = 0
anim = F62
pos = 0, -30
sprpriority = 3
scale = const(size.xscale),const(size.yscale)

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

[State 826, 5]
type = null;Turn
trigger1 = time = 0

[State 826, 6]
type = VelSet
trigger1 = time = 0
x = 2.6
;y = -7



[State 826, 7]
type = VelAdd
trigger1 = time >= 0
y = .39



[State 826, 8]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100


;-------------------------------------------------------------------------
;Wall Smack
[Statedef 827]
type = A
movetype = H
physics = N
;velset = 0,0


[State 827, 4]
type = null;ChangeAnim2
trigger1 = time = 0
value = 827


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

[State 827, Spark]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor(Pos Y)
sprpriority = 3
scale = const(size.xscale),const(size.yscale)


[State 828, 5]
type = null;Turn
trigger1 = time = 0

[State 827, 6]
type = null;VelSet
trigger1 = time = 0
x = ifelse(Vel X < 0,3,-3)




[State 827, 7]
type = VelAdd
trigger1 = time >= 0
y = .39


[State 827, 8]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100



;---------------------------------------------------------------------------
; Toss - Attempt

; Description: Throws are not difficult to make, although then can be
;     tedious at times. Throw attempt states have a HitDef of a
;     special format. The key parameters in a throw are p1stateno
;     and p2stateno. If the HitDef successfully connects, then
;     the attacker will change to the state number specified by
;     p1stateno, and the opponent will be change to the state
;     number assigned to p2stateno. The special thing about p2stateno
;     is that the opponent will be temporarily brought into the
;     attacker's state file. In this case, no matter who the
;     opponent is, he will be taken to state 820 of this file (kfm.cns)
;     and remain here until the end of the throw (look at his debug
;     information when he is being thrown; the text changes to yellow
;     to mean that he is in another player's state file).
[Statedef 830]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2



; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 830]
type = HitDef
trigger1 = hitcount < 1
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face p`
p1stateno = 840       ;On success, changes to state 840
p2stateno = 850       ;If hit, p2 changes to state 820 
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
hitsound = S1,9 
id = 830


[State 830]
type = CtrlSet
trigger1 = Time = 10
value = 1

[State 830]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Toss

[Statedef 840]
type    = S
movetype= A
physics = N
anim = 840
poweradd = 60
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 2

[State 840]
type = null;Turn
trigger1 = Time = 0

[State 840]
type = Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
pos = 85,-137
scale = const(size.xscale),const(size.yscale)

[State 840]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 840]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 840]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 85,-137


[State 840]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 6,-141


[State 840]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 20,-158


[State 840]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 169,-85


[State 840]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = 149,0

[State 840]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -10*var(30)

[State 840]
type = PowerAdd
trigger1 = AnimElem = 5
value = 50


[State 840]
type = PlaySnd
trigger1 = AnimElem = 5
value = 192,0


[State 840]
type = Pause
trigger1 = AnimElem = 5
time = 4

[State 840]
type = TargetState
trigger1 = AnimElem = 6
value = 858


[State 840]
type = ChangeState
trigger1 = AnimElem = 6
value = 841


[State 840]
type = ChangeState
trigger1 = !NumTarget(830)
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Toss End

[Statedef 841]
type    = S
movetype= I
physics = N
;anim = 841
;poweradd = 60
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 2



[State 841]
type = VarAdd
trigger1 = AnimElem = 6, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

[State 841]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1



;---------------------------------------------------------------------------
;Thrown

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

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

[State 850]
type = ChangeAnim2
trigger1 = Time = 0
value = 850


[State 850]
type = null;Turn
trigger1 = facing = enemynear,facing


[State 850]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 850]
type = DestroySelf
trigger1 = ishelper

;---------------------------------------------------------------------------
;Thrown

[Statedef 853]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -2

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

[State 853]
type = ChangeAnim2
trigger1 = Time = 0
value = 853


[State 853]
type = null;Turn
trigger1 = facing = enemynear,facing


[State 853]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 853]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown

[Statedef 855]
type    = A
movetype= H
physics = N
velset = 0,9
poweradd = 60
sprpriority = 4

[State 855]
type = null;ChangeAnim2
Trigger1 = Time = 0
value = 823


[State 855] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


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


[State 855]
type = null;ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 825


[State 855]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 855]
type = null;SelfState
trigger1 = Vel Y > 2
value = 5040

[State 8575] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground
;---------------------------------------------------------------------------
;Thrown

[Statedef 857]
type    = A
movetype= H
physics = N
velset = -11,-10
poweradd = 60


[State 857]
type = ChangeAnim2
Trigger1 = Time = 0
value = 823


[State 857] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


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


[State 857]
type = null;ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 825


[State 857]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 857]
type = null;SelfState
trigger1 = Vel Y > 2
value = 5040

[State 857] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground
;---------------------------------------------------------------------------
;Thrown

[Statedef 858]
type    = A
movetype= H
physics = N
velset = 0,17
poweradd = 60


[State 858]
type = null;ChangeAnim2
Trigger1 = Time = 0
value = 823


[State 858] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


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


[State 858]
type = null;ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 825


[State 858]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 858]
type = null;SelfState
trigger1 = Vel Y > 2
value = 5040

[State 858] ;Hit ground
type = null;SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

[State 858] ;Hit ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 859 ;Hit ground

;---------------------------------------------------------------------------
;Thrown

[Statedef 859]
type    = A
movetype= H
physics = N
velset = -7,-12
;poweradd = 60


[State 859]
type = ChangeAnim2
Trigger1 = Time = 0
value = 823


[State 859] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


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


[State 859]
type = null;ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 825


[State 859]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 859]
type = null;SelfState
trigger1 = Vel Y > 2
value = 5040

[State 859] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground



;---------------------------------------------------------------------------
; Air Throw - Attempt

[Statedef 920]
type    = A
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 920
sprpriority = 2



[State 920]
type = HitDef
trigger1 = hitcount < 1
attr = A, NT          ;Attributes: Standing, Normal Throw
hitflag = A-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face p`
p1stateno = 930       ;On success, changes to state 940
p2stateno = 940       ;If hit, p2 changes to state 940 
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
hitsound = S1,9 
id = 920

[State 920]
type = CtrlSet
trigger1 = Time = 10
value = 1

[State 920]
type = ChangeAnim
trigger1 = Time = 8
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))
persistent = 0

[State 920]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = anim = [41,43]
trigger1 = SelfAnimExist(anim + 3)
value = Anim + 3
persistent = 0


[State 920]
type = VelAdd
trigger1 = Time >= 7; && !var(54)
y = 0.4


[State 920]
type = null;ChangeState
trigger1 = Time = 8 && var(54)
value = 1335
ctrl = 1

[State 920, 2]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
; Air Throw

[Statedef 930]
type    = A
movetype= A
physics = N
anim = 930
poweradd = 60
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 2

[State 930]
type = null;Turn
trigger1 = Time = 0


[State 930]
type = Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
pos = 22,-178
scale = const(size.xscale),const(size.yscale)

[State 930]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 930]
type = null;NotHitBy
trigger1 = 1
value = SCA




[State 930]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = -22,-178


[State 930]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = -8,-188

[State 930]
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 136,-123

[State 930]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 139,0


[State 930]
type = PlaySnd
trigger1 = AnimElem = 4
value = 193,0

[State 930]
type = TargetLifeAdd
trigger1 = AnimElem = 4
value = -8*var(30)

[State 930]
type = PowerAdd
trigger1 = AnimElem = 4
value = 50

[State 930]
type = TargetState
trigger1 = AnimElem = 5
value = 943

[State 930]
type = ChangeState
trigger1 = AnimElem = 5
value = 931
ctrl = 0


[State 930, State End]
type = ChangeState
trigger1 = !NumTarget(920)
value = 931
ctrl = 1



;---------------------------------------------------------------------------
; Air Throw End

[Statedef 931]
type    = A
movetype= I
physics = N
;anim = 931
;poweradd = 60
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 2


[State 931]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 44
elem = 7
persistent = 0

[State 931]
type = VelAdd
trigger1 = 1
y = 0.4

[State 931]
type = null;ChangeState
trigger1 = AnimTime = 0 && var(54)
value = 1335
ctrl = 1

[State 931]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Thrown 

[Statedef 940]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -2

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


[State 940]
type = ChangeAnim2
trigger1 = Time = 0
value = 940

[State 940]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 940]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Thrown 
[Statedef 943]
type    = A
movetype= H
physics = N
velset = -1,12
poweradd = 60



[State 943]
type = null;ChangeAnim2
trigger1 = Time = 0
value = 822


[State 943] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


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


[State 943]
type = null;SelfState
trigger1 = BackEdgeBodyDist <= 15
trigger2 = FrontEdgeBodyDist <= 15
value = 5040


[State 943]
type = null;SelfState
trigger1 = Vel Y > 2 
value = 5040

[State 943] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground


;---------------------------------------------------------------------------
; Air Toss - Attempt

[Statedef 950]
type    = A
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 920
sprpriority = 2



[State 950]
type = HitDef
trigger1 = hitcount < 1
attr = A, NT          ;Attributes: Standing, Normal Throw
hitflag = A-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face p`
p1stateno = 960       ;On success, changes to state 960
p2stateno = 970       ;If hit, p2 changes to state 970 
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
hitsound = S1,9 
id = 950

[State 950]
type = CtrlSet
trigger1 = Time = 10
value = 1

[State 950]
type = ChangeAnim
trigger1 = Time = 8
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))
persistent = 0

[State 950]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = anim = [41,43]
trigger1 = SelfAnimExist(anim + 3)
value = Anim + 3
persistent = 0


[State 950]
type = VelAdd
trigger1 = Time >= 7 && !var(54)
y = 0.4


[State 950]
type = ChangeState
trigger1 = Time = 8 && var(54)
value = 1335
ctrl = 1

[State 950, 2]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
; Air Toss

[Statedef 960]
type    = A
movetype= A
physics = N
anim = 840
poweradd = 60
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 2

[State 960]
type = null;Turn
trigger1 = Time = 0


[State 960]
type = VarSet
trigger1 = Time = 0
var(1) = 0

[State 960]
type = Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
pos = 68,-124
scale = const(size.xscale),const(size.yscale)

[State 960]
type = null;PlayerPush
trigger1 = 1
value = 0

[State 960]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 960, Bind 1]
type = TargetBind
trigger1 = AnimElemNo(0) = [1,9]
pos = 68,-124


[State 960, Bind 2]
type = TargetBind
trigger1 = AnimElemNo(0) = [10,11]
pos = 42,-112


[State 960, Bind 3]
type = TargetBind
trigger1 = AnimElemNo(0) = [12,15]
pos = 21,-88


[State 960]
type = PlaySnd
trigger1 = AnimElem = 15
value = 320,0

[State 960]
type = TargetLifeAdd
trigger1 = AnimElem = 16
value = -10*var(30)

[State 960]
type = PowerAdd
trigger1 = AnimElem = 16
value = 50


[State 960]
type = VarSet
triggerall = AnimElemNo(0) = [2,11]
trigger1 = command = "holdup"
trigger2 = var(59) && random < 200
var(1) = 1


[State 960]
type = VarSet
triggerall = AnimElemNo(0) = [2,11]
trigger1 = command = "holddown"
trigger1 = command = "holdfwd"
trigger2 = var(59) && random < 200
var(1) = 2


[State 960]
type = VarSet
triggerall = AnimElemNo(0) = [2,8]
trigger1 = command = "holddown"
trigger1 = command != "holdfwd"
trigger2 = var(59) && random < 200
var(1) = 3

[State 960]
type = ChangeAnim
trigger1 = AnimElem = 15 && var(1) = 1
value = 841
elem = 15
persistent = 0


[State 960]
type = ChangeAnim
trigger1 = AnimElem = 15 && var(1) = 2
value = 842
elem = 15
persistent = 0


[State 960]
type = TargetState
trigger1 = AnimElem = 16 && var(1) = 1
value = 857


[State 960]
type = TargetState
trigger1 = AnimElem = 16 && var(1) = 2
value = 858


[State 960]
type = TargetState
trigger1 = AnimElem = 9, = 2 && var(1) = 3
value = 853

[State 960]
type = TargetState
trigger1 = AnimElem = 16 && var(1) = 0
value = 859

[State 960]
type = ChangeState
trigger1 = AnimElem = 16 && var(1) = [0,2]
value = 841
ctrl = 0

[State 960]
type = ChangeState
trigger1 = AnimElem = 9, = 2 && var(1) = 3
value = 963


[State 960]
type = ChangeState
trigger1 = !NumTarget(950)
value = 931
ctrl = 0


;---------------------------------------------------------------------------
; Toss Down

[Statedef 963]
type    = A
movetype= A
physics = N
anim = 843
;poweradd = 60
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 2



[State 960, Bind 1]
type = TargetBind
trigger1 = AnimElemNo(0) = [1,3]
pos = 15,-128


[State 960, Bind 2]
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 6,-123


[State 960, Bind 3]
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = -17,-10


[State 960]
type = PlaySnd
trigger1 = AnimElem = 4
value = 320,0



[State 960]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -10*var(30)

[State 960]
type = PowerAdd
trigger1 = AnimElem = 5
value = 50


[State 960]
type = TargetState
trigger1 = AnimElem = 5
value = 855

[State 960]
type = ChangeState
trigger1 = AnimElem = 5
value = 931
ctrl = 0

[State 960]
type = ChangeState
trigger1 = !NumTarget(950)
value = 931
ctrl = 0


;---------------------------------------------------------------------------
;Air Toss

[Statedef 970]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -2

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

[State 970]
type = ChangeAnim2
trigger1 = Time = 0
value = 850


[State 970]
type = null;Turn
trigger1 = facing = enemynear,facing


[State 970]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050


[State 970]
type = DestroySelf
trigger1 = ishelper


;---------------------------------------------------------------------------
;Earth Quake Punch
[Statedef 1240]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = 2
facep2 = 1

[State 1240]
type = Explod
trigger1 = Time = 0
anim = 7023
scale = .5,.5
ontop = 1
ownpal = 1


[State 1240]
type = Varset
trigger1 = Time = 0
var(28) = 0

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

[State 1240]
type = PlaySnd
trigger1 = Time = 19
value = 1240,1


[State 1240]
type = PlaySnd
trigger1 = Time = 20
value = 1240,2

[State 1240]
type = EnvShake
trigger1 = Time = 19
time = 17


[State 1240]
type = Helper
trigger1 = Time = 20
stateno = 21242
id = 21242
ownpal = 1
pos = 0,0
scale = const(size.xscale),const(size.yscale)

[State 1240]
type = Helper
trigger1 = Time = 20
stateno = 21240
id = 21240
ownpal = 1
pos = 130,0
scale = const(size.xscale),const(size.yscale)

[State 1240]
type = Helper
trigger1 = Time = 32
stateno = 21240
id = 21240
ownpal = 1
pos = 130+32,0
scale = const(size.xscale),const(size.yscale)

[State 1240]
type = Helper
trigger1 = Time = 44
stateno = 21240
id = 21240
ownpal = 1
pos = 130+32+32,0
scale = const(size.xscale),const(size.yscale)

[State 1240]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA             
damage = 3*var(30),floor(var(30)/2)                    
animtype = Medium                 
guardflag = M                 
hitflag = MAF                    
priority = 3, Hit                
pausetime = 7,7             
sparkno = S(8200+random%2)                   
sparkxy = -10,-90
hitsound = S1,1     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = High              
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -7    
;ground.velocity = -1,-9     
air.velocity = -7                    
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 1240]
type = HitDef
trigger1 = AnimElem = 5
attr = C, NA             
damage = 5*var(30),floor(var(30)/2)                    
animtype = Medium                 
guardflag = L                 
hitflag = MAFD                    
priority = 3, Hit                
pausetime = 5,5             
sparkno = S(8210+random%2)                   
sparkxy = -10,-30
hitsound = S1,1     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = Low               
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -7    
;ground.velocity = -1,-9     
air.velocity = -7                    
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0

[State 1240]
type = VarAdd
trigger1 = !MoveContact && Time > 22
var(9) = 1
ignorehitpause = 1
persistent = 0


[State 1240]
type = Projectile
trigger1 = Time%3 = 0 && Time = [17,60]
projid = 1240
projanim = 6310+random%3
;projhitanim =
;projremanim = 
;projcancelanim = 
projremove = 1
projremovetime = 120
velocity = 0,7
projhits = 1
projpriority = 4
projsprpriority = 3
projedgebound = 100
projheightbound = -340,100
postype = back
offset = random%320,-screenpos y-200
;-----------------------------
attr = A, NP
animtype  = Medium
damage    = var(30)
hitflag = MAFD
guardflag = H
pausetime = 0,3
sparkno = S(8200+random%2)
guard.sparkno = S8430
sparkxy = -10,0
hitsound   = S1,2
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
air.hittime = 20
ground.velocity = -7
air.velocity = -7
;fall = 1
;air.fall = 1
;fall.recover =0
kill = 0



[State 1240]
type = ChangeAnim
trigger1 = Time = 60
value = 1241
persistent = 0


[State 1240]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 1241
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Earth Quake Punch
[Statedef 1250]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = 2
facep2 = 1

[State 1250]
type = Explod
trigger1 = Time = 0
anim = 7023
scale = .5,.5
ontop = 1
ownpal = 1


[State 1250]
type = Varset
trigger1 = Time = 0
var(28) = 0

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

[State 1250]
type = PlaySnd
trigger1 = Time = 19
value = 1240,1


[State 1250]
type = PlaySnd
trigger1 = Time = 20
value = 1240,2

[State 1250]
type = EnvShake
trigger1 = Time = 19
time = 17


[State 1250]
type = Helper
trigger1 = Time = 20
stateno = 21242
id = 21242
ownpal = 1
pos = 0,0
scale = const(size.xscale),const(size.yscale)

[State 1250]
type = Helper
trigger1 = Time = 20
stateno = 21240
id = 21240
ownpal = 1
pos = 130,0
scale = const(size.xscale),const(size.yscale)

[State 1250]
type = Helper
trigger1 = Time = 32
stateno = 21240
id = 21240
ownpal = 1
pos = 130+32,0
scale = const(size.xscale),const(size.yscale)

[State 1250]
type = Helper
trigger1 = Time = 44
stateno = 21240
id = 21240
ownpal = 1
pos = 130+32+32,0
scale = const(size.xscale),const(size.yscale)

[State 1250]
type = Helper
trigger1 = Time = 56
stateno = 21240
id = 21240
ownpal = 1
pos = 130+32+32+32,0
scale = const(size.xscale),const(size.yscale)

[State 1250]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA             
damage = 3*var(30),floor(var(30)/2)                    
animtype = Medium                 
guardflag = M                 
hitflag = MAF                    
priority = 3, Hit                
pausetime = 7,7             
sparkno = S(8200+random%2)                   
sparkxy = -10,-90
hitsound = S1,1     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = High              
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -7    
;ground.velocity = -1,-9     
air.velocity = -7                    
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 1250]
type = HitDef
trigger1 = AnimElem = 5
attr = C, NA             
damage = 5*var(30),floor(var(30)/2)                    
animtype = Medium                 
guardflag = L                 
hitflag = MAFD                    
priority = 3, Hit                
pausetime = 5,5             
sparkno = S(8210+random%2)                   
sparkxy = -10,-30
hitsound = S1,1     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = Low               
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -7    
;ground.velocity = -1,-9     
air.velocity = -7                    
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0

[State 1250]
type = VarAdd
trigger1 = !MoveContact && Time > 22
var(9) = 1
ignorehitpause = 1
persistent = 0



[State 1250]
type = Projectile
trigger1 = Time%3 = 0 && Time = [17,72]
projid = 1250
projanim = 6310+random%3
;projhitanim =
;projremanim = 
;projcancelanim = 
projremove = 1
projremovetime = 120
velocity = 0,7
projhits = 1
projpriority = 4
projsprpriority = 3
projedgebound = 100
projheightbound = -340,100
postype = back
offset = random%320,-screenpos y-200
;-----------------------------
attr = A, NP
animtype  = Medium
damage    = var(30)
hitflag = MAFD
guardflag = H
pausetime = 0,3
sparkno = S(8200+random%2)
guard.sparkno = S8430
sparkxy = -10,0
hitsound   = S1,2
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
air.hittime = 20
ground.velocity = -7
air.velocity = -7
;fall = 1
;air.fall = 1
;fall.recover =0
kill = 0

[State 1250]
type = ChangeAnim
trigger1 = Time = 72
value = 1241
persistent = 0


[State 1250]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 1241
value = 0
ctrl = 1



;---------------------------------------------------------------------------
;Earth Quake Punch
[Statedef 1260]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = 2
facep2 = 1

[State 1260]
type = Explod
trigger1 = Time = 0
anim = 7023
scale = .5,.5
ontop = 1
ownpal = 1


[State 1260]
type = Varset
trigger1 = Time = 0
var(28) = 0

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

[State 1260]
type = PlaySnd
trigger1 = Time = 19
value = 1240,1


[State 1260]
type = PlaySnd
trigger1 = Time = 20
value = 1240,2

[State 1260]
type = EnvShake
trigger1 = Time = 19
time = 17


[State 1260]
type = Helper
trigger1 = Time = 20
stateno = 21242
id = 21242
ownpal = 1
pos = 0,0
scale = const(size.xscale),const(size.yscale)

[State 1260]
type = Helper
trigger1 = Time = 20
stateno = 21240
id = 21240
ownpal = 1
pos = 130,0
scale = const(size.xscale),const(size.yscale)

[State 1260]
type = Helper
trigger1 = Time = 32
stateno = 21240
id = 21240
ownpal = 1
pos = 130+32,0
scale = const(size.xscale),const(size.yscale)

[State 1260]
type = Helper
trigger1 = Time = 44
stateno = 21240
id = 21240
ownpal = 1
pos = 130+32+32,0
scale = const(size.xscale),const(size.yscale)

[State 1260]
type = Helper
trigger1 = Time = 56
stateno = 21240
id = 21240
ownpal = 1
pos = 130+32+32+32,0
scale = const(size.xscale),const(size.yscale)

[State 1260]
type = Helper
trigger1 = Time = 68
stateno = 21240
id = 21240
ownpal = 1
pos = 130+32+32+32+32,0
scale = const(size.xscale),const(size.yscale)

[State 1260]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA             
damage = 3*var(30),floor(var(30)/2)                    
animtype = Medium                 
guardflag = M                 
hitflag = MAF                    
priority = 3, Hit                
pausetime = 7,7             
sparkno = S(8200+random%2)                   
sparkxy = -10,-90
hitsound = S1,1     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = High              
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -7    
;ground.velocity = -1,-9     
air.velocity = -7                    
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 1260]
type = HitDef
trigger1 = AnimElem = 5
attr = C, NA             
damage = 5*var(30),floor(var(30)/2)                    
animtype = Medium                 
guardflag = L                 
hitflag = MAFD                    
priority = 3, Hit                
pausetime = 5,5             
sparkno = S(8210+random%2)                   
sparkxy = -10,-30
hitsound = S1,1     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = Low               
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -7    
;ground.velocity = -1,-9     
air.velocity = -7                    
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 1260]
type = Projectile
trigger1 = Time%3 = 0 && Time = [17,84]
projid = 1260
projanim = 6310+random%3
;projhitanim =
;projremanim = 
;projcancelanim = 
projremove = 1
projremovetime = 120
velocity = 0,7
projhits = 1
projpriority = 4
projsprpriority = 3
projedgebound = 100
projheightbound = -340,100
postype = back
offset = random%320,-screenpos y-200
;-----------------------------
attr = A, NP
animtype  = Medium
damage    = var(30)
hitflag = MAFD
guardflag = H
pausetime = 0,3
sparkno = S(8200+random%2)
guard.sparkno = S8430
sparkxy = -10,0
hitsound   = S1,2
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
air.hittime = 20
ground.velocity = -7
air.velocity = -7
;fall = 1
;air.fall = 1
;fall.recover =0
kill = 0

[State 1260]
type = VarAdd
trigger1 = !MoveContact && Time > 22
var(9) = 1
ignorehitpause = 1
persistent = 0




[State 1260]
type = ChangeAnim
trigger1 = Time = 84
value = 1241
persistent = 0


[State 1260]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 1241
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Juggernaut Punch
[Statedef 1270]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
anim = 1270
sprpriority = 2
velset = 0,0
facep2 = 1


[State 1270]
type = PlaySnd
trigger1 = AnimElem = 1, = 1
value = 1270,0

[State 1270]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1240,1


[State 12670]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1240,2

[State 1270]
type = EnvShake
trigger1 = AnimElem = 7
time = 17

[State 1270]
type = Helper
trigger1 = AnimElem = 5
stateno = 21270
id = 21270
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1270]
type = Helper
trigger1 = AnimElem = 7
stateno = 21271
id = 21271
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1270]
type = Helper
trigger1 = AnimElem = 7
stateno = 21272
id = 21272
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1270]
type = HitDef
trigger1 = AnimElem = 6
attr = S, SA
animtype  = Medium
damage    = 7*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 7,7
sparkno = S(8210+random%2)
guard.sparkno = S8430
sparkxy = -10,-80+floor(P2Dist Y)
hitsound   = S1,7
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -30,-11
air.velocity = -30,-11
getpower = 50,20
p2stateno = 9020

[State 1270]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype  = Medium
damage    = 7*var(30),floor(var(30)/2)
hitflag = MAFD
guardflag = M
pausetime = 7,7
sparkno = S(8210+random%2)
guard.sparkno = S8430
sparkxy = -10,-10
hitsound   = S1,7
guardsound = S4,0
ground.type = Low
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -30,-11
air.velocity = -30,-11
getpower = 50,20
p2stateno = 9020


[State 1270]
type = ChangeState
trigger1 = Time = 50
value = 1271

;---------------------------------------------------------------------------
;Juggernaut Punch End
[Statedef 1271]
type    = S
movetype= I
physics = N
juggle  = 3
;poweradd= 50
ctrl = 0
anim = 1271
sprpriority = 2
velset = 0,0
facep2 = 1


[State 1271]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Juggernaut Punch
[Statedef 1280]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
anim = 1270
sprpriority = 2
velset = 0,0
facep2 = 1


[State 1280]
type = PosAdd
trigger1 = AnimElemNo(0) = 5
x = 7

[State 1280]
type = PlaySnd
trigger1 = AnimElem = 1, = 1
value = 1270,0

[State 1280]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1240,1


[State 12670]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1240,2

[State 1280]
type = EnvShake
trigger1 = AnimElem = 7
time = 17

[State 1280]
type = Helper
trigger1 = AnimElem = 7
stateno = 21270
id = 21270
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1280]
type = Helper
trigger1 = AnimElem = 7
stateno = 21271
id = 21271
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1280]
type = Helper
trigger1 = AnimElem = 7
stateno = 21272
id = 21272
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1280]
type = HitDef
trigger1 = AnimElem = 6
attr = S, SA
animtype  = Medium
damage    = 8*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 7,7
sparkno = S(8210+random%2)
guard.sparkno = S8430
sparkxy = -10,-80+floor(P2Dist Y)
hitsound   = S1,7
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -30,-11
air.velocity = -30,-11
getpower = 50,20
p2stateno = 9020


[State 1280]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype  = Medium
damage    = 8*var(30),floor(var(30)/2)
hitflag = MAFD
guardflag = M
pausetime = 7,7
sparkno = S(8210+random%2)
guard.sparkno = S8430
sparkxy = -10,-10
hitsound   = S1,7
guardsound = S4,0
ground.type = Low
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -30,-11
air.velocity = -30,-11
getpower = 50,20
p2stateno = 9020


[State 1280]
type = ChangeState
trigger1 = Time = 50
value = 1271

;---------------------------------------------------------------------------
;Juggernaut Punch
[Statedef 1290]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
anim = 1290
sprpriority = 2
velset = 0,0
facep2 = 1


[State 1290]
type = PosAdd
trigger1 = AnimElemNo(0) = 5
x = 7

[State 1290]
type = PlaySnd
trigger1 = AnimElem = 1, = 1
value = 1270,0

[State 1290]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1240,1


[State 12670]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1240,2

[State 1290]
type = EnvShake
trigger1 = AnimElem = 7
time = 17

[State 1290]
type = Helper
trigger1 = AnimElem = 7
stateno = 21270
id = 21270
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1290]
type = Helper
trigger1 = AnimElem = 7
stateno = 21271
id = 21271
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1290]
type = Helper
trigger1 = AnimElem = 7
stateno = 21272
id = 21272
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1290]
type = HitDef
trigger1 = AnimElem = 6
attr = S, SA
animtype  = Medium
damage    = 8*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 7,7
sparkno = S(8210+random%2)
guard.sparkno = S8430
sparkxy = -10,-80+floor(P2Dist Y)
hitsound   = S1,7
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -30,-11
air.velocity = -30,-11
getpower = 50,20
p2stateno = 9020


[State 1290]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype  = Medium
damage    = 8*var(30),floor(var(30)/2)
hitflag = MAFD
guardflag = M
pausetime = 7,7
sparkno = S(8210+random%2)
guard.sparkno = S8430
sparkxy = -10,-10
hitsound   = S1,7
guardsound = S4,0
ground.type = Low
air.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -30,-11
air.velocity = -30,-11
getpower = 50,20
p2stateno = 9020


[State 1290]
type = ChangeState
trigger1 = Time = 50
value = 1271

;---------------------------------------------------------------------------
;Force Field
[Statedef 1300]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1300
sprpriority = 2
facep2 = 1

[State 1300]
type = Explod
trigger1 = Time = 0
anim = 7023
scale = .5,.5
ontop = 1
ownpal = 1



[State 1300]
type = PlaySnd
trigger1 = Time = 3
value = 1300,0


[State 1300]
type = PlaySnd
trigger1 = Time = 10
value = 1300,1


[State 1305]
type = Helper
trigger1 = Time = 7
stateno = 21301
id = 21301
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1300]
type = ReversalDef
trigger1 = (!var(59) && command = "holda") || (var(59) && random < 500)
trigger1 = hitcount < 1
reversal.attr = SCA,NA,SA
pausetime = 7,10
sparkno = -1
p1stateno = 1305
hitsound = -1
id = 1300


[State 1300]
type = ReversalDef
trigger1 = (!var(59) && command = "holdc") || (var(59))
trigger1 = hitcount < 1
reversal.attr = SCA,NA,SA
pausetime = 7,10
sparkno = -1
p1stateno = 1305
hitsound = -1
id = 1300

[State 1300]
type = ChangeAnim
trigger1 = Time = 60
value = 1301
persistent = 0


[State 1300]
type = Helper
trigger1 = Anim = 1301
trigger1 = NumHelper(6000) = 0
stateno = 6000
id = 6000
scale = const(size.xscale),const(size.yscale)

[State 1300]
type = ChangeState
trigger1 = AnimTime = 0 && Anim = 1301
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Force Field
[Statedef 1305]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1305
sprpriority = 2
facep2 = 1

[State 1305]
type = Helper
trigger1 = Time = 0
stateno = 21300
id = 21300
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1305]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Flight
[Statedef 1330]
type    = A
movetype= I
physics = N
juggle  = 3
poweradd= 20
ctrl = 0
velset = 0,-4
anim = 1330
sprpriority = 2



[State 1330]
type = VarSet
trigger1 = Time = 0
var(54) = 1

[State 1330]
type = ChangeState
trigger1 = AnimTime = 0 && var(54) >= 1
value = 1335
ctrl = 0


;---------------------------------------------------------------------------
;Flight Cancel
[Statedef 1331]
type    = A
movetype= I
physics = N
juggle  = 3
poweradd= 20
ctrl = 0
velset = 0,0
;anim = 44
sprpriority = 2


[State 1331]
type = ChangeAnim
trigger1 = Time = 0
value = 44
elem = 9


[State 1331]
type = VarSet
trigger1 = Time = 0
var(54) = 0


[State 1331]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.35



[State 1331]
type = CtrlSet
trigger1 = Time = 1
value = 1


[State 1331]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Flight End
[Statedef 1332]
type    = A
movetype= I
physics = A
juggle  = 3
;poweradd= 40
ctrl = 1
velset = 0,0
;anim = 1332
sprpriority = 2

[State 1332]
type = ChangeAnim
trigger1 = Time = 0
value = 44
elem = 9

[State 1332]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Flight after S Jump
[Statedef 1333]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

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

[State 1333]
type = Explod
trigger1 = Time = 1
anim = 7055
scale = const(size.xscale),const(size.yscale)

[State 1333]
type = Explod
trigger1 = Time = 1
anim = 7055
facing = -1
scale = const(size.xscale),const(size.yscale)

[State 1333]
type = Explod
trigger1 = Time = 1
anim = 7022
sprpriority = 4
scale = const(size.xscale),const(size.yscale)

[State 1333, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 1333, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 1333, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 1333, 4]
type = null;VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y) - 3

[State 1333, 4]
type = null;VelSet
trigger1 = AnimTime = 0
x = (P2Dist X)*0.07
y = (P2Dist Y)*0.07

[State 1333, 5]
type = null;VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 1333, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 1334
ctrl = 0


;---------------------------------------------------------------------------
; Super Jump Up
[Statedef 1334]
type    = A
physics = N


[State 1334, 4]
type = null;VelSet
trigger1 = 1;Time = 0
y = -11


[State 1334, 4]
type = VelSet
trigger1 = Time = 0
y = -15;-13

[State 1334, 4]
type = VelAdd
trigger1 = 1
y = 0.35;0.4



[State 1334]
type = veladd
triggerall = vel x <= 4
trigger1 = var(59)
trigger1 = p2bodydist x >= 0
persistent = 4
x = .9


[State 1334]
type = veladd
triggerall = vel x >= -4
trigger1 = var(59) 
trigger1 = p2bodydist x <= 0
persistent = 4
x = -.9


[State 1334,4]
type = null;VelAdd
triggerall = command = "holdfwd"
trigger1 = sysvar(1) = 1
trigger1 = vel X <=4
trigger2 = sysvar(1) = -1
trigger2 = Vel X <= -.4
x = .2

[State 1334,5]
type = null;VelAdd
triggerall = command = "holdback"
trigger1 = sysvar(1) = -1
trigger1 = Vel X >= -4
trigger2 = sysvar(1) = 1
trigger2 = Vel X >= .4
x = -.2

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


[State 1334]
type = Explod
trigger1 = Time%4 = 0
trigger1 = Time >= 4
trigger1 = Vel Y < 0
anim = 7056
pos = 0,0
random = 50,0
ontop = 1
scale = const(size.xscale),const(size.yscale)

[State 1334]
type = Explod
trigger1 = Time%2 = 0
trigger1 = Time >= 12
trigger1 = Vel Y < 0
anim = 7057+random%3
pos = 0,0
random = 60,0
ontop = 1
scale = const(size.xscale),const(size.yscale)

[State 1334, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 1334, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 1334]
type = turn
trigger1 = p2dist x < -5


[State 1334]
type = ChangeState
trigger1 = Vel Y > -1
value = 1330

;---------------------------------------------------------------------------
; Flight
[Statedef 1335]
type    = A
physics = N
anim = 0
velset = 0,0
movetype= I
sprpriority = 2
ctrl = 1



[State ]
type = Helper
trigger1 = NumHelper(6000) = 0
trigger1 = Anim = 0
stateno = 6000
id = 6000
scale = const(size.xscale),const(size.yscale)


[State 1335]
type = Turn
trigger1 = FrontEdgeDist < 15
trigger2 = enemy(0),facing = facing
trigger2 = Time%4 = 0


[State 1335]
type = PosAdd
trigger1 = Pos Y > -10
y = -4

[State 1335]
type = VarSet
trigger1 = 1
sysvar(1) = 0


[State 1335]
type = VarSet
trigger1 = Time = 0
var(1) = 0

[State 1335]
type = null;ChangeAnim
trigger1 = Anim = [41,43]
persistent = 0
value = Anim + 3

[State 1335]
type = VarSet
trigger1 = p2bodydist x != 0
var(1) = ifelse((p2bodydist y/p2bodydist x = [0.4,0.8]),1,0)


[State 1335]
type = ChangeState
trigger1 = var(59) 
trigger1 = !var(1)
trigger1 = p2bodydist x > 200
value = 1340


[State 1335]
type = ChangeState
trigger1 = var(59) 
trigger1 = !var(1)
trigger1 = p2bodydist x < 70
value = ifelse(BackEdgeDist > 70,1345,1340)

[State 1335]
type = ChangeState
trigger1 = var(59) 
trigger1 = !var(1)
trigger1 = p2bodydist y < 170;240
value = 1342


[State 1335]
type = ChangeState
trigger1 = var(59) 
trigger1 = !var(1)
trigger1 = p2bodydist y > 340;480
value = 1344

[State 1335]
type = VarSet
trigger1 = command = "holdfwd"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger2 = var(59) 
trigger2 = !var(1)
trigger2 = p2bodydist x > 200
sysvar(1) = 1


[State 1335]
type = VarSet
trigger1 = command = "holdback"
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger2 = var(59) 
trigger2 = !var(1)
trigger2 = p2bodydist x < 70
sysvar(1) = -1


[State 1335, 3]
type = VarSet
trigger1 = command = "holdfwd"
trigger1 = command = "holdup"
sysvar(1) = 2


[State 1335, 3]
type = VarSet
trigger1 = command = "holdback"
trigger1 = command = "holdup"
sysvar(1) = -2



[State 1335, 3]
type = VarSet
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger1 = command = "holdup"
trigger2 = var(59)
trigger2 = !var(1)
trigger2 = p2bodydist y < 170
sysvar(1) = 3

[State 1335, 3]
type = VarSet
trigger1 = command = "holddown"
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
trigger2 = var(59)
trigger2 = !var(1)
trigger2 = p2bodydist y > 340
sysvar(1) = -3



[State 1335, 3]
type = VarSet
trigger1 = command = "holdfwd"
trigger1 = command = "holddown"
sysvar(1) = 4

[State 1335, 3]
type = VarSet
trigger1 = command = "holddown"
trigger1 = command = "holdback"
sysvar(1) = -4

[State 1335, 3]
type = null;ChangeAnim
trigger1 = anim != 103
value = 103
persistent = 0

[State 1335, 3]
type = null;ChangeAnim
triggerall = anim != 102
trigger1 = sysvar(1) = 0
value = 102
persistent = 0

[State 1335]
type = null;ChangeAnim
triggerall = anim != 101
trigger1 = sysvar(1) = 1
trigger2 = sysvar(1) = 2
value = 101
persistent = 0


[State 1335]
type = VarSet
trigger1 = command = "x" && command = "y"
var(1) = 4

[State 1335]
type = ChangeAnim
triggerall = anim != 20
trigger1 = sysvar(1) = 1
value = 20

[State 1335]
type = ChangeAnim
triggerall = anim != 21
trigger1 = sysvar(1) = -1
value = 21


[State 1335]
type = ChangeAnim
triggerall = anim != 1337
trigger1 = sysvar(1) = 2
value = 1337

[State 1335]
type = ChangeAnim
triggerall = anim != 1338
trigger1 = sysvar(1) = -2
value = 1338


[State 1335]
type = ChangeAnim
triggerall = anim != 1336
trigger1 = sysvar(1) = 3
value = 1336


[State 1335]
type = ChangeAnim
triggerall = anim != 1335
trigger1 = sysvar(1) = -3
value = 1335


[State 1335]
type = ChangeAnim
triggerall = anim != 1334
trigger1 = sysvar(1) = 4
value = 1334

[State 1335]
type = ChangeAnim
triggerall = anim != 1339
trigger1 = sysvar(1) = -4
value = 1339


[State 1335]
type = VelSet
trigger1 = sysvar(1) = 0
y = 0
x = 0

[State 1335]
type = VelSet
trigger1 = sysvar(1) = 1
x = const(velocity.walk.fwd.x)
y = 0

[State 1335]
type = VelSet
trigger1 = sysvar(1) = -1
x = const(velocity.walk.back.x)
y = 0

[State 1335]
type = VelSet
trigger1 = sysvar(1) = 2
x = 4
y = -5+5*(ScreenPos Y < 120)



[State 1335]
type = VelSet
trigger1 = sysvar(1) = -2
x = -4
y = -5+5*(ScreenPos Y < 120)




[State 1335]
type = VelSet
trigger1 = sysvar(1) = 3
y = -5+5*(ScreenPos Y < 120)
x = 0


[State 1335]
type = VelSet
trigger1 = sysvar(1) = -3
y = 5-5*(Pos Y > -20)
x = 0


[State 1335]
type = VelSet
trigger1 = sysvar(1) = 4
y = 5-5*(Pos Y > -20)
x = 4


[State 1335]
type = VelSet
trigger1 = sysvar(1) = -4
y = 5-5*(Pos Y > -20)
x = -4


[State 1335]
type = VarSet
trigger1 = Time = 0
var(6) = 0


[State 1335]
type = null;PlaySnd
trigger1 = sysvar(1) != 0
trigger1 = var(6) != sysvar(1)
value = 100,5


[State 1335]
type = null;VarSet
trigger1 = sysvar(1) != 0
trigger1 = var(6) != sysvar(1)
var(6) = sysvar(1)


[State 1335]
type = ChangeAnim
triggerall = anim != 0
trigger1 = sysvar(1) = 0
value = 0

[State 1335]
type = ChangeState
trigger1 = var(54) = 0
value = 1331
ctrl = 0




;----------------------------------------------------------
; Air Dash Forward
[Statedef 1340]
type    = A
physics = N
anim = 100
sprpriority = 2
velset = 0,0


[State 1340]
type = PlaySnd
trigger1 = AnimElem = 3
value = 100,6


[State 1340]
type = VelSet
trigger1 = AnimElemNo(0) = [2,6]
x = 9


[State 1340] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1340]
type = CtrlSet
trigger1 = Time = 4
value = 1


[State 1340]
type = ChangeState
trigger1 = AnimTime = 0 && var(54)
value = 1335
ctrl = 1

[State 1340]
type = ChangeState
trigger1 = AnimTime = 0 && !var(54)
value = 1332
ctrl = 1


;----------------------------------------------------------
; Air Dash Forward Up
[Statedef 1341]
type    = A
physics = N
anim = 1337
sprpriority = 2
velset = 0,0


[State 1341]
type = PlaySnd
trigger1 = Time = 2
value = 100,6


[State 1341]
type = VelSet
trigger1 = 1
x = 7
y = -14

[State 1341] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1341]
type = CtrlSet
trigger1 = Time = 4
value = 1


[State 1341]
type = ChangeState
trigger1 = Time = 17 && var(54)
value = 1335
ctrl = 1

[State 1341]
type = ChangeState
trigger1 = Time = 17 && !var(54)
value = 1332
ctrl = 1



;----------------------------------------------------------
; Air Dash Up
[Statedef 1342]
type    = A
physics = N
anim = 1336
sprpriority = 2
velset = 0,0


[State 1342]
type = null;ChangeAnim
trigger1 = Time = 0
value = 41
elem = 2


[State 1342]
type = PlaySnd
trigger1 = Time = 3
value = 100,6


[State 1342]
type = VelSet
trigger1 = 1
x = 0
y = -12


[State 1342]
type = VelSet
trigger1 = ScreenPos Y < 120
x = 0
y = 0

[State 1342] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1342]
type = CtrlSet
trigger1 = Time = 4
value = 1


[State 1342]
type = ChangeState
trigger1 = Time = 17 && var(54)
value = 1335
ctrl = 1

[State 1342]
type = ChangeState
trigger1 = Time = 17 && !var(54)
value = 1332
ctrl = 1



;----------------------------------------------------------
; Air Dash Forward Down
[Statedef 1343]
type    = A
physics = N
anim = 1334
sprpriority = 2
velset = 0,0


[State 1343]
type = PlaySnd
trigger1 = Time = 3
value = 100,6


[State 1343]
type = VelSet
trigger1 = 1
x = 7
y = 14

[State 1343] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1343]
type = CtrlSet
trigger1 = Time = 4
value = 1


[State 1343]
type = ChangeState
trigger1 = (Time = 17 || Pos Y >= 0) && var(54)
value = 1335
ctrl = 1

[State 1343]
type = ChangeState
trigger1 = (Time = 17 || Pos Y >= 0) && !var(54)
value = 1332
ctrl = 1


;----------------------------------------------------------
; Air Dash Down
[Statedef 1344]
type    = A
physics = N
anim = 1335
sprpriority = 2
velset = 0,0



[State 1344]
type = PlaySnd
trigger1 = Time = 3
value = 100,6


[State 1344]
type = VelSet
trigger1 = 1
x = 0
y = 12


[State 1344] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1344]
type = CtrlSet
trigger1 = Time = 4
value = 1


[State 1344]
type = ChangeState
trigger1 = (Time = 17 || Pos Y >= 0) && var(54)
value = 1335
ctrl = 1

[State 1344]
type = ChangeState
trigger1 = (Time = 17 || Pos Y >= 0) && !var(54)
value = 1332
ctrl = 1



;---------------------------------------------------------------------------
; Air Dash Back
[Statedef 1345]
type    = A
physics = N
ctrl = 0
anim = 105
sprpriority = 2


[State 1345]
type = PlaySnd
trigger1 = Time = 3
value = 100,7

[State 1345]
type = VelSet
trigger1 = AnimElemNo(0) = [2,7]
x = -10


[State 1345] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1345]
type = CtrlSet
trigger1 = Time = 4
value = 1



[State 1345]
type = ChangeState
trigger1 = Time = 17 && var(54)
value = 1335
ctrl = 1

[State 1345]
type = ChangeState
trigger1 = Time = 17 && !var(54)
value = 1332
ctrl = 1


;---------------------------------------------------------------------------
; Air Dash Back Up
[Statedef 1346]
type    = A
physics = N
ctrl = 0
anim = 1338
sprpriority = 2


[State 1346]
type = PlaySnd
trigger1 = Time = 3
value = 100,7

[State 1346]
type = VelSet
trigger1 = 1
x = -7
y = -14


[State 1346] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1346]
type = CtrlSet
trigger1 = Time = 4
value = 1



[State 1346]
type = ChangeState
trigger1 = Time = 17 && var(54)
value = 1335
ctrl = 1

[State 1346]
type = ChangeState
trigger1 = Time = 17 && !var(54)
value = 1332
ctrl = 1


;---------------------------------------------------------------------------
; Air Dash Back Down
[Statedef 1347]
type    = A
physics = N
ctrl = 0
anim = 1339
sprpriority = 2

[State 1347]
type = PlaySnd
trigger1 = Time = 3
value = 100,7

[State 1347]
type = VelSet
trigger1 = 1
x = -7
y = 14


[State 1347] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 1347]
type = CtrlSet
trigger1 = Time = 4
value = 1


[State 1347]
type = ChangeState
trigger1 = (Time = 17 || Pos Y >= 0) && var(54)
value = 1335
ctrl = 1

[State 1347]
type = ChangeState
trigger1 = (Time = 17  || Pos Y >= 0) && !var(54)
value = 1332
ctrl = 1

;---------------------------------------------------------------------------
;Body Press
[Statedef 1360]
type    = A
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1360
sprpriority = 2
facep2 = 1

[State 1360]
type = Explod
trigger1 = Time = 0
anim = 7023
scale = .5,.5
ontop = 1
ownpal = 1



[State 1360]
type = PlaySnd
trigger1 = Time = 4
value = 193,0

[State 1360]
type = VelSet
trigger1 = Time = 0
x = 1
y = -12


[State 1360]
type = VelAdd
trigger1 = 1
y = 0.4

[State 1260]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, SA             
damage = 12*var(30),floor(var(30)/2)                    
animtype = Medium                 
guardflag = MA                 
hitflag = MAFD                    
priority = 3, Hit                
pausetime = 7,7             
sparkno = S(8200+random%2)                   
sparkxy = -10,-90+floor(P2Dist Y)
hitsound = S2,5     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = High              
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -9    
;ground.velocity = -1,-9     
air.velocity = -9                    
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 1360]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Body Press
[Statedef 1370]
type    = A
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1360
sprpriority = 2
facep2 = 1

[State 1370]
type = Explod
trigger1 = Time = 0
anim = 7023
scale = .5,.5
ontop = 1
ownpal = 1



[State 1370]
type = PlaySnd
trigger1 = Time = 4
value = 193,0

[State 1370]
type = VelSet
trigger1 = Time = 0
x = 3
y = -12


[State 1370]
type = VelAdd
trigger1 = 1
y = 0.4

[State 1260]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, SA             
damage = 13*var(30),floor(var(30)/2)                    
animtype = Medium                 
guardflag = MA                 
hitflag = MAFD                    
priority = 3, Hit                
pausetime = 7,7             
sparkno = S(8200+random%2)                   
sparkxy = -10,-90+floor(P2Dist Y)
hitsound = S2,5     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = High              
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -9    
;ground.velocity = -1,-9     
air.velocity = -9                    
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 1370]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
;Body Press
[Statedef 1380]
type    = A
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1360
sprpriority = 2
facep2 = 1

[State 1380]
type = Explod
trigger1 = Time = 0
anim = 7023
scale = .5,.5
ontop = 1
ownpal = 1



[State 1380]
type = PlaySnd
trigger1 = Time = 4
value = 193,0


[State 1380]
type = VelSet
trigger1 = Time = 0
x = 5
y = -12


[State 1380]
type = VelAdd
trigger1 = 1
y = 0.4

[State 1260]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, SA             
damage = 15*var(30),floor(var(30)/2)                    
animtype = Medium                 
guardflag = MA                 
hitflag = MAFD                    
priority = 3, Hit                
pausetime = 7,7             
sparkno = S(8200+random%2)                   
sparkxy = -10,-90+floor(P2Dist Y)
hitsound = S2,5     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = High              
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -9    
;ground.velocity = -1,-9     
air.velocity = -9                    
getpower = ifelse(MoveHit,27,14),ifelse(MoveHit,27,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0


[State 1380]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0



;---------------------------------------------------------------------------
;Power Up
[Statedef 1400]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 100
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 2
facep2 = 1

[State 1400]
type = Explod
trigger1 = Time = 0
anim = 7023
scale = .5,.5
ontop = 1
ownpal = 1


[State 1400]
type = PlaySnd
trigger1 = Time = 1
value = 1400


[State 1400]
type = VarSet
trigger1 = Time = 1
var(50) = 1

[State -2]
type = PalFx
trigger1 = Time = 1
time = 50
;add = 255,63,-255
add = 64,0,0
sinadd = 64,0,0,30

[State 1400]
type = ChangeState
trigger1 = Time = 50
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Get Beam
[Statedef 1450]
type    = S
movetype= I
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1450
sprpriority = 2
facep2 = 1


[State 1450]
type = PosSet
trigger1 = Time = 0
trigger1 = NumHelper(21480)
x = Helper(21480),Pos X

[State 1450]
type = PlaySnd
trigger1 = AnimElem = 3 || AnimElem = 4
value = 1450


[State 1450]
type = VarSet
trigger1 = Time = 7
var(39) = 1

[State 1450]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Beam Atk
[Statedef 1470]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1470
sprpriority = 2
facep2 = 1


[State 1470]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, SA             
damage = 20*var(30),floor(var(30)/2)                    
animtype = Hard              
guardflag = MA                 
hitflag = MAF                 
priority = 5, Hit                
pausetime = 7,7             
sparkno = S(8200+random%2)                   
sparkxy = -10,-90+floor(P2Dist Y)
hitsound = S2,5     
guardsound = S4,0                
guard.sparkno = S8430
ground.type = High              
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -9    
;ground.velocity = -1,-9     
air.velocity = -9                    
getpower = ifelse(MoveHit,50,20),ifelse(MoveHit,50,0)
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
sprpriority = 3

[State 1470]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Beam Throw
[Statedef 1480]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1464
sprpriority = 2
facep2 = 1


[State 1480]
type = Helper
trigger1 = AnimElem = 3
stateno = 21485
id = 21485
ownpal = 1
pos = 171,-88
scale = const(size.xscale),const(size.yscale)

[State 1480]
type = VarSet
trigger1 = NumHelper(21485)
var(39) = 2
persistent = 0

[State 1480]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Beam Drop
[Statedef 1490]
type    = S
movetype= I
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1463
sprpriority = 2
facep2 = 1


[State 1490]
type = Helper
trigger1 = AnimElem = 2
stateno = 21490
id = 21490
ownpal = 1
pos = 90,-71
scale = const(size.xscale),const(size.yscale)

[State 1490]
type = VarSet
trigger1 = NumHelper(21490)
var(39) = 2
persistent = 0

[State 1490]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Head Crush

[Statedef 3000]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3000
poweradd= 150
ctrl = 0
sprpriority = 2
facep2 = 1


[State 3000]
type = Explod
trigger1 = AnimElem = 1 && StateType != A
anim = 7023
scale = .5,.5
ontop = 1
ownpal = 1

[State 3000]
type = SuperPause
trigger1 = Time = 4
anim = -1;S32701
sound = -1;S3000,3
poweradd = -1000
time = 60
movetime = 60
unhittable = 1
darken = 0


;about 8 ticks before 3110
[State 3000]
type = Helper
trigger1 = Time = 5
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
size.xscale = .5
size.yscale = .5

[State 3000]
type = Helper
trigger1 = Time = 13
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = -26,-119
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 3000]
type = null;NotHitBy
trigger1 = AnimElem = 4, >= 0
value = SCA


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


[State 3000]
type = PlaySnd
trigger1 = Time = 13
value = 3000,1


[State 3000]
type = ChangeState
trigger1 = Time = 64
value = 3001
ctrl = 0


;---------------------------------------------------------------------------
;Head Crush
[Statedef 3001]
type    = S
movetype= A
physics = N
juggle  = 2
;poweradd=
velset = 0,0
anim = 3001
ctrl = 0
sprpriority = 2
facep2 = 1


[State 3001]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 3001]
type = null;PlayerPush
trigger1 = 1
value = 0

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


[State 3001]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 3001]
type = Helper
trigger1 = Time = 0
stateno = 23001
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 3001]
type = Helper
trigger1 = Time = 0
stateno = 23002
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 3001]
type = NotHitBy
trigger1 = 1
value = SCA



[State 3001]
type = VelSet
trigger1 = Time = 1
x = 7


[State 3001]
type = VelAdd
trigger1 = Time >= 1
x = 0.3


[State 3001]
type = null;VelSet
trigger1 = FrontEdgeDist < 50
trigger2 = Time >= 50
x = 0

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


[State 3001]
type = PlaySnd
trigger1 = Time = 1
value = 1240,1


[State 3001]
type = EnvShake
trigger1 = Time%12 = 0
time = 4
amp = 4


[State 3001]
type = HitDef
attr = S, HA
triggerall = Anim = 3001
trigger1 = hitcount < 7
trigger1 = moveguarded < 1
damage = 5*(var(30)),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
hitflag = MAFD
pausetime = 4,7
sparkxy = -10,-70
hitsound   = S2,4
guardsound = S4,0
sparkno = S(8220+random%2)
guard.sparkno = S8430
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -7
air.velocity = -7
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = ifelse(MoveHit,20,10),ifelse(MoveHit,20,0)
sprpriority = 3
envshake.time = 8
envshake.freq = 60
envshake.ampl = -4
envshake.phase = 0


[State 3001]
type = Varset
trigger1 = time = 0
var(0) = 7

[State 3001]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 3001]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded

[State 3001]
type = ChangeState
trigger1 = FrontEdgeDist < 5
trigger2 = Time >= 50
trigger3 = hitcount >= 7;var(1)
value = 3002
persistent = 0


;---------------------------------------------------------------------------
;Head Crush
[Statedef 3002]
type    = S
movetype= A
physics = N
juggle  = 2
;poweradd=
velset = 0,0
anim = 3002
ctrl = 0
sprpriority = 2
;facep2 = 1


[State 3001]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 3001]
type = null;PlayerPush
trigger1 = 1
value = 0

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


[State 3001]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 3001]
type = VelSet
trigger1 = Time = 0
x = 7


[State 3002]
type = VelAdd
trigger1 = Time >= 1
x = 0.3

[State 3001]
type = VelSet
trigger1 = Time = 10
trigger2 = FrontEdgeDist < 5
x = 0


[State 3002]
type = PlaySnd
trigger1 = Time = 1
value = 1240,1
persistent = 0

[State 3002]
type = PlaySnd
trigger1 = Time = 1
value = 1240,2
persistent = 0

[State 3002]
type = EnvShake
trigger1 = Time = 1
time = 12
amp = 8
persistent = 0

[State 3002]
type = EnvShake
trigger1 = Time%12 = 0
time = 4
amp = 4


[State 3002]
type = HitDef
attr = S, HA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 15*(var(30)),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
hitflag = MAFD
pausetime = 3,7
sparkxy = -10,-70
hitsound   = S2,5
guardsound = S4,0
sparkno = S(8220+random%2)
guard.sparkno = S8430
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 7,-15
air.velocity = 7,-15
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = ifelse(MoveHit,20,10),ifelse(MoveHit,20,0)
sprpriority = 3
envshake.time = 8
envshake.freq = 60
envshake.ampl = -4
envshake.phase = 0

[State 3002]
type = ChangeState
trigger1 = AnimTime = 0
value = 3003
ctrl = 0

;---------------------------------------------------------------------------
;Head Crush End
[Statedef 3003]
type    = S
movetype= I
physics = N
juggle  = 2
;poweradd=
velset = 0,0
anim = 3003
ctrl = 0
sprpriority = 2



[State 3003]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1



;---------------------------------------------------------------------------
;Magnetic Shield
[Statedef 4121]
type    = U
movetype= A
physics = N
juggle  = 2
;poweradd=
velset = 0,0
;anim = 4121
ctrl = 0
sprpriority = 2
facep2 = 1


[State 4121]
type = null;NotHitBy
trigger1 = 1
value = SCA


[State 4121]
type = null;PlayerPush
trigger1 = 1
value = 0

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


[State 4121]
type = null;AssertSpecial
trigger1 = 1
flag = nobg
flag1 = nofg

[State 4121]
type = null;Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 4121]
type = Varset
trigger1 = Time = 0
var(57) = 1

[State 4121]
type = Helper
trigger1 = Time = 0
stateno = 24120
id = 24120
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 4121]
type = PalFx
trigger1 = Time = [1,20]
time = 8
add = 64,32,64
sinadd = 64,32,64,30


[State 4121]
type = PlaySnd
trigger1 = AnimElem = 7
value = 4120,0



[State 4121]
type = ChangeState
trigger1 = AnimTime = 0
value = 3002
ctrl = 1

;---------------------------------------------------------------------------
; Hyper Spark Helper
[Statedef 33110]
type    = S
movetype= I
physics = N
juggle  = 5
;poweradd= 65
ctrl = 0
velset = 0,0
anim = 32701
sprpriority = 4

[State 33110]
type = PlaySnd
trigger1 = Time = 0
value = 3000,3

[State 33110]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,MoveType = H

;---------------------------------------------------------------------------
; Hyper Portrait Helper
[Statedef 33117]
type    = S
movetype= I
physics = N
juggle  = 5
;poweradd= 65
ctrl = 0
velset = 0,0
anim = 9800;32717
sprpriority = 0


[State 33117]
type = AssertSpecial 
trigger1 = anim = 9800;32717
flag = noBG 
flag2 = nobardisplay
flag3 = noFG 
ignorehitpause = 1

[State 33117]
type  = Explod 
trigger1 = Time = 0 && facing = 1
anim = 32717
postype = left;back
ID = 32717 
sprpriority = -2
removetime = 7
pos = 0,0
scale = 0.55,0.55
bindtime = 5
facing = 1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
supermove = 9999
pausemove = 9999

[State 33117]
type  = Explod 
trigger1 = Time = 0 && facing = -1
anim = 32717
postype = right;back
ID = 32717 
sprpriority = -2
removetime = 7
pos = 0,0
scale = 0.55,0.55
bindtime = 5
facing = -1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
supermove = 9999
pausemove = 9999

[State 33117]
type= Modifyexplod
trigger1 = Numexplod(32717) && Time <= 6
ID = 32717
scale = 1.3-(.13*(time)),1.3-(.13*(time))

[State 33117]
type  = Explod 
trigger1 = Time = 7 && facing = 1
anim = 32717
postype = left;back
ID = 32717 
sprpriority = -2
removetime = 55
pos = 0,0
scale = 0.55,0.55
;bindtime = -1
facing = 1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
supermove = 9999
pausemove = 9999
vel = -0.2

[State 33117]
type  = Explod 
trigger1 = Time = 7 && facing = -1
anim = 32717
postype = right;back
ID = 32717 
sprpriority = -2
removetime = 55
pos = 0,0
scale = 0.55,0.55
;bindtime = -1
facing = -1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
supermove = 9999
pausemove = 9999
vel = 0.2


[State 33117]
type = RemoveExplod
trigger1 = Time > 17
trigger1 = NumHelper(33110) = 0
trigger2 = Parent,MoveType = H
id = 32717

[State 33117]
type = DestroySelf
trigger1 = Time > 17
trigger1 = NumHelper(33110) = 0
trigger2 = Parent,MoveType = H

;---------------------------------------------------------------------------
; Hyper Bg
[Statedef 33120]
physics = N
anim = 9800
sprpriority = -3



[State 33120]
type = VarSet
trigger1 = Time = 0
var(3) = Root,Stateno


[State 33120]
type = AssertSpecial 
trigger1 = anim = 9800
flag = noBG 
flag2 = noFG 
;flag3 = nobardisplay
ignorehitpause = 1


[State 33120]
type  = Explod 
triggerall = Time = 0
trigger1 = p2life > 0
anim = 32710
postype = left
ID = 32710 
sprpriority = -4
removetime = 370
pos = 0,0
scale = const(size.xscale),const(size.yscale)
bindtime = -1
;facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 33120]
type  = null;Explod 
triggerall = Time = 0
trigger1 = p2life > 0
anim = 32710
postype = left
ID = 32710 
sprpriority = -4
removetime = 270
pos = 160,0
scale = const(size.xscale),const(size.yscale)
bindtime = -1
facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999


[State 33120]
type  = null;Explod 
triggerall = Time = 0
trigger1 = p2life > 0
anim = 32710
postype = right
ID = 32710 
sprpriority = -4
removetime = 270
pos = -160,0
scale = const(size.xscale),const(size.yscale)
bindtime = -1
facing=-1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999



[State 33120] 
type = RemoveExplod 
triggerall = Numexplod(32710)
trigger1 = Root, stateno != var(3)
trigger2 = p2life = 0
trigger3 = Root,MoveType = H

[State 33120] 
type = Destroyself 
triggerall = Numexplod(32710)= 0
triggerall = Time > 7
trigger1 = Root, stateno != var(3)
trigger2 = Root,MoveType = H

[State 33120]
type = ChangeState
trigger1 = p2life = 0
trigger2 = roundstate = 3
value = 33121

;---------------------------------------------------------------------------
; Hyper KO Bg
[Statedef 33121]
physics = N
anim = 9800
sprpriority = -3




[State 33121]
type = AssertSpecial 
trigger1 = anim = 9800
flag = noBG 
flag2 = nobardisplay
flag3 = noFG 
ignorehitpause = 1

[State 33121]
type  = Explod 
triggerall = Time = 0
trigger1 = p2life <= 0
anim = 32715
postype = left
ID = 32715 
sprpriority = -4
pos = 0,0
scale = const(size.xscale),const(size.yscale)
bindtime = -1
;facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999

[State 33121]
type = null;PlaySnd
trigger1 = Time = 1
value = 8000,1
channel = 1

[State 33121] 
type = Destroyself 
trigger1 = roundstate = 4
trigger2 = Root,stateno = [180,189]
trigger3 = Time = 60

;---------------------------------------------------------------------------------------
;dizzy
[Statedef 5300]
type    = S
movetype= H
physics = N
juggle  = 4
velset = 0,0
anim = 5300
ctrl = 0
sprpriority = 2

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


[State 5300,e]
type = SelfState; ChangeState
trigger1 = time = 360
value = 0
ctrl = 1


;---------------------------------------------------------------------------------------
;Short Circuit Dizzyness
[Statedef 5301]
type    = S
movetype= H
physics = N
juggle  = 4
velset = 0,0
anim = 7030+random%3
ctrl = 0
sprpriority = 3


[State 5301]
type = PlaySnd
trigger1 = Time = 0
value = 5300, 0
loop = 1
channel = 4

[State 5301]
type = StopSnd
trigger1 = time = 359
trigger2 = enemy,anim != 5300
channel = 4

[State 5301]
type = DestroySelf
trigger1 = time = 360
trigger2 = enemy,anim != 5300



;------------------------------------------------------------------------------------------------------------
;
[Statedef 5999]
type = S
movetype = I
physics = N
anim = 6000
ctrl = 0
sprpriority = 3
velset = 0,Parent,Vel Y


[State 6003]
type = Varset
trigger1 = Time = 0
var(3) = parent,id

[State 6003]
type = Turn
trigger1 = parent,facing != facing

[State 6003]
type = DestroySelf
trigger1 = !PlayerIDExist(var(3))


[State 6003]
type = BindToParent
trigger1 = PlayerIDExist(var(3))




;------------------------------------------------------------------------------------------------------------
;Cloak
[Statedef 6000]
type = S
movetype = I
physics =N
anim = 6000
ctrl = 0
sprpriority = 1
velset = 0,0


[State 6000]
type = VarSet
trigger1 = Time = 0
var(2) = Parent,anim

[State 6000]
type = Turn
trigger1 = Parent,Facing != Facing

[State 6000]
type = DestroySelf
trigger1 = parent,anim != var(2)

[State 6000]
type = BindToParent
trigger1 = 1



;------------------------------------------------------------------------------------------------------------
;intro 2 helper
[Statedef 6193]
type = A
movetype = I
physics =N
anim = 6193
ctrl = 0
sprpriority = 0
velset = -1,0

[State 6193]
type = Turn
trigger1 = Parent,Facing != Facing

[State 6193]
type = VelAdd
trigger1 = Pos Y < -30
y = 0.3


[State 193]
type = PlaySnd
trigger1 = Pos Y >= -30
trigger1 = Vel Y > 0
value = 193,1
persistent = 0


[State 6193]
type = VelSet
trigger1 = Pos Y >= -30
trigger1 = Vel Y > 0
Y = -3
persistent = 0


[State 193]
type = PlaySnd
trigger1 = Pos Y >= -30
trigger1 = Vel Y > 0
value = 193,1
persistent = 0

[State 6193]
type = VelSet
trigger1 = Pos Y >= -30
trigger1 = Vel Y > 0
Y = -2
persistent = 0



[State 6193]
type = ChangeState
trigger1 = Pos Y >= -30
trigger1 = Vel Y > 0
value = 6194


;------------------------------------------------------------------------------------------------------------
;intro 2 helper
[Statedef 6194]
type = S
movetype = I
physics = N
anim = 6193
ctrl = 0
sprpriority = 0
velset = 0,0

[State 6194]
type = Turn
trigger1 = Parent,Facing != Facing

[State 6194]
type = AssertSpecial
trigger1 = Time%2 = 0
flag = invisible

[State 6194]
type = DestroySelf
trigger1 = Time = 17

;------------------------------------------------------------------------------------------------------------
;Cloak
[Statedef 6199]
type = S
movetype = I
physics =N
anim = 6000
ctrl = 0
sprpriority = 1
velset = 0,0



[State 6199]
type = Turn
trigger1 = Parent,Facing != Facing

[State 6199]
type = DestroySelf
trigger1 = parent,stateno != 199

[State 6199]
type = BindToParent
trigger1 = 1
pos = 0,-1




;------------------------------------------------------------------------------------------------------------
;Arm For Stand Strong Punch 2
[Statedef 6230]
type = S
movetype = I
physics =N
anim = 6230
ctrl = 0
sprpriority = 1
velset = 0,0


[State 6230]
type = null;varset
trigger1 = Time = 0
var(2) = parent,anim


[State 6230]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
value = anim
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 6230]
type = null;AssertSpecial
trigger1 = 1
flag = noshadow

[State 6230]
type = Turn
trigger1 = Parent,Facing != Facing

[State 6230]
type = DestroySelf
trigger1 = parent,anim != 230

[State 6230]
type = BindToParent
trigger1 = 1
ignorehitpause = 1



;------------------------------------------------------------------------------------------------------------
;Throw Spark
[Statedef 6810]
type = S
movetype = I
physics =N
anim = 6800
ctrl = 0
sprpriority = 3
velset = 0,0


[State 6810]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno


[State 6810]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6810]
type = AssertSpecial
trigger1 = Time%2 = 0
flag = invisible

[State 6810]
type = Turn
trigger1 = Parent,Facing != Facing

[State 6810]
type = DestroySelf
trigger1 = Time = 17
trigger2 = parent,stateno != var(2)

[State 6810]
type = BindToParent
trigger1 = 1
pos = 68,-124


;------------------------------------------------------------------------------------------------------------
;Metal
[Statedef 6811]
type = S
movetype = I
physics =N
anim = 9800
ctrl = 0
sprpriority = 4
velset = 0,0

[State 6811]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6811]
type = VarSet
trigger1 = Time = 0
var(0) = 0

[State 6811]
type = VarSet
trigger1 = Time = 0
var(1) = Parent,var(10)

[State 6811]
type = Explod
trigger1 = Time < 11 && PlayerIDExist(var(1))
anim = 6811+random%4
id = 6811
bindtime = -1
postype = p2
ownpal = 1
pos = 20,-20
random = 40,80
ontop = 1
scale = const(size.xscale),const(size.yscale)

[State 6811]
type = RemoveExplod
trigger1 = PlayerID(var(1)),stateno != [820,824]
trigger1 = PlayerID(var(1)),stateno != [940,944]
id = 6811


[State 6811]
type = VarAdd
trigger1 = PlayerID(var(1)),stateno != [820,824]
trigger1 = PlayerID(var(1)),stateno != [940,944]
var(0) = 1

[State 6811]
type = Explod
trigger1 = var(0) = [1,17]
anim = 6815+random%4
id = 6815
postype = p2
ownpal = 1
pos = 20,-20
random = 40,80
ontop = 1
vel = -4+random%5,1+random%4
scale = const(size.xscale),const(size.yscale)

[State 6811]
type = PlaySnd
trigger1 = var(0) = 1
value = 810,0
persistent = 0

[State 6811]
type = DestroySelf
trigger1 = var(0) = 18
trigger2 = Time = 300
;------------------------------------------------------------------------------------------------------------
;Cloak
[Statedef 7003]
type = S
movetype = I
physics =N
anim = 7003
ctrl = 0
sprpriority = 0
velset = 0,0

[State 7003]
type = Turn
trigger1 = Parent,Facing != Facing

[State 7003]
type = DestroySelf
trigger1 = root,anim != 21
trigger1 = root,anim != 3020

[State 7003]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Dash Forward Booster Helper
[Statedef 7005]
type = S
movetype = I
physics =N
anim = 6100
ctrl = 0
sprpriority = 0
velset = 0,0


[State 7005]
type = BindToParent
trigger1 = 1


[State 7005]
type = DestroySelf
trigger1 = parent,stateno != 100



;------------------------------------------------------------------------------------------------------------
;Dash Back Booster Helper
[Statedef 7006]
type = S
movetype = I
physics =N
anim = 6105
ctrl = 0
sprpriority = 0
velset = 0,0



[State 7006]
type = BindToParent
trigger1 = 1

[State 7006]
type = DestroySelf
trigger1 = parent,stateno != 105


;------------------------------------------------------------------------------------------------------------
;Explodsion A
[Statedef 7070]
type = S
movetype = I
physics =N
anim = 7070
ctrl = 0
sprpriority = 3
velset = 0,0



[State 7070]
type = AssertSpecial
trigger1 = Time%2 = 0
flag = invisible


[State 7070]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;Dust Trail
[Statedef 7106]
type = S
movetype = I
physics =N
anim = 7106
ctrl = 0
sprpriority = 3
velset = 0,0


[State 7106]
type = Varset
trigger1 = Time = 0
var(3) = parent,id


[State 7106]
type = Varset
trigger1 = Time = 0
var(2) = parent,stateno

[State 7106]
type = BindToParent
trigger1 = parent,stateno = var(2)
trigger1 = parent,id = var(3)
pos = -67,-floor(parent,pos y)


[State 7106]
type = DestroySelf
trigger1 = !PlayerIDExist(var(3))
trigger2 = parent,stateno != var(2)





;------------------------------------------------------------------------------------------------------------
;Guard Shield
[Statedef 7510]
type = S
movetype = I
physics =N
anim = 7510
ctrl = 0
sprpriority = 4
velset = 0,0

[State 7510]
type = Varset
trigger1 = Time = 0
var(2) = parent,stateno


[State 7510]
type = BindToParent
trigger1 = Parent,Anim = 130
trigger2 = Parent,Anim = 150
pos = 0,0

[State 7510]
type = BindToParent
trigger1 = Parent,Anim = 131
trigger2 = Parent,Anim = 151
pos = 13,18


[State 7510]
type = BindToParent
trigger1 = Parent,Anim = 132
trigger2 = Parent,Anim = 152
pos = 1,-44

[State 7510]
type = DestroySelf
trigger1 = parent,anim != [130,132]
trigger1 = parent,anim != [150,152]



;------------------------------------------------------------------------------------------------------------
;General Explode Helper, No Loop
[Statedef 7555]
type = S
movetype = I
physics = N
anim = Parent,var(15)
ctrl = 0
sprpriority = 4
velset = 0,0

[State 7555]
type = Varset
trigger1 = Time = 0
var(2) = Parent,Anim

[State 7555]
type = BindToParent
trigger1 = 1

[State 7555]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Anim != var(2)

;------------------------------------------------------------------------------------------------------------
[Statedef 7600]
type = s
movetype = i
physics = n

[State 7600]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible

[State 7600]
type = NotHitBy
trigger1 = 1
value = SCA

[State 7600, Dramatic KO Helper]
type = helper
triggerall = (root,alive || enemy,alive)
trigger1 = roundstate = 3 && (root,life <= 0 || enemy,life <= 0)
helpertype = Normal
id = 7601
pos = 0,0
postype = p1
name = "K.O."
stateno = 7601
supermovetime = 9999999999
pausemovetime = 9999999999
persistent = 0
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

;-----------------------------------------------------------------
;Dramatic K.O. Effects
;-----------------------------------------------------------------
[Statedef 7601]
type = s
movetype = i
physics = n



[State 7601]
type = PlaySnd
trigger1 = Time = 0
value = 170,1
ignorehitpause = 1
persistent = 0
pausemovetime = 99999
supermovetime = 99999

[State 7601]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible
flag3 = nokoslow
ignorehitpause = 1

[State 7601]
type = NotHitBy
trigger1 = 1
value = SCA

[State 7601]
type = Pause
trigger1 = 1
time = 2
ignorehitpause = 1
persistent = 0


[State 7601, DestroySelf]
type = DestroySelf
trigger1 = time >= 2


;--------------------------------------------------------------------------------------------
; Guard Push (stand)
[Statedef 7610]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 7610
sprpriority = 2
facep2 = 1

[State 7610, VelMul]
type = VelMul
trigger1 = 1
x = 0.75

[State 7610, VelSet]
type = VelSet
trigger1 = Time = 10
x = 0

[State 7610, Width]
type = Width
trigger1 = 1
value = 10,0

[State 7610, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 23


[State 7610, PosAdd]
type = PosAdd
trigger1 = animelem = 2
x = 30

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

[State 7610, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 126,-90
ownpal = 1
vel = 0,0
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
sprpriority = 7

[State 7610, Guard Push Helper]
type = Helper
trigger1 = AnimElem = 2;Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 7611
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30
scale = const(size.xscale),const(size.yscale)

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

;---------------------------------------------------------------------------
; Guard Push (Helper)

[Statedef 7611]
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = Parent,Anim
sprpriority = -4


[State 7611, PlayerPush]
type = AssertSpecial
trigger1 = 1
flag = invisible

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

[State 7611, VelSet 1]
type = VelSet
trigger1 = Time = [0,10]
x = 30

[State 7611, VelSet 2]
type = VelSet
trigger1 = Time = [11,13]
x = 20

[State 7611, VelSet 2]
type = VelSet
trigger1 = Time >= 14
x = 10

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

[State 7611, DestroySelf]
type = DestroySelf
trigger1 = Time >= 18

;---------------------------------------------------------------------------
; Guard Push (Crouching)

[Statedef 7615]
type    = C
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 7615
sprpriority = 2
facep2 = 1

[State 7615, VelMul]
type = VelMul
trigger1 = 1
x = 0.75

[State 7615, VelSet]
type = VelSet
trigger1 = Time = 10
x = 0

[State 7615, Width]
type = Width
trigger1 = 1
value = 10,0

[State 7615, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 23


[State 7615, PosAdd]
type = PosAdd
trigger1 = animelem = 2
x = 30

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

[State 7615, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 108,-65
ownpal = 1
vel = 0,0
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
sprpriority = 7

[State 7615, Guard Push Helper]
type = Helper
trigger1 = AnimElem = 2;Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 7611
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30
scale = const(size.xscale),const(size.yscale)

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


;---------------------------------------------------------------------------
; Guard Push (Air)

[Statedef 7620]
type    = A
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 7620
sprpriority = 2
facep2 = 1

[State 7620, VelMul]
type = VelMul
trigger1 = 1
x = 0.75

[State 7620, VelSet]
type = VelSet
trigger1 = Time = 10
x = 0

[State 7620, Width]
type = Width
trigger1 = 1
value = 10,0

[State 7620, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 23


[State 7620, PosAdd]
type = PosAdd
trigger1 = animelem = 2
x = 30

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

[State 7620, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 127,-88
ownpal = 1
vel = 0,0
scale = const(size.xscale),const(size.yscale)
ignorehitpause = 1
sprpriority = 7

[State 7620, Guard Push Helper]
type = Helper
trigger1 = AnimElem = 2;Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 7622
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30
scale = const(size.xscale),const(size.yscale)

[State 7620, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 7621

;---------------------------------------------------------------------------
; Guard Push (Air - Falling)

[Statedef 7621]
type    = A
movetype= I
physics = A
poweradd= 0
ctrl = 1
anim = 44
sprpriority = 1

[State 7621, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
ctrl = 0

;---------------------------------------------------------------------------
; Guard Push (Air Helper)

[Statedef 7622]
type    = A
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = Parent,Anim
sprpriority = -4


[State 7611, PlayerPush]
type = AssertSpecial
trigger1 = 1
flag = invisible

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

[State 7622, VelSet 1]
type = VelSet
trigger1 = Time = [0,10]
x = 30

[State 7622, VelSet 2]
type = VelSet
trigger1 = Time = [11,13]
x = 20

[State 7622, VelSet 2]
type = VelSet
trigger1 = Time >= 14
x = 10

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

[State 7622, DestroySelf]
type = DestroySelf
trigger1 = Time >= 18


;---------------------------------------------------------------------------
; Super Jump Start
[Statedef 7710]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

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

[State 7710]
type = Explod
trigger1 = Time = 1
anim = 7055
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 7710]
type = Explod
trigger1 = Time = 1
anim = 7055
facing = -1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 7710]
type = Explod
trigger1 = Time = 1
anim = 7022
sprpriority = 4
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 7710, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 7710, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 7710, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 7710, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y) - 3

[State 7710, 5]
type = null;VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 7710, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 7711
ctrl = 1

;---------------------------------------------------------------------------
; Super Jump Up
[Statedef 7711]
type    = A
physics = A

[State 7711]
type = VelSet
trigger1 = Time = 0
y = -16

[State 7711,4]
type = VelAdd
triggerall = command = "holdfwd"
;trigger1 = sysvar(1) = 1
trigger1 = vel X <=4
;trigger2 = sysvar(1) = -1
trigger2 = Vel X <= -.4
x = .5

[State 7711,5]
type = VelAdd
triggerall = command = "holdback"
;trigger1 = sysvar(1) = -1
trigger1 = Vel X >= -4
;trigger2 = sysvar(1) = 1
trigger2 = Vel X >= .4
x = -.5

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



[State 7711]
type = Explod
trigger1 = Time%4 = 0
trigger1 = Time >= 4
trigger1 = Vel Y < 0
anim = 7056
pos = 0,0
random = 50,0
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 7711]
type = Explod
trigger1 = Time%2 = 0
trigger1 = Time >= 12
trigger1 = Vel Y < 0
anim = 7057+random%3
pos = 0,0
random = 60,0
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 7711, 1]
type = null;VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 7711, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 51, ifelse((vel x)>0, 52, 53))


[State 7711, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3


;---------------------------------------------------------------------------
;AI Super Jump Start
[Statedef 7720]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

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

[State 7720]
type = Explod
trigger1 = Time = 1
anim = 7055
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 7720]
type = Explod
trigger1 = Time = 1
anim = 7055
facing = -1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 7720]
type = Explod
trigger1 = Time = 1
anim = 7022
sprpriority = 4
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 7720, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 7720, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 7720, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 7720, 4]
type = null;VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y) - 3

[State 7720, 4]
type = null;VelSet
trigger1 = AnimTime = 0
x = (P2Dist X)*0.07
y = (P2Dist Y)*0.07

[State 7720, 5]
type = null;VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 7720, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 7721
ctrl = 1

;---------------------------------------------------------------------------
; Super Jump Up
[Statedef 7721]
type    = A
physics = N


[State 7721, 4]
type = null;VelSet
trigger1 = 1;Time = 0
y = -11


[State 7721, 4]
type = VelSet
trigger1 = Time = 0
y = -15;-13

[State 7721, 4]
type = VelAdd
trigger1 = 1
y = 0.35;0.4



[State 7721]
type = veladd
triggerall = vel x <= 4
trigger1 = var(59)
trigger1 = p2bodydist x >= 0
persistent = 4
x = .9


[State 7721]
type = veladd
triggerall = vel x >= -4
trigger1 = var(59) 
trigger1 = p2bodydist x <= 0
persistent = 4
x = -.9


[State 7721,4]
type = null;VelAdd
triggerall = command = "holdfwd"
trigger1 = sysvar(1) = 1
trigger1 = vel X <=4
trigger2 = sysvar(1) = -1
trigger2 = Vel X <= -.4
x = .2

[State 7721,5]
type = null;VelAdd
triggerall = command = "holdback"
trigger1 = sysvar(1) = -1
trigger1 = Vel X >= -4
trigger2 = sysvar(1) = 1
trigger2 = Vel X >= .4
x = -.2

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


[State 7721]
type = Explod
trigger1 = Time%4 = 0
trigger1 = Time >= 4
trigger1 = Vel Y < 0
anim = 7056
pos = 0,0
random = 50,0
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 7721]
type = Explod
trigger1 = Time%2 = 0
trigger1 = Time >= 12
trigger1 = Vel Y < 0
anim = 7057+random%3
pos = 0,0
random = 60,0
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 7721, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 51, ifelse((vel x)>0, 52, 53))

[State 7721, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 7721]
type = turn
trigger1 = p2dist x < -5


;---------------------------------------------------------------------------
; Jump Land
[Statedef 7722]
type    = A
physics = A

[State 7722, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 7722, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 7722]
type = turn
trigger1 = p2dist x < -5



;---------------------------------------------------------------------------
; Triangle Jump 
[Statedef 7730]
type = A
movetype = I
physics = N
anim = 7730
velset = -Vel X,-4
ctrl = 0

[State 7730, 1]
type = Turn
trigger1 = FrontEdgeBodyDist <= 3

[State 7730, 2]
type = PlaySnd
trigger1 = time = 0
value = 7730, 0

[State 7730, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 7731



;---------------------------------------------------------------------------
; Triangle Jump End
[Statedef 7731]
type = A
movetype = I
physics = A
;velset = 0, 0
ctrl = 0



[State 7731, 3]
type = ChangeAnim
trigger1 = Time = 0
value = 44
elem = 6


;---------------------------------------------------------------------------
; Flying to End of Screen
[Statedef 7740]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 5010

[State 7740]
type = null;ScreenBound
trigger1 = 1
value = 0

[State 7740]
type = SelfState
trigger1 = Alive = 0
value = 5000

[State 7740]
type = ChangeAnim
trigger1 = Time < 10
value = 5010

[State 7740]
type = AfterImage
trigger1 = Time = 5
length = 5
timegap = 1
framegap = 1
PalBright   = 0,0,0
PalContrast = 100,100,100
PalMul      = 1,1,1
trans = Add1
time = 0

[State 7740]
type = AfterImageTime
trigger1 = 1
time = 2

[State 7740]
type = ChangeAnim
trigger1 = Time >= 10
value = 5011

[State 7740]
type = HitVelSet
trigger1 = Time = 10
x = 1

[State 7740]
type = ChangeState
triggerall = Time >= 10
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 7741

[State 7740]
type = SelfState
trigger1 = Time = 150
value = 5000


;---------------------------------------------------------------------------
; Hit Wall or Stop Moving
[Statedef 7741]
type    = A
movetype= H
physics = N
anim = 5010

[State 7741]
type = EnvShake
trigger1 = time = 0
time = 30
freq = 100
ampl = -10
phase = 10

[State 7741]
type = PosAdd
trigger1 = Time = 0
x = 10 - BackEdgeBodyDist

[State 7741]
type = PosFreeze
trigger1 = Time < 10
x = 1
y = 1

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

[State 7741]
type = null;Explod
trigger1 = time = 0
anim = F72
pos = -30,-50
postype = p1
facing = 1
sprpriority = 3
bindtime = 2
supermove = 1
scale = const(size.xscale),const(size.yscale)
[State 7741]
type =null; PlaySnd
trigger1 = Time = 0
value = F7,2

[State 7741]
type = LifeAdd
trigger1 = Time = 0
value = -100

[State 7741]
type = ChangeAnim
triggerall = SelfAnimExist(5030)
trigger1 = Time = 10
value = 5030

[State 7741]
type = VelSet
trigger1 = Time = 10
x = 2
y = -4

[State 7741]
type = VelAdd
trigger1 = Time > 10
y = .4

[State 7741]
type = ChangeAnim
triggerall = SelfAnimExist(5035)
trigger1 = Anim = 5030
trigger1 = AnimTime = 0
value = 5035

[State 7741]
type = ChangeAnim
triggerall = SelfAnimExist(5050)
triggerall = AnimTime = 0
trigger1 = Anim = 5030
trigger2 = Anim = 5035
value = 5050

[State 7741]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y > 20
value = 5100 ;Hit ground


;---------------------------------------------------------------------------
; Wall Hit Helper
[Statedef 7750]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 9800

[State 7750]
type = explod
trigger1 = Time = 1
trigger1 = enemynear,screenpos x < 150
anim = 7024
id = 7024
pos = 0,floor(enemynear,screenpos y -abs(enemynear,const(size.mid.pos.y)))
postype = left
bindtime = -1
facing = -1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 4
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 7750]
type = explod
trigger1 = Time = 1
trigger1 = enemynear,screenpos x > 150
anim = 7024
id = 7024
pos = 0,floor(enemynear,screenpos y -abs(enemynear,const(size.mid.pos.y)))
postype = right
bindtime = -1
facing = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 4
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 7750]
type = playsnd
trigger1 = Time = 1
value = 825,0
channel = 1
volume = 255
persistent = 0

[State 7750]
type = EnvShake
trigger1 = Time = 1
time = 8
ampl = -8
phase = 10
freq = 100


[State 7750]
type = DestroySelf
trigger1 = enemynear,movetype != H


;---------------------------------------------------------------------------
; Ground Hit Helper
[Statedef 7755]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 9800

[State 7755]
type = explod
trigger1 = Time = 1
anim = 7052
id = 7510
postype = p2
pos = 0, floor(-enemynear,pos y - enemynear,vel y)
bindtime = 1
facing = -1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = -4
ownpal = 1
ignorehitpause = 1
persistent = 0


[State 7755]
type = playsnd
trigger1 = Time = 1
value = 5100,4


[State 7755]
type = EnvShake
trigger1 = Time = 1
time = 8
ampl = -8
phase = 10
freq = 100


[State 7755]
type = DestroySelf
trigger1 = enemynear,movetype != H
trigger2 = enemynear,vel y < -5



;---------------------------------------------------------------------------
; Ko Sound Helper
[Statedef 7760]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 9800


[State 7760]
type = playsnd
trigger1 = Time = 1
value = 5500,0
channel = 1
volume = 255
persistent = 0


[State 7760]
type = DestroySelf
trigger1 = Parent,alive


;---------------------------------------------------------------------------------------
;res
[Statedef 7777]
type    = A
movetype= I
physics = A
juggle  = 4
velset = ifelse(random < 500,3,-3),-13
anim = 43
ctrl = 0
sprpriority = 2


[state 7777]
type = superpause
trigger1 = Time = 0
anim = -1
time = 30
movetime = 30
darken = 0
unhittable = 1

[State 7777]
type = ChangeAnim
trigger1 = Vel Y > 0
value = 46
persistent = 0

[State 7777]
type = LifeAdd
trigger1 = Time = 0
value = 30*var(30)



[State 7777, 1]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 60

[State 7777,e]
type = ChangeState
triggerall = Time >= 32
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger2 = Time = 90
value = 52
ctrl = 0




;---------------------------------------------------------------------------
;Roll Recovery Forward

[Statedef 7800]
type    = S
movetype= I
physics = N
ctrl = 0
;anim = 7801
sprpriority = 0
velset = -7,0

[State 7800]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 7800
value = 7800


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


[State 7800]
type = VelSet
trigger1 = 1
x = 7



[State 7800]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State  7800]
type = ChangeState
trigger1 = prevstateno = 7800
value = 7801
ctrl = 0



[State  7800]
type = ChangeState
trigger1 = Time = 27
trigger2 = FrontEdgeBodyDist <= 10
value = 0
ctrl = 1


[State 7800]
type = ChangeState
trigger1 = !alive
value = 5050

;---------------------------------------------------------------------------
;Roll Recovery Backward

[Statedef 7801]
type    = S
movetype= I
physics = N
ctrl = 0
;anim = 7801
sprpriority = 0
velset = -7,0




[State 7801]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 7801
value = 7801




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


[State 7800]
type = VelSet
trigger1 = 1
x = -7



[State 7801]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State  7801]
type = ChangeState
trigger1 = Time = 27
trigger2 = BackEdgeBodyDist <= 10
value = 12
ctrl = 1


[State 7801]
type = ChangeState
trigger1 = !alive
value = 5050

;---------------------------------------------------------------------------
;Remove Helper

[Statedef 7805]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 9800
sprpriority = 0
velset = 0,0


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

[State 7805]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State  7805]
type = DestroySelf
trigger1 = 1

;-------------------------------------------------------------------------
;Stand by
[Statedef 7827]
type = S
movetype = I
physics = N
velset = 0,0
ctrl = 0
;anim = 9800

[State 7827]
type = PosSet
trigger1 = Time = 0
y = 0

[State 7827]
type = ChangeState
trigger1 = NumEnemy = [1,2]
trigger1 = Enemy(0),statetype = L || Enemy(0),movetype != H
value = 102


[State 7827]
type = ChangeState
trigger1 = NumEnemy = 2
trigger1 = Enemy(1),statetype = L || Enemy(1),movetype != H
value = 102


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

;Special reversal
[Statedef 7970]
type = S
movetype = A
physics = S
anim = 7970
ctrl = 0
sprpriority = 2
velset = 0,0


[State 7970]
type = PosSet
trigger1 = Time = 0
y = 0



[State 7970]
type = VarRandom
trigger1 = time = 0
v = 4
range = 1200



[State 7970]
type = VarSet
trigger1 = time = 0
var(3) = 120



[State 7970]
type = ReversalDef
trigger1 = hitcount < 1
reversal.attr = SCA,AA,AT; NA, SA, HA, NT, ST,HT, NP, SP, HP
pausetime = 10,15
sparkno = -1
;p1stateno = ifelse( var(4) < 400,1273, ifelse(var(4) > 800,ifelse(enemy,isHelper,1240+10*(random%3),900),1210))
hitsound = S7970,0
persistent = 0
id = 7970


[State 7970,a]
type = VarSet
trigger1 = var(4) < 400
trigger1 = P2bodydist X < 70
var(3) = ifelse(random < 500,7973,ifelse(random < 500,410,230))


[State 7970,b]
type = VarSet
trigger1 = var(4) = [400,800]
trigger1 = P2bodydist X < 20
trigger1 = NumTarget(7970)
trigger1 = Target(7970),IsHelper < 1
var(3) = 800

[State 7970,c]
type = VarSet
trigger1 = var(4) > 800
trigger1 = power > 1000
trigger1 = P2bodydist X < 200
var(3) = 3000


[State 7970]
type = ChangeState
trigger1 = NumTarget(7970)
value = var(3)
ctrl = 0


[State 7970]
type = PalFX
trigger1 = Time <= 50
trigger1 = Time%2 = 0
time = 1
add = 0,0,128
color = 0
ignorehitpause = 1

[State 7970]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Special reversal punch

[Statedef 7972]
type    = S                     
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 5,0                    
ctrl = 0                         
anim = 200                      
poweradd = 20                    
sprpriority = 2                  


[State 7972]
type = NotHitBy
trigger1 = 1
value = SCA


[State 7972, 1]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, SA                     
damage = 7*var(30), floor(var(30)/2)                   
animtype = Heavy                
guardflag = MA                   
hitflag = MAF                    
priority = 5, Hit               
pausetime = 10,10                
sparkno = S(8220+random%2)                    
sparkxy = -10,-70               
hitsound = S1,7                
guardsound = S4,0               
guard.sparkno = S8430
ground.type = High               
ground.slidetime = 10            
ground.hittime  = 10             
ground.velocity = -9,-7           
;airguard.velocity = -4,-3     
air.type = High                  
air.velocity = -9,-7           
air.hittime = 12               
getpower = 85,10
givepower = 40
;p2stateno = 9020
;persistent = 0



[State 7972]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,0


[State 7972]
type = PalFX
trigger1 = Time <= 30
trigger1 = Time%2 = 0
time = 1
add = 0,0,128
color = 0
ignorehitpause = 1


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

;--------------------------------------------------------------------------------------
[Statedef 7973]
type = S
movetype = I
physics = S
ctrl = 0
sprpriority = 2

[State 7973]
type = AllPalFx
trigger1 = Time = 0
time = 3
add = 256,256,256


[State 7973]
type = ChangeState
trigger1 = Time = 5
value = 7972
ctrl = 0



;---------------------------------------------------------------------------
; Down Kick
[Statedef 8016]
type    = A
movetype= A
physics = N
juggle  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 8016
sprpriority = 2
facep2 = 1

[State 8016]
type = Turn
trigger1 = Time = 0
trigger1 = FrontEdgeBodyDist <= 5

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



[State 8016]
type = VelSet
trigger1 = AnimElem = 3
x = 3
y = 11


[State 8016]
type = VelAdd
trigger1 = AnimElem = 4, >= 0
y = 0.3


[State 8016]
type = PlaySnd
trigger1 = AnimElem = 1
value = 100,4

[State 8016]
type = PlaySnd
trigger1 = AnimElem = 3
value = 205,0

[State 8016, 2]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, SA
animtype  = Medium
damage    = 3*var(30),floor(0.5*var(30))
guardflag = MA
pausetime = 7,7
sparkno = S(8200+random%2)  
guard.sparkno = S8430
sparkxy = -10,-64+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -7,-4
air.velocity = -7,-4
getpower = ifelse(MoveHit,40,14),ifelse(MoveHit,40,0)
;fall.animtype = Up
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 211
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;p2stateno = 9020


[State 8016]
type = VarAdd
trigger1 = MoveContact
var(19) = 1
ignorehitpause = 1
persistent = 0

[State 8016, 3]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0




;---------------------------------------------------------------------------
; Down Kick Medium
[Statedef 8017]
type    = A
movetype= A
physics = N
juggle  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 8017
sprpriority = 2
facep2 = 1

[State 8017]
type = Turn
trigger1 = Time = 0
trigger1 = FrontEdgeBodyDist <= 5

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



[State 8017]
type = VelSet
trigger1 = AnimElem = 3
x = 6
y = 11


[State 8017]
type = VelAdd
trigger1 = AnimElem = 4, >= 0
y = 0.3

[State 8017]
type = PlaySnd
trigger1 = AnimElem = 1
value = 100,4

[State 8017]
type = PlaySnd
trigger1 = AnimElem = 3
value = 205,0

[State 8017]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, SA
animtype  = Medium
damage    = 5*var(30),floor(0.5*var(30))
guardflag = MA
pausetime = 7,7
sparkno = S(8210+random%2)  
guard.sparkno = S8430
sparkxy = -10,-64+floor(P2Dist Y)
hitsound   = S1,5
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -7,-4
air.velocity = -7,-4
getpower = ifelse(MoveHit,40,14),ifelse(MoveHit,40,0)
;fall.animtype = Up
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 211
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;p2stateno = 9020


[State 8017]
type = VarAdd
trigger1 = MoveContact
var(20) = 1
ignorehitpause = 1
persistent = 0

[State 8017]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;---------------------------------------------------------------------------
; Down Kick Hard
[Statedef 8018]
type    = A
movetype= A
physics = N
juggle  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 8018
sprpriority = 2
facep2 = 1

[State 8018]
type = Turn
trigger1 = Time = 0
trigger1 = FrontEdgeBodyDist <= 5

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



[State 8018]
type = VelSet
trigger1 = Time = 1
x = 9
y = 11


[State 8018]
type = VelAdd
trigger1 = 1
y = 0.4

[State 8018]
type = PlaySnd
trigger1 = AnimElem = 2
value = 193,0


[State 8018]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, SA
animtype  = Medium
damage    = 7*var(30),floor(0.5*var(30))
guardflag = MA
pausetime = 7,7
sparkno = S(8220+random%2)  
guard.sparkno = S8430
sparkxy = -10,-64+floor(P2Dist Y)
hitsound   = S2,5
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7,-4
air.velocity = -7,-4
getpower = ifelse(MoveHit,40,14),ifelse(MoveHit,40,0)
;fall.animtype = Up
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 211
;air.animtype = back
;air.type = Low
;air.cornerpush.veloff = 0
;ground.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;p2stateno = 9020


[State 8018]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0

[State 8018]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


;------------------------------------------------------------------------------------------------------------
;Super Armor
[Statedef 8600]
type = U
movetype = I
physics = N
;anim =9800
ctrl = 0
sprpriority = 4
velset = 0,0



[State 8600]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1


[State 8600]
type = ChangeAnim
trigger1 = Parent,Anim != Anim
value = Parent,Anim
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 8600]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
value = Parent,Anim
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 8600]
type = AssertSpecial
trigger1 = 1
flag = invisible


[State 8600]
type = HitBy
trigger1 = 1
value = SCA,AA,AP,AT


[State 8600]
type = HitOverride
trigger1 = 1
stateno = 8601
attr = SCA,AA,AP,AT
slot = 0
time = -1


[State 8600]
type = null;ParentVarSet
trigger1 = Time = 0
var(55) = 1



[State 8600]
type = BindToParent
trigger1 = 1
ignorehitpause = 1


[State 8600]
type = DestroySelf
trigger1 = Parent,StateType = A || Pos Y < 0

;------------------------------------------------------------------------------------------------------------
;Super Armor End
[Statedef 8601]
type = U
movetype = H
physics = N
;anim = 9800
ctrl = 0
sprpriority = 4
velset = 0,0



[State 8601]
type = PlayerPush
trigger1 = 1
value = 1
ignorehitpause = 1


[State 8601]
type = ChangeAnim
trigger1 = Parent,Anim != Anim
trigger1 = SelfAnimExist(Parent,Anim)
value = Parent,Anim
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 8601]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
trigger1 = SelfAnimExist(Parent,Anim)
value = Parent,Anim
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 8601]
type = AssertSpecial
trigger1 = 1
flag = invisible


[State 8601]
type = ParentVarAdd
trigger1 = Time = 0
var(55) = 1

[State 8601]
type = PlaySnd
trigger1 = Time = 0
value = 4,9


[State 8601]
type = ParentVarSet
trigger1 = !var(52)
trigger1 = Parent,Stateno != [120,159]
var(52) = GetHitVar(Damage)

[State 8601]
type = ChangeState 
trigger1 = Time = 0 && parent,var(55) < 4
value = 8600

[State 8601]
type = NotHitBy
trigger1 = parent,var(55) < 4
value = SCA

[State 8601]
type = ParentVarSet
trigger1 = Time = 12
var(55) = 0


[State 8601]
type = DestroySelf
trigger1 = Time = 48

[State 8601]
type = BindToParent
trigger1 = 1
ignorehitpause = 1


;------------------------------------------------------------------------------------------
; Hit by  - shaking from the hit
; (a custom gethit state)

[Statedef 9020]
type    = A
movetype= H
physics = N
velset = 0,0

[State 9020, Anim] ;Custom animation
type = null;ChangeAnim2
trigger1 = 1
value = 5012


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


[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 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 5050, 2] ; anim for trip
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(groundtype) = 3
trigger1 = SelfAnimExist(5070)
value = 5070


[State 9020, State]
type = AfterImage
trigger1 = Time = 5
length = 5
timegap = 1
framegap = 1
PalBright   = 0,0,0
PalContrast = 100,100,100
PalMul      = 1,1,1
trans = Add1
time = 0

[State 9020, State]
type = AfterImageTime
trigger1 = 1
time = 2

[State 9020, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 9030

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


[State 9030]
type = AfterImage
trigger1 = Time = 5
length = 5
timegap = 1
framegap = 1
PalBright   = 0,0,0
PalContrast = 100,100,100
PalMul      = 1,1,1
trans = Add1
time = 0

[State 9030]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 9030, Gravity]
type = VelAdd
trigger1 = 1
y = .39

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

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


[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050
trigger2 = Anim != 5070

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0


[State 5050, 2] ;Coming down anim for trip
type = ChangeAnim
trigger1 = anim = 5070
trigger1 = Vel Y >= 0
trigger1 = SelfAnimExist(anim-10) || SelfAnimExist(5071)
value = ifelse(SelfAnimExist(5071),5071,anim-10)
persistent = 0


[State 5035, 3]
type = null;ChangeState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;HITA_RECOV

[State 5050, 4] ;Recover near ground
type = null;SelfState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = 1;Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 5050, 5]; Recover in mid air
type = null;ChangeState
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 9030, Hit ground]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5071]), 0, 25)
value = 5100 ;HIT_BOUNCE

;-----------------------------------------------------------------------------------------------------
; Hit by  - hit wall
; (a custom gethit state)
[Statedef 9027]
type    = A
movetype= H
physics = N

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

[State 9027]
type = EnvShake
trigger1 = time = 0
time = 30
freq = 100
ampl = -10
phase = 10

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

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

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

[State 9027, Spark]
type = null;Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3
scale = const(size.xscale),const(size.yscale)

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

[State 9027, Sound]
type = null;PlaySnd
trigger1 = Time = 0
value = F7,0

[State 9027, State]
type = ChangeState
trigger1 = Time = 5
value = 9028

;----------------------------------------------------------------
; Hit by  - bounce off wall
; (a custom gethit state)
[Statedef 9028]
type    = A
movetype= H
physics = N


[State 9028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

[State 9028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -2

[State 9028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 2


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

[State 9028, Gravity]
type = VelAdd
trigger1 = 1
y = .39

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

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

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

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

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


;------------------------------------------------------------------------------------------------------------
;Arm For Stand State
[Statedef 10000]
type = S
movetype = I
physics =N
anim = 10000
ctrl = 0
sprpriority = 3
velset = 0,0


[State 10000]
type = BindToParent
trigger1 = 1
facing = 1
;time = -1
ignorehitpause = 1

[State 10000]
type = ChangeAnim
trigger1 = Anim != 9800
trigger1 = !SelfAnimExist(Parent,Anim+10000)
value = 9800

[State 10000]
type = ChangeAnim
trigger1 = Parent,Anim+10000 != Anim
trigger1 = SelfAnimExist(Parent,Anim+10000)
value = Parent,Anim+10000
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 10000]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
trigger1 = SelfAnimExist(Parent,Anim+10000)
value = Parent,Anim+10000
elem = Parent,AnimElemNo(0)
ignorehitpause = 1


[State 10000]
type = ChangeState
trigger1 = parent,var(57) = 4
value = 10001


;------------------------------------------------------------------------------------------------------------
;Arm Detached
[Statedef 10001]
type = S
movetype = I
physics =N
anim = 10001
ctrl = 0
sprpriority = 3
velset = -2,-7


[State 10001]
type = Varset
trigger1 = time = 0
var(2) = 0

[State 10001]
type = PlaySnd
trigger1 = Time = 0
value = 10000,0

[State 10001]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.4


[State 10001]
type = Velset
trigger1 = FrontEdgeBodyDist <= -5
trigger2 = BackEdgeBodyDist <= -5
x = ifelse(vel x > 0,-Vel X,abs(Vel X))

[State 10001]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 10002


[State 10001]
type = null;Varset
trigger1 = time > 10
trigger1 = RootDist X = [-25,25]
trigger1 = RootDist Y = [-25,60]
var(2) = 4

[State 10001]
type = null;PlaySnd
trigger1 = var(2) = 4
value = 10000,1


[State 10001]
type =  null;ChangeState
trigger1 = var(2) = 4
value = 10000


;------------------------------------------------------------------------------------------------------------
;Arm Detached Land
[Statedef 10002]
type = S
movetype = I
physics =N
;anim = 10001
ctrl = 0
sprpriority = 3
velset = 0,0

[State 10002]
type = PlaySnd
trigger1 = Time = 0
value = 10000,0

[State 10002]
type = Velset
trigger1 = FrontEdgeBodyDist <= -5
trigger2 = BackEdgeBodyDist <= -5
x = ifelse(vel x > 0,-Vel X,abs(Vel X))



[State 10002]
type = VelSet
trigger1 = parent,var(57) != 4
trigger1 = parent,movetype != H
x = (RootDist X)*0.1


[State 10002]
type = Varset
trigger1 = time > 10
trigger1 = parent,var(57) != 4
trigger1 = RootDist X = [-25,25]
trigger1 = RootDist Y = [-25,60]
var(2) = 4


[State 10002]
type = ParentVarset
trigger1 = var(2) = 4
var(57) = 1

[State 10002]
type = PlaySnd
trigger1 = var(2) = 4
value = 10000,1


[State 10002]
type =  ChangeState
trigger1 = var(2) = 4
value = 10000



;------------------------------------------------------------------------------------------------------------
;Earth Quake Blast
[Statedef 21240] 
type = S
movetype = A
physics = N
;anim = 21240
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1


[State 21240]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21240
value = 21240

[State 21240]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21240]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21240]
type = HitOverride
trigger1 = 1
stateno = 21240
attr = SCA,AP
slot = 0
time = -1


[State 21240]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 3*(Root,var(30)),floor(root,var(30)/2)
animtype = Medium
priority  = 3, Hit
guardflag = MA
hitflag = MAFD
pausetime = 7,7
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = S(8200+random%2)
guard.sparkno = S8430
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -7
air.velocity = -7
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = ifelse(MoveHit,20,10),ifelse(MoveHit,20,0)
sprpriority = 3


[State 21240]
type = null;Helper
trigger1 = Time = 12; && Parent,var(28) < 3
stateno = 21240
id = 21240
ownpal = 1
pos = 16,0
scale = const(size.xscale),const(size.yscale)
[State 21240]
type = null;ChangeState
trigger1 = MoveContact
value = 21241
ignorehitpause = 1

[State 21240]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Time = 240

;------------------------------------------------------------------------------------------------------------
;Earth Quake Blast End
[Statedef 21241] 
type = S
movetype = I
physics = N
anim = 9800
ctrl = 0
sprpriority = 1
velset = 0,0


[State 21241]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21241]
type = DestroySelf
trigger1 = Time = 0



;------------------------------------------------------------------------------------------------------------
;Earth Quake Spark 
[Statedef 21242] 
type = S
movetype = I
physics = N
anim = 21242
ctrl = 0
sprpriority = 3
velset = 0,0


[State 21242]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21242]
type = DestroySelf
trigger1 = AnimTime = 0

;------------------------------------------------------------------------------------------------------------
;Juggernaut Punch
[Statedef 21270]
type = S
movetype = I
physics = N
;anim = 21270
ctrl = 0
sprpriority = 4
velset = 0,0


[State 21270]
type = ChangeAnim
trigger1 = Anim != 21270 && Time = 0
value = 21270

[State 21270]
type = null;HitBy
trigger1 = 1
value = SCA,AP


[State 21270]
type = null;HitOverride
trigger1 = 1
stateno = 21270
attr = SCA,AP
slot = 0
time = -1



[State 21270]
type = DestroySelf
trigger1 = AnimTime = 0


[State 21270]
type = BindToParent
trigger1 = 1
ignorehitpause = 1


;------------------------------------------------------------------------------------------------------------
;Juggernaut Punch Rock
[Statedef 21271]
type = S
movetype = I
physics = N
anim = 21271
ctrl = 0
sprpriority = 4
velset = 0,0


[State 21271]
type = null;ChangeAnim
trigger1 = Anim != 21270 && Time = 0
value = 21270

[State 21271]
type = null;HitBy
trigger1 = 1
value = SCA,AP


[State 21271]
type = null;HitOverride
trigger1 = 1
stateno = 21270
attr = SCA,AP
slot = 0
time = -1



[State 21271]
type = DestroySelf
trigger1 = AnimTime = 0


;------------------------------------------------------------------------------------------------------------
;Juggernaut Punch Crater
[Statedef 21272]
type = S
movetype = I
physics = N
anim = 21272
ctrl = 0
sprpriority = 0
velset = 0,0


[State 21272]
type = null;ChangeAnim
trigger1 = Anim != 21270 && Time = 0
value = 21270

[State 21272]
type = null;HitBy
trigger1 = 1
value = SCA,AP


[State 21272]
type = null;HitOverride
trigger1 = 1
stateno = 21270
attr = SCA,AP
slot = 0
time = -1


[State 21272]
type = ChangeAnim
trigger1 = Parent,Anim = 1271 && Parent,AnimElem = 2
value = 21272
elem = 2
persistent = 0

[State 21272]
type = DestroySelf
trigger1 = AnimTime = 0
;trigger2 = Parent,Anim != [1270,1271]



;------------------------------------------------------------------------------------------------------------
;I Beam
[Statedef 21480]
type = S
movetype = I
physics = N
anim = 1480
ctrl = 0
sprpriority = 5
velset = 0,0


[State 21480]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21480]
type = DestroySelf
trigger1 = Root,var(39) = 1



;------------------------------------------------------------------------------------------------------------
;Beam Throw
[Statedef 21485] 
type = A
movetype = A
physics = N
;anim = 21240
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1


[State 21485]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 1481
value = 1481


[State 21485]
type = VelSet
trigger1 = Time = 0
x = ifelse(p2bodydist x < 100,5,7)
y = -2+random%3

[State 21485]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21485]
type = AngleDraw
trigger1 = 1
value = -10*Time%360

[State 21485]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21485]
type = HitOverride
trigger1 = 1
stateno = 21485
attr = SCA,AP
slot = 0
time = -1


[State 21485]
type = HitDef
attr = S, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 3*(Root,var(30)),floor(root,var(30)/2)
animtype = Medium
priority  = 3, Hit
guardflag = MA
hitflag = MAFD
pausetime = 7,7
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = S(8200+random%2)
guard.sparkno = S8430
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -7
air.velocity = -7
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = ifelse(MoveHit,20,10),ifelse(MoveHit,20,0)
sprpriority = 3


[State 21485]
type = null;ChangeState
trigger1 = MoveContact
value = 21241
ignorehitpause = 1

[State 21485]
type = StateTypeSet
trigger1 = MoveContact
movetype = I
ignorehitpause = 1

[State 21485]
type = DestroySelf
trigger1 = FrontEdgeDist < -100
trigger2 = Time = 240




;------------------------------------------------------------------------------------------------------------
;Drop Beam
[Statedef 21490]
type = A
movetype = I
physics =N
anim = 1481
ctrl = 0
sprpriority = 0
velset = 0,0

[State 21490]
type = Turn
trigger1 = Parent,Facing != Facing

[State 21490]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.3


[State 21490]
type = PlaySnd
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 193,1
persistent = 0


[State 21490]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
Y = -3
persistent = 0


[State 21490]
type = PlaySnd
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 193,1
persistent = 0

[State 21490]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
Y = -2
persistent = 0



[State 21490]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 21491


;------------------------------------------------------------------------------------------------------------
;Beam Remove
[Statedef 21491]
type = S
movetype = I
physics = N
anim = 1481
ctrl = 0
sprpriority = 0
velset = 0,0

[State 21491]
type = Turn
trigger1 = Parent,Facing != Facing

[State 21491]
type = AssertSpecial
trigger1 = Time%2 = 0
flag = invisible

[State 21491]
type = DestroySelf
trigger1 = Time = 17
;------------------------------------------------------------------------------------------------------------
;Bomb Helper
[Statedef 21905]
type = A
movetype = A
physics = N
anim = 21505
ctrl = 0
sprpriority = 4
velset = 0,1


[State 21505]
type = VelAdd
trigger1 = 1
y = 0.3

[State 21505]
type = null;HitBy
trigger1 = 1
value = SCA,AP

[State 21505]
type = null;HitOverride
trigger1 = 1
stateno = 21486
attr = SCA,AP
slot = 0
time = -1


[State 21505]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 7*(Root,var(30)),Root,var(30)
animtype = Large
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-40
hitsound   = S8,0
guardsound = S4,0
sparkno = S7419;(8220+random%2)
guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 25
ground.velocity = -8,-4
air.velocity = -8,-4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = ifelse(MoveHit,40,14),ifelse(MoveHit,40,0)
palfx.time = 1
palfx.add = 256,256,256


[State 21505]
type = ChangeState
trigger1 = MoveContact
value = 21506
ignorehitpause = 1

[State 21505]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 21507


;------------------------------------------------------------------------------------------------------------
;Bomb Explod Helper in Air
[Statedef 21906]
type = A
movetype = A
physics = N
anim = 21506
ctrl = 0
sprpriority = 4
velset = 0,0

[State 21506]
type = PlaySnd
trigger1 = Time = 1
value = 32720


[State 21506]
type = null;HitBy
trigger1 = 1
value = SCA,AP

[State 21506]
type = null;HitOverride
trigger1 = 1
stateno = 21486
attr = SCA,AP
slot = 0
time = -1


[State 21506]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 15*(Root,var(30)),Root,var(30)
animtype = Large
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-40
hitsound   = S8,0
guardsound = S4,0
sparkno = S7419;(8220+random%2)
guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 25
ground.velocity = -8,-4
air.velocity = -8,-4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = ifelse(MoveHit,40,14),ifelse(MoveHit,40,0)
palfx.time = 1
palfx.add = 256,256,256



[State 21506]
type = DestroySelf
trigger1 = AnimTime = 0


;------------------------------------------------------------------------------------------------------------
;Bomb Explod Helper on Ground
[Statedef 21907]
type = A
movetype = A
physics = N
anim = 21507
ctrl = 0
sprpriority = 4
velset = 0,0

[State 21507]
type = PlaySnd
trigger1 = Time = 1
value = 32720


[State 21507]
type = null;HitBy
trigger1 = 1
value = SCA,AP

[State 21507]
type = null;HitOverride
trigger1 = 1
stateno = 21486
attr = SCA,AP
slot = 0
time = -1


[State 21507]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 15*(Root,var(30)),Root,var(30)
animtype = Large
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-40
hitsound   = S8,0
guardsound = S4,0
sparkno = S7419;(8220+random%2)
guard.sparkno = S8430
ground.type = High
ground.slidetime = 10
ground.hittime  = 25
ground.velocity = -8,-4
air.velocity = -8,-4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;fall = 1
;air.fall = 1
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
getpower = ifelse(MoveHit,40,14),ifelse(MoveHit,40,0)
palfx.time = 1
palfx.add = 256,256,256



[State 21507]
type = DestroySelf
trigger1 = AnimTime = 0


;------------------------------------------------------------------------------------------------------------
;Head Crush Wave
[Statedef 23001]
type = S
movetype = A
physics = N
anim = 23001
ctrl = 0
sprpriority = 4
velset = 0,0
hitcountpersist = 1


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

[State 23001]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 23001]
type = DestroySelf
trigger1 = Parent,Anim != 3001


[State 23001]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Head Crush Wave
[Statedef 23002]
type = S
movetype = I
physics = N
anim = 23002
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1


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

[State 23002]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 23002]
type = HitBy
trigger1 = 1
value = SCA,AA,AP,AT

[State 23002]
type = HitOverride
trigger1 = 1
stateno = 23002
attr = SCA,AA,AP,AT
slot = 0
time = -1

[State 23002]
type = DestroySelf
trigger1 = Parent,stateno != 3001


[State 23002]
type = BindToParent
trigger1 = 1
;------------------------------------------------------------------------------------------------------------
;Clean up Helper
[Statedef 23021]
type = S
movetype = I
physics = N
anim = 9800
ctrl = 0
sprpriority = 5
velset = 0,0



[State 3021]
type = RemoveExplod
trigger1 = Parent,Stateno = 3021
trigger1 = Parent,StateTime = 118
trigger2 = Parent,Stateno != 3021
id = 6881

[State 3021]
type = DestroySelf
trigger1 = Parent,Stateno != 3021

[State 23021]
type = BindToParent
trigger1 = 1
ignorehitpause = 1




;------------------------------------------------------------------------------------------------------------
;Magnetic Armor
[Statedef 24120]
type = S
movetype = I
physics = N
anim = 24120
ctrl = 0
sprpriority = 5
velset = 0,0


[State 24120]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 24120]
type = Turn
trigger1 = root,facing != facing

[State 24120]
type = HitBy
trigger1 = 1
value = SCA,AA,AP,AT


[State 24120]
type = HitOverride
trigger1 = 1
stateno = 24120
attr = SCA,AA,AP,AT
slot = 0
time = -1



[State 24120]
type = DestroySelf
trigger1 = Root,var(57) = 0


[State 24120]
type = BindToParent
trigger1 = 1
ignorehitpause = 1

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



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

;-----------------------------------------------------------------
; States that are executed when in se
