

;VARIABLES
;var(0)-var(5): Temp
;var(6);combo chain 
;var(7); enemynear, head pos y
;var(8);small opponent y dist
;var(9);miss target
;var(10);target hit
;
;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);temp hitcount
;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);Donovan Swords
;var(38);dancing swords
;var(39);Anakaris Haste
;var(40)-(41);wall, ground, hit
;var(42);wall hit
;var(43) - var(48); run
;var(49); Kyuukouka Dance 
;var(50);- Kongou 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); Metamorphose
;var(58); remember ai for next round
;var(59); ai activate


[Data]
;Amount of life to start with

life = 7000
;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 = 30    ;Player width (back, ground)
ground.front = 30   ;Player width (front, ground)
air.back = 30  ;Player width (back, air)
air.front = 30   ;Player width (front, air)
height = 70          ;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 = 0     ;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,-3    ;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 2.0   ;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 = 171
velset = 0,0


[State 170]
type = null;ChangeState
trigger1 = Time = 0 && random < 400
value = 171

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


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



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


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

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


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

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


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

[State 171]
type = CtrlSet
trigger1 = Time = 120
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


;---------------------------------------------------------------------------
; DRAWGAME (Time over)
[Statedef 175]
type = S
ctrl = 0
velset = 0,0

[State 175, 1] ; If no anim, use go to lose state.
type = ChangeState
trigger1 = Time = 0
trigger1 = !SelfAnimExist(175)
value = 170

[State 175, 2]
type = ChangeAnim
trigger1 = Time = 0
value = 175

[State 175, 3]
type = NotHitBy
trigger1 = 1
value = SCA
time = 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+random%2


[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 = Time = 1
value = 181,0

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



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

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

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



[state 181] 
type = PlaySnd
trigger1 = AnimElem = 1
value = 181,0


[state 181] 
type = PlaySnd
trigger1 = AnimElem = 7
value = 181,1

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


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

[Statedef 182]
type = S
ctrl = 0
physics = N
anim = 182
sprpriority = 0
facep2 = 1


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


[state 181] 
type = PlaySnd
trigger1 = AnimElem = 10
value = 182,0

[State 182]
type = AssertSpecial
trigger1 = Time < 170
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 = PosSet
trigger1 = Time = 0 
y = 5

[State 183]
type = Explod
trigger1 = AnimElem = 1, = 2
anim = 6193
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)

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


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

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


;---------------------------------------------------------------------------
; Win pose 4- Win KO

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

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


[State 184] 
type = PlaySnd 
trigger1 = AnimElem =10
value = 184,0
persistent = 0


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


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

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

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


[State 185] 
type = PlaySnd 
trigger1 = AnimElem = 6
value = 185,0
persistent = 0



[State 185]
type = AssertSpecial
trigger1 = Time < 100
flag = roundnotover


;---------------------------------------------------------------------------
; Win pose 6- Win KO

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

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


[State 186] 
type = PosSet
trigger1 = Time = 0 
y = 5

[State 186]
type = Explod
trigger1 = AnimElem = 1, = 2
anim = 6193
ownpal = 1
ontop = 1
scale = const(size.xscale),const(size.yscale)

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


[State 186]
type = Helper
trigger1 = AnimElem = 2 && random < 1000
stateno = 6185
id = 6195
ownpal = 1
pos = -20,0
scale = const(size.xscale),const(size.yscale)
[State 186]
type = Explod
trigger1 = AnimElem = 7
anim = 6186
ownpal = 1
ontop = 1
pos = -3,-97
bindtime = -1
removetime = -1
scale = const(size.xscale),const(size.yscale)



[State 186]
type = AssertSpecial
trigger1 = Time < 150
flag = roundnotover


;---------------------------------------------------------------------------
; Win pose 7- Win KO

[Statedef 187]
type = S
ctrl = 0
anim = 187+random%2
velset = 0,0
sprpriority = 0

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



[State 187]
type = PlaySnd
trigger1 = AnimElem = 5 && Anim = 187
value = 187,0


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


;---------------------------------------------------------------------------
; Win pose 8 Win KO

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

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



[State 188]
type = Helper
trigger1 = AnimElem = 4
stateno = 6189
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 188]
type = PlaySnd
trigger1 = AnimElem = 7
value = 185,0

[State 188]
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; && random < 400
value = 192;+random%2

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


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

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


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

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


[State 192]
type = Helper
trigger1 = Time = 0
stateno = 6192
id = 6192
pos = 1,-88
scale = const(size.xscale),const(size.yscale)

[State 192]
type = ChangeAnim
trigger1 = NumHelper(6192)
trigger1 = Helper(6192),AnimElem = 15
value = 192
elem = 2
persistent = 0


[State 192]
type = PalFx
trigger1 = AnimElem = 8
time = 8
color = 256
add = -70,70,70



[State 192]
type = PlaySnd
trigger1 = AnimElem = 12
value = 192,1


[State 192]
type = Explod
trigger1 = AnimElem = 12
anim = 6193
pos = 1,-88
sprpriority = -3
scale = const(size.xscale),const(size.yscale)
[State 192]
type = Explod
trigger1 = AnimElem = 12
anim = 6194
pos = 1,-88
sprpriority = 4
scale = const(size.xscale),const(size.yscale)

[State 192]
type = Helper
trigger1 = AnimElem = 12
stateno = 6193
id = 6193
pos = 0,0
scale = const(size.xscale),const(size.yscale)

[State 192]
type = Helper
trigger1 = AnimElem = 12
stateno = 6194
id = 6194
pos = 0,0
scale = const(size.xscale),const(size.yscale)
[State 192] ;Freeze animation until PreIntro is over
type = null;ChangeAnim
trigger1 = RoundState = 0
value = 190

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


[State 192]
type = null;ChangeState
triggerall = Anim = 193
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 198
ctrl = 0

[State 192]
type = ChangeState
trigger1 = AnimElem, = 12, = 30
value = 199
ctrl = 0



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

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


[State 193]
type = screenbound
trigger1 = Time >= 0
value = 0
movecamera = 0, 0



[State 193]
type = PlaySnd
trigger1 = AnimElem = 18
value = 192,1


[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 = screenbound
trigger1 = Time >= 0
value = 0
movecamera = 0, 0


[State 194]
type = PlaySnd
trigger1 = AnimElem = 5
value = 3001,3
persistent = 0

[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 = ChangeAnim
trigger1 = AnimTime = 0 && Anim = 194
value = 50
persistent = 0


[State 194]
type = VelSet
trigger1 = AnimElem = 7
y = -4


[State 194]
type = VelAdd
trigger1 = Anim = 50
y = 0.4

[State 193]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 198
ctrl = 0

[State 194]
type = null;ChangeState
trigger1 = Time = 120
value = 199
ctrl = 0


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

[Statedef 7196]
type = S
ctrl = 0
physics = N
anim = 196
velset = -3,0
sprpriority = 3


[State 7196]
type = VarSet
trigger1 = Time = 0
fvar(0) = Pos X


[State 7196]
type = PosSet
trigger1 = Time = 0
x = -2*Pos X
y = 0

[State 7196]
type = screenbound
trigger1 = Time >= 0
value = 0
movecamera = 0, 0


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



[State 7196]
type = VelSet
trigger1 = Time = 0
x = -3


[State 7196]
type = Turn
trigger1 = Time = 0 || AnimElem  = 14

[State 7196]
type = VelSet
trigger1 = FrontEdgeDist < 70
x = 0


[State 7196]
type = PosSet
trigger1 = Vel X = 0
x = fvar(0)
persistent = 0



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

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


[State 7196]
type = ChangeAnim
trigger1 = Vel X != 0
trigger1 = AnimElem = 9
value = 196
elem = 4


[State 7196]
type = PlaySnd
trigger1 = Time = 4
value = 3001,0



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


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

[Statedef 7197]
type = S
ctrl = 0
physics = N
anim = 7198
velset = -3,0
sprpriority = 3


[State 7197]
type = VarSet
trigger1 = Time = 0
fvar(0) = Pos X


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

[State 7197]
type = PosSet
trigger1 = Time = 0
x = -2*Pos X
y = -100

[State 7197]
type = Helper
trigger1 = Time = 0
stateno = 6197
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 7197]
type = screenbound
trigger1 = Time >= 0
value = 0
movecamera = 0, 0


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



[State 7197]
type = VelSet
trigger1 = Time = 0
x = -3


[State 7197]
type = Turn
trigger1 = Time = 0


[State 7197]
type = VelSet
trigger1 = FrontEdgeDist < 70
x = 0


[State 7197]
type = PosSet
trigger1 = Vel X = 0
x = fvar(0)
persistent = 0



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

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



[State 7197]
type = null;ChangeAnim
trigger1 = Vel X = 0
value = 7198
elem = 7
persistent = 0

[State 7197]
type = PlaySnd
trigger1 = Vel X = 0
value = 1550,1
persistent = 0


[State 7197]
type = VelAdd
trigger1 = Vel X = 0 && Pos Y < 0
y = 0.4

[State 7197]
type = null;PlaySnd
trigger1 = Time = 4
value = 3001,0


[State 7197]
type = VarSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
var(0) = 1


[State 7197]
type = PosSet
trigger1 = var(0)
y = 0


[State 7197]
type = VelSet
trigger1 = var(0)
y = 0



[State 7197]
type = ChangeAnim
trigger1 = var(0)
value = 7198
elem = 2
persistent = 0


[State 7197]
type = PlaySnd
trigger1 = var(0)
value = 197,0


[State 7197]
type = Turn
trigger1 = var(0)
persistent = 0


[State 7197]
type = VelSet
trigger1 = var(0)
y = -4
persistent = 0



[State 7197]
type = VarSet
trigger1 = var(0)
var(0) = 0


[State 7197]
type = Explod
trigger1 = AnimElem = 5, = 30
anim = 21541
ontop = 1
scale = const(size.xscale),const(size.yscale)

[State 7197]
type = PlaySnd
trigger1 = AnimElem = 5, = 30
value = 1550,4


[State 7197]
type = AssertSpecial
trigger1 = AnimElem = 5, >= 30
flag = invisible



[State 7197]
type = ChangeState
trigger1 = AnimElem = 5, >= 37
value = 199
ctrl = 0


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

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

[State 7198]
type = screenbound
trigger1 = Time >= 0
value = 0
movecamera = 0, 0


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

[State 7198]
type = Explod
trigger1 = Time = 1
anim = 6311
ontop = 1
ownpal = 1
pos = 0,-floor(Pos Y)
scale = const(size.xscale),const(size.yscale)
[State 7198]
type = Explod
trigger1 = Time = 1
anim = 6311
facing = -1
ontop = 1
ownpal = 1
pos = 0,-floor(Pos Y)
scale = const(size.xscale),const(size.yscale)
[State 7198]
type = Helper
trigger1 = Time = 2
stateno = 6199
ownpal = 1
scale = const(size.xscale),const(size.yscale)



[State 7198]
type = PosSet
trigger1 = Time = 4
y = -240


[State 7198]
type = ChangeAnim
trigger1 = Time = 4
value = 7199


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

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


[State 7198]
type = PlaySnd
trigger1 = Time = 8
value = 198,0
persistent = 0


[State 7198]
type = VelSet
trigger1 = Pos Y < 0
y = 0.5


[State 7198]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 198
ctrl = 0

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

[State 198]
type = Explod
trigger1 = Time = 1
anim = 7053
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 = null;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 = 0 
anim = 0
velset = 0,0


[State 199]
type = Helper
trigger1 = NumHelper(6000) = 0 && Anim != [20,21] 
stateno = 6000
id = 6000
pos = 0,0
scale = const(size.xscale),const(size.yscale)

[State 199]
type = Helper
trigger1 = NumHelper(6001) = 0 && Anim != [20,21] 
stateno = 6001
id = 6001
pos = 0,0
scale = const(size.xscale),const(size.yscale)
[State 199]
type = Helper
trigger1 = NumHelper(6002) = 0 && Anim != [20,21] 
stateno = 6002
id = 6002
pos = 0,0
scale = const(size.xscale),const(size.yscale)

[State 199]
type = Helper
trigger1 = NumHelper(6020) = 0 && Anim = 20
stateno = 6020
id = 6020
ownpal = 0
scale = const(size.xscale),const(size.yscale)

[State 199]
type = Helper
trigger1 = NumHelper(6021) = 0 && Anim = 21
stateno = 6021
id = 6021
ownpal = 0
scale = const(size.xscale),const(size.yscale)
[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 = 1
movetype = I
physics = S
poweradd = 10
anim = 195
velset = 0,0
sprpriority = 2



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


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

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


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


[State 200]
type = Helper
trigger1 = Time = 0
stateno = 6200
id = 6200
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 200]
type = HitDef
trigger1 = hitcount < 3
trigger1 = moveguarded < 1
attr = S, NA             
damage = 3*var(30),floor(var(30)/2)
animtype = Light                 
guardflag = MA                  
hitflag = MAF                    
priority = 3, Hit                
pausetime = 7,7                
sparkno = -1;S7202       
sparkxy = -10,-80
hitsound = S1,1
guardsound = S4,0                
guard.sparkno = -1;S7300
ground.type = High               
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -9  
air.type = High                  
air.velocity = -9     
air.hittime = 12                 
getpower = 50,25
;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, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7202
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200]
type = Varset
trigger1 = time = 0
var(0) = 3

[State 200]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 200]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded


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


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


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


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

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



[State 210]
type = HitDef
trigger1 = hitcount < 5
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Medium
damage    = 2*var(30),floor(var(30)/4)
guardflag = MA
pausetime = 7,7
sparkno = -1;S7202
guard.sparkno = -1;S7300
sparkxy = -10,-70
hitsound   = S1,12
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -9
air.velocity = -9
getpower = 57,25
;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 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7202
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 210]
type = Varset
trigger1 = time = 0
var(0) = 5

[State 210]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 210]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded


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

[State 210]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 17, >= 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 = 0
facep2 = 1



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

[State 220]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Medium
damage    = 10*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 7,7
sparkno = -1;S7202
sparkxy = -10,-60
hitsound   = S1,1
guardsound = S4,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -11
air.velocity = -11
getpower = 20,10
;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 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7202
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)


[State 220]
type = Helper
trigger1 = AnimElem = 9
stateno = 6220
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 220]
type = Helper
trigger1 = AnimElem = 9
stateno = 6221
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 220]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


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

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


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



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

[State 300]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Medium
damage    = 10*var(30),floor(var(30)/2)
guardflag = MA
pausetime = 7,7
sparkno = -1;S7202
sparkxy = -10,-60
hitsound   = S1,1
guardsound = S4,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -11
air.velocity = -11
getpower = 20,10
;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 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7202
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 300]
type = Helper
trigger1 = AnimElem = 9
stateno = 6220
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 300]
type = Helper
trigger1 = AnimElem = 9
stateno = 6221
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 300]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


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

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


;---------------------------------------------------------------------------
; Standing Medium Kick

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

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



[State 310]
type = HitDef
trigger1 = hitcount < 5
trigger1 = moveguarded < 1
attr = S, NA
animtype  = Medium
damage    = 2*var(30),floor(var(30)/4)
guardflag = MA
pausetime = 7,7
sparkno = -1;S7202
guard.sparkno = -1;S7300
sparkxy = -10,-70
hitsound   = S1,12
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -9
air.velocity = -9
getpower = 57,25
;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 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7202
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 310]
type = Varset
trigger1 = time = 0
var(0) = 5

[State 310]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 310]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded


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

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

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



;---------------------------------------------------------------------------
; Stand Strong Kick

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


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


[State 320]
type = Helper
trigger1 = Time = 0
stateno = 6200
id = 6200
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 320]
type = HitDef
trigger1 = hitcount < 3
trigger1 = moveguarded < 1
attr = S, NA             
damage = 3*var(30),floor(var(30)/2)
animtype = Light                 
guardflag = MA                  
hitflag = MAF                    
priority = 3, Hit                
pausetime = 7,7                
sparkno = -1;S7202       
sparkxy = -10,-80
hitsound = S1,1
guardsound = S4,0                
guard.sparkno = -1;S7300
ground.type = High               
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -9  
air.type = High                  
air.velocity = -9     
air.hittime = 12                 
getpower = 50,25
;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, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7202
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 320]
type = Varset
trigger1 = time = 0
var(0) = 3

[State 320]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 320]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded


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


[State 320]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 17, >= 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 = 0
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 = 3*var(30)      
animtype = Light                 
guardflag = M                
hitflag = MAF                    
priority = 3, Hit                
pausetime = 3,3             
sparkno = -1;S(8200+random%8)                
sparkxy = -10,-50
hitsound = S1,0        
guardsound = S4,0                
guard.sparkno = -1;S7300
ground.type = Low               
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -3    
getpower = 13,7
;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, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8200+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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


[State 400]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 5, >= 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 = 0
velset = 0,0 
facep2 = 1



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


