;-|    K E Z |--------------------------------------------------------
[Command]
name = "atem1"
command = ~D, DF, F, D, DF, F, x
time = 38

[Command]
name = "atem2"
command = ~D, DF, F, D, DF, F, y
time = 38

[Command]
name = "seele1"
command = ~D, DF, F, D, DF, F, a
time = 38

[Command]
name = "seele2"
command = ~D, DF, F, D, DF, F, b
time = 38

;-|  K E Z |------------------------------------------------------
[Command]
name = "flame1"
command = ~18$B, F, x
time = 18

[Command]
name = "flame2"
command = ~18$B, F, y
time = 18

[Command]
name = "panzer1"
command = ~18$B, F, a
time = 18

[Command]
name = "panzer2"
command = ~18$B, F, b
time = 18

[Command]
name = "lanze1"
command = ~18$D, $U, a
time = 18

[Command]
name = "lanze2"
command = ~18$D, $U, b
time = 18

[Command]
name = "FF_ab"
command = F, F, a+b
time = 15

[Command]
name = "FF_a"
command = F, F, a
time = 15

[Command]
name = "FF_b"
command = F, F, b
time = 15

[Command]
name = "FF_c"
command = F, F, c
time = 15

[Command]
name = "BB_c"
command = B, B, c
time = 15

;---------------------------------------------------------------------------
[Command]
name = "FF"     
command = F, F
time = 10

[Command]
name = "BB"     
command = B, B
time = 10

[Command]
name = "recovery"
command = x+y
time = 1

[Command]
name = "ab"
command = a+b
time = 1

[Command]
name = "ac"
command = a+c
time = 1

[Command]
name = "bc"
command = b+c
time = 1

[Command]
name = "ax"
command = a+x
time = 1

[Command]
name = "by"
command = b+y
time = 1

[Command]
name = "down_a"
command = /$D,a
time = 1

[Command]
name = "down_b"
command = /$D,b
time = 1

[Command]
name = "down_x"
command = /$D,x
time = 1

[Command]
name = "down_y"
command = /$D,y
time = 1

[Command]
name = "up_z"
command = /$U,z
time = 1

[Command]
name = "D_xy"
command = $D,x+y
time = 10

[Command]
name = "F_xy"
command = $F,x+y
time = 10

;---------------------------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

[Command]
name = "b"
command = b
time = 1

[Command]
name = "c"
command = c
time = 1

[Command]
name = "x"
command = x
time = 1

[Command]
name = "y"
command = y
time = 1

[Command]
name = "z"
command = z
time = 1

[Command]
name = "start"
command = s
time = 1

[command]
name = "fwd"
command = F
time = 1

[command]
name = "back"
command = B
time = 1

[command]
name = "JD"
command = $B
time = 1

[command]
name = "up"
command = U
time = 1

[command]
name = "down"
command = D
time = 1

;---------------------------------------------------------------------------
[Command]
name = "holdfwd"
command = /$F
time = 1

[Command]
name = "holdback"
command = /$B
time = 1

[Command]
name = "holdup" 
command = /$U
time = 1

[Command]
name = "holddown"
command = /$D
time = 1

[Command]
name = "holdx"
command = /$x
time = 1

[Command]
name = "holda"
command = /$a
time = 1

[Command]
name = "holdy"
command = /$y
time = 1

[Command]
name = "holdb"
command = /$b
time = 1

[Command]
name = "holdz"
command = /$z
time = 1

[Command]
name = "holdc"
command = /$c
time = 1

