
;-| AI controller |--------------------------------------------------------

[command]
name = "AI-1"
command = B,BD,UF,x
time = 1

[command]
name = "AI-2"
command = B,BD,UF,y
time = 1

[command]
name = "AI-3"
command = B,BD,UF,z
time = 1

[command]
name = "AI-4"
command = B,BD,UF,a
time = 1

[command]
name = "AI-5"
command = B,BD,UF,b
time = 1

[command]
name = "AI-6"
command = B,BD,UF,c
time = 1

[command]
name = "AI-7"
command = B,BU,DF,x
time = 1

[command]
name = "AI-8"
command = B,BU,DF,y
time = 1

[command]
name = "AI-9"
command = B,BU,DF,z
time = 1

[command]
name = "AI-(debug)"
command = /D,s
time = 1

[command]
name = "AI-a"
command = B,BU,DF,a
time = 1

[command]
name = "AI-b"
command = B,BU,DF,b
time = 1

[command]
name = "AI-c"
command = B,BU,DF,c
time = 1

[command]
name = "AI-d"
command = F,BU,DF,x
time = 1

[command]
name = "AI-e"
command = F,BU,DF,y
time = 1

[command]
name = "AI-f"
command = F,BU,DF,z
time = 1

;-| Super Motions |--------------------------------------------------------

[Command]
name = "22plus02"
command = ~D,DF,F,D,DF,F,b
time = 28

[Command]
name = "22plus04"
command = ~D,DF,F,D,DF,F,z
time = 28

[Command]
name = "22plus0204"
command = ~D,DF,F,D,DF,F,b
time = 28

[Command]
name = "22plus0204"
command = ~D,DF,F,D,DF,F,z
time = 28

[Command]
name = "22plus09"
command = ~D,DF,F,D,DF,F,b+z
time = 36

;-| Special Motions |------------------------------------------------------

[Command]
name = "01plus01"
command = ~D,D,a

[Command]
name = "01plus02"
command = ~D,D,b

[command]
name = "02plus01"
command = ~28$D,$U,a
time = 12

[command]
name = "02plus03"
command = ~28$D,$U,c
time = 12

[command]
name = "09plus01"
command = ~D,DB,B,a

[command]
name = "09plus03"
command = ~D,DB,B,c

[Command]
name = "09plus02"
command = ~D,DB,B,b

[Command]
name = "09plus04"
command = ~D,DB,B,z

-| Command limits |--------------------------------------------------------

[Command]
name = "com-no-back"
command = ~D,DB,B,a

[Command]
name = "com-no-back"
command = ~D,DB,B,c

[Command]
name = "com-no-back"
command = ~D,DB,B,b

[Command]
name = "com-no-back"
command = ~D,DB,B,z

;-| Double Tap |-----------------------------------------------------------

[Command]
name = "longjump"
command = $D,$U
time = 12

[Command]
name = "FF"
command = F,F
time = 9

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

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

[Command]
name = "00plus10"
command = c+z
time = 1

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

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

;-| Hold Button |-----------------------------------------------------------

[Command]
name = "hold_s"
command = /s

[Command]
name = "hold_a"
command = /a

[Command]
name = "hold_b"
command = /b

[Command]
name = "hold_c"
command = /c

[Command]
name = "hold_x"
command = /x

[Command]
name = "hold_y"
command = /y

[Command]
name = "hold_z"
command = /z

[Command]
name = "hold_non_s"
command = /a

[Command]
name = "hold_non_s"
command = /b

[Command]
name = "hold_non_s"
command = /c

[Command]
name = "hold_non_s"
command = /z

[Command]
name = "hold_non_a"
command = /s

[Command]
name = "hold_non_a"
command = /b

[Command]
name = "hold_non_a"
command = /c

[Command]
name = "hold_non_a"
command = /z

[Command]
name = "hold_non_b"
command = /s

[Command]
name = "hold_non_b"
command = /a

[Command]
name = "hold_non_b"
command = /c

[Command]
name = "hold_non_b"
command = /z

[Command]
name = "hold_non_c"
command = /s

[Command]
name = "hold_non_c"
command = /a

[Command]
name = "hold_non_c"
command = /b

[Command]
name = "hold_non_c"
command = /z

[Command]
name = "hold_non_x"
command = /s

[Command]
name = "hold_non_x"
command = /a

[Command]
name = "hold_non_x"
command = /b

