
;-| Super Motions |--------------------------------------------------------
[Command]
name ="SuperRaySpin"
command = ~D, DB, B, a+b
time = 20
[Command]
name ="SuperRaySpin"
command = ~D, DB, B, b+c
time = 20
[Command]
name ="SuperRaySpin"
command = ~D, DB, B, a+c
time = 20

[Command]
name = "diamond_crack"
command = ~F, D, DF, x+z
time = 20
[Command]
name = "diamond_crack"
command = ~F, D, DF, x+y
time = 20
[Command]
name = "diamond_crack"
command = ~F, D, DF, y+z
time = 20

[Command]
name = "diamond_edge"
command = ~D, DF, F, x+z
time = 15
[Command]
name = "diamond_edge"
command = ~D, DF, F, x+y
time = 15
[Command]
name = "diamond_edge"
command = ~D, DF, F, y+z
time = 15

[Command]
name = "ice_block"
command = ~D, DF, F, a+c
time = 15
[Command]
name = "ice_block"
command = ~D, DF, F, b+c
time = 15
[Command]
name = "ice_block"
command = ~D, DF, F, a+b
time = 15

[Command]
name = "Heavens_Chain"
command = ~D, DB, B, x+z
time = 15
[Command]
name = "Heavens_Chain"
command = ~D, DB, B, x+y
time = 30
[Command]
name = "Heavens_Chain"
command = ~D, DB, B, y+z
time = 30

[Command]
name = "diamond_jungle"
command = ~F, D, DF, a+c
time = 15
[Command]
name = "diamond_jungle"
command = ~F, D, DF, a+b
time = 15
[Command]
name = "diamond_jungle"
command = ~F, D, DF, b+c
time = 15

[Command]
name = "Diamond_Limit"
command = ~D, DF, F, a+x
time = 15
[Command]
name = "Diamond_Limit"
command = ~D, DF, F, b+y
time = 15
[Command]
name = "Diamond_Limit"
command = ~D, DF, F, c+z
time = 15

[Command]
name = "freeze_execution"
command = ~D, DB, B, a+x
time = 15
[Command]
name = "freeze_execution"
command = ~D, DB, B, b+y
time = 15
[Command]
name = "freeze_execution"
command = ~D, DB, B, c+z
time = 15

;-| Special Motions |------------------------------------------------------
[Command]
name = "crow_bites_a"
command = ~F, D, DF, x
time = 20
[Command]
name = "crow_bites_b"
command = ~F, D, DF, y
time = 20
[Command]
name = "crow_bites_c"
command = ~F, D, DF, z
time = 20

[Command]
name = "diamond_lance_a"
command = ~F, D, DF, a
time = 20
[Command]
name = "diamond_lance_b"
command = ~F, D, DF, b
time = 20
[Command]
name = "diamond_lance_c"
command = ~F, D, DF, c
time = 20

[Command]
name = "diamond_plant_a"
command = ~B, D, DB, a
time = 20
[Command]
name = "diamond_plant_b"
command = ~B, D, DB, b
time = 20
[Command]
name = "diamond_plant_c"
command = ~B, D, DB, c
time = 20

[Command]
name = "one_inch diamond"
command = ~B, D, DB, x
time = 20
[Command]
name = "one_inch diamond"
command = ~B, D, DB, y
time = 20
[Command]
name = "one_inch diamond"
command = ~B, D, DB, z
time = 20

[Command]
name = "diamond_breath_a"
command = ~D, DF, F, x
time = 15
[Command]
name = "diamond_breath_b"
command = ~D, DF, F, y
time = 15
[Command]
name = "diamond_breath_c"
command = ~D, DF, F, z
time = 15

[Command]
name = "counter_shell"
command = ~D, DB, B, x
time = 15
[Command]
name = "counter_shell"
command = ~D, DB, B, y
time = 15
[Command]
name = "counter_shell"
command = ~D, DB, B, z
time = 15

[Command]
name = "ray_spin_a"
command = ~D, DB, B, a
time = 15
[Command]
name = "ray_spin_b"
command = ~D, DB, B, b
time = 15
[Command]
name = "ray_spin_c"
command = ~D, DB, B, c
time = 15

[Command]
name = "diamond_shoot_a"
command = ~D, DF, F, a
time = 15
[Command]
name = "diamond_shoot_b"
command = ~D, DF, F, b
time = 15
[Command]
name = "diamond_shoot_c"
command = ~D, DF, F, c
time = 15

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

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

;-| 2/3 Button Combination |-----------------------------------------------

[Command]
name="recovery"
command=a+x
time=1
[Command]
name = "recovery"
command = x+y
time=1
[Command]
name = "recovery"
command = y+z
time=1
[Command]
name = "recovery"
command = x+z
time=1
[Command]
name = "recovery"
command = a+b
time=1
[Command]
name = "recovery"
command = b+c
time=1
[Command]
name = "recovery"
command = a+c
time=1

[Command]
name = "ax"
command = a+x
time = 1
;---------------------------------------
;Single direction
[Command]
name = "Up"
command = U
time = 5
[Command]
name = "Forward"
command = F
time = 5
[Command]
name = "Down"
command = D
time = 5
[Command]
name = "Back"
command = B
time = 1

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

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

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

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

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

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

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

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

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

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