[State 410]
type = PosAdd
trigger1 = AnimElemNo(0) = [2,3]
x = 9

[State 410]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA             
damage = 5*var(30)             
animtype = Medium                 
guardflag = M                 
hitflag = MAF                    
priority = 3, Hit                
pausetime = 5,5             
sparkno = -1;S(8210+random%8)                   
sparkxy = -10,-50
hitsound = S1,1
guardsound = S4,0                
guard.sparkno = -1;S7300
ground.type = Low               
ground.slidetime = 15            
ground.hittime  = 15             
ground.velocity = -5    
;ground.velocity = -1,-9     
air.velocity = -4                    
getpower = 27,14
;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, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8200+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[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 = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

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

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

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

[State 420]
type = Helper
trigger1 = facing = 1 && AnimElem = 2
trigger2 = facing = -1 && AnimElem = 3
stateno = 6420
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 420]
type = VelSet
triggerall = !Vel X
trigger1 = AnimElem = 1, >= 0 
trigger1 = p2bodydist x > 50
trigger1 = var(59) && var(17) 
x = 7

[State 420]
type = VelSet
triggerall = Vel X 
trigger1 = p2bodydist x < 30
trigger2 = AnimElem = 4, >= 0
x = 0

[State 420]
type = HitDef
trigger1 = !var(29)
triggerall = facing = -1
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
damage    = 8*var(30)
animtype  = Hard
;hitflag = MAFD
guardflag = M
pausetime = 7,7
sparkxy = -10,-90
sparkno = -1;S(8220+random%4)
hitsound   = S1,2 
guardsound = S4,0
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,-13
air.velocity = 0,-12
getpower = 50,20
;fall = 1
;air.fall = 1
;fall.recover =0
;fall.animtype = Hard
;p2stateno = 9020
p2stateno = 321
palfx.time = 20
palfx.add = -128,32,128
color = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8220+random%4
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 420]
type = HitDef
trigger1 = !var(29)
triggerall = facing = 1
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
damage    = 8*var(30)
animtype  = Hard
;hitflag = MAFD
guardflag = M
pausetime = 7,7
sparkxy = -10,-90
sparkno = -1;S(8220+random%4)
hitsound   = S1,2 
guardsound = S4,0
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,-13
air.velocity = 0,-12
getpower = 50,20
;fall = 1
;air.fall = 1
;fall.recover =0
;fall.animtype = Hard
;p2stateno = 9020
p2stateno = 321
palfx.time = 20
palfx.add = 32,-128,-128
color = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8220+random%4
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[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 = PlaySnd
trigger1 = MoveHit
value = 1,19+2*(facing = 1)
ignorehitpause = 1
persistent = 0



[State 420]
type = Explod
trigger1 = MoveHit = [1,3]
anim = 8050+(facing = 1)
ignorehitpause = 1
pos = 0,-abs(EnemyNear, const(size.mid.pos.y))
random = 2*abs(enemynear,const(size.ground.front)), abs(EnemyNear, const(size.head.pos.y))
postype = p2
ownpal = 1
ontop = 1
bindtime = -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 = 7, >= 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 = 0
velset = 0,0 
facep2 = 1


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


[State 500]
type = VelSet
trigger1 = AnimElemNo(0) = [3,6]
x = 9

[State 500]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA             
damage = 7*var(30),floor(var(30)/2)           
animtype = Light                 
guardflag = L                 
hitflag = MFD             
priority = 3, Hit                
pausetime = 4,4             
sparkno = -1;S7302            
sparkxy = -10,-10
hitsound = S1,4        
guardsound = S4,0                
guard.sparkno = -1;S7300
ground.type = Trip               
ground.slidetime = 15            
ground.hittime  = 10             
ground.velocity = -0,-4    
air.velocity = -3    
getpower = 13,7
;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, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7302
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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


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

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

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



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

[State 510]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
animtype = Medium
damage    = 5*var(30)
hitflag = MFD
guardflag = L
pausetime = 5,5
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
sparkxy = -10,-10
hitsound   = S1,5
guardsound = S4,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -5
air.velocity = -5
getpower = 27,14
;fall = 1
;air.fall = 1
;fall.recover =0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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


[State 510]
type = VarAdd
trigger1 = !MoveContact && AnimElem = 6, >= 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 = N
juggle  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 520
sprpriority = 0
facep2 = 1



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


[State 220]
type = Helper
trigger1 = facing = 1 && AnimElem = 3
trigger2 = facing = -1 && AnimElem = 1
stateno = 6520
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 520]
type = HitDef
triggerall = facing
;trigger1 = !var(29)
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
animtype = Hard
damage    = 8*var(30)
hitflag = MAF
guardflag = L
pausetime = 7,7
sparkno = -1;S(8220+random%8)
guard.sparkno = -1;S7300
sparkxy = -10,-20
hitsound   = S1,6
guardsound = S4,0
ground.type = Trip
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,-4
air.velocity = 0,-4
getpower = 50,20
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;p2stateno = 321
palfx.time = 20
palfx.add = -128,32,128
color = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8220+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 520]
type = HitDef
triggerall = facing = -1
;trigger1 = !var(29)
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = C, NA
animtype = Hard
damage    = 8*var(30)
hitflag = MAF
guardflag = L
pausetime = 7,7
sparkno = -1;S(8220+random%8)
guard.sparkno = -1;S7300
sparkxy = -10,-20
hitsound   = S1,6
guardsound = S4,0
ground.type = Trip
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = 0,-4
air.velocity = 0,-4
getpower = 50,20
;fall = 1
;air.fall = 1
;fall.recover =0
;p2stateno = 9020
;p2stateno = 321
palfx.time = 20
palfx.add = 32,-128,-128
color = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8220+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 520]
type = PlaySnd
trigger1 = MoveHit
value = 1,19+2*(facing = -1)
ignorehitpause = 1
persistent = 0



[State 520]
type = Explod
trigger1 = MoveHit = [1,3]
anim = 8050+(facing = -1)
ignorehitpause = 1
pos = 0,-abs(EnemyNear, const(size.mid.pos.y))
random = 2*abs(enemynear,const(size.ground.front)), abs(EnemyNear, const(size.head.pos.y))
postype = p2
ownpal = 1
ontop = 1
bindtime = -1
scale = const(size.xscale),const(size.yscale)
[State 520]
type = null;varset
trigger1 = MoveHit
var(29) = 1
ignorehitpause = 1
persistent = 0

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


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

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


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


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

[State 600]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 7*var(30),floor(var(30)/2)
guardflag = HA
pausetime = 3,3
sparkno = -1;S7302
guard.sparkno = -1;S7300
sparkxy = -10,-90+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -9
air.velocity = 0,((vel y)-.2)
getpower = 50,25

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7302
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

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

[State 600]
type = CtrlSet
trigger1 = Anim = 50
value = 1
persistent = 0

[State 600]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 50
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 = 50
persistent = 0

[State 600]
type = StateTypeSet
trigger1 = Anim = 50
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 = 0
;velset = 0,0
facep2 = 1


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

[State 610]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Medium
damage    = 5*var(30)
guardflag = HA
pausetime = 5,5
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
sparkxy = -10,-90+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 = 27,14

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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


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

[State 610]
type = CtrlSet
trigger1 = Anim = 50
value = 1
persistent = 0

[State 610]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 50
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 = 50
value = 1335
ctrl = 1

[State 610]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
persistent = 0


[State 610]
type = StateTypeSet
trigger1 = Anim = 50
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 = 0
;velset = 0,0
facep2 = 1


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


[State 620]
type = Helper
trigger1 = facing = 1 && AnimElem = 2
trigger2 = facing = -1 && AnimElem = 5
stateno = 6620
ownpal = 1
persistent = 0
scale = const(size.xscale),const(size.yscale)
[State 620]
type = HitDef
triggerall = facing = -1
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 8*var(30)
guardflag = HA
pausetime = 5,7;0,17;7,10
sparkno = -1;S(8220+random%8)
guard.sparkno = -1;S7300
sparkxy = -20,-90+floor(P2Dist Y)
hitsound   = S1,2
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 = 50,20
fall = (enemynear,statetype = A)
air.fall = 1
fall.recover =0
palfx.time = 20
palfx.add = -128,32,128
color = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8220+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 620]
type = HitDef
triggerall = facing = 1
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 8*var(30)
guardflag = HA
pausetime = 5,7;0,17;7,10
sparkno = -1;S(8220+random%8)
guard.sparkno = -1;S7300
sparkxy = -20,-90+floor(P2Dist Y)
hitsound   = S1,2
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 = 50,20
fall = (enemynear,statetype = A)
air.fall = 1
fall.recover =0
palfx.time = 20
palfx.add = 32,-128,-128
color = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8220+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 620]
type = PlaySnd
trigger1 = MoveHit
value = 1,19+2*(facing = 1)
ignorehitpause = 1
persistent = 0



[State 620]
type = Explod
trigger1 = MoveHit = [1,3]
anim = 8050+(facing = 1)
ignorehitpause = 1
pos = 0,-abs(EnemyNear, const(size.mid.pos.y))
random = 2*abs(enemynear,const(size.ground.front)), abs(EnemyNear, const(size.head.pos.y))
postype = p2
ownpal = 1
ontop = 1
bindtime = -1
scale = const(size.xscale),const(size.yscale)
[State 620]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0

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

[State 620]
type = CtrlSet
trigger1 = Anim = 50
value = 1
persistent = 0

[State 620]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 50
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 = 50
value = 1335
ctrl = 1

[State 620]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
persistent = 0


[State 620]
type = StateTypeSet
trigger1 = Anim = 50
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 = 41
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 < 100
trigger1 = random < 200
value = 710
ctrl = 0


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


[State 631]
type = ChangeState
trigger1 = p2bodydist x < 90
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 = null;ChangeState
trigger1 = p2bodydist x < 70
trigger1 = random < 100
value = 620
ctrl = 0


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

[State 631]
type = null;ChangeState
trigger1 = p2bodydist x < 90
value = 620
ctrl = 0


;------------------------------------------------------------------------------------------------------------
; Air Land
[Statedef 635]
type = A
movetype = I
physics = A
anim = 50
;ctrl = 0
sprpriority = 2
;poweradd= 65
velset = 0,0
facep2 = 1


[State 635]
type = null;StateTypeSet
trigger1 = Pos Y < 0
statetype = A
persistent = 0


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


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

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


[State 700]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Light
damage    = 3*var(30)
guardflag = MA
pausetime = 3,3
sparkno = -1;S(8200+random%8)
guard.sparkno = -1;S7300
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 = 13,7

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8200+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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


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

[State 700]
type = CtrlSet
trigger1 = Anim = 50
value = 1
persistent = 0

[State 700]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 50
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 = 50
value = 1335
ctrl = 1

[State 700]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
persistent = 0


[State 700]
type = StateTypeSet
trigger1 = Anim = 50
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 = 0
;velset = 0,0
facep2 = 1

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


[State 710]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Medium
damage    = 5*var(30)
guardflag = HA
pausetime = 5,5
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
sparkxy = -10,-70+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 = 27,14

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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


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

[State 710]
type = CtrlSet
trigger1 = Anim = 50
value = 1
persistent = 0

[State 710]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 50
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 = 50
value = 1335
ctrl = 1

[State 710]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
persistent = 0


[State 710]
type = StateTypeSet
trigger1 = Anim = 50
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 = 0
;velset = 0,0
facep2 = 1


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


[State 720]
type = Helper
trigger1 = facing = 1 && AnimElem = 3
trigger2 = facing = -1 && AnimElem = 5
stateno = 6720
ownpal = 1
persistent = 0
scale = const(size.xscale),const(size.yscale)
[State 720]
type = HitDef
triggerall = facing = -1
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 8*var(30)
guardflag = HA
pausetime = 7,7;0,17;7,10
sparkno = -1;S(8220+random%4)
guard.sparkno = -1;S7300
sparkxy = -10,-80+floor(P2Dist Y)
hitsound   = S1,6;2,4
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9
air.velocity = -7,17
getpower = 50,20
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
palfx.time = 20
palfx.add = -128,32,128
color = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8220+random%4
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)


[State 720]
type = HitDef
triggerall = facing = 1
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = A, NA
animtype  = Hard
damage    = 8*var(30)
guardflag = HA
pausetime = 7,7;0,17;7,10
sparkno = -1;S(8220+random%4)
guard.sparkno = -1;S7300
sparkxy = -10,-80+floor(P2Dist Y)
hitsound   = S1,6;2,4
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -9
air.velocity = -7,17
getpower = 50,20
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
palfx.time = 20
palfx.add = 32,-128,-128
color = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8220+random%4
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 720]
type = PlaySnd
trigger1 = MoveHit
value = 1,19+2*(facing = 1)
ignorehitpause = 1
persistent = 0



[State 720]
type = Explod
trigger1 = MoveHit = [1,3]
anim = 8050+(facing = 1)
ignorehitpause = 1
pos = 0,-abs(EnemyNear, const(size.mid.pos.y))
random = 2*abs(enemynear,const(size.ground.front)), abs(EnemyNear, const(size.head.pos.y))
postype = p2
ownpal = 1
ontop = 1
bindtime = -1
scale = const(size.xscale),const(size.yscale)
[State 720]
type = VarAdd
trigger1 = MoveContact
var(21) = 1
ignorehitpause = 1
persistent = 0


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

[State 720]
type = CtrlSet
trigger1 = Anim = 50
value = 1
persistent = 0

[State 720]
type = VelAdd
trigger1 = Pos Y < 0; && !var(54)
trigger2 = Anim = 50
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 = 50
value = 1335
ctrl = 1

[State 720]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
persistent = 0


[State 720]
type = StateTypeSet
trigger1 = Anim = 50
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 = 0



; 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 = PlaySnd
trigger1 = AnimElem = 2
value = 800,0

[State 800]
type = Helper
trigger1 = AnimElem = 1
stateno = 20800
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)
[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 = 0

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


[State 810]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
ownpal = 1
pos = 77,-62
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]
type = Helper
trigger1 = Time = 0
stateno = 20810
scale = const(size.xscale),const(size.yscale)


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


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

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

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


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


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


[State 810]
type = PlaySnd
trigger1 = AnimElem = 6
value = 810,0

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


[State 810]
type = null;HitAdd
trigger1 = AnimElemNo(0) = 3 && Time%7 = 0
value = 1

[State 810]
type = PowerAdd
trigger1 = AnimElem = 6
value = 50


[State 810]
type = TargetState
trigger1 = Time >= 92
value = 823

[State 810]
type = ChangeState
trigger1 = Time >= 92
value = 813
ctrl = 0


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


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

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

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


[State 811]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
ownpal = 1
pos = 77,-62
scale = const(size.xscale),const(size.yscale)
[State 811]
type = null;PlayerPush
trigger1 = 1
value = 0

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




[State 811];Bind 7
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 75,-61


[State 811];Bind 8
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 57,-74



[State 811];Bind 9
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = -63,-126


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


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

[State 811]
type = PowerAdd
trigger1 = AnimElem = 3
value = 50

[State 811]
type = TargetState
trigger1 = AnimElem = 3, = 1
value = 823

[State 811]
type = ChangeState
trigger1 = AnimElem = 3, = 1
value = 813
ctrl = 0


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


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

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


[State 813]
type = null;VarSet
trigger1 = !var(41)
var(41) = 1
persistent = 0


[State 813]
type = null;VarSet
trigger1 = !var(40)
var(40) = 1
persistent = 0



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

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

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

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

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


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


[State 820]
type = DestroySelf
trigger1 = ishelper


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

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

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

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

[State 821]
type = Turn
trigger1 = facing = enemynear,facing


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


[State 821]
type = DestroySelf
trigger1 = ishelper


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

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


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


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

[State 823]
type = VelSet
trigger1 = Time = 0
x = -7
y = -7

[State 823] ;Gravity
type = 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;elfState
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 = null;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 = null;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 = null;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 = 0



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

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

[State 840]
type = null;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 = Helper
trigger1 = Time = 0
stateno = 6840
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 840]
type = VarSet
trigger1 = Time = 0
var(1) = 0

[State 840]
type = VarAdd
trigger1 = AnimElem = 13, = 1
var(1) = 1

[State 840];Bind 1
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 108,-47


[State 840];Bind 2
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 81,-56

[State 840];Bind 3
type = TargetBind
trigger1 = AnimElemNo(0) = 3
pos = 38,-61

[State 840];Bind 4
type = TargetBind
trigger1 = AnimElemNo(0) = 4
pos = 29,-62


[State 840];Bind 5
type = TargetBind
trigger1 = AnimElemNo(0) = 5
pos = 28,-85


[State 840];Bind 6
type = TargetBind
trigger1 = AnimElemNo(0) = 6
pos = 25,-112

[State 840];Bind 7
type = TargetBind
trigger1 = AnimElemNo(0) = 7
pos = 52,-128