[Command]
name = "hold_non_x"
command = /c

[Command]
name = "hold_non_x"
command = /z

[Command]
name = "hold_non_y"
command = /s

[Command]
name = "hold_non_y"
command = /a

[Command]
name = "hold_non_y"
command = /b

[Command]
name = "hold_non_y"
command = /c

[Command]
name = "hold_non_y"
command = /z

[Command]
name = "hold_non_z"
command = /s

[Command]
name = "hold_non_z"
command = /a

[Command]
name = "hold_non_z"
command = /b

[Command]
name = "hold_non_z"
command = /c

[Command]
name = "hold_non_p"
command = /s

[Command]
name = "hold_non_p"
command = /b

[Command]
name = "hold_non_p"
command = /z

[Command]
name = "hold_non_k"
command = /s

[Command]
name = "hold_non_k"
command = /a

[Command]
name = "hold_non_k"
command = /c

;-| Single Button |--------------------------------------------------------- 

[command]
name = "callmenu"
command = ~12s

[Command] 
name = "menu"
command = s

[Command] 
name = "Lp"
command = a

[Command] 
name = "Lk"
command = b
 
[Command] 
name = "Hp"
command = c
 
[Command]
name = "HotKey-1"
command = x

[Command]
name = "HotKey-2"
command = y

[Command] 
name = "Hk"
command = z
 
;-| Hold Dir |-------------------------------------------------------------- 

[Command]
name = "holdrun"
command = /DF

[Command] 
name = "holdfwd"
command = /$F
 
[Command] 
name = "holdback"
command = /$B
 
[Command] 
name = "holdup"
command = /$U

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

[Command]
name = "holdF"
command = /F

[Command]
name = "holdB"
command = /B

[Command]
name = "holdU"
command = /U

[Command]
name = "holdD"
command = /D

[Command]
name = "justfd"
command = F

[Command]
name = "justbk"
command = B

[Command]
name = "justup"
command = U

[Command]
name = "justdn"
command = D

;===========================================================================

[Statedef -1]

[State -1,var(59)]
type = VarSet
var(59) = 1
triggerall = !var(59)
trigger1 = ((command="AI-1")||(command="AI-2")||(command="AI-3")||(command="AI-4")||(command="AI-5"))
trigger2 = ((command="AI-6")||(command="AI-7")||(command="AI-8")||(command="AI-9")||(command="AI-a"))
trigger3 = ((command="AI-b")||(command="AI-c")||(command="AI-d")||(command="AI-e")||(command="AI-f"))

;===========================================================================

[State -1,var(13)1000]
type = VarSet
var(13) = 1000
triggerall = ((command="09plus01")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=1))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=1)))
triggerall = ((power>999)&&(!var(59))&&((command!="hold_non_a")||(command="00plus08")))
trigger1 = (stateno=220||stateno=260||stateno=320||stateno=410)
trigger2 = (stateno=1455||stateno=1480||stateno=1561||stateno=1566||stateno=1620||stateno=1670)
ignorehitpause = 1

[State -1,var(13)1050]
type = VarSet
var(13) = 1050
triggerall = ((command="09plus03")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=3))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=3)))
triggerall = ((power>999)&&(!var(59))&&((command!="hold_non_c")||(command="00plus08")))
trigger1 = (stateno=220||stateno=260||stateno=320||stateno=410)
trigger2 = (stateno=1455||stateno=1480||stateno=1561||stateno=1566||stateno=1620||stateno=1670)
ignorehitpause = 1

[State -1,var(13)1400]
type = VarSet
var(13) = 1400
triggerall = ((command="01plus01")||((command="HotKey-1")&&(var(46)=1)&&(var(47)=1))||((command="HotKey-2")&&(var(48)=1)&&(var(49)=1)))
triggerall = ((power>999)&&(!var(59))&&((command!="hold_non_a")||(command="00plus08")))
trigger1 = (stateno=220||stateno=260||stateno=320||stateno=410)
trigger2 = (stateno=1620||stateno=1670)
ignorehitpause = 1

[State -1,var(13)1500]
type = VarSet
var(13) = 1500
triggerall = ((command="01plus02")||((command="HotKey-1")&&(var(46)=1)&&(var(47)=2))||((command="HotKey-2")&&(var(48)=1)&&(var(49)=2)))
triggerall = ((power>999)&&(!var(59))&&((command!="hold_non_b")||(command="00plus08")))
trigger1 = (stateno=220||stateno=260||stateno=320||stateno=410)
trigger2 = (stateno=1620||stateno=1670)
ignorehitpause = 1