[Command]
name = "hold_z"
command = /$z
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

;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1

[Command]
name = "holdup" ;Required (do not remove)
command = /$U
time = 1

[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1

[Command]
name = "holddownfwd";Required (do not remove)
command = /$DF
time = 1


[Command]
name = "DU"
command = D, U
time = 18

[Command]
name = "DU"
command = DB, UF
time = 18

[Command]
name = "DU"
command = DF, UB
time = 18

[Command]
name = "DU"
command = $D, UF
time = 18

[Command]
name = "DU"
command = $D, UB
time = 18


[Statedef -1]
;------------------------------------------------------------------------
;Diamond Jungle
[State -1,Diamond Jungle]
type = ChangeState
value = 2900
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&power >= 2000&&command = "diamond_jungle"
trigger1 = ctrl
trigger2 = (stateno = [200,450])&& movecontact
;---------------------------------------------------------------------------
;Diamond Crack
[State -1,Diamond Crack]
type = ChangeState
value = 2600
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&power >= 2000&&command = "diamond_crack"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-------------------------------------------------------------------------
;Freeze Execution
[State -1,Freeze Execution]
type = ChangeState
value = 2200
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&power >= 3000&&life>=334&&command = "freeze_execution"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-------------------------------------------------------------------------
;Neo Freeze Execution
[State -1,Neo Freeze Execution]
type = ChangeState
value = 2250
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&power >= 3000&&life<=333&&command = "freeze_execution"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;--------------------------------------------------------------------------
;Diamond Limit
[State -1,Diamond Limit]
type = ChangeState
value = 2100
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&power >= 3000&&command = "Diamond_Limit"
trigger1 = ctrl
trigger2 = (stateno = [200,450])&& movecontact
;---------------------------------------------------------------------------
;Ice Block
[State -1,Ice Block]
type = ChangeState
value = 2300
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&power >= 1000&&command = "ice_block"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;---------------------------------------------------------------------------
;Heaven's Chain
[State -1,Heaven's Chain]
type = ChangeState
value = 2400
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&power >= 1000&&command = "Heavens_Chain"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-------------------------------------------------------------------------
;Diamond Rain
[State -1,Diamond Rain]
type = ChangeState
value = 2500
triggerall=!AILevel&&Roundstate=2&&Statetype=A&&Pos Y <= -30&&command = "ice_block"
trigger1 = ctrl
trigger2 = (stateno = [600,650])&& movecontact
;------------------------------------------------------------------------
;Diamond Edge
[State -1,Diamond Edge]
type = ChangeState
value = 2000
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&power >= 1000&& command = "diamond_edge"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;---------------------------------------------------------------------------
;Super Ray Spin
[State -1,Super Ray Spin]
type = ChangeState
value = 2800
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&power >= 1000&&command = "SuperRaySpin"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;---------------------------------------------------------------------------
;Super Ray Twirl
[State -1,Super Ray Twirl]
type = ChangeState
value = 2850
triggerall=!AILevel&&Roundstate=2&&Statetype=A&&Pos y<=-30&&power >= 1000&&command = "SuperRaySpin"
trigger1 = ctrl
trigger2 = (stateno = [600,650])&& movecontact
ignorehitpause=1
;===========================================================================
;--------------------------------------------------------------
;Crow Bites
[State -1,Crow Bites]
type = ChangeState
value = 1200
triggerall=!AILevel&&Roundstate=2&&Statetype!=A
triggerall = command = "crow_bites_a"||command = "crow_bites_b"||command = "crow_bites_c"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;---------------------------------------------------------------
;Diamond Lance
[State -1,Diamond lance]
type = ChangeState
value = 1450
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&!numhelper (10000)
triggerall = command = "diamond_lance_a" ||command = "diamond_lance_b"||command = "diamond_lance_c"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;----------------------------------------------------------------------------
;Diamond Plant
[State -1,Diamond Plant]
type = ChangeState
value = 1500
triggerall=!AILevel&&Roundstate=2&&Statetype!=A
triggerall = command = "diamond_plant_a"||command = "diamond_plant_b"||command = "diamond_plant_c"
triggerall = !numhelper (10003)
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-----------------------------------------------------------------------
;Diamond Breath
[State -1,Diamond Breath]
type = ChangeState
value = 1000
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&!numhelper (1005)
triggerall = command = "diamond_breath_a"||command = "diamond_breath_b"||command = "diamond_breath_c"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-----------------------------------------------------------------------
;One Inch Punch
[State -1,One Inch Punch]
type = ChangeState
value = 1120
triggerall=!AILevel&&Roundstate=2&&Statetype!=A
triggerall = command = "one_inch diamond"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-----------------------------------------------------------------------
;Diamond choice
[State -1,Diamond Choice]
type = ChangeState
value = Ifelse(command = "diamond_shoot_a",1140,Ifelse(command = "diamond_shoot_b",1310,1130))
triggerall=!AILevel&&Roundstate=2&&Statetype!=A
triggerall = command = "diamond_shoot_a"||command = "diamond_shoot_b"||command = "diamond_shoot_c"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;------------------------------------------------------------------------
;Counter Shell
[State -1,Counter Shell]
type = ChangeState
value = 1100
triggerall=!AILevel&&Roundstate=2&&Statetype!=A&&command = "counter_shell"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,440])&& movecontact
;--------------------------------------------------------------------------
;Ray Spin
[State -1,Ray Spin]
type = ChangeState
value = 1300
triggerall=!AILevel&&Roundstate=2&&Statetype!=A
triggerall = command = "ray_spin_a"||command = "ray_spin_b"||command = "ray_spin_c"
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,440])&& movecontact
;--------------------------------------------------------------------------
;Air Ray Spin
[State -1,Air Ray Spin]
type = ChangeState
value = 1330
triggerall=!AILevel&&Roundstate=2&&Statetype=A&&Pos Y <= -30
triggerall = command = "ray_spin_a"||command = "ray_spin_b"||command = "ray_spin_c"
trigger1 = ctrl
trigger2 = (stateno = [600,650])&& movecontact
;------------------------------------------------------------------------------
;Diamond Star
[State -1,Diamond Star]
type = ChangeState
value = 1400
triggerall = command = "diamond_shoot_a"||command = "diamond_shoot_b"||command = "diamond_shoot_c"
triggerall=!AILevel&&Roundstate=2&&Statetype=A&&Pos Y <= -30&&!Numhelper(1405)
trigger1 = ctrl
trigger2 = (stateno = [600,650])&&movecontact
;---------------------------------------------------------------------------
;Run Fwd 1
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall=!AILevel&&Roundstate=2
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl
;---------------------------------------------------------------------------
;Run Back
[State -1, Run Back]
type = ChangeState
value = 105
triggerall=!AILevel&&Roundstate=2
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;super jump
[State -1, super jump ]
type = ChangeState
value = 123
triggerall=!AILevel&&Roundstate=2
trigger1 = command = "DU"
trigger1 = ctrl ; these means that you can make the move when you control the char
trigger1 = statetype != A ; these is to make that you cant use the superjump while you are in the air