[State 840];Bind 8
type = TargetBind
trigger1 = AnimElemNo(0) = 8
pos = 42,-138


[State 840];Bind 9
type = TargetBind
trigger1 = AnimElemNo(0) = 9
pos = 64,-139


[State 840];Bind 10
type = TargetBind
trigger1 = AnimElemNo(0) = 10
pos = 52,-137


[State 840];Bind 11
type = TargetBind
trigger1 = AnimElemNo(0) = 11
pos = 53,-137


[State 840];Bind 12
type = TargetBind
trigger1 = AnimElemNo(0) = 12
pos = 53,-137

[State 840];Bind 13
type = TargetBind
trigger1 = AnimElemNo(0) = 13
pos = 54,-138


[State 840]
type = PlaySnd
trigger1 = AnimElem = 11
value = 830,0


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

[State 840]
type = PowerAdd
trigger1 = AnimElem = 11
value = 10

[State 840]
type = TargetState
trigger1 = Var(1) = 5
value = 859


[State 840]
type = ChangeState
trigger1 = Var(1) = 5
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 = 0


[State 841]
type = null;VarSet
trigger1 = AnimTime = -1
trigger1 = !var(40)
var(40) = 1
persistent = 0


[State 841]
type = VarSet
trigger1 = AnimTime = -1
trigger1 = !var(41)
var(41) = 1
persistent = 0

[State 841]
type = VarAdd
trigger1 = AnimElem = 9, >= 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 = ChangeAnim2
trigger1 = Time = 0
trigger1 = Authorname = "Gill"
trigger1 = Name = "Gill"
trigger1 = SelfAnimExist(850+10000*(facing = -1))
value = 850+10000*(facing = -1)


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


[State 850]
type = SprPriority
trigger1 = AnimElem = 6
value = 2



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

[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 = 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,-9
;poweradd = 60

[State 859]
type = Turn
trigger1 = Time = 0

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


[State 859]
type = ChangeAnim2
trigger1 = Time = 0
trigger1 = Authorname = "Gill"
trigger1 = Name = "Gill"
trigger1 = SelfAnimExist(823+10000*(facing = -1))
value = 823+10000*(facing = -1)


[State 859]
type = VelSet
trigger1 = Time = 0
x = -7
y = -4

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


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

[State 859]
type = null;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 = 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 = null;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 = ScreenBound
trigger1 = 1
value = 0
movecamara = 0,0

[State 930]
type = PlaySnd
trigger1 = AnimElem = 2
value = 710
persistent = 0

[State 930]
type = VelSet
trigger1 = AnimElem = 2
y = -9


[State 930]
type = VelAdd
trigger1 = AnimElem = 2, >= 0
y = -0.3


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


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

[State 930]
type = TargetState
trigger1 = ScreenPos Y < -100
value = 941


[State 930]
type = ChangeState
trigger1 = ScreenPos Y < -100
value = 931
ctrl = 0



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


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

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

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


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

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


[State 931]
type = ScreenBound
trigger1 = Pos Y < -150
value = 0
movecamara = 0,1


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

[State 931]
type = Helper
trigger1 = Time = 0
stateno = 6931
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 931]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = -1,0


[State 931]
type = TargetState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 942

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


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


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

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

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


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

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


[State 932]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = -1,0



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

[State 932]
type = PlaySnd
trigger1 = Time = 0
value = 52,4



[State 932]
type = EnvShake
trigger1 = Time = 0
time = 8

[State 932]
type = Explod
trigger1 = Time = 0
anim = 8200+random%8
ontop = 1
pos = 10,0
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 932]
type = TargetLifeAdd
trigger1 = Time = 0
value = -10*var(30)

[State 932]
type = PowerAdd
trigger1 = Time = 0
value = 50

[State 932]
type = TargetState
trigger1 = Time = 12
value = 943

[State 932]
type = ChangeState
trigger1 = Time = 12
value = 935
ctrl = 0


[State 932]
type = ChangeState
trigger1 = !NumTarget(920)
value = 935
ctrl = 1


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

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

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


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

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


[State 933]
type = TargetBind
trigger1 = AnimElemNo(0) = 1
pos = 20,-69


[State 933]
type = TargetBind
trigger1 = AnimElemNo(0) = 2
pos = 15,-39


[State 933]
type = TargetLifeAdd
trigger1 = AnimElem = 2, = 3
value = -10*var(30)

[State 933]
type = PowerAdd
trigger1 = AnimElem = 2, = 3
value = 50

[State 933]
type = TargetState
trigger1 = AnimElem = 2, = 3
value = 943

[State 933]
type = ChangeState
trigger1 = AnimElem = 2, = 3
value = 935
ctrl = 0


[State 933]
type = ChangeState
trigger1 = !NumTarget(920)
value = 935
ctrl = 1


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

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



[State 935]
type = PlayerPush
trigger1 = Time < 10
value = 0


[State 935]
type = null;VarSet
trigger1 = !var(40)
var(40) = 1
persistent = 0


[State 935]
type = null;VarSet
trigger1 = !var(41)
var(41) = 1
persistent = 0


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

[State 931]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
persistent = 0


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


[State 935]
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 941]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 3

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


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

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


[State 941]
type = DestroySelf
trigger1 = ishelper



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

[Statedef 942]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 3

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


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

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


[State 942]
type = DestroySelf
trigger1 = ishelper


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



[State 943]
type = ChangeAnim2
trigger1 = Time = 0
value = 823


[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


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



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


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


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


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


[State 944]
type = null;SelfState
trigger1 = Vel Y > 3
value = 5040

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



;---------------------------------------------------------------------------
;Thrown 
[Statedef 945]
type    = A
movetype= H
physics = N
velset = 0,9
poweradd = 60



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


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


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


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


[State 945]
type = null;SelfState
trigger1 = Vel Y > 3 
value = 5040

[State 945] ;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 = VarSet
trigger1 = AnimElem = 5
var(41) = 1

[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


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

[State 1240]
type = PlaySnd
trigger1 = AnimElem = 10
value = 1240,0

[State 1240]
type = Helper
trigger1 = AnimElem = 7
stateno = 21241
id = 21241
ownpal = 1
pos = 0,0
scale = const(size.xscale),const(size.yscale)

[State 1240]
type = Helper
trigger1 = AnimElem = 11
stateno = 21240
id = 21240
ownpal = 1
pos = 145,-63
scale = const(size.xscale),const(size.yscale)

[State 1240]
type = VarAdd
;trigger1 = !MoveContact
trigger1 = AnimElem = 13, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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



;---------------------------------------------------------------------------
;Armor Strike
[Statedef 1250]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1250
sprpriority = 0
facep2 = 1

[State 1250]
type = null;Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1250]
type = PlaySnd
trigger1 = AnimElem = 11
value = 1250,0


[State 1250]
type = Helper
trigger1 = AnimElem = 11
stateno = 21250
id = 21250
scale = const(size.xscale),const(size.yscale)
[State 1250]
type = ChangeAnim
trigger1 = AnimElem = 20 && NumHelper(21250)
value = 1250
elem = 15

[State 1250]
type = PlaySnd
trigger1 = AnimElem = 20
value = 1250,1

[State 1250]
type = VarAdd
;trigger1 = !MoveContact
trigger1 = AnimElem = 21, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


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


;---------------------------------------------------------------------------
;Mirror Trap
[Statedef 1260]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1260
sprpriority = 0
facep2 = 1

[State 1260]
type = null;Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

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


[State 1260]
type = Helper
trigger1 = AnimElem = 9
stateno = 21260
id = 21260
ownpal = 1
pos = 92,-100
scale = const(size.xscale),const(size.yscale)

[State 1260]
type = VarAdd
;trigger1 = !MoveContact
trigger1 = AnimElem = 14, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


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




;---------------------------------------------------------------------------
;Arm Shot Ground
[Statedef 1270]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1270
sprpriority = 0
facep2 = 1

[State 1270]
type = null;Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

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

[State 1270]
type = Helper
trigger1 = AnimElem = 5
stateno = 21270
id = 21270
pos = 229,-80
scale = const(size.xscale),const(size.yscale)
[State 1270]
type = null;VarAdd
;trigger1 = !MoveContact
trigger1 = AnimElem = 14, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0

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



;---------------------------------------------------------------------------
;Arm Shot Air
[Statedef 1280]
type    = A
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1280
sprpriority = 0
facep2 = 1

[State 1280]
type = null;Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

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

[State 1280]
type = Helper
trigger1 = AnimElem = 5
stateno = 21280
id = 21280
pos = 114,-85
scale = const(size.xscale),const(size.yscale)
[State 1280]
type = null;VarAdd
;trigger1 = !MoveContact
trigger1 = AnimElem = 14, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


[State 1280]
type = VelAdd
trigger1 = AnimElem = 6, >= 0
trigger1 = Pos Y < 0
y = 0.4


[State 1280]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 1281
ctrl = 0


[State 1280]
type = null;ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Arm Shot Air
[Statedef 1281]
type    = A
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1281
sprpriority = 0
facep2 = 1

[State 1281]
type = null;Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)




[State 1281]
type = PlaySnd
trigger1 = Time = 1
value = 52,3

[State 1281]
type = Explod
trigger1 = Time = 1
anim = 7052
sprpriority = -2
pos = 0,10
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 1281]
type = EnvShake
trigger1 = Time = 1
time = 12
ampl = 8


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

;---------------------------------------------------------------------------
;Power Up
[Statedef 1290]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1290
sprpriority = 0
facep2 = 1

[State 1290]
type = null;Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


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



[State 1290]
type = VarSet
trigger1 = AnimElem = 3
var(50) = 1

[State 1290]
type = PalFx
trigger1 = Time = 1
time = 70
add = 255,63,-255
;add = 64,0,0
;sinadd = 64,0,0,30



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

[State 1290]
type = ChangeState
trigger1 = Time >= 76
value = 0
ctrl = 1



[State 1290]
type = null;ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 0


[State 1290]
type = null;ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0

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

[State 1300]
type = null;Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 1300]
type = PlaySnd
trigger1 = AnimElem = 6
value = 1300,0

[State 1300]
type = Helper
trigger1 = Time = 0
stateno = 21305
id = 21305
pos = 0,0
scale = const(size.xscale),const(size.yscale)

[State 1300]
type = Helper
trigger1 = AnimElem = 6
stateno = 21300
id = 21300
pos = 0,0
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 1300]
type = null;VarAdd
trigger1 = !MoveContact
trigger1 = AnimElem = 6, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


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



[State 1300]
type = null;ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 0


[State 1300]
type = null;ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
ctrl = 0


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


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

[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 = 1330
velset = 0,0
movetype= I
sprpriority = 2
ctrl = 1




[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 = 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 != 100
trigger1 = sysvar(1) = 1
value = 100

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


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

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


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


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


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

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


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

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

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

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



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




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


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


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


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


[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 != 1330
trigger1 = sysvar(1) = 0
value = 1330

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

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


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


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

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


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

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


;----------------------------------------------------------
; Air Dash Forward Up
[Statedef 1341]
type    = A
physics = N
anim = 100
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 = 41
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 = 100
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 = 50
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 = 105
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 = 105
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



;---------------------------------------------------------------------------
;Warp Top Left
[Statedef 1400]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 2


[State 1400]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1400]
type = Null;Helper
trigger1 = AnimElem = 9
stateno = 21400
ownpal = 1
pos = 0,0

[State 1400]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21405
ownpal = 1
pos = 130,0

[State 1405]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21410
ownpal = 1
pos = 260,0

[State 1400]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21415
ownpal = 1
pos = 0,100


[State 1400]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21420
ownpal = 1
pos = 130,100


[State 1400]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21425
ownpal = 1
pos = 260,100


[State 1400]
type = Turn
trigger1 = AnimElem = 15
trigger1 = p2bodydist x < -5

[State 1400]
type = PlaySnd
trigger1 = AnimElem = 9
value = 1400,0


[State 1400]
type = Width
trigger1 = AnimElem = 14
edge = 280,20


[State 1400]
type = PosSet
trigger1 = AnimElem = 14
y = -100


[State 1400]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 44
elem = 4
persistent = 0

[State 1400]
type = VelAdd
trigger1 = Anim = 44
y = 0.4


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

[State 1400]
type = CtrlSet
trigger1 = Anim = 44
value = 1


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


;---------------------------------------------------------------------------
;Warp Top Middle
[Statedef 1405]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 2


[State 1405]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 1405]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21400
ownpal = 1
pos = -130,0

[State 1405]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21405
ownpal = 1
pos = 0,0

[State 1405]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21410
ownpal = 1
pos = 130,0

[State 1405]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21415
ownpal = 1
pos = -130,100


[State 1405]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21420
ownpal = 1
pos = 0,100


[State 1405]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21425
ownpal = 1
pos = 130,100


[State 1405]
type = Turn
trigger1 = AnimElem = 15
trigger1 = p2bodydist x < -5

[State 1405]
type = PlaySnd
trigger1 = AnimElem = 9
value = 1400,0


[State 1405]
type = Width
trigger1 = AnimElem = 14
edge = 150,150


[State 1405]
type = PosSet
trigger1 = AnimElem = 14
y = -100


[State 1405]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 44
elem = 4
persistent = 0

[State 1405]
type = VelAdd
trigger1 = Anim = 44
y = 0.4


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

[State 1405]
type = CtrlSet
trigger1 = Anim = 44
value = 1


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



;---------------------------------------------------------------------------
;Warp Top Right
[Statedef 1410]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 2


[State 1410]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 1410]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21400
ownpal = 1
pos = -260,0

[State 1410]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21405
ownpal = 1
pos = -130,0

[State 1410]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21410
ownpal = 1


[State 1410]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21415
ownpal = 1
pos = -260,100


[State 1410]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21420
ownpal = 1
pos = -130,100


[State 1410]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21425
ownpal = 1
pos = 0,100

[State 1410]
type = Turn
trigger1 = AnimElem = 15
trigger1 = p2bodydist x < -5

[State 1410]
type = PlaySnd
trigger1 = AnimElem = 9
value = 1400,0


[State 1410]
type = Width
trigger1 = AnimElem = 14
edge = 30,280


[State 1410]
type = PosSet
trigger1 = AnimElem = 14
y = -100


[State 1410]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 44
elem = 4
persistent = 0

[State 1410]
type = VelAdd
trigger1 = Anim = 44
y = 0.4


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

[State 1410]
type = CtrlSet
trigger1 = Anim = 44
value = 1


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


;---------------------------------------------------------------------------
;Warp Bottom Left
[Statedef 1415]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 2


[State 1415]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 1415]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21400
ownpal = 1
pos = 0,-100

[State 1415]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21405
ownpal = 1
pos = 130,-100

[State 1415]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21410
ownpal = 1
pos = 260,-100

[State 1415]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21415
ownpal = 1


[State 1415]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21420
ownpal = 1
pos = 130,0


[State 1415]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21425
ownpal = 1
pos = 260,0


[State 1415]
type = Turn
trigger1 = AnimElem = 15
trigger1 = p2bodydist x < -5

[State 1415]
type = PlaySnd
trigger1 = AnimElem = 9
value = 1400,0


[State 1415]
type = Width
trigger1 = AnimElem = 14
edge = 280,30


[State 1415]
type = PosSet
trigger1 = AnimElem = 14
y = 0


[State 1415]
type = StateTypeSet
trigger1 = Pos Y >= 0
statetype = S
persistent = 0



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


;---------------------------------------------------------------------------
;Warp Bottom Middle
[Statedef 1420]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 2


[State 1420]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 1420]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21400
ownpal = 1
pos = -130,-100

[State 1420]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21405
ownpal = 1
pos = 0,-100

[State 1420]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21410
ownpal = 1
pos = 130,-100

[State 1420]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21415
ownpal = 1
pos = -130,0


[State 1420]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21420
ownpal = 1
pos = 0,0


[State 1420]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21425
ownpal = 1
pos = 130,0



[State 1420]
type = Turn
trigger1 = AnimElem = 15
trigger1 = p2bodydist x < -5

[State 1420]
type = PlaySnd
trigger1 = AnimElem = 9
value = 1400,0


[State 1420]
type = Width
trigger1 = AnimElem = 14
edge = 150,150


[State 1420]
type = PosSet
trigger1 = AnimElem = 14
y = 0


[State 1420]
type = StateTypeSet
trigger1 = Pos Y >= 0
statetype = S
persistent = 0


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


;---------------------------------------------------------------------------
;Warp Bottom Right
[Statedef 1425]
type    = U
movetype= I
physics = N
juggle  = 3
poweradd= 10
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 2


[State 1425]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1425]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21400
ownpal = 1
pos = -260,-100

[State 1425]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21405
ownpal = 1
pos = -130,-100

[State 1425]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21410
ownpal = 1
pos = 0,-100

[State 1425]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21415
ownpal = 1
pos = -260,0


[State 1425]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21420
ownpal = 1
pos = -130,0