[State -1,var(13)1600]
type = VarSet
var(13) = 1600
triggerall = ((command="09plus02")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=2))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=2)))
triggerall = ((power>999)&&(!var(59))&&((command!="hold_non_b")||(command="00plus08")))
trigger1 = (stateno=220||stateno=260||stateno=320||stateno=410)
trigger2 = (stateno=1455||stateno=1480||stateno=1561||stateno=1566)
ignorehitpause = 1

[State -1,var(13)1650]
type = VarSet
var(13) = 1650
triggerall = ((command="09plus04")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=4))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=4)))
triggerall = ((power>999)&&(!var(59))&&((command!="hold_non_z")||(command="00plus08")))
trigger1 = (stateno=220||stateno=260||stateno=320||stateno=410)
trigger2 = (stateno=1455||stateno=1480||stateno=1561||stateno=1566)
ignorehitpause = 1

[State -1,var(13)1900]
type = VarSet
var(13) = 1900
triggerall = ((command="02plus01")||((command="HotKey-1")&&(var(46)=2)&&(var(47)=1))||((command="HotKey-2")&&(var(48)=2)&&(var(49)=1)))
triggerall = ((power>999)&&(!var(59))&&((command!="hold_non_a")||(command="00plus08")))
trigger1 = (stateno=220||stateno=260||stateno=320||stateno=410)
trigger2 = (stateno=1455||stateno=1480||stateno=1561||stateno=1566||stateno=1620||stateno=1670)
ignorehitpause = 1

[State -1,var(13)1950]
type = VarSet
var(13) = 1950
triggerall = ((command="02plus03")||((command="HotKey-1")&&(var(46)=2)&&(var(47)=3))||((command="HotKey-2")&&(var(48)=2)&&(var(49)=3)))
triggerall = ((power>999)&&(!var(59))&&((command!="hold_non_c")||(command="00plus08")))
trigger1 = (stateno=220||stateno=260||stateno=320||stateno=410)
trigger2 = (stateno=1455||stateno=1480||stateno=1561||stateno=1566||stateno=1620||stateno=1670)
ignorehitpause = 1

;===========================================================================

[State Lv-2,var(13)2002]
type = VarSet
var(13) = 2002
triggerall = ((command="22plus0204")||((command="HotKey-1")&&(var(46)=22)&&(var(47)=2||var(47)=4))||((command="HotKey-2")&&(var(48)=22)&&(var(49)=2||var(49)=4)))
triggerall = ((var(9)>1)&&(command!="22plus09")&&((command!="hold_non_b")||(command!="hold_non_z")||(command="00plus08")))
trigger1 = (stateno=1455||stateno=1480||stateno=1561||stateno=1566||stateno=1620||stateno=1670)
ignorehitpause = 1

[State Lv-3,var(13)2052]
type = VarSet
var(13) = 2052
triggerall = ((command="22plus09")||((command="HotKey-1")&&(var(46)=22)&&(var(47)=9))||((command="HotKey-2")&&(var(48)=22)&&(var(49)=9)))
triggerall = ((var(9)>2)&&((command!="hold_non_k")||(command="00plus08")))
trigger1 = (stateno=1455||stateno=1480||stateno=1561||stateno=1566||stateno=1620||stateno=1670)
ignorehitpause = 1

[State Lv-2,var(13)2602]
type = VarSet
var(13) = 2602
triggerall = ((command="22plus02")||((command="HotKey-1")&&(var(46)=22)&&(var(47)=2))||((command="HotKey-2")&&(var(48)=22)&&(var(49)=2)))
triggerall = ((var(9)>1)&&((command!="hold_non_b")||(command="00plus08")))
trigger1 = (stateno=1610||stateno=1660||stateno=1905||stateno=1960)
ignorehitpause = 1

[State Lv-2,var(13)2622]
type = VarSet
var(13) = 2622
triggerall = ((command="22plus04")||((command="HotKey-1")&&(var(46)=22)&&(var(47)=4))||((command="HotKey-2")&&(var(48)=22)&&(var(49)=4)))
triggerall = ((var(9)>1)&&((command!="hold_non_z")||(command="00plus08")))
trigger1 = (stateno=1610||stateno=1660||stateno=1905||stateno=1960)
ignorehitpause = 1