;Forward
[State -1,Airdash Forward]
type = ChangeState
value = 100000
triggerall = (StateType = A && command = "FF")
trigger1 = StateNo = 50
trigger1 = Ctrl

;Backward
[State -1,Airdash Backward]
type = ChangeState
value = 100002
triggerall = (StateType = A && command = "BB")
trigger1 = StateNo = 50
trigger1 = ctrl

;Throw
[State -1,throw]
type = ChangeState
value = Ifelse(command = "z",800,801)
triggerall=!AILevel&&Roundstate=2
triggerall = command = "z"|| command = "c"
triggerall = command = "holdfwd" || command = "holdback"
triggerall = command != "holddown"
trigger1 = statetype = S&& stateno != 100
trigger1 = p2bodydist x < 10
trigger1 = p2statetype != A
trigger1 = p2movetype != H
trigger1 = ctrl

; Power charge
[State -1, Charge]
type = ChangeState
value = 88887
triggerall=!AILevel&&Roundstate=2
triggerall = power < 3000
trigger1 = command = "hold_b" && command = "hold_y"
trigger1 = statetype = S
trigger1 = ctrl

; Taunt
[State -1,Taunt]
type = ChangeState
value = 195
triggerall=!AILevel&&Roundstate=2
trigger1 = command = "start"
trigger1 = Vel X = 0
trigger1 = statetype = S
trigger1 = ctrl = 1

; Dodge
[State -1,Dodge]
type = ChangeState
value = Ifelse(command = "holdfwd",361,Ifelse(command = "holdback",360,362))
triggerall = command = "ax"
triggerall=!AILevel&&Roundstate=2
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 150 || stateno = 151) && power >= 1000
trigger3 = stateno = 101
;----------------------------------------------------------
[State -1, sparry]
type=hitoverride
triggerall = var(59)<1&&roundstate=2&&statetype=S
triggerall=command="Forward"&&command!="Back"&&command!="Up"&&command!="Down"
trigger1=ctrl||stateno=7700||stateno=7710
trigger2=(stateno=[150,153])
attr=SA,AA,AP
stateno=7700
slot=0
time=ifelse((stateno=[150,153]),4,8)

[State -1, cparry]
type=hitoverride
triggerall = var(59)<1&&roundstate=2&&statetype!=A
triggerall=(statetype=S&&command="Down")||(statetype=C&&command="Forward")&&command!="Back"&&command!="Up"
trigger1=ctrl||stateno=7700||stateno=7710
trigger2=(stateno=[150,153])
attr=C,AA,AP
stateno=7710
slot=0
time=ifelse((stateno=[150,153]),14,18)