[State 1425]
type = null;Helper
trigger1 = AnimElem = 9
stateno = 21425
ownpal = 1
pos = 0,0

[State 1425]
type = Turn
trigger1 = AnimElem = 15
trigger1 = p2bodydist x < -5

[State 1425]
type = PlaySnd
trigger1 = AnimElem = 9
value = 1400,0


[State 1425]
type = Width
trigger1 = AnimElem = 14
edge = 30,280


[State 1425]
type = PosSet
trigger1 = AnimElem = 14
y = 0


[State 1425]
type = StateTypeSet
trigger1 = Pos Y >= 0
statetype = S
persistent = 0


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


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

[State 1450]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


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


[State 1450]
type = PlaySnd
trigger1 = AnimElem = 10
value = 1450,0

[State 1450]
type = HitDef
attr = S, SA
trigger1 = hitcount < 3
trigger1 = moveguarded < 1
damage = 3*var(30),var(30)/2
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,20
guardsound = S4,0
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
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 = 20,10
palfx.time = 30
palfx.add = -255,-255,64

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1450]
type = Varset
trigger1 = time = 0
var(0) = 3

[State 1450]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 1450]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded

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

[State 1450]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1



[State 1450]
type = ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 0



;---------------------------------------------------------------------------
;Lightning Sword
[Statedef 1460]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1450
sprpriority = 2
facep2 = 1

[State 1460]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


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


[State 1460]
type = PlaySnd
trigger1 = AnimElem = 10
value = 1450,0

[State 1460]
type = HitDef
attr = S, SA
trigger1 = hitcount < 3
trigger1 = moveguarded < 1
damage = 3*var(30),var(30)/2
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,20
guardsound = S4,0
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
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 = 20,10
palfx.time = 30
palfx.add = -255,-255,64

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1460]
type = Varset
trigger1 = time = 0
var(0) = 3

[State 1460]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 1460]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded

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

[State 1460]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1



[State 1460]
type = ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 0



;---------------------------------------------------------------------------
;Lightning Sword
[Statedef 1470]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1450
sprpriority = 2
facep2 = 1

[State 1470]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


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


[State 1470]
type = PlaySnd
trigger1 = AnimElem = 10
value = 1450,0

[State 1470]
type = HitDef
attr = S, SA
trigger1 = hitcount < 3
trigger1 = moveguarded < 1
damage = 3*var(30),var(30)/2
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,20
guardsound = S4,0
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
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 = 20,10
palfx.time = 30
palfx.add = -255,-255,64

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1470]
type = Varset
trigger1 = time = 0
var(0) = 3

[State 1470]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 1470]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded

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

[State 1470]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1



[State 1470]
type = ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 0


;---------------------------------------------------------------------------
;Blizzard Sword

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

[State 1480]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


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


[State 1480]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1480,0



[State 1480]
type = Helper
trigger1 = AnimElem = 7
stateno = 21480
id = 21480
ownpal = 1
pos = 58,-128
scale = const(size.xscale),const(size.yscale)
[State 1480]
type = HitDef
attr = S, SA
trigger1 = hitcount < 3
trigger1 = moveguarded < 1
damage = 2*var(30),var(30)/2
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
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 = 20,10

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1480]
type = Varset
trigger1 = time = 0
var(0) = 3

[State 1480]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 1480]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded

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

[State 1480]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1



[State 1480]
type = ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 0





;---------------------------------------------------------------------------
;Blizzard Sword

[Statedef 1490]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1480
sprpriority = 2
facep2 = 1

[State 1490]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


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


[State 1490]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1480,0



[State 1490]
type = Helper
trigger1 = AnimElem = 7
stateno = 21480
id = 21480
ownpal = 1
pos = 58,-128
scale = const(size.xscale),const(size.yscale)
[State 1490]
type = HitDef
attr = S, SA
trigger1 = hitcount < 3
trigger1 = moveguarded < 1
damage = 2*var(30),var(30)/2
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
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 = 20,10

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1490]
type = Varset
trigger1 = time = 0
var(0) = 3

[State 1490]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 1490]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded

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

[State 1490]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1



[State 1490]
type = ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 0



;---------------------------------------------------------------------------
;Blizzard Sword

[Statedef 1500]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1480
sprpriority = 2
facep2 = 1

[State 1500]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


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


[State 1500]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1480,0



[State 1500]
type = Helper
trigger1 = AnimElem = 7
stateno = 21480
id = 21480
ownpal = 1
pos = 58,-128
scale = const(size.xscale),const(size.yscale)
[State 1500]
type = HitDef
attr = S, SA
trigger1 = hitcount < 3
trigger1 = moveguarded < 1
damage = 2*var(30),var(30)/2
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
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 = 20,10

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1500]
type = Varset
trigger1 = time = 0
var(0) = 3

[State 1500]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 1500]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded

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

[State 1500]
type = ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1



[State 1500]
type = ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 0



;---------------------------------------------------------------------------
;Sword Grapple
[Statedef 1510]
type    = S
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 800
sprpriority = 2




[State 1510]
type = null;Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 1510]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, ST          ;Attributes: Standing, Normal Throw
hitflag = MA          ;Affect only ground people who are not being hit
priority = 3, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          
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 = 21510       ;On success, changes to state 
p2stateno = 21520       ;If hit, p2 changes to state 
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 1510]
type = CtrlSet
trigger1 = Time = 10
value = 1

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


;---------------------------------------------------------------------------
;Ira Piano
[Statedef 1570]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1570
sprpriority = 2




[State 1570]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1570]
type = PlaySnd
trigger1 = Time =4
value = 810,0



[State 1570]
type = HitDef
attr = S, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 10*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-40
hitsound   = S1,2
guardsound = S4,0
sparkno = -1;S(8200+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -7
guard.velocity = -9
airguard.velocity = -9
;fall.xvelocity = -3
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 = 10,5
;palfx.time = 1
;palfx.add = 256,256,256

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8200+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1570]
type = null;ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1



[State 1570]
type = null;ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 1

[State 1570]
type = VelSet
trigger1 = AnimElem = 16
x = 3
y = 7

[State 1570]
type = VelAdd
trigger1 = AnimElem = 16, >= 0
y = 0.35


[State 1570]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
x = 2
y = -7
persistent = 0

[State 1570]
type = ChangeState
trigger1 = Pos Y <= -50
trigger1 = Vel X = 2
value = 635
ctrl = 0


;---------------------------------------------------------------------------
;Ira Piano
[Statedef 1580]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1570
sprpriority = 2




[State 1580]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1580]
type = PlaySnd
trigger1 = Time =4
value = 810,0



[State 1580]
type = HitDef
attr = S, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 10*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-40
hitsound   = S1,2
guardsound = S4,0
sparkno = -1;S(8200+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -7
guard.velocity = -9
airguard.velocity = -9
;fall.xvelocity = -3
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 = 10,5
;palfx.time = 1
;palfx.add = 256,256,256

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8200+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1580]
type = null;ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1



[State 1580]
type = null;ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 1

[State 1580]
type = VelSet
trigger1 = AnimElem = 16
x = 5
y = 7

[State 1580]
type = VelAdd
trigger1 = AnimElem = 16, >= 0
y = 0.35


[State 1580]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
x = 2
y = -7
persistent = 0

[State 1580]
type = ChangeState
trigger1 = Pos Y <= -50
trigger1 = Vel X = 2
value = 635
ctrl = 0


;---------------------------------------------------------------------------
;Ira Piano
[Statedef 1590]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1570
sprpriority = 2




[State 1590]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1590]
type = PlaySnd
trigger1 = Time =4
value = 810,0



[State 1590]
type = HitDef
attr = S, SA
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 10*var(30),floor(var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-40
hitsound   = S1,2
guardsound = S4,0
sparkno = -1;S(8200+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -7
guard.velocity = -9
airguard.velocity = -9
;fall.xvelocity = -3
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 = 10,5
;palfx.time = 1
;palfx.add = 256,256,256

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8200+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1590]
type = null;ChangeState
trigger1 = AnimTime = 0 && StateType != A
value = 0
ctrl = 1



[State 1590]
type = null;ChangeState
trigger1 = AnimTime = 0 && StateType = A
value = 635
ctrl = 1

[State 1590]
type = VelSet
trigger1 = AnimElem = 16
x = 7
y = 9

[State 1590]
type = VelAdd
trigger1 = AnimElem = 16, >= 0
y = 0.35


[State 1590]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
x = 2
y = -7
persistent = 0

[State 1590]
type = ChangeState
trigger1 = Pos Y <= -50
trigger1 = Vel X = 2
value = 635
ctrl = 0


;---------------------------------------------------------------------------
;Dio-Cega Flight Mode
[Statedef 1600]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 60
ctrl = 0
velset = 0,0
anim = 1240
sprpriority = 2
facep2 = 1

[State 1600]
type = Explod
trigger1 = Time = 0 && StateType = S
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

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


[State 1600]
type = Helper
trigger1 = AnimElem = 3
stateno = 21600
id = 21600
name = "Slash"
ownpal = 1
persistent = 0
pos = -3,-39
scale = const(size.xscale),const(size.yscale)
[State 1600]
type = VarAdd
trigger1 = NumHelper(21600)
trigger1 = !Helper(21600),MoveContact
trigger1 = AnimElem = 15, >= 0
var(9) = 1
ignorehitpause = 1
persistent = 0


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

[State 1600]
type = ChangeState
triggerall = var(54)
trigger1 = AnimTime = 0
trigger2 = Anim = 50
value = 1335
ctrl = 1


[State 1600]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
persistent = 0

[State 1600]
type = CtrlSet
trigger1 = Anim = 50
value = 1
persistent = 0

[State 1600]
type = StateTypeSet
trigger1 = Anim = 50
movetype = I
persistent = 0

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


;---------------------------------------------------------------------------
;Spreggio Air
[Statedef 1610]
type    = U
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 0,0
anim = 3121
ctrl = 0
sprpriority = 2
facep2 = 1


[State 1610]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1450,1


[State 1610]
type = Helper
trigger1 = AnimElem = 3
stateno = 23120
id = 21610
ownpal = 1
pos = 79,-65
scale = const(size.xscale),const(size.yscale)
[State 1610]
type = Helper
trigger1 = AnimElem = 4
stateno = 6811
ownpal = 1
pos = 21,8
scale = const(size.xscale),const(size.yscale)

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

[State 1610]
type = ChangeState
triggerall = var(54)
trigger1 = AnimTime = 0
trigger2 = Anim = 50
value = 1335
ctrl = 1


[State 1610]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
persistent = 0

[State 1610]
type = CtrlSet
trigger1 = Anim = 50
value = 1
persistent = 0

[State 1610]
type = StateTypeSet
trigger1 = Anim = 50
movetype = I
persistent = 0

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





;---------------------------------------------------------------------------
;Meteor Strike

[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 = Helper
trigger1 = AnimElem = 10
stateno = 23005
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
scale = const(size.xscale),const(size.yscale)
[State 3000]
type = null;Explod
trigger1 = AnimElem = 1
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 3000]
type = SuperPause
trigger1 = Time = 13
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 = 14
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
scale = const(size.xscale),const(size.yscale)

[State 3000]
type = Helper
trigger1 = Time = 22
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = 46,-143
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 = AnimElem = 5
value = 192,0


[State 3000]
type = ChangeState
trigger1 = Time = 73
value = 3001
ctrl = 0


;---------------------------------------------------------------------------
;Meteor Strike
[Statedef 3001]
type    = S
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 0,0
;anim = 3001
ctrl = 0
sprpriority = 0
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 = 0
movecamera = 0,0

[State 3001]
type = Helper
trigger1 = Time = 0
stateno = 33120
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 3001]
type = null;Helper
trigger1 = Time = 0
stateno = 23007
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 3001]
type = null;Helper
trigger1 = Time%5 = 0
stateno = 23000
postype = back
pos = random%240,floor(-screenpos y-200)
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 3001]
type = Projectile
trigger1 = Time%7 = 0
projid = 3000
projanim = 21240
projhitanim = 8210+random%8
projremanim = 21240
projcancelanim = 21240
projremove = 1
projremovetime = 120
velocity = 3,9
projhits = 1
projpriority = 4
projsprpriority = 3
projedgebound = 100
projheightbound = -340,150
postype = back
offset = random%240,-screenpos y-200
;-----------------------------
attr = S, HP
animtype  = Medium
damage    = 4*var(30),floor(var(30)/4)
hitflag = MAFD
guardflag = MA
pausetime = 0,3
sparkno = -1;S(8220+random%8)
guard.sparkno = -1;S7300
sparkxy = -10,0
hitsound   = S1,1
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 25
air.hittime = 20
ground.velocity = -7
air.velocity = -7,-2
fall = 0
air.fall = 0
fall.recover =0
palfx.time = 20
palfx.add = -128,32,128
color = 0
;kill = 0

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 3001]
type = Projectile
trigger1 = Time%7 = 0
projid = 3001
projanim = 21241
projhitanim = 8200+random%8
projremanim = 21240
projcancelanim = 21240
projremove = 1
projremovetime = 120
velocity = 3,9
projhits = 1
projpriority = 4
projsprpriority = 3
projedgebound = 100
projheightbound = -340,150
postype = back
offset = random%240,-screenpos y-200
;-----------------------------
attr = S, HP
animtype  = Medium
damage    = 4*var(30),floor(var(30)/4)
hitflag = MAFD
guardflag = MA
pausetime = 0,3
sparkno = -1;S(8220+random%8)
guard.sparkno = -1;S7300
sparkxy = -10,0
hitsound   = S1,1
guardsound = S4,0
ground.type = High
air.type = Low
ground.slidetime = 15
ground.hittime  = 25
air.hittime = 20
ground.velocity = -7
air.velocity = -7,-2
fall = 0
air.fall = 0
fall.recover =0
palfx.time = 20
palfx.add = 32,-128,-128
color = 0
;kill = 0

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 23000]
type = PlaySnd
trigger1 = ProjHit(3000) = 1
value = 1,19


[State 23000]
type = PlaySnd
trigger1 = ProjHit(3001) = 1
value = 1,21


[State 23000]
type = Explod
trigger1 = ProjHit(3000) = 1, < 3
anim = 8050
ignorehitpause = 1
pos = 0,-abs(EnemyNear, const(size.mid.pos.y))
random = 2*abs(enemynear,const(size.ground.front)), abs(EnemyNear, const(size.head.pos.y))
postype = p2
ownpal = 1
ontop = 1
bindtime = -1
scale = const(size.xscale),const(size.yscale)

[State 23000]
type = Explod
trigger1 = ProjHit(3001) = 1, < 3
anim = 8051
ignorehitpause = 1
pos = 0,-abs(EnemyNear, const(size.mid.pos.y))
random = 2*abs(enemynear,const(size.ground.front)), abs(EnemyNear, const(size.head.pos.y))
postype = p2
ownpal = 1
ontop = 1
bindtime = -1
scale = const(size.xscale),const(size.yscale)
[State 3001]
type = ChangeState
trigger1 = Time = 60
value = 3003
ctrl = 0



;---------------------------------------------------------------------------
;Meteor Strike End
[Statedef 3003]
type    = S
movetype= I
physics = N
juggle  = 1
;poweradd=
velset = 0,0
anim = 3003
ctrl = 0
sprpriority = 0
facep2 = 1


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


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

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


[State 3003]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Seraphic Wing

[Statedef 3040]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3040
poweradd= 150
ctrl = 0
sprpriority = 0
facep2 = 1


[State 3040]
type = VelSet
trigger1 = Time = 0
trigger1 = FrontEdgeDist < 150
x = -7
y = -7

[State 3040]
type = VelSet
trigger1 = Time = 0
trigger1 = FrontEdgeDist > 150
x = 7
y = -7


[State 3040]
type = VelSet
trigger1 = Pos Y < -100
x = 0
y = 0


[State 3040]
type = Width
trigger1 = Vel X = 0 || Vel Y = 0
edge = 150,150
persistent = 0


[State 3040]
type = null;Explod
trigger1 = AnimElem = 1
anim = 7023
;scale = .5,.5
ontop = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 3040]
type = SuperPause
trigger1 = Time = 15
anim = -1;S32701
sound = -1;S3000,3
poweradd = -1000
time = 80
movetime = 80
unhittable = 1
darken = 0


;about 8 ticks before 3110
[State 3040]
type = Helper
trigger1 = Time = 16
stateno = 33117
supermovetime = 9999
pausemovetime = 9999
pos = 0,-200
ownpal = 1
postype = back
scale = const(size.xscale),const(size.yscale)

[State 3040]
type = Helper
trigger1 = Time = 24
stateno = 33110
id = 33110
supermovetime = 9999
pausemovetime = 9999
pos = 9,-107
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 3040]
type = null;NotHitBy
trigger1 = AnimElem = 4, >= 0
value = SCA


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


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