[Statedef -1]
;---------------------------------------------------------------------------
;   ݃q     b V   A [ e  
[State -1]
type = ChangeState
value = 3200
triggerall = !var(9)
triggerall = command = "atem2"
triggerall = power >= 2000
triggerall = command != "holda"
triggerall = command != "holdb"
triggerall = command != "holdx"
triggerall = command != "holdc"
triggerall = command != "holdz"
triggerall = statetype != A
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [150,153]) && var(17) = [1,9]
trigger4 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger5 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger6 = time <= 14 && stateno = 650 && movecontact = [1,10]
trigger7 = stateno = 410 && movecontact = [1,10]
trigger8 = stateno = 710 && movehit = [1,10]
trigger9 = (stateno = [2100,2200]) && time >= 10
trigger10 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;   ݃q     b V   [ [  
[State -1]
type = ChangeState
value = 3300
triggerall = !var(9)
triggerall = command = "seele2"
triggerall = power >= 2000
triggerall = NumHelper(3350) <= 3
triggerall = command != "holdx"
triggerall = command != "holda"
triggerall = command != "holdy"
triggerall = command != "holdc"
triggerall = command != "holdz"
triggerall = statetype != A
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [150,153]) && var(17) = [1,9]
trigger4 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger5 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger6 = time <= 14 && stateno = 650 && movecontact = [1,10]
trigger7 = stateno = 410 && movecontact = [1,10]
trigger8 = stateno = 710 && movehit = [1,10]
trigger9 = (stateno = [2100,2200]) && time >= 10
trigger10 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
; q     b V   A [ e  
[State -1]
type = ChangeState
value = 3000
triggerall = !var(9)
triggerall = command = "atem1"
triggerall = power >= 1000
triggerall = command != "holda"
triggerall = command != "holdb"
triggerall = command != "holdy"
triggerall = command != "holdc"
triggerall = command != "holdz"
triggerall = statetype != A
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [150,153]) && var(17) = [1,9]
trigger4 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger5 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger6 = time <= 14 && stateno = 650 && movecontact = [1,10]
trigger7 = stateno = 410 && movecontact = [1,10]
trigger8 = stateno = 710 && movehit = [1,10]
trigger9 = (stateno = [2100,2200]) && time >= 10
trigger10 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
; q     b V   [ [  
[State -1]
type = ChangeState
value = 3100
triggerall = !var(9)
triggerall = command = "seele1"
triggerall = power >= 1000
triggerall = NumHelper(3150) <= 3
triggerall = command != "holdx"
triggerall = command != "holdb"
triggerall = command != "holdy"
triggerall = command != "holdc"
triggerall = command != "holdz"
triggerall = statetype != A
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [150,153]) && var(17) = [1,9]
trigger4 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger5 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger6 = time <= 14 && stateno = 650 && movecontact = [1,10]
trigger7 = stateno = 410 && movecontact = [1,10]
trigger8 = stateno = 710 && movehit = [1,10]
trigger9 = (stateno = [2100,2200]) && time >= 10
trigger10 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
; t F C   g1
[State -1]
type = ChangeState
value = 2100
triggerall = !var(9)
triggerall = var(21) < 10
triggerall = command = "F_xy"
triggerall = statetype != A
triggerall = command != "holda"
triggerall = command != "holdb"
triggerall = command != "holdc"
triggerall = command != "holdz"
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger4 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger5 = time <= 14 && stateno = 650 && movecontact = [1,10]
trigger6 = stateno = 410 && movecontact = [1,10]
trigger7 = stateno = 710 && movehit = [1,10]
trigger8 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
; t F C   g2
[State -1]
type = ChangeState
value = 2200
triggerall = !var(9)
triggerall = var(21) < 10
triggerall = command = "D_xy"
triggerall = statetype != A
triggerall = command != "holda"
triggerall = command != "holdb"
triggerall = command != "holdc"
triggerall = command != "holdz"
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger4 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger5 = time <= 14 && stateno = 650 && movecontact = [1,10]
trigger6 = stateno = 410 && movecontact = [1,10]
trigger7 = stateno = 710 && movehit = [1,10]
trigger8 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;  E V       c t   C  
[State -1]
type = ChangeState
value = 1000
triggerall = !var(9)
triggerall = command = "flame1"
triggerall = command != "holda"
triggerall = command != "holdb"
triggerall = command != "holdy"
triggerall = command != "holdc"
triggerall = command != "holdz"
triggerall = statetype != A
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [150,153])  && var(17) = [1,9]
trigger4 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger5 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger6 = stateno = 410 && movecontact = [1,10]
trigger7 = stateno = 710 && movehit = [1,10]
trigger8 = (stateno = [2100,2200]) && time >= 10
trigger9 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;   E V       c t   C  
[State -1]
type = ChangeState
value = 1010
triggerall = !var(9)
triggerall = command = "flame2"
triggerall = command != "holda"
triggerall = command != "holdb"
triggerall = command != "holdx"
triggerall = command != "holdc"
triggerall = command != "holdz"
triggerall = statetype != A
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [150,153]) && var(17) = [1,9]
trigger4 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger5 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger6 = stateno = 410 && movecontact = [1,10]
trigger7 = stateno = 710 && movehit = [1,10]
trigger8 = (stateno = [2100,2200]) && time >= 10
trigger9 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;  E V       c     c F
[State -1]
type = ChangeState
value = 1200
triggerall = !var(9)
triggerall = command = "lanze1"
triggerall = command != "holdy"
triggerall = command != "holdb"
triggerall = command != "holdx"
triggerall = command != "holdc"
triggerall = command != "holdz"
triggerall = statetype != A
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520 || stateno = 40
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [150,153]) && var(17) = [1,9]
trigger4 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger5 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger6 = stateno = 410 && movecontact = [1,10]
trigger7 = stateno = 710 && movehit = [1,10]
trigger8 = (stateno = [2100,2200]) && time >= 10
trigger9 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;   E V       c     c F
[State -1]
type = ChangeState
value = 1220
triggerall = !var(9)
triggerall = command = "lanze2"
triggerall = command != "holdy"
triggerall = command != "holda"
triggerall = command != "holdx"
triggerall = command != "holdc"
triggerall = command != "holdz"
triggerall = statetype != A
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520 || stateno = 40
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [150,153]) && var(17) = [1,9]
trigger4 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger5 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger6 = stateno = 410 && movecontact = [1,10]
trigger7 = stateno = 710 && movehit = [1,10]
trigger8 = (stateno = [2100,2200]) && time >= 10
trigger9 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;  E V       c p   c @ [
[State -1]
type = ChangeState
value = 1100
triggerall = !var(9)
triggerall = command = "panzer1"
triggerall = command != "holdx"
triggerall = command != "holdb"
triggerall = command != "holdy"
triggerall = command != "holdc"
triggerall = command != "holdz"
triggerall = statetype != A
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [150,153]) && var(17) = [1,9]
trigger4 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger5 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger6 = stateno = 410 && movecontact = [1,10]
trigger7 = stateno = 710 && movehit = [1,10]
trigger8 = (stateno = [2100,2200]) && time >= 10
trigger9 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;   E V       c p   c @ [
[State -1]
type = ChangeState
value = 1120
triggerall = !var(9)
triggerall = command = "panzer2"
triggerall = command != "holdy"
triggerall = command != "holda"
triggerall = command != "holdx"
triggerall = command != "holdc"
triggerall = command != "holdz"
triggerall = statetype != A
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [150,153]) && var(17) = [1,9]
trigger4 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger5 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger6 = stateno = 410 && movecontact = [1,10]
trigger7 = stateno = 710 && movehit = [1,10]
trigger8 = (stateno = [2100,2200]) && time >= 10
trigger9 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
; V       c V   g D [ X
[State -1]
type = ChangeState
value = 1300
triggerall = !var(9)
triggerall = var(0)
triggerall = command = "by" || command = "c"
triggerall = command != "holda"
triggerall = command != "holdx"
triggerall = command != "holdz"
triggerall = statetype != A
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger2 = (stateno = [200,799]) && !var(10) && stateno != [650,699]
trigger3 = (stateno = [150,153]) && var(17) = [1,9]
trigger4 = (stateno = [200,225]) && stateno != 220 && movecontact = [1,10]
trigger5 = var(13) = 1 && stateno = 220 && movecontact = [1,10]
trigger6 = time <= 14 && stateno = 650 && movecontact = [1,10]
trigger7 = stateno = 410 && movecontact = [1,10]
trigger8 = stateno = 710 && movehit = [1,10]
trigger9 = (stateno = [2100,2200]) && time >= 10
trigger10 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
; _ b V  
[State -1]
type = ChangeState
value = 100
triggerall = !var(9)
triggerall = stateno != 100
triggerall = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl || stateno = 57

;---------------------------------------------------------------------------
; o b N X e b v
[State -1]
type = ChangeState
value = 105
triggerall = !var(9)
triggerall = stateno != 100
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl || stateno = 57

;---------------------------------------------------------------------------
;   i    U  
[State -1]
type = ChangeState
value = 700
triggerall = !var(9)
triggerall = command = "ax" || command = "z"
triggerall = command != "holddown"
triggerall = command != "holdb"
triggerall = command != "holdy"
triggerall = command != "holdc"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 2100 && time >= 10

;---------------------------------------------------------------------------
;  i    U  
[State -1]
type = ChangeState
value = 710
triggerall = !var(9)
triggerall = command = "ax" || command = "z"
triggerall = command = "holddown"
triggerall = command != "holdb"
triggerall = command != "holdy"
triggerall = command != "holdc"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = (stateno = [2100,2200]) && time >= 10

;---------------------------------------------------------------------------
;    
[State -1]
type = ChangeState
value = 195
triggerall = !var(9)
triggerall = statetype = S
triggerall = stateno != 195 && ctrl
triggerall = command != "holdfwd"
triggerall = command != "holdback"
trigger1 =  command = "start"

[State -1]
type = ChangeState
value = 196
triggerall = !var(9)
triggerall = win
triggerall = statetype = S
triggerall = stateno != 195 && ctrl
triggerall = command != "holdback"
trigger1 =  command = "holdfwd"
trigger1 =  command = "start"

[State -1]
type = ChangeState
value = 197
triggerall = !var(9)
triggerall = win
triggerall = statetype = S
triggerall = stateno != 195 && ctrl
triggerall = command != "holdfwd"
trigger1 =  command = "holdback"
trigger1 =  command = "start"

;---------------------------------------------------------------------------
; V       c   [     g
[State -1]
type = ChangeState
value = 800
triggerall = !var(9)
triggerall = command = "y"
triggerall = statetype = S
triggerall = p2statetype != A
triggerall = p2bodydist X <= ceil(6*fvar(10))
triggerall = command = "holdfwd" || command = "holdback"
trigger1 = ctrl
trigger2 = stateno = 2100 && time >= 10

;---------------------------------------------------------------------------
; R   r l [ V     E     b
[State -1]
type = ChangeState
value = 650
triggerall = command = "holdy"
trigger1 = command != "holddown"
triggerall = !var(9)
triggerall = statetype != A
trigger1 = stateno = 710 && movecontact = [1,10]

;---------------------------------------------------------------------------
; R   r l [ V     E    B
[State -1]
type = ChangeState
value = 660
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = !var(9)
triggerall = statetype != A
trigger1 = stateno = 400 && movecontact = [1,10]

;---------------------------------------------------------------------------
; R   r l [ V     E    C
[State -1]
type = ChangeState
value = 670
triggerall = command = "y"
triggerall = command = "holddown"
triggerall = !var(9)
triggerall = statetype != A
trigger1 = (stateno = [400,410]) && movecontact = [1,10]

;---------------------------------------------------------------------------
; R   r l [ V     E  A
[State -1]
type = ChangeState
value = 680
triggerall = command = "x"
triggerall = !var(9)
triggerall = statetype = A
triggerall = vel X = 0
trigger1 = stateno = 630 && movecontact = [1,10]

;---------------------------------------------------------------------------
;    A
[State -1]
type = ChangeState
value = 200
triggerall = !var(9)
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = command != "ax"
triggerall = command != "by"
triggerall = statetype = S
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 2100 && time >= 10
trigger3 = stateno = 200 && time >= 8
trigger4 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;    B
[State -1]
type = ChangeState
value = 210
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = command != "ax"
triggerall = command != "by"
triggerall = !var(9)
triggerall = statetype = S
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 2100 && time >= 10
trigger3 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;    C
[State -1]
type = ChangeState
value = ifelse(p2bodydist x <= ceil(25*fvar(10)),225,220)
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = !var(9)
triggerall = statetype = S
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 2100 && time >= 10
trigger3 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;    D
[State -1]
type = ChangeState
value = 230
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = !var(9)
trigger1 = statetype = S
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 2100 && time >= 10
trigger3 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;    A
[State -1]
type = ChangeState
value = 400
triggerall = !var(9)
triggerall = command = "x"
triggerall = command = "holddown"
triggerall = command != "ax"
triggerall = command != "by"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 2200 && time >= 10
trigger3 = stateno = 400 && time >= 8
trigger4 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;    B
[State -1]
type = ChangeState
value = 410
triggerall = !var(9)
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = command != "ax"
triggerall = command != "by"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 2200 && time >= 10
trigger3 = stateno = 410 && time >= 8
trigger4 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;    C
[State -1]
type = ChangeState
value = 420
triggerall = !var(9)
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 2200 && time >= 10
trigger3 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;    D
[State -1]
type = ChangeState
value = 430
triggerall = !var(9)
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 2200 && time >= 10
trigger3 = (stateno = [200,799]) && AnimTime = 0

;---------------------------------------------------------------------------
;  A
[State -1]
type = ChangeState
value = 600
triggerall = !var(9)
triggerall = command = "x" && ctrl
triggerall = command != "ax"
triggerall = command != "by"
trigger1 = statetype = A

;---------------------------------------------------------------------------
;  B
[State -1]
type = ChangeState
value = 610
triggerall = !var(9)
triggerall = command = "a" && ctrl
triggerall = command != "ax"
triggerall = command != "by"
trigger1 = statetype = A

;---------------------------------------------------------------------------
;  C
[State -1]
type = ChangeState
value = 620
triggerall = !var(9)
triggerall = command = "y" && ctrl
trigger1 = statetype = A

;---------------------------------------------------------------------------
;  D
[State -1]
type = ChangeState
value = 630
triggerall = !var(9)
triggerall = command = "b" && ctrl
trigger1 = statetype = A

;-| CPU |--------------------------------------------------------------------
;---------------------------------------------------------------------------
[State 5001, 6]
type = ChangeState
triggerall = RoundState = 2
triggerall = var(9)
triggerall = statetype != A
triggerall = ctrl || stateno = 57 || stateno = 2520
triggerall = NumHelper(200000) = 0
trigger1 = random < 20
trigger1 = var(47) = 0
trigger1 = var(47) := 1 || 1
ctrl = 0
value = 20000

;---------------------------------------------------------------------------
;   ݃q     b V   A [ e  
[State -1]
type = ChangeState
value = 3200
triggerall = RoundState = 2
triggerall = var(9)
triggerall = power >= 2000
triggerall = statetype != A
triggerall = enemy,life >= 320
triggerall = prevstateno != 3000
trigger1 = random%4 = 0
trigger1 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger2 = stateno = 650 && movehit = 8 && var(9) > 5
trigger3 = (P2bodydist X = [50*fvar(10),130*fvar(10)]) && (P2bodydist Y = [-280*fvar(11),-120*fvar(11)]) && p2statetype = A && !var(16)
trigger3 = Random <= 50*var(9) && (p2stateno = [5000,5099]) && !var(11) && prevstateno != 1250 
trigger3 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger4 = Random <= 140*var(9) && stateno = 1250 && (p2stateno = [5000,5099]) && AnimTime = 0
trigger4 = (P2BodyDist X = [-10*fvar(10),90*fvar(10)]) && var(6) 
trigger5 = stateno = 1250 && (p2stateno = [5000,5099]) && AnimTime = 0
trigger5 = p2statetype = A && !var(16) && (P2BodyDist X = [0,120*fvar(10)]) && var(6) && var(9) > 6 && power < 2000
trigger6 = stateno = 3100 || stateno = 3300
trigger6 = Random <= 140*var(9) && (p2stateno = [5020,5099]) && AnimTime = 0
trigger6 = (P2bodydist X = [0,80*fvar(10)]) && var(9) > 4

;---------------------------------------------------------------------------
;   ݃q     b V   [ [  
[State -1]
type = ChangeState
value = 3300
triggerall = RoundState = 2
triggerall = var(9)
triggerall = power >= 2000
triggerall = NumHelper(3150) = 0 && NumHelper(3350) = 0
triggerall = statetype != A
triggerall = enemy,life >= 320
triggerall = p2stateno != 4121 && fvar(4) < 110
trigger1 = random%3 = 0
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (P2bodydist X = [40*fvar(10),70*fvar(10)]) && (P2bodydist Y = [-80*fvar(11),-50*fvar(11)]) && p2statetype = A && !var(16)
trigger2 = Random <= 20*var(9) && enemy,vel Y >= 0
trigger2 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger2 = stateno != 105
trigger3 = stateno = 812 && AnimTime = 0 && enemy,backedgedist <= 40 && var(9) > 3
trigger3 = (p2bodydist X = [-10*fvar(10),60*fvar(10)]) && Random <= 140*var(9)
trigger4 = (stateno = [220,225]) && Time <= 13 && movehit = 1 && p2statetype != A && Random <= 30*var(9)
trigger5 = (stateno = [210,225]) && Time <= 13 && moveguarded = 1 && Random <= 15*var(9)
trigger6 = (p2bodydist X = [-10*fvar(10),70*fvar(10)]) && stateno = 812 && enemy,backedgedist <= 50
trigger6 = AnimTime = 0 && Random <= 120*var(9)
trigger6 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger6 = stateno != 105
trigger7 = stateno = 710 && movehit && p2statetype != A && Random <= 50*var(9)
trigger7 = (P2BodyDist X = [40*fvar(10)+var(43),80*fvar(10)])  && var(9) > 5

;---------------------------------------------------------------------------
; q     b V   A [ e  
[State -1]
type = ChangeState
value = 3000
triggerall = RoundState = 2
triggerall = var(9)
triggerall = !var(11)
triggerall = power >= 1000
triggerall = statetype != A
triggerall = prevstateno != 3000
trigger1 = random%2 = 0
trigger1 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger2 = stateno = 650 && movehit = 8 && var(9) > 4
trigger3 = (P2bodydist X = [50*fvar(10),100*fvar(10)]) && (P2bodydist Y = [-240*fvar(11),-100*fvar(11)]) && p2statetype = A && !var(16)
trigger3 = Random <= 50*var(9) && (p2stateno = [5000,5099]) && !var(11) && prevstateno != 1250 
trigger3 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger4 = p2statetype = A && !var(16) && Random <= 100*var(9)+var(0)*200 && stateno = 1250 && (p2stateno = [5000,5099]) && AnimTime = 0
trigger4 = (P2BodyDist X = [5*fvar(10),100*fvar(10)]) && P2BodyDist Y < -60
trigger5 = Random <= 140*var(9) && stateno = 1250 && (p2stateno = [5000,5099]) && AnimTime = 0
trigger5 = p2statetype = A && !var(16) && (P2BodyDist X = [0,100*fvar(10)]) && var(6)
trigger6 = stateno = 3100 || stateno = 3300
trigger6 = Random <= 140*var(9) && (p2stateno = [5020,5099]) && AnimTime = 0
trigger6 = (P2bodydist X = [0,80*fvar(10)]) && var(9) > 4
trigger7 = Random <= 140*var(9) && stateno = 3300 && (p2stateno = [5000,5099]) && AnimTime = 0 && enemy,life >= 250
trigger7 = (P2bodydist X = [0,80*fvar(10)]) && prevstateno = 812 && var(9) > 6
trigger8 = stateno = 1250 && (p2stateno = [5000,5099]) && AnimTime = 0
trigger8 = p2statetype = A && !var(16) && (P2BodyDist X = [0,120*fvar(10)]) && var(6) && var(9) > 6 && power < 2000
trigger9 = (P2BodyDist X = [-30*fvar(10),80*fvar(10)]) && p2stateno = [5000,5099]
trigger9 = (P2BodyDist Y = [-100*fvar(11),-10*fvar(11)]) && AnimTime = 0 && var(9) > 5
trigger9 = stateno = 3100 || stateno = 3300

;---------------------------------------------------------------------------
; q     b V   [ [  
[State -1]
type = ChangeState
value = 3100
triggerall = RoundState = 2
triggerall = var(9)
triggerall = !var(11)
triggerall = power >= 1000
triggerall = NumHelper(3150) = 0 && NumHelper(3350) = 0
triggerall = statetype != A
triggerall = p2stateno != 4121 && fvar(4) < 110
trigger1 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger1 = stateno != 105
trigger2 = (stateno = [220,225]) && Time <= 13 && movehit = 1 && p2statetype != A && Random <= 90*var(9)
trigger3 = var(0) && (fvar(4) = [40,60]) || !var(0) && fvar(4) > 90
trigger3 = (stateno = [210,225]) && Time <= 13 && moveguarded = 1 && !var(41) && Random <= 120*var(9)
trigger4 = NumHelper(3150) > 0 && !var(41) && (fvar(4) = [20,60]) && (p2stateno = [150,153]) && Random <= 8*var(9)
trigger4 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger5 = stateno = 710 && movehit && p2statetype != A && Random <= 90*var(9)
trigger5 = (P2BodyDist X = [40*fvar(10)+var(43),80*fvar(10)])  && var(9) > 5
trigger6 = fvar(4) > 70 && !var(0) || fvar(4) > 40 && var(0) || fvar(4) > 20 && var(0) && power >= 2000
trigger6 = (P2bodydist X = [50*fvar(10),100*fvar(10)])
trigger6 = stateno != 105 && Random <= 20*var(9) && p2stateno = 5120 && enemynear,animtime = [-20,-10]
trigger6 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger7 = (stateno = [150,153]) && var(17) = 1 && enemynear,animtime <= -10 && enemy,vel X <= 1
trigger7 = (P2bodydist X = [20*fvar(10),60*fvar(10)]) && var(9) > 6 && Random <= 40*var(9)+var(20)*30
trigger8 = p2statetype != A && p2movetype = A && enemynear,animtime <= -10 && enemy,vel X <= 1
trigger8 = (P2bodydist X = [20*fvar(10),60*fvar(10)]) && var(9) > 6 && Random <= 20*var(9)+var(20)*30 && life >= 100
trigger8 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger8 = stateno != 105
trigger9 = (stateno = [210,225]) && Time <= 13 && moveguarded = 1 && !var(41) && (fvar(4) = [20,40]) && Random <= 140*var(9) && var(0)
trigger10 = stateno = 650 && moveguarded = 1 && !var(41) && (fvar(4) = [35,60]) && Random <= 140*var(9) && var(0)
trigger11 = power >= 2000 && (stateno = [210,225]) && Time <= 13 && moveguarded = 1 && !var(41) && Random <= 140*var(9)
trigger11 = var(0) && (fvar(4) = [10,40]) || !var(0) && fvar(4) > 75
trigger12 = power >= 2000 && stateno = 650 && moveguarded = 1 && !var(41) && Random <= 140*var(9)
trigger12 = var(0) && (fvar(4) = [10,40]) || !var(0) && fvar(4) > 75
trigger13 = (P2bodydist X = [50*fvar(10),100*fvar(10)]) && var(0) && fvar(4) >= 30
trigger13 = Random <= 40*var(9) && p2stateno = 5120 && enemynear,animtime = [-20,-10]
trigger13 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger13 = stateno != 105
trigger14 = (P2bodydist X = [70*fvar(10),110*fvar(10)]) && var(0) && fvar(4) >= 30
trigger14 = Random <= 10*var(9) && p2statetype != A && p2statetype != L && NumHelper(3150) = 0
trigger14 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger14 = stateno != 105
trigger15 = var(0) && (fvar(4) = [40,60]) || !var(0) && fvar(4) > 90
trigger15 = (stateno = [400,410]) && Time <= 13 && moveguarded = 1 && var(9) > 6 && !var(41) && Random <= 120*var(9)

;---------------------------------------------------------------------------
;
[State -1]
type = ChangeState
value = 21000
triggerall = RoundState = 2
triggerall = var(9)
triggerall = statetype != A
triggerall = ctrl || stateno = 57 || stateno = 2520
trigger1 = enemynear,movetype = a && random%4 = 0

;---------------------------------------------------------------------------
[State 5001, 6]
type = ChangeState
triggerall = RoundState = 2
triggerall = var(9)
triggerall = statetype != A
triggerall = ctrl || stateno = 57 || stateno = 2520
trigger1 = numhelper(13500) = 1
trigger1 = random%5 = 0
ctrl = 0
value = 1340020

;---------------------------------------------------------------------------
;  h [ i c ]      
[State -1]
type = ChangeState
value = 14100
triggerall = RoundState = 2
triggerall = var(9)
triggerall = statetype != A
triggerall = ctrl || stateno = 57 || stateno = 2520
trigger1 = random%15 = 0

;---------------------------------------------------------------------------
;  E V       c t   C  
[State -1]
type = ChangeState
value = ifelse(random%3 < 2,1000,1300)
triggerall = RoundState = 2
triggerall = var(9)
triggerall = statetype != A
triggerall = ctrl || stateno = 57 || stateno = 2520
trigger1 = P2BodyDist X > 0 && P2BodyDist y > -240 && random%3 = 0

;---------------------------------------------------------------------------
;   E V       c t   C  
[State -1]
type = ChangeState
value = ifelse(random%3 < 2,1010,1300)
triggerall = RoundState = 2
triggerall = var(9)
triggerall = statetype != A
trigger1 = P2BodyDist X > 0 && P2BodyDist y > -240 && random%2 = 0
trigger1 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520

;---------------------------------------------------------------------------
;  E V       c p   c @ [
[State -1]
type = ChangeState
value = 1100
triggerall = RoundState = 2
triggerall = var(9)
triggerall = !var(11)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = (P2BodyDist X = [-20*fvar(10),120*fvar(10)]) 
triggerall = movehit = 0 || movehit && enemy,stateno = [5000,5030]
trigger1 = (stateno = [220,225]) && Time <= 13 && movehit = 1 && p2statetype != A && Random <= 140*var(9)
trigger1 = (P2BodyDist X = [20*fvar(10),120*fvar(10)]) 
trigger2 = stateno = 410 && movehit && p2statetype != A
trigger2 = (P2BodyDist X = [20*fvar(10),120*fvar(10)]) && var(9) > 6
trigger3 = (p2stateno = [5000,5099]) && Random <= 40*var(9) && ctrl
trigger3 = (P2BodyDist X = [30*fvar(10),100*fvar(10)]) && (P2BodyDist Y = [-90*fvar(11),-60*fvar(11)]) 
trigger4 = (p2stateno = [5000,5099]) && (stateno = [2100,2200]) && time = 10 && p2statetype = A && !var(16)  && var(9) > 4
trigger5 = stateno = 710 && movehit && p2statetype != A && Random <= 140*var(9)
trigger5 = (P2BodyDist X = [30*fvar(10),120*fvar(10)]) && var(9) > 4
trigger6 = stateno = 210 && movehit = 1 && p2statetype != A && Random <= 140*var(9)
trigger6 = (P2BodyDist X = [20*fvar(10),120*fvar(10)]) && var(9) > 3
trigger7 = (P2BodyDist X = [-30*fvar(10),80*fvar(10)]) && (p2stateno = [5000,5099]) && enemy,backedgedist > 50
trigger7 = (P2BodyDist Y = [-100*fvar(11),-10*fvar(11)]) && AnimTime = 0 && var(9) > 5
trigger7 = stateno = 3100 || stateno = 3300
trigger8 = NumHelper(3150) || NumHelper(3350)
trigger8 = ctrl || stateno = 57 || (stateno = [100,104]) || stateno = 2520
trigger8 = (p2bodydist X = [0,80*fvar(10)]) && (p2stateno = [5030,5050]) && !inguarddist && Random <= 80*var(9)
trigger9 = (stateno = [150,153]) && var(17) = 1 && enemy,animtime <= -20 && p2statetype != L && enemy,numproj = 0
trigger9 = (p2bodydist X = [30*fvar(10),60*fvar(10)]) && p2statetype != A && Random <= 30*var(9) && life > 300
trigger10 = (p2bodydist X = [30*fvar(10),80*fvar(10)]) && P2bodydist Y >= -120*fvar(11) && !var(16)
trigger10 = enemy,vel Y > 0 && !inguarddist && p2stateno = 5050 && Random <= 80*var(9) && ctrl
trigger11 = prevstateno != 3300 && stateno = 3000 && (p2stateno = [5000,5099])
trigger11 = (P2BodyDist Y = [-140*fvar(11),-40*fvar(11)]) && AnimTime = 0 && Random <= 140*var(9)

[State -1]
type = ChangeState
value = 1101
triggerall = RoundState = 2
triggerall = var(9)
triggerall = var(14)
triggerall = statetype != A
trigger1 = Random <= 140*var(9) && stateno = 1250 && (p2stateno = [5030,5099]) && AnimTime = 0
trigger1 = (P2BodyDist X = [-10*fvar(10),100*fvar(10)]) && var(9) > 3
trigger2 = Random <= 140*var(9) && stateno = 1250 && (p2stateno = [5030,5099]) && AnimTime = 0
trigger2 = (P2BodyDist X = [50*fvar(10),110*fvar(10)]) && var(9) > 3 && enemy,backedgedist <= 20
trigger3 = stateno = 3300 && prevstateno = 812 && power < 1000 && var(9) > 6
trigger3 = (P2BodyDist X = [0,80*fvar(10)]) && enemy,backedgedist <= 35 && p2stateno = [5030,5099]
trigger3 = AnimTime = 0 && Random <= 140*var(9)
trigger4 = stateno = 3200 && p2stateno = [5030,5099]
trigger4 = AnimTime = 0 && Random <= 140*var(9)
trigger5 = stateno = 1100 && var(6) && p2stateno = [5030,5099]
trigger5 = AnimTime = 0 && movehit && Random <= 140*var(9)

;---------------------------------------------------------------------------
;   E V       c p   c @ [
[State -1]
type = ChangeState
value = 1120
triggerall = RoundState = 2
triggerall = var(9) = [1,5]
triggerall = statetype != A
triggerall = p2statetype != A
triggerall = p2statetype != L
trigger1 = (P2BodyDist X = [10*fvar(10),40*fvar(10)])
trigger1 = (stateno = [210,225]) && Time <= 13 && movehit = 1 && p2statetype != A && Random <= 30
trigger2 = (P2BodyDist X = [80*fvar(10),120*fvar(10)]) && ctrl && Random <= 5

;---------------------------------------------------------------------------
;  E V       c     c F
[State -1]
type = ChangeState
value = 1200
triggerall = RoundState = 2
triggerall = var(9)
triggerall = statetype != A
triggerall = p2stateno != 4121 && fvar(4) < 110
trigger1 = p2statetype != L && p2statetype != A && p2movetype != A
trigger1 = (p2bodydist X = [5*fvar(10),35*fvar(10)]) && Random <= 15*var(9)+var(20)*30
trigger1 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger2 = p2statetype = L && p2bodydist X > 60*fvar(10) && power <= 3000 && p2stateno != 5120
trigger2 = Random <= 80*var(9) && var(9) > 5
trigger2 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger3 = (stateno = [150,153]) && var(17) = 1 && var(9) > 5
trigger3 = (p2bodydist X = [0,40*fvar(10)]) && (p2bodydist Y = [-70*fvar(11),0]) && Random <= 70*var(9)
trigger4 = (p2bodydist X = [0,40*fvar(10)]) && (p2bodydist Y = [-70*fvar(11),0])
trigger4 = p2movetype = A && var(9) > 5 && Random <= 15*var(9)+var(20)*50
trigger4 = ctrl || stateno = 57 || (stateno = [100,102]) || stateno = 2520 || stateno = [102,104]
trigger5 = (p2bodydist X = [0,40*fvar(10)]) && (p2bodydist Y = [-70*fvar(11),0])
trigger5 = enemynear,hitdefattr = ,AA,AT,AP && var(9) > 6 && Random <= 50*var(9)+var(20)*120
trigger5 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger6 = stateno = 710 && movehit = 1 && p2statetype != A && Random <= 140*var(9)
trigger6 = (P2BodyDist X = [30*fvar(10)-var(43),40*fvar(10)])  && var(9) > 4
trigger7 = (P2bodydist X = [-50*fvar(10),50*fvar(10)]) && (P2bodydist Y = [-70*fvar(11),0]) && p2movetype = A && !var(16)
trigger7 = Random <= 40*var(9) && !var(6) && AnimTime = 0
trigger7 = stateno = 5120 || (stateno = [2000,2030])
trigger8 = (stateno = [210,225]) && Time <= 13 && moveguarded = 1 && Random <= 70*var(9) && var(9) > 5
trigger8 = (P2BodyDist X = [-10*fvar(10),25*fvar(10)])
trigger9 = (stateno = [210,225]) && Time <= 13 && movehit = 1 && Random <= 140*var(9) && var(9) > 5
trigger9 = (P2BodyDist X = [-10*fvar(10),25*fvar(10)])
trigger10 = stateno = 410 && movecontact = 1 && Random <= 50*var(9) && p2statetype != L && var(9) > 6
trigger10 = (P2BodyDist X = [-10*fvar(10),25*fvar(10)]) 
trigger11 = (p2bodydist X = [0,50*fvar(10)]) && var(9) > 3 && var(6) = 1 && Random <= 80*var(9) && ctrl
trigger12 = (P2bodydist X = [5*fvar(10),30*fvar(10)]) && (P2bodydist Y = [-60*fvar(11),-40*fvar(11)]) && p2statetype = A && !var(16) && var(6)
trigger12 = Random <= 50*var(9) && enemy,vel Y > 0 && ctrl
trigger13 = (p2bodydist X = [10*fvar(10),35*fvar(10)]) && p2statetype = A && !var(16) && p2stateno != [5030,5050]
trigger13 = (p2bodydist Y = [-50*fvar(11),-30*fvar(11)]) && Random <= 30*var(9)+var(20)*100  && var(9) > 3
trigger13 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger14 = (p2bodydist X = [0,40*fvar(10)]) && (p2bodydist Y = [-70*fvar(11),0])
trigger14 = enemynear,hitdefattr = ,AA,AT,AP && var(9) > 6 && Random <= 60*var(9)+var(20)*60
trigger14 = stateno = 5120 && AnimTime = 0
trigger15 = (p2bodydist X = [0,40*fvar(10)]) && (p2bodydist Y = [-70*fvar(11),0])
trigger15 = p2movetype = A && var(9) > 6 && Random <= 20*var(9)+var(20)*60
trigger15 = enemy,animtime <= -10 && !var(10) && movecontact = 0
trigger15 = stateno = 710 || (stateno = [200,230]) || stateno = [400,430]
trigger16 = p2statetype != L && p2bodydist X > 150*fvar(10) && power <= 3000 && p2movetype != A
trigger16 = enemy,numproj = 0 && !inguarddist && Random <= 2*var(9) && var(9) > 6
trigger16 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger17 = p2statetype = A && p2bodydist X > 120*fvar(10) && power <= 3000 && p2stateno = 5050
trigger17 = enemy,numproj = 0 && !inguarddist && Random <= 80*var(9) && var(9) > 6
trigger17 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger18 = p2statetype != A && p2bodydist X < 30*fvar(10) && enemy,backedgedist <= 80 && p2stateno = [130,151]
trigger18 = enemy,numproj = 0 && !inguarddist && Random <= 100*var(9) && var(9) > 4
trigger18 = stateno = 1250 && AnimTime = 0
trigger19 = (p2bodydist X = [15*fvar(10),45*fvar(10)]) && p2statetype = A && !var(16) && prevstateno != 1250 
trigger19 = (p2bodydist Y = [-50*fvar(11),-30*fvar(11)]) && Random <= 30*var(9)+var(20)*100
trigger19 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger20 = (P2bodydist X = [-50*fvar(10),50*fvar(10)]) && (P2bodydist Y = [-70*fvar(11),-50*fvar(11)]) && p2statetype = A && !var(16)
trigger20 = Random <= 80*var(9) && !var(6) && AnimTime = 0
trigger20 = stateno = 5120 || (stateno = [2000,2030])
trigger21 = stateno = 410 && movehit && p2statetype != A
trigger21 = (P2BodyDist X = [-20*fvar(10),30*fvar(10)]) && var(9) > 6
trigger22 = ctrl && p2statetype = A && p2movetype != A && Random <= 20*var(9) && enemy,vel X = [-2,2]
trigger22 = (p2bodydist Y = [-60*fvar(11),-1]) && (p2bodydist X = [-20*fvar(10),40*fvar(10)]) && enemy,vel Y = [-2,2]
trigger23 = p2statetype = A && p2bodydist X > 80*fvar(10) && Enemy,NumPartner = 0 && power <= 3000 && p2stateno = [5030,5050]
trigger23 = p2movetype = H && enemy,numproj = 0 && !inguarddist && Random <= 80*var(9) && var(9) > 6
trigger23 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520 || stateno = 21
trigger24 = p2statetype = A && stateno = 710 && !var(10) && var(9) > 6

;---------------------------------------------------------------------------
;   E V       c     c F
[State -1]
type = ChangeState
value = 1220
triggerall = RoundState = 2
triggerall = var(9)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2stateno != 4121 && fvar(4) < 110
triggerall = p2movetype != A
trigger1 = (p2bodydist X = [15*fvar(10),45*fvar(10)]) && p2statetype = A && !var(16) && prevstateno != 1250 
trigger1 = (p2bodydist Y = [-70*fvar(11),-50*fvar(11)]) && Random <= 20*var(9)
trigger1 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520
trigger2 = (stateno = [210,225]) && Time <= 13 && movecontact = 1 && Random <= 25*var(9) && var(9) > 4
trigger2 = (P2BodyDist X = [0,30*fvar(10)]) 
trigger3 = stateno = 410 && Time <= 13 && movecontact = 1 && Random <= 25*var(9) && var(9) > 6
trigger3 = (P2BodyDist X = [0,30*fvar(10)]) 
trigger4 = stateno = 710 && movehit && p2statetype = A && !var(16) && var(9) > 4
trigger4 = (P2BodyDist X = [0,30*fvar(10)]) && var(6) && Random <= 40*var(9)
trigger5 = Random <= 140*var(9) && stateno = 1250 && (p2stateno = [5000,5099]) && AnimTime = 0
trigger5 = p2statetype = A && !var(16) && (P2BodyDist X = [0,45*fvar(10)]) && var(6) && var(9) > 3 && power < 1000
trigger6 = (P2BodyDist X = [-30*fvar(10),80*fvar(10)]) && (p2stateno = [5000,5099]) && enemy,backedgedist <= 50
trigger6 = (P2BodyDist Y = [-100*fvar(11),-10*fvar(11)]) && AnimTime = 0 && var(9) > 5
trigger6 = stateno = 3100 || stateno = 3300
trigger7 = (p2bodydist X = [-10*fvar(10),50*fvar(10)]) && p2statetype = A && var(6)
trigger7 = (p2bodydist Y = [-70*fvar(11),-30*fvar(11)]) && Random <= 40*var(9)
trigger7 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520

[State -1]
type = ChangeState
value = 1221
triggerall = RoundState = 2
triggerall = var(9)
triggerall = statetype != A
trigger1 = (P2BodyDist X = [0,60*fvar(10)]) && stateno = 812 && enemy,backedgedist <= 40
trigger1 = AnimTime = 0 && var(9) > 3
trigger2 = stateno = 3000 || stateno = 3200
trigger2 = (P2BodyDist X = [0,60*fvar(10)]) && enemy,backedgedist <= 30 && p2stateno = [5030,5099]
trigger2 = (P2BodyDist Y = [-130*fvar(11),-70*fvar(11)]) && AnimTime = 0 && Random <= 140*var(9)

;---------------------------------------------------------------------------
; V       c V   g D [ X
[State -1]
type = ChangeState
value = 1300
triggerall = RoundState = 2
triggerall = var(9)
triggerall = var(0)
triggerall = statetype != A
trigger1 = stateno = 3000 || stateno = 3200
trigger1 = (P2BodyDist X = [0,120*fvar(10)]) && (P2BodyDist Y = [-140*fvar(11),-40*fvar(11)]) && AnimTime = 0
trigger1 = enemy,backedgedist <= 60 && (p2stateno = [5030,5099]) && Random <= 140*var(9) && var(9) > 6
trigger2 = (stateno = [220,225]) && Time <= 13 && moveguarded = 1 && !var(41) && Random <= 140*var(9)+fvar(4) && var(9) > 4
trigger2 = (P2BodyDist X = [5*fvar(10),120*fvar(10)]) && fvar(4) >= 60 && p2statetype != L
trigger3 = stateno = 210 || stateno = 410
trigger3 = moveguarded = 1 && !var(41) && Random <= 50*var(9)+fvar(4) && var(9) > 4
trigger3 = (P2BodyDist X = [5*fvar(10),120*fvar(10)]) && fvar(4) >= 60 && p2statetype != L
trigger4 = p2statetype != A && p2movetype != A && enemy,numproj = 0 && Random <= 10*var(9)+NumHelper(3150)*100+NumHelper(3350)*100
trigger4 = (P2BodyDist X = [40*fvar(10),100*fvar(10)]) && fvar(4) >= 60 && p2statetype != L && !inguarddist
trigger4 = ctrl || stateno = 57 || (stateno = [100,106]) || stateno = 2520
trigger5 = (stateno = [150,153]) && var(17) = 1 && enemy,animtime <= -23 && p2statetype != L && enemy,numproj = 0
trigger5 = (p2bodydist X = [30*fvar(10),60*fvar(10)]) && p2statetype != A && Random <= 30*var(9) && life > 350
trigger6 = enemynear,hitdefattr = ,NT,ST,HT && Random <= 10*var(9) && p2statetype != L && p2bodydist X <= 60*fvar(10) && var(9) > 5
trigger7 = stateno = 650 && power < 2000 && movehit = 7 && p2statetype = A && !var(16) && Random <= 80*var(9)
trigger8 = Random <= 60*var(9) && stateno = 3100 && (p2stateno = [5000,5099]) && AnimTime = 0
trigger8 = (P2bodydist X = [0,80*fvar(10)]) && p2statetype != L
trigger9 = stateno = 650 && moveguarded = 1 && !var(41) && Random <= 140*var(9)+fvar(4) && var(9) > 4
trigger9 = (P2BodyDist X = [0,120*fvar(10)]) && fvar(4) >= 60 && p2statetype != L
trigger10 = stateno = 710 && movehit = 1 && p2statetype != A && Random <= 100*var(9)
trigger10 = (P2BodyDist X = [35*fvar(10)+var(43),100*fvar(10)]) && p2statetype != L
trigger11 = (P2BodyDist X = [30*fvar(10),90*fvar(10)]) && fvar(4) >= 70 && Random <= 20*var(9)
trigger11 = p2stateno = 5120 && enemy,animtime = [-20,-18]
trigger11 = ctrl || stateno = 57 || (stateno = [100,101]) || stateno = 2520

;---------------------------------------------------------------------------
; t F C   g2
[State -1]
type = ChangeState
value = 2200
triggerall = RoundState = 2
triggerall = var(9) > 4
triggerall = statetype != A
trigger1 = P2bodydist X = [0,45*fvar(10)]
trigger1 = (stateno = [220,225]) && Time <= 13 && movecontact = 1 && !var(41) && Random <= 90*var(9)
trigger2 = stateno = 650 && power < 1000 && movehit = 8 && var(9) > 4
trigger3 = stateno = 650 && moveguarded = 2 && Random <= 100*var(9) && var(9) = [5,6]
trigger4 = stateno = 650 && moveguarded = 2 && var(9) > 6
trigger5 = (stateno = [220,225]) && Time <= 13 && moveguarded = 1 && Random <= 140*var(9)

;---------------------------------------------------------------------------
; _ b V  
[State -1]
type = ChangeState
value = 103
triggerall = RoundState = 2
triggerall = var(9) > 5
triggerall = statetype != A
;triggerall = enemy,numproj = 0
trigger1 = ctrl || stateno = 57 || stateno = 21
trigger1 = p2stateno = [150,153]
trigger1 = NumHelper(3150) > 0 && var(9) > 5 && p2statetype != A && (P2BodyDist X = [30*fvar(10),150*fvar(10)])
trigger2 = ctrl || stateno = 57 || stateno = 21
trigger2 = p2stateno = 150 || p2stateno = 152
trigger2 = NumHelper(3350) > 0 && var(9) > 5 && p2statetype != A && (P2BodyDist X = [30*fvar(10),150*fvar(10)])
trigger3 = ctrl || stateno = 57 || stateno = 21
trigger3 = p2statetype = C && p2movetype != A && Random <= 10 && (P2bodydist X = [30*fvar(10),50*fvar(10)]) && !inguarddist
trigger4 = ctrl || stateno = 57 || stateno = 21
trigger4 = p2statetype = S && p2movetype != A && Random <= 5 && (P2bodydist X = [30*fvar(10),50*fvar(10)]) && !inguarddist
trigger5 = stateno = 3100 || stateno = 3300
trigger5 = (p2stateno = [150,153]) && AnimTime = 0 && fvar(4) >= 100-var(0)*50
trigger5 = var(9) > 6 && p2statetype != A && (P2BodyDist X = [10*fvar(10),100*fvar(10)])
trigger6 = p2movetype != A && Random <= 10*var(9) && p2bodydist X >= 140*fvar(10) && !inguarddist && ctrl
trigger7 = ctrl || stateno = 57 || stateno = 21 || stateno = [130,131]
trigger7 = p2movetype = A && (P2BodyDist X = [60*fvar(10),120*fvar(10)]) && Random <= 1*var(9)
trigger8 = p2statetype = A && (P2bodydist X = [40*fvar(10),120*fvar(10)]) && P2bodydist Y > -110*fvar(11)
trigger8 = enemy,moveguarded && enemy, vel Y > 0 && !inguarddist && Random <= 30*var(9)

[State -1]
type = ChangeState
value = 102
triggerall = RoundState = 2
triggerall = var(9) > 6
triggerall = statetype != A
triggerall = enemy,numproj = 0
triggerall = stateno != 100
triggerall = p2statetype != L
triggerall = ctrl || stateno = 57
trigger1 = p2statetype != A && p2movetype != A && Random <= 1*var(9)-var(46)*var(9)
trigger1 = (P2bodydist X = [30*fvar(10),60*fvar(10)]) && !inguarddist
trigger2 = p2stateno = 4121 && p2movetype != A && P2BodyDist X  >= 30*fvar(10)

[State -1]
type = ChangeState
value = 100
triggerall = RoundState = 2
triggerall = var(9) > 2
triggerall = statetype != A
triggerall = enemy,numproj = 0
triggerall = p2stateno != 5120
triggerall = ctrl || stateno = 57 || stateno = 21
trigger1 = p2statetype = L && p2stateno != 5120 && Random <= 10*var(9) && p2bodydist X >= 160*fvar(10)
trigger2 = p2movetype != A && Random <= 6*var(9) && p2bodydist X >= 120*fvar(10) && !inguarddist
trigger3 = NumHelper(3150) > 0 && p2movetype = H && Random <= 50*var(9) && p2statetype != A && (P2BodyDist X = [30*fvar(10),250*fvar(10)]) && life > 350
trigger4 = NumHelper(3350) > 0 && p2movetype = H && Random <= 50*var(9) && p2statetype != A && (P2BodyDist X = [30*fvar(10),250*fvar(10)]) && life > 350
trigger5 = stateno = 3100 && Animtime = 0 && Random <= 35*var(9) && p2statetype != A && P2BodyDist X >= 30*fvar(10)
trigger6 = (p2bodydist X = [50*fvar(10),90*fvar(10)]) && P2statetype != A && p2movetype != A && !inguarddist && Random <= 30 && p2statetype != L

;---------------------------------------------------------------------------
;   
[State -1]
type = ChangeState
value = 21
triggerall = RoundState = 2
triggerall = var(9) > 2
triggerall = statetype != A
triggerall = p2statetype != L
trigger1 = (p2bodydist X = [50*fvar(10),150*fvar(10)]) && Random <= 30 && ctrl
trigger1 = p2stateno != [5000,5120]
trigger2 = (p2bodydist X = [100*fvar(10),220*fvar(10)]) && Random <= 200 && AnimTime = 0
trigger2 = stateno = 3100
trigger3 = p2bodydist X >= 150*fvar(10) && Random <= 10*var(42) && ctrl

[State 100, 5]
type = ChangeState
value = 22
triggerall = RoundState = 2
triggerall = var(9) > 2
triggerall = !var(6)
triggerall = p2statetype != L
triggerall = statetype != A
triggerall = p2statetype != A
triggerall = ctrl || stateno = 21
trigger1 = (p2bodydist X = [7*fvar(10),70*fvar(10)])
trigger1 = enemy,backedgedist > 30 && Random <= 5*var(9) || enemy,backedgedist <= 30 && Random <= 10*var(9)

;---------------------------------------------------------------------------
; o b N X e b v
[State -1]
type = ChangeState
value = 105
triggerall = RoundState = 2
triggerall = var(9) > 2
triggerall = statetype != A
triggerall = stateno != 100
triggerall = p2stateno != 4121
triggerall = ctrl || stateno = 57 || stateno = 21 || stateno = 131
triggerall = enemy,vel X < 7 
triggerall = NumHelper(3350) = 0
triggerall = NumHelper(3150) = 0
triggerall = Enemy,NumPartner = 0
trigger1 = p2movetype = A && Random <= 5*var(9) && enemy,time <= 10 && (p2bodydist X = [0,80*fvar(10)]) && BackEdgeDist > 50 && enemy,numproj = 0
trigger2 = p2movetype = I && Random <= 3 && (p2bodydist X = [0,80*fvar(10)]) && BackEdgeDist > 50 && enemy,backedgedist > 50
trigger3 = p2statetype = L && Random <= 50 && (p2bodydist X = [-20,80*fvar(10)]) && BackEdgeDist > 50 && p2stateno != [5100,5110]
trigger4 = inguarddist && Random <= 1*var(9) && (p2bodydist X = [80*fvar(10),120*fvar(10)]) && BackEdgeDist <= 50
trigger5 = enemynear,hitdefattr = ,NT,ST,HT && Random <= 5*var(9) && (p2bodydist X = [0,60*fvar(10)]) && var(9) > 5
trigger6 = Random <= 60*var(9) && prevstateno = 1230 && ctrl && enemy,backedgedist <= 40
trigger7 = p2movetype != H && Random <= 4*var(9) && (p2bodydist X = [0,50*fvar(10)]) && BackEdgeDist > 80 && prevstateno = 5120
trigger8 =  var(9) > 6 && fvar(31) > 0 && enemy,stateno = fvar(31) && p2bodydist X < 50 && p2movetype = A && Random <= 30*var(9) && enemynear,animtime = [-30,-2]
trigger8 =  (enemy,vel X = [-2,2]) && BackEdgeDist > 80
trigger9 =  var(9) > 6 && fvar(32) > 0 && enemy,stateno = fvar(32) && p2bodydist X < 50 && p2movetype = A && Random <= 30*var(9) && enemynear,animtime = [-30,-2]
trigger9 =  (enemy,vel X = [-2,2]) && BackEdgeDist > 80
trigger10 =  var(9) > 6 && fvar(33) > 0 && enemy,stateno = fvar(33) && p2bodydist X < 50 && p2movetype = A && Random <= 30*var(9) && enemynear,animtime = [-30,-2]
trigger10 =  (enemy,vel X = [-2,2]) && BackEdgeDist > 80

;---------------------------------------------------------------------------
;  i    U  
[State -1]
type = ChangeState
value = 710
triggerall = RoundState = 2
triggerall = var(9) > 2
triggerall = ctrl || (stateno = [100,101])
triggerall = p2statetype != L
triggerall = statetype != A 
triggerall = p2statetype != A 
triggerall = P2bodydist X = [0,50*fvar(10)]
triggerall = prevstateno != 5120 && fvar(28) = 0
trigger1 = p2statetype != C && (P2bodydist X = [10*fvar(10),50*fvar(10)]) && P2movetype = A && P2stateno = [200,999]
trigger1 = (P2bodydist Y = [-20*fvar(11),0]) && Random <= 8*var(9)  && enemy,vel Y <= 0 && var(45) < 5
trigger2 = p2statetype = S && (P2bodydist X = [30*fvar(10),50*fvar(10)]) && P2movetype != A && Random <= 1*var(9) && var(45) < 5
trigger3 = p2statetype = S && (P2bodydist X = [-10*fvar(10),30*fvar(10)]) && P2movetype != A && Random <= 20*var(9) && var(45) < 5
trigger4 = p2stateno = 4121 && (P2bodydist X = [-10*fvar(10),30*fvar(10)]) && P2movetype != A

;---------------------------------------------------------------------------
;   i    U  
[State -1]
type = ChangeState
value = 700
triggerall = RoundState = 2
triggerall = var(9) > 2
triggerall = ctrl || (stateno = [100,101])
triggerall = statetype != A 
triggerall = P2bodydist X = [25*fvar(10),50*fvar(10)] 
triggerall = prevstateno != 5120 && fvar(28) = 0
trigger1 = p2statetype = C && Random <= 3*var(9)+NumHelper(3150)*100+NumHelper(3350)*100
trigger2 = p2statetype != A && Random <= 2*var(9) && p2movetype != A && p2statetype != L
trigger3 = p2stateno = 5120 && Random <= 15*var(9) && enemynear,animtime = [-8,-4]
trigger4 = (p2bodydist x = [-10*fvar(10),40*fvar(10)]) && p2statetype = C && Random <= 10*var(9) && ctrl && life > 250
trigger4 = p2movetype = A && enemy,animtime < -20 && enemy,stateno != fvar(21) && enemy,stateno != fvar(22) && enemy,stateno != fvar(23)

;---------------------------------------------------------------------------
; V       c   [     g
[State -1]
type = ChangeState
value = 805
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = ctrl
triggerall = statetype != A 
triggerall = p2statetype != L
triggerall = p2statetype != A && p2movetype != H
triggerall = enemynear,prevstateno != [5000,5120]
triggerall = fvar(27) = 0
trigger1 = (p2bodydist X = [-20*fvar(10),6*fvar(10)]) && Random <= 40*var(9) && p2movetype = A
trigger2 = (p2bodydist X = [-20*fvar(10),6*fvar(10)]) && Random <= 80*var(9) && p2movetype != A
trigger3 = (p2bodydist X = [-20*fvar(10),6*fvar(10)]) && enemy,backedgedist <= 50 && Random <= 100*var(9) && p2movetype != A
trigger4 = (p2bodydist X = [-20*fvar(10),6*fvar(10)]) && backedgedist <= 50 && Random <= 100*var(9) && p2movetype != A
trigger5 = (p2bodydist X = [-20*fvar(10),6*fvar(10)]) && prevstateno = 101 && Random <= 100*var(9) && p2movetype != A

;---------------------------------------------------------------------------
; R   r l [ V     E     b
[State -1]
type = ChangeState
value = 650
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = p2stateno != 4121 && fvar(4) < 110
trigger1 = p2bodydist X <= 35*fvar(10)-var(43) && stateno = 710 && movehit && var(9) > 3  && Random <= 140*var(9)
trigger2 = p2bodydist X <= 35*fvar(10)-var(43) && stateno = 710 && moveguarded && var(9) > 3

;---------------------------------------------------------------------------
; R   r l [ V     E    B
[State -1]
type = ChangeState
value = 660
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = p2stateno != 4121 && fvar(4) < 110
trigger1 = stateno = 400 && moveguarded = 1 && Random <= 40*var(9)

;---------------------------------------------------------------------------
; R   r l [ V     E    C
[State -1]
type = ChangeState
value = 670
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = p2stateno != 4121 && fvar(4) < 110
trigger1 = (p2bodydist X = [30*fvar(10),45*fvar(10)]) && (stateno = [400,410]) && moveguarded = 1 && var(9) > 3  && Random <= 60*var(9)
trigger2 = (p2bodydist X = [-20*fvar(10),45*fvar(10)]) && (stateno = [400,410]) && movehit && var(9) = [4,6]

;---------------------------------------------------------------------------
; R   r l [ V     E  A
[State -1]
type = ChangeState
value = 680
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = vel X = 0
trigger1 = stateno = 630 && movecontact = 1 && Random <= 140*var(9)

;---------------------------------------------------------------------------
;    A
[State -1]
type = ChangeState
value = 200
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype != A 
triggerall = p2statetype = S
triggerall = ctrl || (stateno = [100,101])
trigger1 = prevstateno != 5120 && fvar(28) = 0 && (p2bodydist X = [0,35*fvar(10)]) && P2statetype = S && p2movetype != A && Random <= 20*var(9) && p2stateno != 4121
trigger2 = (p2bodydist X = [0,25*fvar(10)]) && stateno = 200 && movecontact && AnimElem = 6 && Random <= 80*var(9)
trigger3 = prevstateno != 5120 && fvar(28) = 0 && (p2bodydist X = [0,40*fvar(10)]) && P2statetype = S && p2movetype = A && Random <= 5*var(9)
trigger3 = enemynear,animtime = -6

;---------------------------------------------------------------------------
;    B
[State -1]
type = ChangeState
value = 210
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype != A 
triggerall = p2statetype != A
trigger1 = p2statetype = S
trigger1 = ctrl || (stateno = [100,101])
trigger1 = (p2bodydist X = [15*fvar(10),45*fvar(10)]) && P2statetype = S && p2movetype != A && Random <= 20*var(9) && p2stateno != 4121
trigger2 = (p2bodydist X = [0,45*fvar(10)]) && stateno = 200 && movehit && AnimTime = 0 && Random <= 140*var(9)
trigger3 = (p2bodydist X = [0,45*fvar(10)]) && stateno = 400 && movecontact && AnimTime = 0 && Random <= 10*var(9)
trigger4 = ctrl || (stateno = [100,101])
trigger4 = p2movetype = A && (p2bodydist X = [0,45*fvar(10)]) && Random <= 10*var(9)
trigger4 = enemy,time > 15 || enemy,animtime < -5 || enemy,time <= 2 && enemy,animtime <= -25

;---------------------------------------------------------------------------
;    C
[State -1]
type = ChangeState
value = ifelse(p2bodydist x <= ceil(25*fvar(10)),225,220)
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype != A 
triggerall = p2statetype = S
trigger1 = ctrl || (stateno = [100,101])
trigger1 = (p2bodydist X = [5*fvar(10),25*fvar(10)]) && P2statetype != A && p2movetype != A && Random <= 15*var(9)
trigger2 = ctrl || (stateno = [100,101])
trigger2 = (p2bodydist X = [25*fvar(10),40*fvar(10)]) && P2statetype != A && p2movetype != A && Random <= 10*var(9)
trigger3 = ctrl || (stateno = [100,101])
trigger3 = (p2bodydist X = [0,30*fvar(10)]) && (p2bodydist Y = [-40*fvar(11),0]) && p2statetype = A && !var(16) && p2movetype != A && Random <= 10*var(9)
trigger4 = (p2bodydist X = [30*fvar(10),40*fvar(10)]) && (p2bodydist Y = [-50*fvar(11),0]) && p2statetype = A && !var(16) && p2movetype != A && Random <= 30*var(9)
trigger4 = ctrl || (stateno = [100,101])
trigger5 = fvar(4) >= 20 && stateno = 2200 && (p2stateno = [130,153]) && time = 10 && (p2bodydist X = [0,30*fvar(10)]) && Random <= 100*var(9)

;---------------------------------------------------------------------------
;    D
[State -1]
type = ChangeState
value = 230
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype != A 
triggerall = p2statetype = S
triggerall = ctrl || (stateno = [100,101])
trigger1 = (p2bodydist X = [0,50*fvar(10)]) && P2statetype != A && p2movetype != A && Random <= 10 && var(9) = [0,5]

;---------------------------------------------------------------------------
;    A
[State -1]
type = ChangeState
value = 400
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype != A 
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = p2stateno != 4121 && fvar(4) < 110
trigger1 = ctrl || (stateno = [100,101])
trigger1 = prevstateno != 5120 && fvar(28) = 0 && (p2bodydist X = [0,40*fvar(10)]) && P2statetype != A && p2movetype != A && Random <= 10*var(9) && p2stateno != 4121
trigger2 = (p2bodydist X = [0,30*fvar(10)]) && stateno = 400 && moveguarded && var(9) > 3  && Random <= 60*var(9)
trigger3 = (p2bodydist X = [0,30*fvar(10)]) && stateno = 400 && movehit && (var(9) = [4,6])  && Random <= 120*var(9)
trigger4 = ctrl || (stateno = [100,101])
trigger4 = (p2bodydist X = [0,40*fvar(10)]) && P2statetype != A && p2movetype = A && Random <= 20*var(9) && enemy,animtime = -5

;---------------------------------------------------------------------------
;    B
[State -1]
type = ChangeState
value = 410
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype != A 
triggerall = p2statetype != A
trigger1 = ctrl || (stateno = [100,101])
trigger1 = prevstateno != 5120 && fvar(28) = 0 && (p2bodydist X = [0,45*fvar(10)]) && P2statetype != A && p2movetype != A && p2statetype != L && Random <= 20*var(9)
trigger2 = (p2bodydist X = [0,40*fvar(10)]) && stateno = 410 && movecontact && var(9) > 3  && Random <= 60*var(9)
trigger3 = (p2bodydist X = [0,45*fvar(10)]) && p2stateno = 5120 && Random <= 50*var(9) && enemynear,animtime = -1
trigger3 = ctrl || (stateno = [100,101])
trigger4 = (p2bodydist X = [0,45*fvar(10)]) && stateno = 400 && movehit && AnimTime = 0 && var(9) > 6 
trigger5 = ctrl || (stateno = [100,101])
trigger5 = prevstateno != 5120 && fvar(28) = 0 && (p2bodydist X = [0,45*fvar(10)]) && P2statetype != A && p2movetype = A && p2statetype != L && Random <= 5*var(9)
trigger6 = stateno = 2200 && (p2stateno = [130,153]) && time = 10 && (p2bodydist X = [0,45*fvar(10)]) && Random <= 100*var(9)
trigger7 = stateno = 57 && AnimTime = 0 && (enemy,stateno = [5000,5099]) && p2movetype = H
trigger7 = Random <= 140*var(9) && (P2BodyDist X = [-20*fvar(10),40*fvar(10)])

;---------------------------------------------------------------------------
;    C
[State -1]
type = ChangeState
value = 420
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype != A 
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = ctrl || (stateno = [100,101])
trigger1 = (p2bodydist X = [0,40*fvar(10)]) && (p2bodydist Y = [-40*fvar(11),0]) && p2movetype != A && Random <= 5*var(9)

;---------------------------------------------------------------------------
;    D
[State -1]
type = ChangeState
value = 430
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype != A 
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = ctrl || (stateno = [100,101])
trigger1 = (p2bodydist X = [10*fvar(10),40*fvar(10)]) && P2statetype != A && p2movetype != A && Random <= 15 && var(9) = [1,6]
trigger2 = ctrl || (stateno = [100,101])
trigger2 = (p2bodydist X = [0,50*fvar(10)]) && P2statetype != A && var(6) && p2statetype = L && Random <= 50*var(9)

;---------------------------------------------------------------------------
;  A
[State -1]
type = ChangeState
value = 600
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype = A 
triggerall = ctrl
trigger1 = (p2bodydist X = [0,30*fvar(10)]) && (p2bodydist Y = [-30*fvar(11),-10*fvar(11)]) && p2statetype = A && !var(16) && p2movetype != A && Random <= 10*var(9)

;---------------------------------------------------------------------------
;  B
[State -1]
type = ChangeState
value = 610
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype = A 
triggerall = ctrl
trigger1 = (p2bodydist X = [0,50*fvar(10)]) && (p2bodydist Y = [-30*fvar(11),40*fvar(11)]) && p2statetype = A && !var(16) && p2movetype != A && Random <= 90*var(9)
trigger2 = (p2bodydist X = [0,50*fvar(10)]) && (p2bodydist Y = [-30*fvar(11),40*fvar(11)]) && p2statetype = A && !var(16) && p2movetype = A && Random <= 40*var(9)

;---------------------------------------------------------------------------
;  C
[State -1]
type = ChangeState
value = 620
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype = A 
triggerall = ctrl
triggerall = pos Y <= -25
triggerall = vel Y > -2
triggerall = !sysvar(3)
trigger1 = (p2bodydist X = [-30*fvar(10),20*fvar(10)]) && p2statetype = S && Random <= 50*var(9)
trigger1 = (p2bodydist Y = [-10*fvar(11),50*fvar(11)]) && vel Y > -2
trigger2 = (p2bodydist X = [-30*fvar(10),20*fvar(10)]) && p2statetype = C && Random <= 50*var(9)
trigger2 = (p2bodydist Y = [-10*fvar(11),50*fvar(11)]) && vel Y > -2 
trigger3 = (p2bodydist X = [-30*fvar(10),20*fvar(10)]) && p2statetype = A && !var(16) && Random <= 50*var(9)
trigger3 = (p2bodydist Y = [-10*fvar(11),50*fvar(11)])
trigger4 = (p2bodydist X = [-30*fvar(10),-10*fvar(10)]) && p2stateno = 5120 && Random <= 50*var(9)
trigger4 = (p2bodydist Y = [10*fvar(11),50*fvar(11)]) && vel Y > -2 && p2movetype != A && p2statetype = L && enemy,animtime = -2

;---------------------------------------------------------------------------
;  D
[State -1]
type = ChangeState
value = 630
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype = A 
triggerall = ctrl
triggerall = pos Y <= -25
triggerall = vel Y > -2
triggerall = NumHelper(3150) = 0 && NumHelper(3350) = 0
trigger1 = (p2bodydist X = [-25*fvar(10),60*fvar(10)]) && p2statetype = S && Random <= 60*var(9)
trigger1 = (p2bodydist Y = [0,70*fvar(11)])
trigger2 = (p2bodydist X = [-25*fvar(10),60*fvar(10)]) && p2statetype = C && Random <= 80*var(9)
trigger2 = (p2bodydist Y = [0,70*fvar(11)])
trigger3 = (p2bodydist X = [-25*fvar(10),60*fvar(10)]) && p2statetype = A && !var(16) && Random <= 60*var(9)
trigger3 = (p2bodydist Y = [0,70*fvar(11)]) && p2movetype != A
trigger4 = (p2bodydist X = [-25*fvar(10),60*fvar(10)]) && p2statetype = A && !var(16) && Random <= 30*var(9)
trigger4 = (p2bodydist Y = [0,70*fvar(11)]) && p2movetype = A
trigger5 = (p2bodydist X = [-25*fvar(10),60*fvar(10)]) && p2stateno = 5120 && Random <= 90*var(9)
trigger5 = (p2bodydist Y = [-10*fvar(11),70*fvar(11)]) && p2movetype != A && p2statetype = L && enemy,animtime = -2

;  D
[State -1]
type = ChangeState
value = 630
triggerall = RoundState = 2
triggerall = var(9) > 0
triggerall = statetype = A 
triggerall = ctrl
triggerall = pos Y <= -25
triggerall = NumHelper(3150) || NumHelper(3350)
trigger1 = (p2bodydist X = [-25*fvar(10),50*fvar(10)]) && Random <= 140*var(9)
trigger1 = (p2bodydist Y = [0,50*fvar(11)]) && vel Y > -2

;---------------------------------------------------------------------------
; W     v
[State -1]
type = ChangeState
value = 41
triggerall = RoundState = 2
triggerall = var(9) > 2
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2bodydist x < 180
triggerall = ctrl || (stateno = [100,101]) || stateno = 21 || stateno = [130,131]
triggerall = var(6) != 1
triggerall = p2stateno != 4121
trigger1 = (p2bodydist x = [40*fvar(10),80*fvar(10)]) && p2statetype = C && Random <= 3*var(9)
trigger1 = ctrl || stateno = 21 || stateno = 131
trigger2 = (p2bodydist x = [40*fvar(10),80*fvar(10)]) && p2statetype = S && Random <= 1*var(9)
trigger2 = ctrl || stateno = 21 || stateno = 131
trigger3 = Random <= 10 && p2bodydist x >= 120*fvar(10) && !inguarddist && stateno = 100
trigger4 = Random <= 1 && p2bodydist x >= 120*fvar(10) && p2stateno != [3000,4999]
trigger5 = Random <= 3 && p2bodydist x >= 120*fvar(10) && p2movetype = A && p2stateno != [3000,4999]
trigger6 = Random <= 100 && p2bodydist x >= 120*fvar(10) && inguarddist && stateno = 100 && time <= 5
trigger7 = (p2bodydist x = [80*fvar(10),120*fvar(10)]) && Random <= 3
trigger7 = ctrl || stateno = 21
trigger8 = !inguarddist && (p2bodydist x = [30*fvar(10),80*fvar(10)]) && Random <= 2
trigger8 = ctrl || stateno = 21
trigger9 = NumHelper(3150) > 0 && p2movetype = H && Random <= 40*var(9) && p2statetype != A && (P2BodyDist X = [30*fvar(10),70*fvar(10)]) && ctrl
trigger10 = NumHelper(3350) > 0 && p2movetype = H && Random <= 40*var(9) && p2statetype != A && (P2BodyDist X = [30*fvar(10),70*fvar(10)]) && ctrl
trigger11 = var(9) > 6 && fvar(31) > 0 && enemy,stateno = fvar(31) && p2bodydist X < 50*fvar(10) && p2movetype = A && Random <= 10*var(9) && enemynear,animtime = [-20,-2]
trigger12 = var(9) > 6 && fvar(32) > 0 && enemy,stateno = fvar(32) && p2bodydist X < 50*fvar(10) && p2movetype = A && Random <= 10*var(9) && enemynear,animtime = [-20,-2]
trigger13 = var(9) > 6 && fvar(33) > 0 && enemy,stateno = fvar(33) && p2bodydist X < 50*fvar(10) && p2movetype = A && Random <= 10*var(9) && enemynear,animtime = [-20,-2]
trigger14 = var(9) > 4 && (p2bodydist x = [40*fvar(10),80*fvar(10)]) && p2statetype = C && Random <= 15*var(9)
trigger14 = p2movetype = A && enemy,animtime < -22 && enemy,stateno != fvar(20) && enemy,stateno != fvar(21)
trigger15 = var(9) > 4 && (p2bodydist x = [60*fvar(10),80*fvar(10)]) && p2statetype = S && Random <= 10*var(9)
trigger15 = p2movetype = A && enemy,animtime < -22 && enemy,stateno != fvar(22) && enemy,stateno != fvar(23)
trigger16 = var(9) > 4 && (p2bodydist x = [80*fvar(10),120*fvar(10)]) && p2statetype != A && Random <= 10*var(9)
trigger16 = p2movetype = A && enemy,animtime < -27
trigger17 = p2movetype = A && p2bodydist x <= 100*fvar(10)
trigger17 = p2statetype = S && Random <= 1*var(9) || p2statetype = C && Random <= 2*var(9)

[State -1]
type = ChangeState
value = 41
triggerall = RoundState = 2
triggerall = var(9) > 2
triggerall = statetype != A
triggerall = ctrl || stateno = 21
trigger1 = (p2bodydist x = [0,60*fvar(10)]) && p2stateno = 5120 && Random <= 10*var(9) && enemy,animtime = -14

[State -1]
type = ChangeState
value = 41
triggerall = RoundState = 2
triggerall = var(9) > 4
triggerall = statetype != A
triggerall = stateno = 3100 || stateno = 3300
trigger1 = AnimTime = 0 && (p2bodydist x = [40*fvar(10),100*fvar(10)]) && Random <= 80*var(9) && (p2stateno = [150,152])

;---------------------------------------------------------------------------
; K [ h
[State -1]
type = ChangeState
value = 120
triggerall = var(9) > 2
triggerall = ctrl || stateno = 101 || stateno = 19 || stateno = 20 || stateno = 21 || stateno = 1101
triggerall = stateno != [121,159]
triggerall = statetype != A
triggerall =!enemynear,hitdefattr = ,NT,ST,HT
trigger1 = inguarddist && p2bodydist X > 60*fvar(10)
trigger2 = inguarddist && p2bodydist X <= 60*fvar(10) && Random <= 140*var(9)

[State -1]
type = ChangeState
value = 130
triggerall = var(9) > 3
triggerall = ctrl || stateno = 101 || stateno = 19 || stateno = 20 || stateno = 21 || stateno = 13 || stateno = [120,131]
triggerall = !enemynear,hitdefattr = ,NT,ST,HT && statetype != A
trigger1 = !inguarddist && p2movetype = A && Random <= 100*var(9) && var(9) > 5
trigger1 = p2dist X < 0
trigger2 = !inguarddist && p2movetype = A && var(9) > 5
trigger2 = p2dist X < 60

;---------------------------------------------------------------------------
;    
[State -1]
type = ChangeState
value = 196
triggerall = win
triggerall = var(9) > 5
triggerall = statetype != A 
triggerall = ctrl
triggerall = prevstateno != [195,197]
triggerall = !enemy,name = "Grant"
trigger1 = var(56)
persistent = 0

[State -1]
type = ChangeState
value = 197
triggerall = win
triggerall = var(9) > 5
triggerall = statetype != A 
triggerall = ctrl
triggerall =  prevstateno != [195,197]
triggerall = !enemy,name = "Grant"
trigger1 = !var(56)
persistent = 0