[State -1, aparry]
type=hitoverride
triggerall = var(59)<1&&roundstate=2&&statetype=A
triggerall=command="Forward"&&command!="Back"&&command!="Up"&&command!="Down"
trigger1=ctrl||stateno=7720
trigger2=(stateno=[154,155])
attr=SA,AA,AP
stateno=7720
forceair=1
slot=0
time=ifelse((stateno=[154,155]),4,8)
;----------------------------------------------------------------------------
; Standing Low Punch
[State -1, Standing Low Punch]
type = ChangeState
value = 200
triggerall = !AILevel&&Roundstate=2
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [101,102])
;---------------------------------------------------------------------------
; Standing Medium Punch
[State -1, Standing Medium Punch]
type = ChangeState
value = 210
triggerall = !AILevel&&Roundstate=2
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,209])&& movecontact
trigger3 = (stateno = [230,239])&& movecontact
trigger4 = (stateno = [400,409])&& movecontact
trigger5 = (stateno = [430,439])&& movecontact
trigger6 = (stateno = [101,102])
;---------------------------------------------------------------------------
;Standing High Punch
[State -1, Standing High Punch]
type = ChangeState
value = 220
triggerall = !AILevel&&Roundstate=2
triggerall = command = "z"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,219])&& movecontact
trigger3 = (stateno = [230,249])&& movecontact
trigger4 = (stateno = [400,419])&& movecontact
trigger5 = (stateno = [430,449])&& movecontact
trigger6 = (stateno = [101,102])
;---------------------------------------------------------------------------
;Standing Low Kick
[State -1, Standing Low Kick]
type = ChangeState
value = 230
triggerall = !AILevel&&Roundstate=2
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,209])&& movecontact
trigger3 = (stateno = [400,409])&& movecontact
trigger4 = (stateno = [101,102])
;---------------------------------------------------------------------------
;Standing Medium Kick
[State -1, Standing Medium Kick]
type = ChangeState
value = 240
triggerall = !AILevel&&Roundstate=2
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,219])&& movecontact
trigger3 = (stateno = [230,239])&& movecontact
trigger4 = (stateno = [400,419])&& movecontact
trigger5 = (stateno = [430,439])&& movecontact
trigger6 = (stateno = [101,102])
;---------------------------------------------------------------------------
;Standing High Kick
[State -1, Standing High Kick]
type = ChangeState
value = 250+(50*(p2bodydist x<=45))
triggerall = !AILevel&&Roundstate=2
triggerall = command = "c"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,249])&& movecontact
trigger3 = (stateno = [400,449])&& movecontact
trigger4 = (stateno = [101,102])
;---------------------------------------------------------------------------
;Crouching Low Punch
[State -1, Crouching Low Punch]
type = ChangeState
value = 400
triggerall = !AILevel&&Roundstate=2
triggerall = command = "x"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [101,102])
;---------------------------------------------------------------------------
;Crouching Medium Punch
[State -1, Crouching Medium Punch]
type = ChangeState
value = 410
triggerall = !AILevel&&Roundstate=2
triggerall = command = "y"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,209])&& movecontact
trigger3 = (stateno = [230,239])&& movecontact
trigger4 = (stateno = [400,409])&& movecontact
trigger5 = (stateno = [430,439])&& movecontact
trigger6 = (stateno = [101,102])
;---------------------------------------------------------------------------
;Crouching High Punch
[State -1, Crouching High Punch]
type = ChangeState
value = 420
triggerall = !AILevel&&Roundstate=2
triggerall = command = "z"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,219])&& movecontact
trigger3 = (stateno = [230,249])&& movecontact
trigger4 = (stateno = [400,419])&& movecontact
trigger5 = (stateno = [430,449])&& movecontact
trigger6 = (stateno = [101,102])
;---------------------------------------------------------------------------
;Crouching Low Kick
[State -1, Crouching Low Kick]
type = ChangeState
value = 430
triggerall = !AILevel&&Roundstate=2
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,209])&& movecontact
trigger3 = (stateno = [400,409])&& movecontact
trigger4 = (stateno = [101,102])
;---------------------------------------------------------------------------
; Crouching Medium Kick
[State -1, Crouching Medium Kick]
type = ChangeState
value = 440
triggerall = !AILevel&&Roundstate=2
triggerall = command = "b"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,219])&& movecontact
trigger3 = (stateno = [230,239])&& movecontact
trigger4 = (stateno = [400,419])&& movecontact
trigger5 = (stateno = [430,439])&& movecontact
trigger6 = (stateno = [101,102])
;---------------------------------------------------------------------------
;Crouching High Kick
[State -1, Crouching High Kick]
type = ChangeState
value = 450
triggerall = !AILevel&&Roundstate=2
triggerall = command = "c"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,249])&& movecontact
trigger3 = (stateno = [400,449])&& movecontact
trigger4 = (stateno = [101,102])
;---------------------------------------------------------------------------
;Jumping Low Punch
[State -1, Jumping Low Punch]
type = ChangeState
value = 600
triggerall = !AILevel&&Roundstate=2
triggerall = command = "x"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [100000,100001])
;---------------------------------------------------------------------------
;Jumping Medium Punch
[State -1, Jumping Medium Punch]
type = ChangeState
value = 610
triggerall = !AILevel&&Roundstate=2
triggerall = command = "y"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [600,609])&& movecontact
trigger3 = (stateno = [630,639])&& movecontact
trigger4 = (stateno = [100000,100001])
;---------------------------------------------------------------------------
;Jumping High Punch
[State -1, Jumping High Punch]
type = ChangeState
value = 620
triggerall = !AILevel&&Roundstate=2
triggerall = command = "z"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [600,619])&& movecontact
trigger3 = (stateno = [630,649])&& movecontact
trigger4 = (stateno = [100000,100001])
;---------------------------------------------------------------------------
;Jumping Low Kick
[State -1, Jumping Low Kick]
type = ChangeState
value = 630
triggerall = !AILevel&&Roundstate=2
triggerall = command = "a"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [600,609])&& movecontact
trigger3 = (stateno = [100000,100001])
;---------------------------------------------------------------------------
;Jumping Medium Kick
[State -1, Jumping Medium Kick]
type = ChangeState
value = 640
triggerall = !AILevel&&Roundstate=2
triggerall = command = "b"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [600,619])&& movecontact
trigger3 = (stateno = [630,639])&& movecontact
trigger4 = (stateno = [100000,100001])
;---------------------------------------------------------------------------
;Jumping High Kick
[State -1, Jumping High Kick]
type = ChangeState
value = 650
triggerall = !AILevel&&Roundstate=2
triggerall = command = "c"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [600,649])&& movecontact
trigger3 = (stateno = [100000,100001])
;---------------------------------------------------------------------------
;AI
;---------------------------------------------------------------------------
;Diamond Cutter
[State -1,Diamond Cutter]
type = ChangeState
value = 2800
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&power >= 1000
triggerall=(Enemynear,stateno!=[5100,5250])&&(Enemynear,stateno!=[120,155])&&(Enemynear,statetype!=C)
triggerall=random < (150 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[40,90])&&(p2dist y=[-90,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;---------------------------------------------------------------------------
;Diamond Crack
[State -1,Diamond Crack]
type = ChangeState
value = 2600
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&power >= 2000
triggerall=(Enemynear,stateno!=[5100,5250])&&(Enemynear,stateno!=[120,155])&&(Enemynear,statetype!=C)&&(Enemynear,statetype!=A)
triggerall=random < (100 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[50,140])&&(p2dist y=[-80,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-------------------------------------------------------------------------
;Freeze Execution
[State -1,Freeze Execution]
type = ChangeState
value = 2200
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&power >= 3000&&Life>=334
triggerall=(Enemynear,stateno!=[5100,5250])&&(Enemynear,stateno!=[120,155])&&(Enemynear,statetype!=A)
triggerall=random < (250 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[80,220])&&(p2dist y=[-80,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-------------------------------------------------------------------------
;Neo Freeze Execution
[State -1,Neo Freeze Execution]
type = ChangeState
value = 2250
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&power >= 3000&&Life<=333
triggerall=(Enemynear,stateno!=[5100,5250])&&(Enemynear,statetype!=A)
triggerall=random < (450 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[50,240])&&(p2dist y=[-80,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;--------------------------------------------------------------------------
;Diamond Limit
[State -1,Diamond Limit]
type = ChangeState
value = 2100
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&power >= 3000
triggerall=(Enemynear,stateno!=[5120,5250])&&(Enemynear,stateno!=[120,155])
triggerall=random < (350 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[40,120])&&(p2dist y=[-110,5])
trigger1 = ctrl
trigger2 = (stateno = [200,450])&& movecontact
;---------------------------------------------------------------------------
;Ice Block
[State -1,Ice Block]
type = ChangeState
value = 2300
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&power >= 1000
triggerall=(Enemynear,stateno!=[5120,5250])&&(Enemynear,stateno!=[120,155])&&(Enemynear,statetype!=C)&&(Enemynear,statetype!=A)
triggerall=random < (200 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[20,120])&&(p2dist y=[-80,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;---------------------------------------------------------------------------
;Heaven's Chain
[State -1,Heaven's Chain]
type = ChangeState
value = 2400
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&power >= 1000
triggerall=(Enemynear,stateno!=[5100,5250])&&(Enemynear,stateno!=[120,155])&&(Enemynear,statetype!=C)
triggerall=random < (150 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[40,100])&&(p2dist y=[-100,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-------------------------------------------------------------------------
;Diamond Rain
[State -1,Diamond Rain]
type = ChangeState
value = 2500
triggerall=AILevel&&Roundstate=2&&Statetype=A&&power >= 1000&&(Enemynear,stateno!=[120,155])&&Pos Y <= -30
triggerall=random < (100 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[40,180])&&(p2dist y=[-40,225])
trigger1 = ctrl
trigger2 = (stateno = [600,650])&& movehit
;------------------------------------------------------------------------
;Diamond Edge
[State -1,Diamond Edge]
type = ChangeState
value = 2000
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&power >= 1000
triggerall=(Enemynear,stateno!=[5120,5250])&&(Enemynear,stateno!=[120,155])&&(Enemynear,statetype!=C)
triggerall=random < (200 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[30,80])&&(p2dist y=[-110,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;------------------------------------------------------------------------
;Diamond Jungle
[State -1,Diamond Jungle]
type = ChangeState
value = 2900
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&power >= 2500&&(Enemynear,stateno!=[5120,5250])&&(Enemynear,stateno!=[120,155])
triggerall=random < (200 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[20,90])&&(p2dist y=[-110,5])
trigger1 = ctrl
trigger2 = (stateno = [200,450])&& movecontact
;===========================================================================
;--------------------------------------------------------------
;Crow Bites
[State -1,Crow Bites]
type = ChangeState
value = 1200
triggerall=AILevel&&Roundstate=2&&Statetype!=A
triggerall=(Enemynear,stateno!=[5120,5250])&&(Enemynear,stateno!=[120,155])&&(Enemynear,statetype!=C)
triggerall=random < (200 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[20,70])&&(p2dist y=[-110,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;---------------------------------------------------------------
;Diamond Lance
[State -1,Diamond lance]
type = ChangeState
value = 1450
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&(Enemynear,stateno!=[5120,5250])&&(Enemynear,stateno!=[120,155])
triggerall=random < (100 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[40,110])&&(p2dist y=[-110,5])&&!numhelper (10000)
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;----------------------------------------------------------------------------
;Diamond Plant
[State -1,Diamond Plant]
type = ChangeState
value = 1500
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&(Enemynear,stateno!=[120,155])
triggerall=random < (150 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[40,100])&&(p2dist y=[-120,5])&&!numhelper (10003)
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-----------------------------------------------------------------------
;Diamond Breath
[State -1,Diamond Breath]
type = ChangeState
value = 1000
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&(Enemynear,stateno!=[120,155])&&(Enemynear,statetype!=A)
triggerall=random < (30 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[90,320])&&(p2dist y=[-80,5])&&!numhelper (1005)
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-----------------------------------------------------------------------
;One Inch Punch
[State -1,One Inch Punch]
type = ChangeState
value = 1120
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&(Enemynear,stateno!=[5100,5250])&&(Enemynear,stateno!=[120,155])&&(Enemynear,statetype!=A)
triggerall=random < (50 * (AIlevel ** 2 / 64.0))&&(Enemynear,Hitdefattr!=SCA,SA,SP,HA,HP,AT)&&(p2dist x=[10,60])&&(p2dist y=[-80,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;-----------------------------------------------------------------------
;Diamond choice
[State -1,Diamond Choice]
type = ChangeState
value = Ifelse(p2statetype=C,1140,Ifelse(p2statetype=S,1310,1130))
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&(Enemynear,Hitdefattr!=SCA,HA,HP,AT)&&(Enemynear,stateno!=[5100,5250])&&(Enemynear,stateno!=[120,155])
triggerall=random < (20 * (AIlevel ** 2 / 64.0))&&(p2dist x=[70,340])&&(p2dist y=[-180,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,450])&& movecontact
;------------------------------------------------------------------------
;Counter Shell
[State -1,Counter Shell]
type = ChangeState
value = 1100
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&(Enemynear,Hitdefattr=SCA,NA,SA,NP,SP)&&(Enemynear,stateno!=[5100,5250])&&(Enemynear,stateno!=[120,155])
triggerall=random < (125 * (AIlevel ** 2 / 64.0))&&(p2dist x=[40,140])&&(p2dist y=[-120,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,440])&& movecontact
;--------------------------------------------------------------------------
;Ray Spin
[State -1,Ray Spin]
type = ChangeState
value = 1300
triggerall=AILevel&&Roundstate=2&&Statetype!=A&&(Enemynear,Movetype!=A)&&(Enemynear,stateno!=[5100,5250])&&(Enemynear,stateno!=[120,155])
triggerall=random < (250 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(Enemynear,Statetype!=C)&&(p2dist x=[30,100])&&(p2dist y=[-100,5])
trigger1 = ctrl
trigger2 = (stateno = [200,224])&& movecontact
trigger3 = (stateno = [226,299])&& movecontact
trigger4 = (stateno = [400,440])&& movecontact
;--------------------------------------------------------------------------
;Ray Spin
[State -1,Ray Spin]
type = ChangeState
value = 1330
triggerall=AILevel&&Roundstate=2&&Statetype=A
triggerall=(Enemynear,stateno!=[5100,5250])&&(Enemynear,stateno!=[120,155])&&(Enemynear,statetype!=C)
triggerall=random < (200 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[10,50])&&(p2dist y=[-60,35])&&Pos Y <= -30
trigger1 = ctrl
trigger2 = (stateno = [600,650])&& movecontact
;------------------------------------------------------------------------------
;Diamond shoot
[State -1,Diamond shoot]
type = ChangeState
value = 1400
triggerall=AILevel&&Roundstate=2&&Statetype!=A
triggerall=(Enemynear,stateno!=[120,155])&&(Enemynear,statetype!=C)
triggerall=random < (200 * (AIlevel ** 2 / 64.0))&&(Enemynear,Movetype!=A)&&(p2dist x=[50,140])&&(p2dist y=[-30,255])&&Pos Y <= -30&&!Numhelper(1405)
trigger1 = ctrl
trigger2 = (stateno = [600,650])&&movecontact
;---------------------------------------------------------------------------
; Standing Low Punch
[State -1, Standing Low Punch AI]
type = ChangeState
value = 200
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A
triggerall = p2bodydist x <=55&&(p2bodydist y = [-70,5])&&P2statetype != A&&P2statetype != C&&P2statetype != L&& random < (350 * (AIlevel ** 2 / 64.0))
trigger1 = ctrl
trigger2 = stateno = 100
;---------------------------------------------------------------------------
; Standing Medium Punch
[State -1, Standing Medium Punch AI]
type = ChangeState
value = 210
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A&&P2statetype != A&&P2statetype != C&&P2statetype != L
trigger1 = (stateno = [200,209])|| (stateno = [230,239])||(stateno = [400,409])||(stateno = [430,439])&& movehit
trigger1 = random < 250
trigger1 = p2bodydist x <= 40
;---------------------------------------------------------------------------
;Standing High Punch
[State -1, Standing High Punch AI]
type = ChangeState
value = 220
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A&&P2statetype != A&&P2statetype != C&&P2statetype != L
trigger1 = (stateno = [210,219])|| (stateno = [240,249])||(stateno = [410,419])||(stateno = [440,449])&& movehit
trigger1 = random < 550
trigger1 = p2bodydist x <= 50
;---------------------------------------------------------------------------
;Standing Low Kick
[State -1, Standing Low Kick AI]
type = ChangeState
value = 230
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A&&P2statetype != A&&P2statetype != C&&P2statetype != L
trigger1 = (stateno = [200,209])|| (stateno = [400,409])&& movehit
trigger1 = random < 100
;---------------------------------------------------------------------------
;Standing Medium Kick
[State -1, Standing Medium Kick AI]
type = ChangeState
value = 240
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A&&P2statetype != A&&P2statetype != C&&P2statetype != L
trigger1 = (stateno = [210,219])|| (stateno = [230,239])||(stateno = [410,419])||(stateno = [430,439])&& movehit
trigger1 = random < 250
;---------------------------------------------------------------------------
;Standing High Kick
[State -1, Standing High Kick AI]
type = ChangeState
value = 250+(50*(p2bodydist x<=45))
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A&&P2statetype != A&&P2statetype != C&&P2statetype != L
trigger1 = (stateno = [240,249])|| (stateno = [440,449])&& movehit && stateno != 225
trigger1 = random < 800
trigger1 = p2bodydist X >= 20
;---------------------------------------------------------------------------
;Crouching Low Punch
[State -1, Crouching Low Punch]
type = ChangeState
value = 400
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A
triggerall = p2bodydist x <=55&&(p2bodydist y = [-70,5])&&P2statetype != A&&P2statetype != L&& random < (250 * (AIlevel ** 2 / 64.0))
trigger1 = ctrl
trigger2 = stateno = 100
;---------------------------------------------------------------------------
;Crouching Medium Punch
[State -1, Crouching Medium Punch]
type = ChangeState
value = 410
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A&&P2statetype != A&&P2statetype != L
trigger1 = (stateno = [200,209])|| (stateno = [230,239])||(stateno = [400,409])||(stateno = [430,439])&& movehit
trigger1 = random < 500
trigger1 = p2bodydist x <= 40
;---------------------------------------------------------------------------
;Crouching High Punch
[State -1, Crouching High Punch]
type = ChangeState
value = 420
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A&&P2statetype != A&&P2statetype != L && random < (450 * (AIlevel ** 2 / 64.0))
trigger1 = (stateno = [210,219])|| (stateno = [240,249])||(stateno = [410,419])||(stateno = [440,449])&& movehit
trigger1 = random < 600
trigger2 = p2bodydist x <= 40
trigger2 = STATENO=100
trigger3 = RANDOM<50
trigger3 = p2bodydist x <= 60
trigger3 = ctrl
;---------------------------------------------------------------------------
;Crouching Low Kick
[State -1, Crouching Low Kick]
type = ChangeState
value = 430
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A&&P2statetype != A&&P2statetype != L && random < (200 * (AIlevel ** 2 / 64.0))&&p2bodydist x <=40 && p2statetype != L
trigger1 = (stateno = [200,209])|| (stateno = [400,409])&& movehit
;---------------------------------------------------------------------------
; Crouching Medium Kick
[State -1, Crouching Medium Kick]
type = ChangeState
value = 440
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A&&P2statetype != A&&P2statetype != L
trigger1 = (stateno = [210,219])|| (stateno = [230,239])||(stateno = [410,419])||(stateno = [430,439])&& movehit
trigger1 = random < 250
;---------------------------------------------------------------------------
;Crouching High Kick
[State -1, Crouching High Kick]
type = ChangeState
value = 450
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A&&P2statetype != A&&P2statetype != L
trigger1 = (stateno = [240,249])|| (stateno = [440,449])&& movehit && stateno != 225
trigger1 = random < 50
trigger1 = p2bodydist x <=60
;---------------------------------------------------------------------------
;Jumping Low Punch
[State -1, Jumping Low Punch]
type = ChangeState
value = 600
triggerall= AILevel && numenemy&&Roundstate=2
triggerall= StateType = A && P2statetype != L &&(P2BodyDist x = [5,50])&&(P2BodyDist Y = [-70, 30])
trigger1 = ctrl
;---------------------------------------------------------------------------
;Jumping Medium Punch
[State -1, Jumping Medium Punch]
type = ChangeState
value = 610
triggerall =AILevel && numenemy&&roundstate=2
trigger1 = (stateno = [600,609])&& movecontact
trigger1 = random < 200
trigger2 = (stateno = [630,639])&& movecontact
trigger2 = random < 800
;---------------------------------------------------------------------------
;Jumping High Punch
[State -1, Jumping High Punch]
type = ChangeState
value = 620
triggerall = AILevel && numenemy&&roundstate=2
trigger1 = (stateno = [610,619])&& movecontact
trigger1 = random < 150
trigger2 = (stateno = [630,639])&& movecontact
trigger2 = random < 800
;---------------------------------------------------------------------------
;Jumping Low Kick
[State -1, Jumping Low Kick]
type = ChangeState
value = 630
triggerall = AILevel && numenemy&&roundstate=2
trigger1 = (stateno = [600,609])&& movecontact

;---------------------------------------------------------------------------
;Jumping Medium Kick
[State -1, Jumping Medium Kick]
type = ChangeState
value = 640
triggerall = AILevel && numenemy&&roundstate=2
trigger1 = (stateno = [610,619])&& movecontact
trigger1 = random < 850
trigger2 = (stateno = [630,639])&& movecontact
trigger2 = random < 150
;---------------------------------------------------------------------------
;Jumping High Kick
[State -1, Jumping High Kick]
type = ChangeState
value = 650
triggerall = AILevel && numenemy&&roundstate=2
trigger1 = (stateno = [620,629])&& movecontact
trigger1 = random < 800
trigger2 = (stateno = [640,649])&& movecontact
trigger2 = random < 150
;---------------------------------------------------------------------------
[State -1, run]
type = changestate
value = 100
trigger1 = AIlevel && numenemy
trigger1 = statetype = S && roundstate = 2 && ctrl && random < (200 * (AIlevel ** 2 / 64.0))
trigger1 = (stateno != [100, 105]) && enemynear, movetype != A && p2bodydist x > 120

[State -1, dash]
type = changestate
value = 105
triggerall = AIlevel && numenemy
triggerall = statetype = S && roundstate = 2 && ctrl
triggerall = (p2bodydist x = [0, 80]) && backedgebodydist > 80 && (stateno != [100, 105])
trigger1 = enemynear, movetype = A && random < (50 * (AIlevel ** 2 / 64.0))
trigger2 = enemynear, stateno = 5120 && enemynear, animtime = -3 && random < (200 * (AIlevel ** 2 / 64.0))

[State -1, Jump]
type = changestate
value = 40
trigger1 = AIlevel && numenemy
trigger1 = roundstate = 2 && statetype != A && ctrl
trigger1 = enemynear, movetype = A && p2bodydist x < 160 && enemynear, hitdefattr = SC, AT

[state -1,AI Guard]
type = ChangeState
value = 120
triggerall = AIlevel && numenemy&& roundstate = 2&&InGuardDist&& random < (900 * (AIlevel ** 2 / 64.0))
triggerall = ctrl
trigger1=!(stateno=[120,155])
trigger1=!(enemynear,hitdefattr=SCA,AT)

[state -1,AI Air Guard]
type = ChangeState
value = 132
triggerall = AIlevel && numenemy&& roundstate = 2&&InGuardDist&& random < (900 * (AIlevel ** 2 / 64.0))
triggerall = ctrl&&statetype = A
trigger1 = enemynear,numproj
trigger2 = enemynear,HitDefAttr = SCA, NA,SA,HA
trigger2 = random <=ifelse(backedgedist<=10,900,700)

[State -1, AI Super Jump 2]
type = ChangeState
value = 123
triggerall = stateno != 100 && pos y = 0
triggerall = AIlevel && numenemy&& statetype != A && roundstate = 2 && ctrl&&(p2bodydist y = [-300,-70])
trigger1 = enemy,vel y < -1&&(p2bodydist x = [ 20, 50])&&p2movetype != A
trigger2 = enemy,vel y < -1
trigger2 = p2movetype = H && (p2stateno = 5040 || p2stateno = 5200 || p2stateno = 5210)
trigger2 = p2bodydist x <= 30
trigger3 = P2MoveType != H&&P2BodyDist Y < -90&& enemy,vel y <= 0

[State -1, FOLLOW UP]
type = ChangeState
value = 123
triggerall = AIlevel && numenemy&&roundstate = 2 && ctrl&&statetype != A
trigger1 = (StateNo = 225) && (Movehit)
trigger2 = (StateNo = 300) && (Movehit)
trigger3 = (StateNo = 420) && (Movehit)

[State -1, roll / dodge]
type = changestate
value = ifelse(random < 600, 361, 360)
trigger1 = AIlevel && numenemy
trigger1 = roundstate = 2 && statetype != A && ctrl && random < (50 * (AIlevel ** 2 / 64.0))
trigger1 = enemynear, movetype = A && p2bodydist x < 80

[State -1, powercharge]
type=changestate
value=88887
trigger1= AIlevel && numenemy
trigger1= roundstate=2 && statetype!=A && ctrl
trigger1= power<const(data.power) && power<powermax
trigger1= random < (50 * (AIlevel ** 2 / 64.0))&& !inguarddist && p2movetype!=A && p2dist x>=160

[State -1, airrecover]
type=changestate
value=ifelse((pos y>=-20),5200,5210)
triggerall= AILevel && numenemy
triggerall= roundstate=2 && stateno=5050
trigger1= vel y>-1 && alive && canrecover && random < (250 * (AIlevel ** 2 / 64.0))