[State 3041]
type = Helper
trigger1 = AnimElem = 5
stateno = 23043
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
scale = const(size.xscale),const(size.yscale)
[State 3040]
type = ChangeState
trigger1 = Time = 95
value = 3041
ctrl = 0


;---------------------------------------------------------------------------
;Seraphic Wing
[Statedef 3041]
type    = A
movetype= A
physics = N
juggle  = 1
;poweradd=
velset = 0,0
;anim = 3041
ctrl = 0
sprpriority = 0
facep2 = 1


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


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

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

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


[State 3041]
type = Helper
trigger1 = Time = 0
stateno = 23040;33120
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 3041]
type = HitDef
attr = S, HA
trigger1 = hitcount < 15
trigger1 = moveguarded < 1
damage = 2*var(30),var(30)/4
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70+floor(P2Dist Y)
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7,-7*(hitcount >= 15)
air.velocity = -7,-5*(hitcount >= 15)
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = hitcount >= 15
air.fall = hitcount >= 15
;fall.recover = 0
;fall.animtype = Up
;p2stateno = 9020
;getpower = 20,10

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 3041]
type = Varset
trigger1 = time = 0
var(0) = 15

[State 3041]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 3041]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded


[State 3041]
type = ChangeState
trigger1 = Time = 100
value = 3043
ctrl = 0



;---------------------------------------------------------------------------
;Seraphic Wing End
[Statedef 3043]
type    = A
movetype= I
physics = A
juggle  = 1
;poweradd=
velset = 0,0
anim = 50
ctrl = 0
sprpriority = 0
facep2 = 1


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


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

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



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


;---------------------------------------------------------------------------------------
;res
[Statedef 4000]
type    = U
movetype= I
physics = N
juggle  = 4
;velset = ifelse(random < 500,3,-3),-13
;anim = 43
ctrl = 0
sprpriority = 0

[state 4000]
type = superpause
trigger1 = Time = 0
anim = -1
time = 60
movetime = 60
darken = 0
unhittable = 1

[State 4000]
type = LifeAdd
trigger1 = Time = 0
value = 2*var(30)

[State 4000]
type = VelAdd
trigger1 = Pos Y < 0 && StateType = A
y = 0.35
persistent = 0


[State 4000]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1



[State 4000]
type = ChangeAnim
trigger1 = StaTeType != A
trigger1 = Time = 0
value = 5131



[State 4000]
type = ChangeState
trigger1 = Anim = 5131 && AnimElem = 13, >= 4
value = 4001
ctrl = 0

[State 4000]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 4001
ctrl = 0


;---------------------------------------------------------------------------------------
;res
[Statedef 4001]
type    = A
movetype= I
physics = N
juggle  = 4
;velset = ifelse(random < 500,3,-3),-13
anim = 4001
ctrl = 0
sprpriority = 0


[state 4001]
type = superpause
trigger1 = Time = 0
anim = -1
time = 60
movetime = 60
darken = 1
unhittable = 1


[State 4001]
type = LifeAdd
trigger1 = AnimElemNo(0) = 11
value = var(30)


[State 4001]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 4001]
type = PlaySnd
trigger1 = AnimElem = 1
value = 4000,1


[State 4001]
type = AfterImage
trigger1 = AnimElem = 5
time = 120
length = 7
palbright = 30,30,130
palpostbright = 0,0,50
palcontrast =120,120,220
paladd = 0,0,0
palmul = 1,1,1
palcolor = 0
timegap = 2
framegap = 3



[State 4001]
type = Explod
trigger1 = AnimElem = 9
anim = 24001
ownpal = 1
ontop = 1
bindtime = -1
removetime = 80
pos = 0,-25
pausemovetime = 9999
supermovetime = 9999
scale = const(size.xscale),const(size.yscale)
[State 4001]
type = Explod
trigger1 = AnimElem = 1, = 1
anim = 8126
ownpal = 1
ontop = 1
pausemovetime = 9999
supermovetime = 9999
scale = const(size.xscale),const(size.yscale)

[State 4001]
type = Explod
trigger1 = AnimElem = 1, = 25
anim = 8230
ownpal = 1
ontop = 1
pausemovetime = 9999
supermovetime = 9999
scale = const(size.xscale),const(size.yscale)
[State 4001]
type = Explod
trigger1 = AnimElem = 1, = 40
anim = 8125
ownpal = 1
ontop = 1
pausemovetime = 9999
supermovetime = 9999
scale = const(size.xscale),const(size.yscale)

[State 4001]
type = PalFx
trigger1 = AnimElem = 1, = 45
time = 12
add = -64,-64,64
sinadd = 64,32,64,30


[State 4001]
type = PosAdd
trigger1 = AnimElem = 1, = [45,55]
;x = 2*sin(Time*(pi/2))
y = sin(Time*(pi/2))

[State 4001]
type = Explod
trigger1 = AnimElem = 9
anim = 7055
ownpal = 1
ontop = 1
pausemovetime = 9999
supermovetime = 9999
removetime = 90
scale = const(size.xscale),const(size.yscale)

[State 4001]
type = Explod
trigger1 = AnimElem = 9
anim = 7055
ownpal = 1
ontop = 1
pausemovetime = 9999
supermovetime = 9999
removetime = 90
facing = -1
scale = const(size.xscale),const(size.yscale)
[State 4001]
type = VelSet
trigger1 = AnimElem = 9
y = -0.7


[State 4001]
type = VelAdd
trigger1 = Pos Y < 0 && AnimElem = 12, >= 0
y = 0.35

[State 4001]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 4002
ctrl = 0


;---------------------------------------------------------------------------------------
;res
[Statedef 4002]
type    = S
movetype= I
physics = N
juggle  = 4
velset = 0,0
;anim = 4001
ctrl = 0
sprpriority = 0


[State 4002]
type = VarAdd
trigger1 = Time = 0 && var(50)
var(50) = -1

[State 4002]
type = ChangeAnim
trigger1 = Time = 0
value = 4001
elem = 13



[State 4002]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 4002]
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



[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 = null;PosSet
trigger1 = Time < 30
y = -240-abs(Root,P2BodyDist Y)


[State 33117]
type = null;VelSet
trigger1 = Time = 0
x = -7

[State 33117]
type = null;VelSet
trigger1 = Time = 10
x = -0.5


[State 33117]
type  = Explod 
trigger1 = Time = 0 && facing = 1
anim = 32717
postype = left;back
ID = 32717 
sprpriority = -1
removetime = 10
pos = 0,0
scale = 0.28,0.28
bindtime = 5
facing = 1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
supermove = 9999
pausemove = 9999
;vel = -7


[State 33117]
type  = Explod 
trigger1 = Time = 0 && facing = -1
anim = 32717
postype = right;back
ID = 32717 
sprpriority = -1
removetime = 10
pos = 0,0
scale = 0.28,0.28
bindtime = 5
facing = -1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
supermove = 9999
pausemove = 9999
;vel = -7

[State 33117]
type= Modifyexplod
trigger1 = Numexplod(32717) && Time <= 10
ID = 32717
scale = 1.3-(.13*(time)),1.3-(.13*(time))


[State 33117]
type  = Explod 
trigger1 = Time = 10 && facing = 1
anim = 32717
postype = left;back
ID = 32717 
sprpriority = -1
removetime = 50
pos = 0,0
scale = 0.28,0.28
;bindtime = -1
facing = 1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999
supermove = 9999
pausemove = 9999
vel = -0.2


[State 33117]
type  = Explod 
trigger1 = Time = 10 && facing = -1
anim = 32717
postype = right;back
ID = 32717 
sprpriority = -1
removetime = 50
pos = 0,0
scale = 0.28,0.28
;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 = -1
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 = -1
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 = right
ID = 32710 
sprpriority = -4
removetime = 270
pos = -160,0
scale = 0.32,0.5
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))


;------------------------------------------------------------------------------------------------------------
;Jewel For Stand State
[Statedef 6000]
type = S
movetype = I
physics =N
anim = 6000
ctrl = 0
sprpriority = -1
velset = 0,0

[State 6000]
type = null;SprPriority
trigger1 = 1
value = 1
ignorehitpause = 1

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

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

[State 6000]
type = null;PlayerPush
trigger1 = 1
value = 1


[State 6000]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 6000]
type = DestroySelf
trigger1 = Parent,Anim != 0

[State 6000]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = [17,43]


[State 6000]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 1 || Parent,AnimElemNo(0) = 15
pos = 0,-1


[State 6000]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 2 || Parent,AnimElemNo(0) = 14
pos = 0,-2

[State 6000]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 3 || Parent,AnimElemNo(0) = 13
pos = 0,-3

[State 6000]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 4 || Parent,AnimElemNo(0) = 12
pos = 0,-4

[State 6000]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 5 || Parent,AnimElemNo(0) = 11
pos = 0,-5


[State 6000]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 6 || Parent,AnimElemNo(0) = 10
pos = 0,-6

[State 6000]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 7 || Parent,AnimElemNo(0) = 9
pos = 0,-7

[State 6000]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 8
pos = 0,-8


;------------------------------------------------------------------------------------------------------------
;Sword For Stand State
[Statedef 6001]
type = S
movetype = I
physics =N
anim = 6001
ctrl = 0
sprpriority = 3
velset = 0,0

[State 6001]
type = null;SprPriority
trigger1 = 1
value = 1
ignorehitpause = 1

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

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

[State 6001]
type = null;PlayerPush
trigger1 = 1
value = 1


[State 6001]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 6001]
type = DestroySelf
trigger1 = Parent,Anim != 0

[State 6001]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = [17,43]



[State 6001]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 1 || Parent,AnimElemNo(0) = 15
pos = 0,0


[State 6001]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 2 || Parent,AnimElemNo(0) = 14
pos = -4,-1

[State 6001]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 3 || Parent,AnimElemNo(0) = 13
pos = -5,-2

[State 6001]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 4 || Parent,AnimElemNo(0) = 12
pos = -6,-3

[State 6001]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 5 || Parent,AnimElemNo(0) = 11
pos = -8,-4


[State 6001]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 6 || Parent,AnimElemNo(0) = 10
pos = -10,-4

[State 6001]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 7 || Parent,AnimElemNo(0) = 9
pos = -11,-4

[State 6001]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 8
pos = -11,-5



;------------------------------------------------------------------------------------------------------------
;Cloth For Stand State
[Statedef 6002]
type = S
movetype = I
physics =N
anim = 6002
ctrl = 0
sprpriority = -2
velset = 0,0

[State 6002]
type = null;SprPriority
trigger1 = Parent,Facing = -1
value = 1+Parent,MoveContact
ignorehitpause = 1

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

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

[State 6002]
type = null;PlayerPush
trigger1 = 1
value = 1


[State 6002]
type = null;AssertSpecial
trigger1 = parent,movetype = h
trigger1 = parent,anim != [4900,5300]
flag = invisible


[State 6002]
type = null;ChangeAnim
trigger1 = Parent,Anim != Anim
trigger1 = SelfAnimExist(Parent,Anim)
value = Parent,Anim
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 6002]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
value = 6002
elem = Parent,AnimElemNo(0)
ignorehitpause = 1


[State 6002]
type = DestroySelf
trigger1 = Parent,Anim != 0

[State 6002]
type = BindToParent
trigger1 = 1
facing = 1
time = -1
ignorehitpause = 1


;------------------------------------------------------------------------------------------------------------
;Sword For Walk State
[Statedef 6020]
type = S
movetype = I
physics =N
anim = 6021
ctrl = 0
sprpriority = 3
velset = 0,0

[State 6020]
type = null;SprPriority
trigger1 = 1
value = 1
ignorehitpause = 1

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

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

[State 6020]
type = null;PlayerPush
trigger1 = 1
value = 1


[State 6020]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 6020]
type = DestroySelf
trigger1 = Parent,Anim != 20

[State 6020]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 1
pos = 0,0


[State 6020]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 2
pos = -1,4


[State 6020]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 3
pos = 0,-2

[State 6020]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 4
pos = -1,-4

[State 6020]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 5
pos = -1,-5


[State 6020]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 6
pos = -1,-8

[State 6020]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 7
pos = -1,-5

[State 6020]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 8
pos = -1,-3



;------------------------------------------------------------------------------------------------------------
;Sword For Walk State
[Statedef 6021]
type = S
movetype = I
physics =N
anim = 6021
ctrl = 0
sprpriority = 3
velset = 0,0

[State 6021]
type = null;SprPriority
trigger1 = 1
value = 1
ignorehitpause = 1

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

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

[State 6021]
type = null;PlayerPush
trigger1 = 1
value = 1


[State 6021]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 6021]
type = DestroySelf
trigger1 = Parent,Anim != 21

[State 6021]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 7
pos = 0,0


[State 6021]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 6
pos = -1,4


[State 6021]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 5
pos = 0,-2

[State 6021]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 4
pos = -1,-4

[State 6021]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 3
pos = -1,-5


[State 6021]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 2
pos = -1,-8

[State 6021]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 1
pos = -1,-5

[State 6021]
type = BindToParent
trigger1 = Parent,AnimElemNo(0) = 8
pos = -1,-3


;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6181]
type = S
movetype = I
physics =N
anim = 6000
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6181]
type = BindToParent
trigger1 = parent,facing = 1
pos = 51,-98

[State 6181]
type = BindToParent
trigger1 = parent,facing = -1
pos = -56,-99

[State 6181]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;FlameHelper
[Statedef 6182]
type = S
movetype = I
physics =N
anim = 8051
ctrl = 0
sprpriority = 4
velset = 0,0



[State 6182]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6182]
type = BindToParent
trigger1 = parent,facing = 1
pos = -56,-99

[State 6182]
type = BindToParent
trigger1 = parent,facing = -1
pos = 51,-98

[State 6182]
type = DestroySelf
trigger1 = AnimTime = 0


;------------------------------------------------------------------------------------------------------------
;win 2 helper
[Statedef 6183]
type = S
movetype = I
physics =N
anim = 6182
ctrl = 0
sprpriority = 3
velset = 0,0


[State 6183]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno


[State 6183]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6183]
type = BindToParent
trigger1 = 1


[State 6183]
type = DestroySelf
trigger1 = parent,stateno != var(2)


;------------------------------------------------------------------------------------------------------------
;win 2 helper
[Statedef 6184]
type = S
movetype = I
physics =N
anim = 6183+(facing = -1)
ctrl = 0
sprpriority = 3
velset = 0,0


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


[State 6184]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6184]
type = BindToParent
trigger1 = Time = 0
trigger1 = parent,facing = 1
pos = -100,-105

[State 6184]
type = BindToParent
trigger1 = Time = 0
trigger1 = parent,facing = -1
pos = -100,-105


[State 6184]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;intro Helper
[Statedef 6185]
type = S
movetype = I
physics =N
anim = 6185
ctrl = 0
sprpriority = -1
velset = 0,0


[State 6185]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6185]
type = Explod
trigger1 = AnimElem = 6
anim = 6186
ownpal = 1
ontop = 1
pos = -3,-97
bindtime = -1
removetime = -1
scale = const(size.xscale),const(size.yscale)
[State 6186]
type = DestroySelf
trigger1 = Time = 777



;------------------------------------------------------------------------------------------------------------
;intro 8 helper
[Statedef 6189]
type = S
movetype = I
physics =N
anim = 6189
ctrl = 0
sprpriority = 2
velset = 0,0


[State 6189]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno




[State 6189]
type = Sprpriority
trigger1 = AnimElem = 12
value = -1


[State 6189]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6189]
type = DestroySelf
trigger1 = parent,stateno != var(2)


[State 6189]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;intro helper
[Statedef 6192]
type = S
movetype = I
physics = N
anim = 6192
ctrl = 0
sprpriority = 3
velset = 0,0


[State 6192]
type = AssertSpecial
trigger1 = 1
flag = noshadow


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

[State 6192]
type = DestroySelf
trigger1 = Parent,AnimElem = 12

;------------------------------------------------------------------------------------------------------------
;intro 2 back
[Statedef 6193]
type = S
movetype = I
physics = N
anim = 193
ctrl = 0
sprpriority = -1
velset = 0,0


[State 6193]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6193]
type = DestroySelf
trigger1 = Parent,Stateno != 192


;------------------------------------------------------------------------------------------------------------
;intro 2 jewel
[Statedef 6194]
type = S
movetype = I
physics = N
anim = 6000
ctrl = 0
sprpriority = 1
velset = 0,0


[State 6194]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 6194]
type = DestroySelf
trigger1 = Parent,Stateno != 192



;------------------------------------------------------------------------------------------------------------
;intro 2 helper
[Statedef 6197]
type = S
movetype = I
physics = N
anim = 6193
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6197]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6197]
type = Turn
trigger1 = Parent,Facing != Facing

[State 6197]
type = DestroySelf
trigger1 = Time = 700


;------------------------------------------------------------------------------------------------------------
;intro 2 helper
[Statedef 6198]
type = S
movetype = I
physics = N
anim = 6194
ctrl = 0
sprpriority = 0
velset = 0,0