;===========================================================================

[State -1,var(6)105]
type = VarSet
var(6) = ifelse((command="FF"),100,105)
trigger1 = ((P2dist X>0)&&((command="FF")||(command="BB")))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))

[State -1,var(6)300]
type = VarSet
var(6) = ifelse((command="holdB"),310,300)
trigger1 = ((P2dist X>0)&&((command="00plus05")||((command="HotKey-1")&&(var(47)=5))||((command="HotKey-2")&&(var(49)=5))))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))

;===========================================================================

[State Lv-1,var(6)2000]
type = VarSet
var(6) = 2000
triggerall = ((command="22plus0204")||((command="HotKey-1")&&(var(46)=22)&&(var(47)=2||var(47)=4))||((command="HotKey-2")&&(var(48)=22)&&(var(49)=2||var(49)=4)))
triggerall = ((var(9))&&(command!="22plus09")&&((command!="hold_non_b")||(command!="hold_non_z")||(command="00plus08")))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))
trigger2 = (stateno=250||stateno=420||stateno=430)
ignorehitpause = 1

[State Lv-2,var(6)2050]
type = VarSet
var(6) = 2050
triggerall = ((command="22plus09")||((command="HotKey-1")&&(var(46)=22)&&(var(47)=9))||((command="HotKey-2")&&(var(48)=22)&&(var(49)=9)))
triggerall = ((var(9)>1)&&((command!="hold_non_k")||(command="00plus08")))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))
trigger2 = (stateno=250||stateno=420||stateno=430)
ignorehitpause = 1

;===========================================================================

[State -1,var(6)1000]
type = VarSet
var(6) = 1000
triggerall = ((command="09plus01")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=1))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=1)))
triggerall = ((var(6)<2000)&&((command!="hold_non_a")||(command="00plus08")))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))
trigger2 = (stateno=250||stateno=420||stateno=430)

[State -1,var(6)1050]
type = VarSet
var(6) = 1050
triggerall = ((command="09plus03")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=3))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=3)))
triggerall = ((var(6)<2000)&&((command!="hold_non_c")||(command="00plus08")))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))
trigger2 = (stateno=250||stateno=420||stateno=430)

[State -1,var(6)1400]
type = VarSet
var(6) = 1400
triggerall = ((command="01plus01")||((command="HotKey-1")&&(var(46)=1)&&(var(47)=1))||((command="HotKey-2")&&(var(48)=1)&&(var(49)=1)))
triggerall = ((var(6)<2000)&&((command!="hold_non_a")||(command="00plus08")))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))
trigger2 = (stateno=250||stateno=420||stateno=430)

[State -1,var(6)1500]
type = VarSet
var(6) = 1500
triggerall = ((command="01plus02")||((command="HotKey-1")&&(var(46)=1)&&(var(47)=2))||((command="HotKey-2")&&(var(48)=1)&&(var(49)=2)))
triggerall = ((var(6)<2000)&&((command!="hold_non_b")||(command="00plus08")))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))
trigger2 = (stateno=250||stateno=420||stateno=430)

[State -1,var(6)1600]
type = VarSet
var(6) = 1600
triggerall = ((command="09plus02")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=2))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=2)))
triggerall = ((var(6)<2000)&&((command!="hold_non_b")||(command="00plus08")))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))
trigger2 = (stateno=250||stateno=420||stateno=430)

[State -1,var(6)1650]
type = VarSet
var(6) = 1650
triggerall = ((command="09plus04")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=4))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=4)))
triggerall = ((var(6)<2000)&&((command!="hold_non_z")||(command="00plus08")))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))
trigger2 = (stateno=250||stateno=420||stateno=430)

[State -1,var(6)1900]
type = VarSet
var(6) = 1900
triggerall = ((command="02plus01")||((command="HotKey-1")&&(var(46)=2)&&(var(47)=1))||((command="HotKey-2")&&(var(48)=2)&&(var(49)=1)))
triggerall = ((var(6)<2000)&&((command!="hold_non_a")||(command="00plus08")))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))
trigger2 = (stateno=250||stateno=420||stateno=430)