[State 6198]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6198]
type = Turn
trigger1 = Parent,Facing != Facing

[State 6198]
type = DestroySelf
trigger1 = Time = 700

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


;------------------------------------------------------------------------------------------------------------
;Upper Slash Wave
[Statedef 6200]
type = S
movetype = I
physics =N
anim = 6200
ctrl = 0
sprpriority = 3
velset = 0,0


[State 6200]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno


[State 6200]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != var(2)


[State 6200]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Dust Helper
[Statedef 6220]
type = S
movetype = I
physics =N
anim = 6220
ctrl = 0
sprpriority = 2
velset = 0,0


[State 6220]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno

[State 6220]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != var(2)

[State 6220]
type = BindToParent
trigger1 = 1
pos = -77,19



;------------------------------------------------------------------------------------------------------------
;Dust Helper
[Statedef 6221]
type = S
movetype = I
physics =N
anim = 6221
ctrl = 0
sprpriority = -2
velset = 0,0


[State 6221]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno

[State 6221]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != var(2)

[State 6221]
type = BindToParent
trigger1 = 1
pos = -31,16

;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6420]
type = S
movetype = I
physics =N
anim = 6420+(facing = 1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6420]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 6420]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 420


;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6520]
type = S
movetype = I
physics =N
anim = 6520+(facing = -1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6520]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 6520]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 520



;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6620]
type = S
movetype = I
physics =N
anim = 6620+(facing = 1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6620]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 6620]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 620


;------------------------------------------------------------------------------------------------------------
;Ice Helper
[Statedef 6720]
type = S
movetype = I
physics =N
anim = 6720+(facing = 1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6720]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 6720]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 720


;------------------------------------------------------------------------------------------------------------
;Arm Helper
[Statedef 6810]
type = S
movetype = I
physics =N
anim = 6810+(facing = -1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6810]
type = BindToParent
trigger1 = 1
pos = 0,0


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

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

[State 6810]
type = PlayerPush
trigger1 = 1
value = 1

[State 6810]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 810


;------------------------------------------------------------------------------------------------------------
;Arm Helper
[Statedef 6840]
type = S
movetype = I
physics =N
anim = 6810+(facing = -1)
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6840]
type = BindToParent
trigger1 = 1
pos = 0,0


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

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

[State 6840]
type = PlayerPush
trigger1 = 1
value = 1

[State 6840]
type = DestroySelf
trigger1 = AnimElem = 6
trigger2 = Parent,Stateno != 840

;------------------------------------------------------------------------------------------------------------
;Claw Slash
[Statedef 6935]
type = S
movetype = A
physics =N
anim = 21510
ctrl = 0
sprpriority = 4
velset = 0,0


[State 6935]
type = varset
trigger1 = Time = 0
var(2) = parent,stateno


[State 6935]
type = Helper
trigger1 = AnimElem = 3
stateno = 6936
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 6935]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6935]
type = HitDef
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
attr = S, ST          ;Attributes: Standing, Normal Throw
hitflag = MA          ;Affect only ground people who are not being hit
priority = 3, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1;S(8200+random%8)          
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 = 21510       ;On success, changes to state 
p2stateno = 21520       ;If hit, p2 changes to state 
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down
hitsound = S1510,1
id = 800
guardflag = M
guardsound = S4,0
guard.sparkno = -1;S7300
damage = 3*(Root,var(30)),floor(Root,var(30)/2)
sparkxy = -10,-70

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8200+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 6935]
type = DestroySelf
trigger1 = animtime = 0
trigger2 = parent,stateno != var(2)

[State 6935]
type = null;BindToParent
trigger1 = 1



;------------------------------------------------------------------------------------------------------------
;Claw Slash
[Statedef 6936]
type = S
movetype = I
physics =N
anim = 21511
ctrl = 0
sprpriority = 0
velset = 0,0


[State 6936]
type = varset
trigger1 = Time = 0
var(2) = parent,id


[State 6936]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6936]
type = DestroySelf
trigger1 = animtime = 0
trigger2 = !PlayerIDExist(var(2))

[State 6936]
type = BindToParent
trigger1 = PlayerIDExist(var(2))



;------------------------------------------------------------------------------------------------------------
;Blood Bubble
[Statedef 6937]
type = S
movetype = I
physics =N
anim = 21513
ctrl = 0
sprpriority = 0
velset = 0,0


[State 6937]
type = varset
trigger1 = Time = 0
var(2) = parent,id


[State 6937]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 6937]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
value = anim
Parent,AnimElemNo(0)

[State 6937]
type = DestroySelf
trigger1 = animtime = 0
trigger2 = !PlayerIDExist(var(2))

[State 6937]
type = BindToParent
trigger1 = PlayerIDExist(var(2))


;------------------------------------------------------------------------------------------------------------
;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 = 220,0

[State 7610, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 24,-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 = 7611
sprpriority = -4

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

[State 7615, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 18,-48
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 = 220,0

[State 7620, Spark]
type = Explod
trigger1 = AnimElem = 2;Time = 0
anim = 7020
postype = p1
pos = 45,-113
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 = 7622
sprpriority = -4

[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
scale = const(size.xscale),const(size.yscale)
[State 7710]
type = Explod
trigger1 = Time = 1
anim = 7055
facing = -1
scale = const(size.xscale),const(size.yscale)
[State 7710]
type = Explod
trigger1 = Time = 1
anim = 7022
sprpriority = 4
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 = -15

[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
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
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
scale = const(size.xscale),const(size.yscale)
[State 7720]
type = Explod
trigger1 = Time = 1
anim = 7055
facing = -1
scale = const(size.xscale),const(size.yscale)

[State 7720]
type = Explod
trigger1 = Time = 1
anim = 7022
sprpriority = 4
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
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
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 = -2*Vel X,-4
ctrl = 0


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

[State 7730]
type = Turn
trigger1 = FrontEdgeBodyDist <= 3

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

[State 7730]
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



;---------------------------------------------------------------------------------------
;res
[Statedef 7777]
type    = A
movetype= I
physics = A
juggle  = 4
velset = ifelse(random < 500,3,-3),-13
anim = 43
ctrl = 0
sprpriority = 0


[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 = 7800
sprpriority = 0
velset = 5,0



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

[State 7800]
type = VelSet
trigger1 = animelem = 1
x = 5
y = 0


[State 7800]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State  7800]
type = ChangeState
trigger1 = AnimTime = 0
;trigger2 = FrontEdgeBodyDist <= 10
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Roll Recovery Backward

[Statedef 7801]
type    = S
movetype= I
physics = N
ctrl = 0
anim = 7801
sprpriority = 0
velset = -5,0




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

[State 7801]
type = VelSet
trigger1 = animelem = 1
x = -5
y = 0


[State 7801]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1


[State  7801]
type = ChangeState
trigger1 = AnimTime = 0
;trigger2 = FrontEdgeBodyDist <= 10
value = 11
ctrl = 1


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

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


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


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

[State 7827, Spark]
type = null;Explod
trigger1 = Time = 0
trigger1 = Anim = 7827
anim = F72
pos = 0, 0
sprpriority = 3
scale = const(size.xscale),const(size.yscale)
[State 7827, Spark]
type = null;Explod
trigger1 = Time = 0
trigger1 = Anim = 7825
anim = F72
pos = -40,-40
sprpriority = 3
scale = const(size.xscale),const(size.yscale)
[State 7828, 5]
type = null;Turn
trigger1 = time = 0

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




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


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



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

;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,320,520))


[State 7970,b]
type = null;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 = -1;S(8220+random%4)                    
sparkxy = -10,-70               
hitsound = S1,7                
guardsound = S4,0               
guard.sparkno = -1;S7300
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 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8220+random%4
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[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 = 1
x = 3
y = 11


[State 8016]
type = VelAdd
trigger1 = AnimElem = 1, >= 0
y = 0.3


[State 8016]
type = null;PlaySnd
trigger1 = AnimElem = 1
value = 100,4

[State 8016]
type = PlaySnd
trigger1 = Time = 5
value = 220,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 = -1;S(8200+random%8)  
guard.sparkno = -1;S7300
sparkxy = -10,-64+floor(P2Dist Y)
hitsound   = S1,12
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -7,-4
air.velocity = -7,-4
getpower = 13,7
;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 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8200+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[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 = 1
x = 5
y = 11


[State 8017]
type = VelAdd
trigger1 = AnimElem = 1, >= 0
y = 0.3

[State 8017]
type = PlaySnd
trigger1 = Time = 7
value = 220,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 = -1;S(8210+random%8)  
guard.sparkno = -1;S7300
sparkxy = -10,-64+floor(P2Dist Y)
hitsound   = S1,13
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -7,-4
air.velocity = -7,-4
getpower = 30,15
;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 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[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 = 0
x = 9
y = 11


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

[State 8018]
type = PlaySnd
trigger1 = Time = 7
value = 220,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 = -1;S(8220+random%8)  
guard.sparkno = -1;S7300
sparkxy = -10,-64+floor(P2Dist Y)
hitsound   = S1,14
guardsound = S4,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7,-4
air.velocity = -7,-4
getpower = 40,14
;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 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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


[State 8018]
type = VarAdd
trigger1 = !MoveContact && Time >= 22
var(9) = 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 = 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, Velocity]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 9030, Gravity]
type = VelAdd
trigger1 = 1
y = .39

[State 9030, No scroll]
type = ScreenBound
;triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
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 = 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 = 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, 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 = 5


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


[State 10000]
type = null;SprPriority
trigger1 = Parent,Facing = 1
value = -1
ignorehitpause = 1

[State 10000]
type = null;SprPriority
trigger1 = Parent,Facing = -1
value = 1+Parent,MoveContact
ignorehitpause = 1

[State 10000]
type = BindToParent
trigger1 = 1
facing = 1
time = -1
ignorehitpause = 1


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

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

[State 10000]
type = PlayerPush
trigger1 = 1
value = 1


[State 10000]
type = AssertSpecial
trigger1 = parent,movetype = h
trigger1 = parent,anim != [4900,5300]
flag = invisible


[State 10000]
type = ChangeAnim
triggerall = Anim != 9800
trigger1 = !SelfAnimExist(Parent,Anim+10000)
value = 9800
trigger2 = Parent,Facing = -1

[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 = null;ChangeAnim
triggerall = Anim != 9800
trigger1 = Parent,var(37)
value = 9800

[State 10000]
type = null;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



;------------------------------------------------------------------------------------------------------------
;FireBall
[Statedef 20210]
type = A
movetype = A
physics = N
anim = 20210
ctrl = 0
sprpriority = 4
velset = 0,0
;hitcountpersist = 1

[State 20210]
type = null;ChangeAnim
trigger1 = Time = 0 && Anim != 20210
value = 20210


[State 20210]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 20210]
type = VelSet
trigger1 = Time = 0
x = 5


[State 20210]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 20210]
type = HitOverride
trigger1 = 1
stateno = 20219
attr = SCA,AP
slot = 0
time = -1



[State 20210]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 5*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-10
hitsound   = S8,0
guardsound = S4,0
sparkno = -1;S7410
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
guard.velocity = -9
airguard.velocity = -9
;fall.xvelocity = -3
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 = 10,5
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 3
palfx.time = 20
palfx.add = 32,-128,-128
color = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7410
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 20210]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 20219
ignorehitpause  = 1


[State 20210]
type = ChangeState
trigger1 = MoveContact || MoveReversed
trigger2 = FrontEdgeBodyDist < - 100
trigger3 = Time = 240
value = 20219
ignorehitpause = 0

[State 20210]
type = null;DestroySelf
trigger1 = FrontEdgeBodyDist < - 100
trigger2 = Time = 240


;------------------------------------------------------------------------------------------------------------
;FireBall End
[Statedef 20219]
type = A
movetype = I
physics = N
;anim = 20219
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1



[State 20219]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 20219]
type = DestroySelf
trigger1 = Time = 1



;------------------------------------------------------------------------------------------------------------
;Arm Throw
[Statedef 20800]
type = S
movetype = I
physics = N
anim = 20800
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1



[State 20800]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 20800]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
value = 20800
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 20800]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 800


[State 20800]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Arm Throw
[Statedef 20810]
type = S
movetype = I
physics = N
anim = 20810
ctrl = 0
sprpriority = 2
velset = 0,0
;hitcountpersist = 1



[State 20810]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 20810]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
value = 20810
elem = Parent,AnimElemNo(0)
ignorehitpause = 1


[State 20810]
type = DestroySelf
trigger1 = Parent,Stateno != 810


[State 20810]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Magic Shot
[Statedef 21240]
type = A
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 = VelSet
trigger1 = Time = 0
x = 8


[State 21240]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21240]
type = HitOverride
trigger1 = 1
stateno = 21249
attr = SCA,AP
slot = 0
time = -1


[State 21240]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 12*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,0
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S7202
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -5
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
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 = 10,5
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7202
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 21240]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21249
ignorehitpause  = 1


[State 21240]
type = ChangeState
trigger1 = MoveContact
trigger2 = FrontEdgeBodyDist < - 100
trigger3 = Time = 240
value = 21249
ignorehitpause = 0

[State 21240]
type = null;DestroySelf
trigger1 = FrontEdgeBodyDist < -100
trigger2 = Time = 240




;------------------------------------------------------------------------------------------------------------
;Magic Shot Charge
[Statedef 21241] 
type = A
movetype = I
physics = N
anim = 21241
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1



[State 21241]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21241]
type = DestroySelf
trigger1 = AnimTime = 0


;------------------------------------------------------------------------------------------------------------
;Magic Shot End
[Statedef 21249] 
type = A
movetype = I
physics = N
anim = 21249
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1



[State 21249]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21249]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;Armour Strike
[Statedef 21250]
type = A
movetype = A
physics = N
;anim = 1251
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1

[State 21250]
type = ChangeAnim
trigger1 = Time = 0 && Anim != [1251,1252]
value = 1251


[State 21250]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21250]
type = null;VelSet
trigger1 = Time = 0
x = 8


[State 21250]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21250]
type = HitOverride
trigger1 = 1
stateno = 21250
attr = SCA,AP
slot = 0
time = -1


[State 21250]
type = HitDef
attr = A, SP
trigger1 = Time%3 = 0 && Anim = 1251
trigger1 = hitcount < 3
trigger1 = moveguarded < 1
damage = 3*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S7202
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -9
air.velocity = -5
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
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 = 20,5
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7202
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 21250]
type = HitDef
attr = A, SP
trigger1 = Time%3 = 0 && Anim = 1252
trigger1 = hitcount < 6
trigger1 = moveguarded < 1
damage = 3*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-70
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S7202
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = 9
air.velocity = 5
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
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 = 20,5
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7202
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 21250]
type = Varset
trigger1 = time = 0
var(0) = 3

[State 21250]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 21250]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded



[State 21250]
type = ChangeAnim
trigger1 = AnimTime = 0 && Anim = 1251
value = 1252
persistent = 0


[State 21250]
type = DestroySelf
trigger1 = AnimTime = 0 && Anim = 1252
trigger2 = MoveReversed



;------------------------------------------------------------------------------------------------------------
;Mirror Trap
[Statedef 21260]
type = A
movetype = A
physics = N
;anim = 21270
ctrl = 0
sprpriority = 3
velset = 0,0
;hitcountpersist = 1

[State 21260]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21260
value = 21260


[State 21260]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21260]
type = VelSet
trigger1 = Time = 0
x = 7


[State 21260]
type = VelSet
trigger1 = abs(Vel X) < 3
x = (p2bodydist x)*0.03


[State 21260]
type = VelSet
trigger1 =  abs(Vel Y) < 3
y = (p2bodydist y- (abs(EnemyNear, const(size.mid.pos.y))))*0.03


[State 21260]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21260]
type = HitOverride
trigger1 = 1
stateno = 21260
attr = SCA,AP
slot = 0
time = -1


[State 21260]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 5*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,0
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S7202
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
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
p1stateno = 21270
p2stateno = 21280
getpower = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 2
id = 800

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7202
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 21260]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21268
ignorehitpause  = 1


[State 21260]
type = Explod
trigger1 = MoveContact
anim = 21269
persistent = 0
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 21260]
type = ChangeState
trigger1 = MoveContact
trigger2 = FrontEdgeBodyDist < - 100
trigger3 = Time = 240
value = 21268
ignorehitpause = 0

[State 21260]
type = null;DestroySelf
trigger1 = FrontEdgeBodyDist < - 100
trigger2 = Time = 240



;------------------------------------------------------------------------------------------------------------
;Mirror Trap End
[Statedef 21268]
type = A
movetype = I
physics = N
anim = 21268
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1



[State 21268]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21268]
type = DestroySelf
trigger1 = AnimTime = 0



;---------------------------------------------------------------------------
; Mirror Trap

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

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


[State 21270]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
ownpal = 1
pos = 77,-62
scale = const(size.xscale),const(size.yscale)
[State 21270]
type = null;PlayerPush
trigger1 = 1
value = 0

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


[State 21270]
type = AssertSpecial
trigger1 = 1
flag = noshadow

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

[State 21270];Bind 1
type = BindToTarget
trigger1 = AnimElemNo(0) = [1,14]
pos = 70,-87;-abs(EnemyNear, const(size.head.pos.y))-10

[State 21270];Bind 3
type = TargetBind
trigger1 = AnimElemNo(0) = [15,23] 
trigger2 = AnimTime = 0
pos = 0,0


[State 21270]
type = PlaySnd
trigger1 = AnimElem = 15
value = 1260,1
persistent = 0

[State 21270]
type = PlaySnd
trigger1 = AnimElem = 18
value = 1260,2
persistent = 0

[State 21270]
type = TargetLifeAdd
trigger1 = AnimElem = 15
value = -2*var(30)

[State 21270]
type = PowerAdd
trigger1 = AnimElem = 15
value = 50


[State 21270]
type = TargetState
trigger1 = Time >= 360
value = 823

[State 21270]
type = ChangeState
trigger1 = Time >= 360
value = 21279
ctrl = 0


[State 21270]
type = ChangeState
trigger1 = !NumTarget(800)
value = 21279
ctrl = 0


;---------------------------------------------------------------------------
; Mirror Trap Back

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

[State 21271]
type = Varset
trigger1 = Time = 0
var(3) = parent,id

[State 21271]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21271]
type = null;VarSet
trigger1 = !var(41)
var(41) = 1
persistent = 0


[State 21271]
type = null;VarSet
trigger1 = !var(40)
var(40) = 1
persistent = 0



[State 21271]
type = DestroySelf
trigger1 = !PlayerIDExist(var(3))
trigger2 = Parent,Stateno != 21270

[State 21271]
type = BindToParent
trigger1 = PlayerIDExist(var(3))

;---------------------------------------------------------------------------
; Mirror Trap End

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


[State 21279]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21279]
type = null;VarSet
trigger1 = !var(41)
var(41) = 1
persistent = 0


[State 21279]
type = null;VarSet
trigger1 = !var(40)
var(40) = 1
persistent = 0


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

[State 21279]
type = DestroySelf
trigger1 = AnimTime = 0



;---------------------------------------------------------------------------
;Trap

[Statedef 21280]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -1

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

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



[State 21280]
type = NotHitBy
trigger1 = Time < 70
value = SCA


[State 21280]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21280]
type = AssertSpecial
trigger1 = AnimElemNo(0) = [10,15]
flag = invisible



[State 21280]
type = AngleDraw
trigger1 = AnimElemNo(0) = [16,23]
value = 0
scale = 0.7,0.7;fvar(1),fvar(2)


[State 21280]
type = null;varset
trigger1 = Time = 0
fvar(1) = ((enemynear,const(size.ground.front)+enemynear,const(size.ground.back))/2)/50

[State 21280]
type = null;varset
trigger1 = Time = 0
fvar(2) = abs(enemynear,const(size.head.pos.y))/100



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


[State 21280]
type = DestroySelf
trigger1 = ishelper

;------------------------------------------------------------------------------------------------------------
;Acid Shot
[Statedef 21300]
type = S
movetype = A
physics = N
anim = 21300
ctrl = 0
sprpriority = 3
velset = 0,0
;hitcountpersist = 1

[State 21300]
type = null;ChangeAnim
trigger1 = Time = 0 && Anim != 21300
value = 21300


[State 21300]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21300]
type = null;VelSet
trigger1 = Time = 0
x = 7
y = 7

[State 21300]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21300]
type = HitOverride
trigger1 = 1
stateno = 21309
attr = SCA,AP
slot = 0
time = -1


[State 21300]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 10*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S7202
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
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 = 10,5
palfx.time = 20
palfx.add = 64,-128,64
color = 0
sprpriority = 3

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7202
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 21300]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21288
ignorehitpause  = 1


[State 21300]
type = ChangeState
trigger1 = MoveContact || MoveReversed
trigger2 = FrontEdgeBodyDist < - 100
trigger3 = Time = 240
value = 21309
ignorehitpause = 0


[State 21300]
type = ChangeState
trigger1 = AnimTime = 0
value = 21308
ignorehitpause = 0

[State 21300]
type = null;DestroySelf
trigger1 = FrontEdgeBodyDist < - 100
trigger2 = Time = 240


;------------------------------------------------------------------------------------------------------------
;Stomach Open Helper
[Statedef 21305]
type = S
movetype = I
physics =N
anim = 21305
ctrl = 0
sprpriority = 4
velset = 0,0


[State 21305]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21305]
type = ChangeAnim
trigger1 = Parent,AnimElemNo(0) != AnimElemNo(0)
value = 21305
elem = Parent,AnimElemNo(0)
ignorehitpause = 1


[State 21305]
type = BindToParent
trigger1 = 1


[State 21305]
type = DestroySelf
trigger1 = parent,stateno != 1300


;------------------------------------------------------------------------------------------------------------
;Acid Shot End
[Statedef 21308]
type = A
movetype = I
physics = N
anim = 21301
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1



[State 21308]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21308]
type = DestroySelf
trigger1 = AnimTime = 0

;------------------------------------------------------------------------------------------------------------
;Acid Shot End
[Statedef 21309]
type = A
movetype = I
physics = N
anim = 21302
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1



[State 21309]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 21309]
type = DestroySelf
trigger1 = AnimTime = 0

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

;Warp Top Left Helper
[Statedef 21400]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = 2


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

[State 21400]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5

[State 21400]
type = Width
trigger1 = Time = 0
edge = 280,20


[State 21400]
type = PosSet
trigger1 = Time = 0
y = -100


[State 21400]
type = DestroySelf
trigger1 = AnimTime = 0




;---------------------------------------------------------------------------
;Warp Top Middle Helper
[Statedef 21405]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = 2

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

[State 21405]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5

[State 21405]
type = Width
trigger1 = Time = 0
edge = 150,150


[State 21405]
type = PosSet
trigger1 = Time = 0
y = -100


[State 21405]
type = DestroySelf
trigger1 = AnimTime = 0


;---------------------------------------------------------------------------
;Warp Top Right Helper
[Statedef 21410]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = 2

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

[State 21410]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5

[State 21410]
type = Width
trigger1 = Time = 0
edge = 30,280


[State 21410]
type = PosSet
trigger1 = Time = 0
y = -100


[State 21410]
type = DestroySelf
trigger1 = AnimTime = 0


;---------------------------------------------------------------------------
;Warp Bottom Left Helper
[Statedef 21415]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = 2

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

[State 21415]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5

[State 21415]
type = Width
trigger1 = Time = 0
edge = 280,30


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


[State 21415]
type = DestroySelf
trigger1 = AnimTime = 0



;---------------------------------------------------------------------------
;Warp Bottom Middle Helper
[Statedef 21420]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = 2


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

[State 21420]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5

[State 21420]
type = Width
trigger1 = Time = 0
edge = 150,150


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


[State 21420]
type = DestroySelf
trigger1 = AnimTime = 0

;---------------------------------------------------------------------------
;Warp Bottom Right Helper
[Statedef 21425]
type    = U
movetype= A
physics = N
juggle  = 3
poweradd= 0
ctrl = 0
velset = 0,0
anim = 1401
sprpriority = 2

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

[State 21425]
type = Turn
trigger1 = Time = 0
trigger1 = p2bodydist x < -5

[State 21425]
type = Width
trigger1 = Time = 0
edge = 30,280


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


[State 21425]
type = DestroySelf
trigger1 = AnimTime = 0






;------------------------------------------------------------------------------------------------------------
;Snow Flake
[Statedef 21480]
type = A
movetype = A
physics = N
;anim = 21480
ctrl = 0
sprpriority = 4
velset = 0,0
hitcountpersist = 1

[State 21480]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21480
value = 21480

[State 21480]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21480]
type = VelSet
trigger1 = AnimElem = 4 && Parent,Stateno = 1480
x = 3
y = 4


[State 21480]
type = VelSet
trigger1 = AnimElem = 4 && Parent,Stateno = 1490
x = 5
y = 3


[State 21480]
type = VelSet
trigger1 = AnimElem = 4 && Parent,Stateno = 1500
x = 7
y = 2

[State 21480]
type = VelAdd
trigger1 = AnimElem = 4, >= 0
y = 0.3

[State 21480]
type = null;AngleDraw
trigger1 = AnimElem = 4, >= 0
value = -Time%360

[State 21480]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21480]
type = HitOverride
trigger1 = 1
stateno = 21489
attr = SCA,AP
slot = 0
time = -1


[State 21480]
type = HitDef
attr = A, SP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 10*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,10
hitsound   = S1,19
guardsound = S4,0
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
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 = 50,25
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 3
palfx.time = 30
palfx.add = -255,128,128

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 21480]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21489
ignorehitpause  = 1

[State 21480]
type = ChangeState
trigger1 = MoveContact
value = 21489
ignorehitpause  = 1

[State 21480]
type = ChangeState;DestroySelf
trigger1 = FrontEdgeBodyDist < - 100
trigger2 = Time = 240
value = 21489

;------------------------------------------------------------------------------------------------------------
;Snow Flake End
[Statedef 21489] 
type = A
movetype = I
physics = N
anim = 21481
ctrl = 0
sprpriority = 4
velset = 0,0
;hitcountpersist = 1



[State 21489]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21489]
type = DestroySelf
trigger1 = AnimTime = 0



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

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

[State 21510]
type = null;Explod
trigger1 = Time = 0
anim = 7515
ontop = 1
ownpal = 1
pos = 77,-62
scale = const(size.xscale),const(size.yscale)
[State 21510]
type = null;PlayerPush
trigger1 = 1
value = 0

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


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

[State 21510]
type = null;PlaySnd
trigger1 = AnimElem = 2
value = 710
persistent = 0

[State 21510]
type = Width
trigger1 = 1
value = 100,70

[State 21510]
type = null;Helper
trigger1 = AnimElem = 1
stateno = 6937
ownpal = 1

[State 21510]
type = TargetBind
trigger1 = AnimElemNo(0) = [1,6]
pos = 60,-60

[State 21510]
type = TargetBind
trigger1 = AnimElemNo(0) = [7,10]
pos = 70,-70


[State 21510]
type = TargetBind
trigger1 = AnimElemNo(0) = [11,17]
pos = 70,-70


[State 21510]
type = TargetBind
trigger1 = AnimElemNo(0) = [18,23]
pos = 70,-70


[State 21510]
type = TargetBind
trigger1 = AnimElemNo(0) = [24,31]
pos = 138,-70


[State 21510]
type = PlaySnd
trigger1 = AnimElem = 11 || AnimElem = 18
value = 1,12

[State 21510]
type = PlaySnd
trigger1 = AnimElem = 27
value = 1,14


[State 21510]
type = Helper
trigger1 = AnimElem = 11 || AnimElem = 18 || AnimElem = 27
stateno = 28109
postype = p2
ownpal = 1
pos = 0,0;abs(enemynear,const(size.mid.pos.y))-20-random%40
scale = const(size.xscale),const(size.yscale)

[State 21510]
type = TargetLifeAdd
trigger1 = AnimElem = 11 || AnimElem = 18 || AnimElem = 27
value = -3*var(30)

[State 21510]
type = TargetLifeAdd
trigger1 = AnimElem = 27
value = -var(30)

[State 21510]
type = TargetState
trigger1 = AnimElem = 31
value = 21523


[State 21510]
type = ChangeState
trigger1 = AnimElem = 31
value = 21511
ctrl = 0



[State 21510]
type = ChangeState
trigger1 = !NumTarget(800)
value = 21511
ctrl = 1


;---------------------------------------------------------------------------
; hrow End

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


[State 21511]
type = null;VarSet
trigger1 = !var(41)
var(41) = 1
persistent = 0


[State 21511]
type = null;VarSet
trigger1 = !var(40)
var(40) = 1
persistent = 0



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


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

[Statedef 21520]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

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

[State 21520]
type = ChangeAnim2
trigger1 = Time = 0
value = 1520

[State 21520]
type = Turn
trigger1 = facing = enemynear,facing


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


[State 21520]
type = DestroySelf
trigger1 = ishelper


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

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


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


[State 21523]
type = null;ChangeAnim2
trigger1 = Time = 0
value = 823


[State 21523]
type = VelSet
trigger1 = Time = 0
x = -9
y = -1

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


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


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


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


[State 21523]
type = null;elfState
trigger1 = Vel Y > 2
value = 5040

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


;------------------------------------------------------------------------------------------------------------
;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 = -1;S7419;(8220+random%8)
guard.sparkno = -1;S7300
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 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7419
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[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 = -1;S7419;(8220+random%8)
guard.sparkno = -1;S7300
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 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7419
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[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 = -1;S7419;(8220+random%8)
guard.sparkno = -1;S7300
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 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 7419
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 21507]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;Spinning Blade
[Statedef 21600]
type = A
movetype = A
physics = N
;anim = 21240
ctrl = 0
sprpriority = 4
velset = 5,0
hitcountpersist = 1


[State 21600]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21240
value = 21240


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


[State 21600]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 21600]
type = VelSet
trigger1 = 1
x = (P2bodydist x )*0.01*Time
y = (P2bodydist y - 70)*0.01*Time


[State 21600]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 21600]
type = HitOverride
trigger1 = 1
stateno = 21249
attr = SCA,AP
slot = 0
time = -1


[State 21600]
type = HitDef
attr = A, SP
trigger1 = Time%7 = 0
trigger1 = hitcount < 3
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/4)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S(8200+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
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 = 10,5
;palfx.time = 1
;palfx.add = 256,256,256

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8200+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 21600]
type = Varset
trigger1 = time = 0
var(0) = 3

[State 21600]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 21600]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded


[State 21600]
type = ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21249
ignorehitpause  = 1


[State 21600]
type = DestroySelf
;trigger1 = FrontEdgeBodyDist < - 100
trigger1 = Time = 120


;------------------------------------------------------------------------------------------------------------
;FireBall
[Statedef 23000]
type = A
movetype = A
physics = N
anim = 21240+random%2
ctrl = 0
sprpriority = 4
velset = 0,0
;hitcountpersist = 1

[State 23000]
type = null;ChangeAnim
trigger1 = Time = 0 && Anim != 21240
value = 21240


[State 23000]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 23000]
type = VelSet
trigger1 = Time = 0 
x = 3
y = 9

[State 23000]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 23000]
type = HitOverride
trigger1 = 1
stateno = 21249
attr = SCA,AP
slot = 0
time = -1


[State 23000]
type = HitDef
attr = A, SP
triggerall = anim = 21240
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S(8200+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
;guard.velocity = -9
;airguard.velocity = -9
;fall.xvelocity = -3
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 = 10,5
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 3
palfx.time = 20
palfx.add = -128,32,128
color = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8200+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 23000]
type = HitDef
attr = A, SP
triggerall = anim = 21241
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 5,5
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S(8210+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
guard.velocity = -9
airguard.velocity = -9
;fall.xvelocity = -3
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 = 10,5
;palfx.time = 1
;palfx.add = 256,256,256
sprpriority = 3
palfx.time = 20
palfx.add = 32,-128,-128
color = 0

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 23000]
type = PlaySnd
trigger1 = MoveHit
value = 1,19+2*(facing = 1)
ignorehitpause = 1
persistent = 0



[State 23000]
type = Explod
trigger1 = MoveHit = [1,3]
anim = 8050+(facing = 1)
ignorehitpause = 1
pos = 0,-abs(EnemyNear, const(size.mid.pos.y))
random = 2*abs(enemynear,const(size.ground.front)), abs(EnemyNear, const(size.head.pos.y))
postype = p2
ownpal = 1
ontop = 1
bindtime = -1
scale = const(size.xscale),const(size.yscale)
[State 23000]
type = null;ChangeState
trigger1 = var(0) < 1 || hitcount > 2
value = 21249
ignorehitpause  = 1


[State 23000]
type = ChangeState
trigger1 = MoveContact
trigger2 = FrontEdgeBodyDist < - 100
trigger3 = Time = 240
value = 21249
ignorehitpause = 0

[State 23000]
type = null;DestroySelf
trigger1 = FrontEdgeBodyDist < - 100
trigger2 = Time = 240




;------------------------------------------------------------------------------------------------------------
;hair helper
[Statedef 23005]
type = S
movetype = I
physics =N
anim = 6182
ctrl = 0
sprpriority = 3
velset = 0,0


[State 23005]
type = Turn
trigger1 = Time = 0

[State 23005]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 23005]
type = BindToParent
trigger1 = 1


[State 23005]
type = DestroySelf
trigger1 = parent,stateno != [3000,3003]


;------------------------------------------------------------------------------------------------------------
;Windy
[Statedef 23027]
type = S
movetype = I
physics = N
anim = 23027
ctrl = 0
sprpriority = 2
velset = 0,0
;hitcountpersist = 1


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