[State -1,var(6)1950]
type = VarSet
var(6) = 1950
triggerall = ((command="02plus03")||((command="HotKey-1")&&(var(46)=2)&&(var(47)=3))||((command="HotKey-2")&&(var(48)=2)&&(var(49)=3)))
triggerall = ((var(6)<2000)&&((command!="hold_non_c")||(command="00plus08")))
trigger1 = (((var(6)=0)||(var(6)=11))&&(!Ctrl)&&(Animtime>-8)&&(statetype!=A))
trigger2 = (stateno=250||stateno=420||stateno=430)

;===========================================================================

[State -1,350]
type = ChangeState
value = 350
trigger1 = ((!var(59))&&(command="menu"))
trigger1 = (((statetype!=A)&&(ctrl))||(stateno=52||stateno=100))

[State -1,380]
type = ChangeState
value = ifelse((command="holdB"),382,ifelse((command="holdD"),381,380))
trigger1 = ((command="00plus08")||((command="HotKey-1")&&(var(47)=8))||((command="HotKey-2")&&(var(49)=8)))
trigger1 = (((statetype!=A)&&(ctrl))||(stateno=52||stateno=100))
trigger1 = ((var(0)=1)&&(!NumHelper(805))&&(Roundstate=2)&&(power>999))

[State -1,320]
type = ChangeState
value = 320
trigger1 = ((command="00plus10")||((command="HotKey-1")&&(var(47)=10))||((command="HotKey-2")&&(var(49)=10)))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

;===========================================================================

[State -1,1950]
type = ChangeState
value = 1950
triggerall = ((command="02plus03")||((command="HotKey-1")&&(var(46)=2)&&(var(47)=3))||((command="HotKey-2")&&(var(48)=2)&&(var(49)=3)))
triggerall = ((command!="hold_non_c")||(command="00plus08"))
trigger1 = (((ctrl)&&(statetype!=A))||(stateno=40||stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400))

[State -1,1900]
type = ChangeState
value = 1900
triggerall = ((command="02plus01")||((command="HotKey-1")&&(var(46)=2)&&(var(47)=1))||((command="HotKey-2")&&(var(48)=2)&&(var(49)=1)))
triggerall = ((command!="hold_non_a")||(command="00plus08"))
trigger1 = (((ctrl)&&(statetype!=A))||(stateno=40||stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400))

[State -1,1400]
type = ChangeState
value = 1400
triggerall = ((command="01plus01")||((command="HotKey-1")&&(var(46)=1)&&(var(47)=1))||((command="HotKey-2")&&(var(48)=1)&&(var(49)=1)))
triggerall = ((command!="hold_non_a")||(command="00plus08"))
trigger1 = (((statetype!=A)&&(ctrl))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400))

[State -1,1500]
type = ChangeState
value = 1500
triggerall = ((command="01plus02")||((command="HotKey-1")&&(var(46)=1)&&(var(47)=2))||((command="HotKey-2")&&(var(48)=1)&&(var(49)=2)))
triggerall = ((command!="hold_non_b")||(command="00plus08"))
trigger1 = (((statetype!=A)&&(ctrl))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400))

[State -1,410]
type = ChangeState
value = 410
triggerall = ((command="holddown")&&(command="Lk"))
trigger1 = (((ctrl)&&(statetype!=A))||(stateno=52||stateno=100))
trigger2 = ((Animelem=2,>1)&&(movecontact)&&(stateno=205))
trigger3 = ((Animelem=2,>1)&&(stateno=400||stateno=410))

[State -1,400]
type = ChangeState
value = 400
triggerall = ((command="holddown")&&(command="Lp"))
trigger1 = (((ctrl)&&(statetype!=A))||(stateno=52||stateno=100))
trigger2 = ((Animelem=2,>1)&&(movecontact)&&(stateno=205))
trigger3 = ((Animelem=2,>1)&&(stateno=400||stateno=410))

[State -1,430]
type = ChangeState
value = 430
triggerall = ((command="holddown")&&(command="Hk"))
trigger1 = (((ctrl)&&(statetype!=A))||(stateno=52||stateno=100))

[State -1,420]
type = ChangeState
value = 420
triggerall = ((command="holddown")&&(command="Hp"))
trigger1 = (((ctrl)&&(statetype!=A))||(stateno=52||stateno=100))

;===========================================================================