[State 23027]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 23027]
type = HitBy
trigger1 = 1
value = SCA,AA,AP,AT

[State 23027]
type = HitOverride
trigger1 = 1
stateno = 23007
attr = SCA,AA,AP,AT
slot = 0
time = -1

[State 23027]
type = DestroySelf
trigger1 = Parent,stateno != [3040,3041]


[State 23027]
type = BindToParent
trigger1 = 1




;------------------------------------------------------------------------------------------------------------
;Illusion
[Statedef 23075]
type = S
movetype = I
physics = N
anim = 23075
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1


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

[State 23075]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 23075]
type = HitBy
trigger1 = 1
value = SCA,AA,AP

[State 23075]
type = HitOverride
trigger1 = 1
stateno = 23075
attr = SCA,AA,AP
slot = 0
time = -1

[State 23075]
type = DestroySelf
trigger1 = Root,Stateno != 3061


[State 23075]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Illusion
[Statedef 23077]
type = S
movetype = I
physics = N
anim = 23077
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1


[State 23077]
type = VarSet
trigger1 = Time = 0
var(1) = Parent,Stateno


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

[State 23077]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 23077]
type = HitBy
trigger1 = 1
value = SCA,AA,AP

[State 23077]
type = HitOverride
trigger1 = 1
stateno = 23077
attr = SCA,AA,AP
slot = 0
time = -1

[State 23077]
type = DestroySelf
trigger1 = Parent,stateno != var(1)


[State 23077]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Illusion
[Statedef 23078]
type = S
movetype = I
physics = N
anim = 23078
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1


[State 23078]
type = VarSet
trigger1 = Time = 0
var(1) = Parent,Stateno


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

[State 23078]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 23078]
type = HitBy
trigger1 = 1
value = SCA,AA,AP

[State 23078]
type = HitOverride
trigger1 = 1
stateno = 23078
attr = SCA,AA,AP
slot = 0
time = -1

[State 23078]
type = DestroySelf
trigger1 = Parent,stateno != var(1)


[State 23078]
type = BindToParent
trigger1 = 1


;---------------------------------------------------------------------------
;Custom Bound
[Statedef 23079]
type    = A
movetype= H
physics = N
velset = -7,-7
;poweradd = 60



[State 23079]
type = ChangeAnim2
trigger1 = Time = 0
value = 823


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


[State 23079]
type = ScreenBound
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,0


[State 23079]
type = Turn
trigger1 = BackEdgeBodyDist < 15
trigger2 = FrontEdgeBodyDist < 15
persistent = 0

[State 23079]
type = VelSet
trigger1 = BackEdgeBodyDist < 15
trigger2 = FrontEdgeBodyDist < 15
x = -7
persistent = 0

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



;------------------------------------------------------------------------------------------------------------
;Change Immortal
[Statedef 23080]
type = S
movetype = I
physics = N
anim = 23080
ctrl = 0
sprpriority = 3
velset = 0,0
hitcountpersist = 1



[State 23080]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 23080]
type = DestroySelf
trigger1 = Time = 60
trigger2 = Parent,Stateno != 3080


;------------------------------------------------------------------------------------------------------------
;Spinning Blade
[Statedef 23081]
type = A
movetype = A
physics = N
;anim = 21242
ctrl = 0
sprpriority = 4
velset = 5,0
hitcountpersist = 1


[State 23081]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21242
value = 21242


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


[State 23081]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 23081]
type = VelSet
trigger1 = 1
x = (P2bodydist x )*0.01*Time
y = (P2bodydist y - 70)*0.01*Time


[State 23081]
type = null;VelAdd
trigger1 = Time < 7
y = 0.5


[State 23081]
type = null;VelAdd
trigger1 = Time = [7,30]
y = -0.3

[State 23081]
type = null;VelSet
trigger1 = Vel X
trigger1 = Time > 30
y = 0
x = 0

[State 23081]
type = HitBy
trigger1 = 1
value = SCA,AP

[State 23081]
type = HitOverride
trigger1 = 1
stateno = 23089
attr = SCA,AP
slot = 0
time = -1


[State 23081]
type = HitDef
attr = A, HP
trigger1 = Time%7 = 0
trigger1 = hitcount < 8
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/4)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-10
hitsound   = S1,1
guardsound = S4,0
sparkno = -1;S(8200+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -5
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
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 = 10,5
;palfx.time = 1
;palfx.add = 256,256,256

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 23081]
type = Varset
trigger1 = time = 0
var(0) = 7

[State 23081]
type = VarAdd
trigger1 = MoveGuarded
var(0) = -1

[State 23081]
type = MoveHitReset
trigger1 = var(0) > 0
trigger1 = MoveGuarded


[State 23081]
type = ChangeState
trigger1 = var(0) < 1 || hitcount > 6
value = 21249
ignorehitpause  = 1


[State 23081]
type = DestroySelf
trigger1 = FrontEdgeBodyDist < - 100
trigger2 = Time = 120


;------------------------------------------------------------------------------------------------------------
;Charge
[Statedef 23082]
type = S
movetype = I
physics = N
anim = 23081
ctrl = 0
sprpriority = 0
velset = 0,0



[State 23082]
type = AssertSpecial
trigger1 = 1
flag = noshadow



[State 23082]
type = DestroySelf
trigger1 = Time = 30
trigger2 = Parent,Stateno != 3081

[State 23082]
type = BindToParent
trigger1 = 1
pos = -7,-81

;------------------------------------------------------------------------------------------------------------
;Change End
[Statedef 23083] 
type = S
movetype = I
physics = N
anim = 3082
ctrl = 0
sprpriority = 0
velset = 0,0



[State 23083] 
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 23083] 
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = Parent,Stateno != 3083


[State 23082]
type = BindToParent
trigger1 = 1

;------------------------------------------------------------------------------------------------------------
;Illusion
[Statedef 23100]
type = S
movetype = I
physics = N
anim = 23117
ctrl = 0
sprpriority = 2
velset = 0,0
hitcountpersist = 1


[State 23100]
type = VarSet
trigger1 = Time = 0
var(1) = Parent,Stateno


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

[State 23100]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 23100]
type = HitBy
trigger1 = 1
value = SCA,AA,AP

[State 23100]
type = HitOverride
trigger1 = 1
stateno = 23117
attr = SCA,AA,AP
slot = 0
time = -1

[State 23100]
type = DestroySelf
trigger1 = Parent,stateno != var(1)


[State 23100]
type = BindToParent
trigger1 = 1


;------------------------------------------------------------------------------------------------------------
;Head
[Statedef 23120]
type = A
movetype = A
physics = N
;anim = 21240
ctrl = 0
sprpriority = 4
velset = 0,-1
;hitcountpersist = 1


[State 23120]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21451
value = 21451



[State 23120]
type = HitDef
attr = A, HP
trigger1 = hitcount < 1
trigger1 = moveguarded < 1
damage = 4*(Root,var(30)),floor(Root,var(30)/2)
animtype = Medium
priority  = 5, Hit
guardflag = MA
pausetime = 0,7
sparkxy = -10,-10
hitsound   = S1,2
guardsound = S4,0
sparkno = -1;S(8200+random%8)
guard.sparkno = -1;S7300
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -7
air.velocity = -7
guard.velocity = -7
airguard.velocity = -7
;fall.xvelocity = -3
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 = 10,5
;palfx.time = 1
;palfx.add = 256,256,256

[State 200, Explod]
type = Explod
trigger1 = MoveHit = 1
anim = 8210+random%8
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 7
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 200, Explod]
type = Explod
trigger1 = MoveGuarded = 1
anim = 7300
postype = p2
pos = 20,-90
persistent = 0
sprpriority = 3
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 23120]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 23120]
type = VelAdd
trigger1 = Time > 0
x = P2dist x  + random%50 - 0.7*(P2dist x + random%50)
 
[State 23120]
type = VelAdd
trigger1 = Time > 0
y = P2dist Y + random%50 - abs(enemynear,const(size.mid.pos.y)) - 0.7*(P2dist Y-abs(enemynear,const(size.mid.pos.y)) + random%50)

[State 23120]
type = VelAdd
trigger1 = p2dist x > p2dist y && Vel Y > 1
y = -0.5
 
[State 23120]
type = VelAdd
trigger1 = p2dist x < p2dist y && Vel Y > 0
y = 0.5
 
[State 23120]
type = VelSet
trigger1 = Vel X > 7
x = 7
 

[State 23120]
type = VelSet
trigger1 = Vel X < -7
x = -7
 

[State 23120]
type = VelSet
trigger1 = vel Y > 7
y = 7
 
[State 23120]
type = VelSet
trigger1 = Vel Y < -7
y = -7


[State 23120]
type = null;AngleDraw
trigger1 = 1
value = 10*Time%360

[State 23120]
type = ChangeState
trigger1 = MoveContact
value = 23129


[State 23120]
type = DestroySelf
trigger1 = FrontEdgeBodyDist < - 100
trigger2 = Time = 120

;------------------------------------------------------------------------------------------------------------
;Head
[Statedef 23129]
type = A
movetype = I
physics = N
;anim = 21240
ctrl = 0
sprpriority = 4
velset = -random%4,-random%4
;hitcountpersist = 1


[State 23129]
type = ChangeAnim
trigger1 = Time = 0 && Anim != 21450
value = 21450


[State 23129]
type = AssertSpecial
trigger1 = 1
flag = noshadow


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


[State 23129]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 21459

;------------------------------------------------------------------------------------------------------------
;Wave
[Statedef 23157]
type = U
movetype = I
physics = N
anim = 23157
ctrl = 0
sprpriority = 4
velset = 0,0


[State 23157]
type = VarSet
trigger1 = Time = 0
var(1) = parent,id


[State 23157]
type = DestroySelf
trigger1 = !PlayerIDExist(var(1))
trigger2 = Anim = 23158 && AnimTime = 0

[State 23157]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 23157]
type = ChangeAnim
trigger1 = Parent,Anim = 23151
trigger2 = Parent,Anim = 23153
value = 23158
persistent = 0


[State 23157]
type = ChangeAnim
trigger1 = Parent,Anim = 23152
value = 23159
persistent = 0

[State 23157]
type = BindToParent
trigger1 = PlayerIDExist(var(1))
ignorehitpause = 1


;------------------------------------------------------------------------------------------------------------
;Wave
[Statedef 23158]
type = U
movetype = I
physics = N
anim = 23154
ctrl = 0
sprpriority = 4
velset = 0,0


[State 23158]
type = VarSet
trigger1 = Time = 0
var(1) = parent,id


[State 23158]
type = DestroySelf
trigger1 = !PlayerIDExist(var(1))
trigger2 = Parent,Anim = 23153

[State 23158]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 23158]
type = BindToParent
trigger1 = PlayerIDExist(var(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



;------------------------------------------------------------------------------------------------------------
;Blood Spit
[Statedef 28103]
type = A
movetype = I
physics = N
anim = 8103
ctrl = 0
sprpriority = 4
velset = 0,0


[State 28103]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 28103]
type = VelSet
trigger1 = Time = 0 && parent,anim = 8108
x = 2+random%2
y = 1+random%2


[State 28103]
type = VelSet
trigger1 = Time = 0 && parent,anim = 8109
x = 4+random%2
y = -3-random%2


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

[State 28103]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 28104



;------------------------------------------------------------------------------------------------------------
;Blood Spit
[Statedef 28104]
type = S
movetype = I
physics = N
anim = 8104
ctrl = 0
sprpriority = 4
velset = 0,0


[State 28103]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 28104]
type = DestroySelf
trigger1 = AnimTime = 0


;------------------------------------------------------------------------------------------------------------
;Blood Spit
[Statedef 28108]
type = S
movetype = I
physics = N
anim = 8108+random%2
ctrl = 0
sprpriority = 5
velset = 0,0


[State 28108]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 28108]
type = Helper
trigger1 = AnimElem = 2 && Anim = 8108
stateno = 28103
pos = 56,28
scale = const(size.xscale),const(size.yscale)

[State 28108]
type = Helper
trigger1 = AnimElem = 2 && Anim = 8109
stateno = 28103
pos = 56,-28
scale = const(size.xscale),const(size.yscale)
[State 28108]
type = null;Turn
trigger1 = root,facing != facing


[State 28108]
type = BindToTarget
trigger1 = Root,Var(10)
id = Root,var(10)
pos = -100,0,mid


[State 28108]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;Blood Spit
[Statedef 28109]
type = S
movetype = I
physics = N
anim = 8108+random%2
ctrl = 0
sprpriority = 5
velset = 0,0


[State 28109]
type = AssertSpecial
trigger1 = 1
flag = noshadow


[State 28109]
type = Helper
trigger1 = AnimElem = 2 && Anim = 8108
stateno = 28103
pos = 56,28
scale = const(size.xscale),const(size.yscale)

[State 28109]
type = Helper
trigger1 = AnimElem = 2 && Anim = 8109
stateno = 28103
pos = 56,-28
scale = const(size.xscale),const(size.yscale)
[State 28109]
type = null;Turn
trigger1 = root,facing != facing


[State 28109]
type = null;BindToParent
trigger1 = 1

[State 28109]
type = DestroySelf
trigger1 = AnimTime = 0



;------------------------------------------------------------------------------------------------------------
;Anita
[Statedef 30500]
type = S
movetype = I
physics =N
anim = 30500
ctrl = 0
sprpriority = 1
velset = 0,0


[State 30500]
type = null;ChangeAnim
trigger1 = Anim != 30505
trigger1 = RootDist X > 10
value = 30505

[State 30500]
type = null;Turn
trigger1 = RootDist X > 10

[State 30500]
type = ChangeAnim
trigger1 = Anim != 30500 && Anim != 30505
trigger2 = Anim = 30505 && AnimTime = 0 ;Turn anim over
value = 30500


[State 30500]
type = ChangeState
trigger1 = RootDist X > 70 && Root,Vel X = [0,4]
value = 30520


[State 30500]
type = ChangeState
trigger1 = RootDist X < -70 && Root,Vel X = [-4,0]
value = 30521

[State 30500]
type = ChangeState
trigger1 = RootDist X > 70 && Root,Vel X > 4
value = 30540

[State 30500]
type = ChangeState
trigger1 = RootDist X < -70 && Root,Vel X < -4
value = 30541


[State 30500]
type = ChangeState
trigger1 = parent,Stateno = [181,182]
value = 6182

[State 30500]
type = ChangeState
trigger1 = parent,Stateno = 195
value = 30515


;------------------------------------------------------------------------------------------------------------
;Anita 
[Statedef 30505]
type = S
movetype = I
physics =N
anim = 6036
ctrl = 0
sprpriority = 1
velset = 0,0


[State 30505]
type = Turn
trigger1 = Root,Facing != Facing


[State 30505]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3000,1
persistent = 0

[State 30505]
type = ChangeState
triggerall = Time > 60
trigger1 = Root,MoveType != H
trigger2 = Root,Stateno != [120,155]
value = 30500


;------------------------------------------------------------------------------------------------------------
;Anita Point
[Statedef 30515]
type = S
movetype = I
physics =N
anim = 30515
ctrl = 0
sprpriority = 1
velset = 0,0


[State 30515]
type = Turn
trigger1 = Root,Facing != Facing


[State 30515]
type = ChangeState
trigger1 = Parent,Stateno != 195
value = 30500

;------------------------------------------------------------------------------------------------------------
;Anita Walk
[Statedef 30520]
type = S
movetype = I
physics =N
anim = 30520
ctrl = 0
sprpriority = 1
velset = 2.5,0


[State 30520]
type = Turn
trigger1 = Root,Facing != Facing




[State 30520]
type = ChangeState
trigger1 = RootDist X < 60
value = 30500


;------------------------------------------------------------------------------------------------------------
;Anita Walk
[Statedef 30521]
type = S
movetype = I
physics =N
anim = 30521
ctrl = 0
sprpriority = 1
velset = -2.5,0


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




[State 30521]
type = ChangeState
trigger1 = RootDist X > 60
value = 30520


;------------------------------------------------------------------------------------------------------------
;Anita Run
[Statedef 30540]
type = S
movetype = I
physics =N
anim = 30520
ctrl = 0
sprpriority = 1
velset = 5.5,0


[State 30540]
type = Turn
trigger1 = Root,Facing != Facing




[State 30540]
type = ChangeState
trigger1 = RootDist X < 60
value = 30500


;------------------------------------------------------------------------------------------------------------
;Anita Run
[Statedef 30541]
type = S
movetype = I
physics =N
anim = 30521
ctrl = 0
sprpriority = 1
velset = -5.5,0




[State 30541]
type = ChangeState
trigger1 = RootDist X > 60
value = 30540



;-----------------------------------------------------------------
; Override common states (use same number to override) :
;-----------------------------------------------------------------



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

;-----------------------------------------------------------------
; States that are executed when in se