[State -1,310]
type = ChangeState
value = 310
triggerall = ((command="00plus05")||((command="HotKey-1")&&(var(47)=5))||((command="HotKey-2")&&(var(49)=5)))
triggerall = ((command="holdB")&&(command!="com-no-back"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

[State -1,b900]
type = ChangeState
value = ifelse((command="Hp"),900,920)
trigger1 = ((command="holdB")&&(command!="com-no-back")&&((command="Hp")||(command="Hk")))
trigger1 = ((ctrl)&&(statetype=S)&&(P2statetype!=A)&&(P2movetype!=H)&&(P2bodydist X<9))

[State -1,b215]
type = ChangeState
value = ifelse((P2bodydist X<20),215,210)
triggerall = ((command="Lk")&&(command="holdB")&&(command!="com-no-back"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(Animelem=2,>1)&&(stateno=400||stateno=410))

[State -1,b205]
type = ChangeState
value = ifelse((P2bodydist X<20),205,200)
triggerall = ((command="Lp")&&(command="holdB")&&(command!="com-no-back"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

[State -1,b235]
type = ChangeState
value = ifelse((P2bodydist X<25),235,230)
triggerall = ((command="Hk")&&(command="holdB")&&(command!="com-no-back"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

[State -1,b225]
type = ChangeState
value = ifelse((P2bodydist X<25),225,220)
triggerall = ((command="Hp")&&(command="holdB")&&(command!="com-no-back"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

[State Lv-2,2050]
type = ChangeState
value = 2050
triggerall = ((command="22plus09")||((command="HotKey-1")&&(var(46)=22)&&(var(47)=9))||((command="HotKey-2")&&(var(48)=22)&&(var(49)=9)))
triggerall = ((var(9)>1)&&((command!="hold_non_k")||(command="00plus08")))
trigger1 = (((statetype!=A)&&(ctrl))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400))

[State Lv-1,2000]
type = ChangeState
value = 2000
triggerall = ((command="22plus0204")||((command="HotKey-1")&&(var(46)=22)&&(var(47)=2||var(47)=4))||((command="HotKey-2")&&(var(48)=22)&&(var(49)=2||var(49)=4)))
triggerall = ((var(9))&&(command!="22plus09")&&((command!="hold_non_b")||(command!="hold_non_z")||(command="00plus08")))
trigger1 = (((statetype!=A)&&(ctrl))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400))

;===========================================================================

[State -1,300]
type = ChangeState
value = 300
triggerall = ((command="00plus05")||((command="HotKey-1")&&(var(47)=5))||((command="HotKey-2")&&(var(49)=5)))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

[State -1,f900]
type = ChangeState
value = ifelse((command="Hp"),900,920)
trigger1 = ((command="holdF")&&((command="Hp")||(command="Hk")))
trigger1 = ((ctrl)&&(statetype=S)&&(P2statetype!=A)&&(P2movetype!=H)&&(P2bodydist X<9))

[State -1,250]
type = ChangeState
value = 250
triggerall = ((command="Lp")&&(command="holdF"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400||stateno=420||stateno=430))

[State -1,260]
type = ChangeState
value = 260
triggerall = ((command="Lk")&&(command="holdF"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400||stateno=420||stateno=430))

[State -1,f215]
type = ChangeState
value = ifelse((P2bodydist X<20),215,210)
triggerall = ((command="Lk")&&(command="holdF"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(Animelem=2,>1)&&(stateno=400||stateno=410))

[State -1,f205]
type = ChangeState
value = ifelse((P2bodydist X<20),205,200)
triggerall = ((command="Lp")&&(command="holdF"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

[State -1,f235]
type = ChangeState
value = ifelse((P2bodydist X<25),235,230)
triggerall = ((command="Hk")&&(command="holdF"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

[State -1,f225]
type = ChangeState
value = ifelse((P2bodydist X<25),225,220)
triggerall = ((command="Hp")&&(command="holdF"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

[State -1,1650]
type = ChangeState
value = 1650
triggerall = ((command="09plus04")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=4))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=4)))
triggerall = ((command!="hold_non_z")||(command="00plus08"))
trigger1 = (((statetype!=A)&&(ctrl))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400))

[State -1,1600]
type = ChangeState
value = 1600
triggerall = ((command="09plus02")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=2))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=2)))
triggerall = ((command!="hold_non_b")||(command="00plus08"))
trigger1 = (((statetype!=A)&&(ctrl))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400))

[State -1,1050]
type = ChangeState
value = 1050
triggerall = ((command="09plus03")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=3))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=3)))
triggerall = ((command!="hold_non_c")||(command="00plus08"))
trigger1 = (((statetype!=A)&&(ctrl))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400))

[State -1,1000]
type = ChangeState
value = 1000
triggerall = ((command="09plus01")||((command="HotKey-1")&&(var(46)=9)&&(var(47)=1))||((command="HotKey-2")&&(var(48)=9)&&(var(49)=1)))
triggerall = ((command!="hold_non_a")||(command="00plus08"))
trigger1 = (((statetype!=A)&&(ctrl))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(stateno=205||stateno=225||stateno=400))

;===========================================================================

[State -1,105]
type = ChangeState
value = ifelse((p2dist X<0),100,105)
trigger1 = ((command="BB")&&(ctrl)&&(statetype=S))

[State -1,100]
type = ChangeState
value = ifelse((p2dist X<0),105,100)
trigger1 = ((command="FF")&&(ctrl)&&(statetype=S))

[State -1,215]
type = ChangeState
value = ifelse((P2bodydist X<20),215,210)
triggerall = ((command="Lk")&&(command!="holddown"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))
trigger2 = ((movecontact)&&(Animelem=2,>1)&&(stateno=400||stateno=410))

[State -1,205]
type = ChangeState
value = ifelse((P2bodydist X<20),205,200)
triggerall = ((command="Lp")&&(command!="holddown"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

[State -1,235]
type = ChangeState
value = ifelse((P2bodydist X<25),235,230)
triggerall = ((command="Hk")&&(command!="holddown"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

[State -1,225]
type = ChangeState
value = ifelse((P2bodydist X<25),225,220)
triggerall = ((command="Hp")&&(command!="holddown"))
trigger1 = (((ctrl)&&(statetype=S))||(stateno=52||stateno=100))

;===========================================================================

[State -1,720]
type = ChangeState
value = 720
trigger1 = ((var(6)=720)||(command="00plus10")||((command="HotKey-1")&&(var(47)=10))||((command="HotKey-2")&&(var(49)=10)))
trigger1 = ((!var(59))&&(statetype=A)&&(ctrl))

[State Lv-1,2620]
type = ChangeState
value = 2620
triggerall = ((command="22plus04")||((command="HotKey-1")&&(var(46)=22)&&(var(47)=4))||((command="HotKey-2")&&(var(48)=22)&&(var(49)=4)))
triggerall = ((var(9))&&((command!="hold_non_z")||(command="00plus08")))
trigger1 = (((ctrl)&&(statetype=A))||(stateno=106))
trigger2 = ((movecontact)&&((stateno=720)&&(Animelem=5,<0)))

[State Lv-1,2600]
type = ChangeState
value = 2600
triggerall = ((command="22plus02")||((command="HotKey-1")&&(var(46)=22)&&(var(47)=2))||((command="HotKey-2")&&(var(48)=22)&&(var(49)=2)))
triggerall = ((var(9))&&((command!="hold_non_b")||(command="00plus08")))
trigger1 = (((ctrl)&&(statetype=A))||(stateno=106))
trigger2 = ((movecontact)&&((stateno=720)&&(Animelem=5,<0)))

[State -1,1700]
type = ChangeState
value = 1700
trigger1 = ((command="holddown")&&(command="Lk"))
trigger1 = ((!var(59))&&(((statetype=A)&&(ctrl))||(stateno=106)))

[State -1,610]
type = ChangeState
value = 610
trigger1 = ((command="Lk")||(var(6)=610))
trigger1 = ((!var(59))&&(statetype=A)&&(ctrl))

[State -1,606]
type = ChangeState
value = 606
trigger1 = ((command="Lp")&&(command="holdup")&&(stateno=40))

[State -1,600]
type = ChangeState
value = ifelse((abs(var(8))=4||abs(var(8))=6),605,600)
trigger1 = ((command="Lp")||(var(6)=600))
trigger1 = ((!var(59))&&(statetype=A)&&(ctrl))

[State -1,630]
type = ChangeState
value = ifelse((var(8)=2),630,635)
trigger1 = ((command="Hk")||(var(6)=630))
trigger1 = ((!var(59))&&(statetype=A)&&(ctrl))

[State -1,620]
type = ChangeState
value = ifelse((var(8)=2),620,625)
trigger1 = ((command="Hp")||(var(6)=620))
trigger1 = ((!var(59))&&(statetype=A)&&(ctrl))
