;-| 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 = "x"
command = x
time = 1

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

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

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

;-| hold Dir |--------------------------------------------------------------

[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

;-| hold button |----------------------------------------------------------

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

[command]
name = "holDB"
command = /B
time = 1

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

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

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

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

[command]
name = "holds"
command = /s
time = 1

;-| cpu |--------------------------------------------------------------

[command]
name = "a2"
command = a
time = 1

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

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

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

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

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

[command]
name = "s2"
command = s
time = 1

[command]
name = "holdfwd2"
command = /$F
time = 1

[command]
name = "holdback2"
command = /$B
time = 1

[command]
name = "holdup2"
command = /$U
time = 1

[command]
name = "holddown2"
command = /$D
time = 1

[command]
name = "holda2"
command = /a
time = 1

[command]
name = "holDB2"
command = /B
time = 1

[command]
name = "holdc2"
command = /c
time = 1

[command]
name = "holdx2"
command = /x
time = 1

[command]
name = "holdy2"
command = /y
time = 1

[command]
name = "holdz2"
command = /z
time = 1

[command]
name = "holds2"
command = /s
time = 1

[command]
name = "recovery2"
command = x+a
time = 1

;********************************************************************************************
;=============================[hyper moves]=========================================
;------------------------------------------
[command]
name = "mirror"
command = ~D, DF, F, D, DF, F, x
time = 35

[command]
name = "mirror"
command = ~D, DF, F, D, DF, F, y
time = 35

[command]
name = "dance"
command = ~D, DF, F, D, DF, F, a
time = 35

[command]
name = "dance"
command = ~D, DF, F, D, DF, F, b
time = 35

[command]
name = "yagball"
command = ~D, DB, B, DB, D, DF, F, x
time = 35

[command]
name = "yagball"
command = ~D, DB, B, DB, D, DF, F, y
time = 35
;=============================[special moves]=======================================
[command]
name = "mirrorball1"
command = ~D, DF, F, x
time = 15

[command]
name = "mirrorball2"
command = ~D, DF, F, y
time = 15

[command]
name = "groove1"
command = ~F, D, DF, x
time = 15

[command]
name = "groove2"
command = ~F, D, DF, y
time = 15

[command]
name = "charing1"
command = ~D, D, x
time = 15

[command]
name = "charing2"
command = ~D, D, y
time = 15

[command]
name = "charing3"
command = ~D, D, a
time = 15

[command]
name = "charing4"
command = ~D, D, b
time = 15
;----------------------------
[command]
name = "kilikili1"
command = ~F, D, B, x
time = 15

[command]
name = "kilikili2"
command = ~F, D, B, y
time = 15
;-----------------------------
;easier
[command]
name = "kilikili1"
command = ~D, DB, B, x
time = 15
;easier
[command]
name = "kilikili2"
command = ~D, DB, B, y
time = 15
;------------------------
[command]
name = "chika1"
command = ~F, D, B, a
time = 15

[command]
name = "chika2"
command = ~F, D, B, b
time = 15
;-----------------------------
;easier
[command]
name = "chika1"
command = ~D, DB, B, a
time = 15
;easier
[command]
name = "chika2"
command = ~D, DB, B, b
time = 15
;----------------------------
[command]
name = "pq"
command = ~F, D, B, x
time = 15

;easier
[command]
name = "pq"
command = ~D, DB, B, x
time = 15

[command]
name = "pq2"
command = ~F, D, B, a
time = 15

;easier
[command]
name = "pq2"
command = ~D, DB, B, a
time = 15

;-----------------------
[command]
name = "pahipo"
command = ~F, D, B, y
time = 15

;easier
[command]
name = "pahipo"
command = ~D, DB, B,y
time = 15

[command]
name = "pahipo2"
command = ~F, D, B, b
time = 15

;easier
[command]
name = "pahipo2"
command = ~D, DB, B,b
time = 15

;-----------------------
[command]
name = "qcf_c"
command = ~D, DF, F, c
time = 15

[command]
name = "qcb_x"
command = ~D, DB, B, x
time = 15

[command]
name = "qcb_y"
command = ~D, DB, B, y
time = 15

[command]
name = "qcb_a"
command = ~D, DB, B, a
time = 15

[command]
name = "qcb_b"
command = ~D, DB, B, b
time = 15

[command]
name = "dp_x"
command = ~F, D, DF, x
time = 15

[command]
name = "dp_b"
command = ~F, D, DF, b
time = 15

[command]
name = "dp_a"
command = ~F, D, DF, a
time = 15

[command]
name = "dp_y"
command = ~F, D, DF, y
time = 15
;-------------------------------------------
[command]
name = "max"
command = x+y+a
time = 1

[command]
name = "mature"
command = a+y
time = 2

[command]
name = "vice"
command = x+b
time = 2

[command]
name = "mature"
command = z
time = 2

[command]
name = "vice"
command = c
time = 2
;--------------------------------------------
;=========================================================================================
;##############################################################################
;run n Dash back
;____________________________________________________________________________________

;run
[command]
name = "ff"
command = F, F
time = 15

;back
[command]
name = "bb"
command = B, B
time = 10

;-|button combination|-----------------------------------------------

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

[command]
name = "recovery"
command = x+a
time = 1

[command]
name = "dodge"
command = x+y
time = 1

[command]
name = "knockdown"
command = y+b
time = 1

[command]
name = "roll"
command = x+a
time = 1

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

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

[command]
name = "abc"
command = a+b+c
time = 1

[command]
name = "yb"
command = y+b
time = 1

[command]
name = "xa"
command = x+a
time = 1

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

[command]
name = "xz"
command = x+z
time = 1

[command]
name = "yz"
command = y+z
time = 1

;power Up
[command]
name = "xyz"
command = x+y+z
time = 1

;------------------------------------------------------------------------------
;hold buttons

[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

;==================================================================================
;hold Dir

[command]
name = "/DB"
command = /DB
time = 1

;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;hold Dir + button

[command]
name = "holdfwd_x"
command = /$F, x
time = 1

[command]
name = "holdfwd_y"
command = /$F, y
time = 1

[command]
name = "fwd_a"
command = /F,a
time = 1

[command]
name = "fwd_b"
command = /F,b
time = 1


[command]
name = "fwd_x"
command = /F,x

[command]
name = "fwd_z"
command = /F,z

[command]
name = "back_z"
command = /B,z

[command]
name = "back_a"
command = /B,a

[command]
name = "back_x"
command = /B,x

[command]
name = "fwd_y"
command = /F,y

[command]
name = "back_y"
command = /B,y

[command]
name = "down_y"
command = /D, y

[command]
name = "down_b"
command = /D, b

[command]
name = "down_z"
command = /D, z

;================================================================================
;=================================[commands]=====================================
;================================================================================
[statedef -1]
;================================================================================

[state -1, ai helper check]
type = changestate
trigger1 = ishelper(9741)
value = 9741

[state -1, ai helper check 2]
type = changestate
trigger1 = ishelper(9742)
value = 9742


;dancing queen maximum
[state -1,Dance]
type = changestate
value = 1909
triggerall = var(9) != 1
triggerall = life <= 200
triggerall = numhelper(1901) = 0
triggerall = command = "dance"
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;dancing queen maximum
[state -1,Dance]
type = changestate
value = 1909
triggerall = var(9) != 1
triggerall = var(10) > 0
triggerall = numhelper(1901) = 0
triggerall = command = "dance"
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;dancing queen normal
[state -1,Dance]
type = changestate
value = 1900
triggerall = var(9) != 1
triggerall = var(10) <= 0
triggerall = life > 200
triggerall = numhelper(1901) = 0
triggerall = command = "dance"
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

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

;yagball 
[state -1,boladas]
type = changestate
value = 2000
triggerall = var(9) != 1
triggerall = life <= 200
triggerall = numhelper(1901) = 0
triggerall = command = "yagball"
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;yagball 
[state -1,boladas]
type = changestate
value = 2010
triggerall = var(9) != 1
triggerall = var(10) > 0
triggerall = numhelper(1901) = 0
triggerall = command = "yagball"
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;yagball 
[state -1,boladas]
type = changestate
value = 2000
triggerall = var(9) != 1
triggerall = var(10) <= 0
triggerall = life > 200
triggerall = numhelper(1901) = 0
triggerall = command = "yagball"
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;====[special attacks]=====
;groove Upper type 1^_^
[state -1,g1]
type = changestate
value = 1100
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = numhelper(1101) = 0
triggerall = command = "groove1"
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;groove Upper type 2 ^_^
[state -1,g2]
type = changestate
value = 1110
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = numhelper(1101) = 0
triggerall = command = "groove2"
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;chika 1
[state -1,c1]
type = changestate
value = 1750
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = command = "chika1"
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;chika 2
[state -1,2]
type = changestate
value = 1800
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = command = "chika2"
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;kilikili 1
[state -1,k1]
type = changestate
value = 1550
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = command = "kilikili1"
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;kilikili2
[state -1,k2]
type = changestate
value = 1600
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = command = "kilikili2"
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;mirror ball 1
[state -1,mb1]
type = changestate
value = 1000
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = command = "mirrorball1"
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;mirror ball 2
[state -1,mb2]
type = changestate
value = 1005
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = command = "mirrorball2"
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;charing 1
[state -1,ch1]
type = changestate
value = 1500
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = statetype != a
triggerall = command = "charing1"
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;charing 2
[state -1,ch2]
type = changestate
value = 1510
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = statetype != a
triggerall = command = "charing2"
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;charing 3
[state -1,ch3]
type = changestate
value = 1520
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = statetype != a
triggerall = command = "charing3"
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;charing 4
[state -1,ch4]
type = changestate
value = 1530
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = statetype != a
triggerall = command = "charing4"
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 215
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;--------------------------------
;max
[state -1]
type = changestate
value = 707
;triggerall = var(9) != 1
triggerall = var(10) <= 0
triggerall = power >= 1000
trigger1 = command = "holdx"
trigger1 = command = "holdy"
trigger1 = command = "holda"
trigger1 = stateno = 0
trigger1 = ctrl

;charge xy
[state -1]
type = changestate
value = 704
triggerall = var(9) != 1
triggerall = power < 3000
trigger1 = command = "holdx"
trigger1 = command = "holdy"
trigger1 = stateno = 0
trigger1 = ctrl

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

[state -1,rollb counter]
type = changestate
value = 710
triggerall = var(9) != 1
triggerall = power >= 500
triggerall = command = "roll"
triggerall = life > 0
triggerall = command = "holdback"
trigger1 = stateno = 150
trigger2 = stateno = 152

[state -1,rollf counter]
type = changestate
value = 711
triggerall = var(9) != 1
triggerall = power >= 500
triggerall = command = "roll"
triggerall = life > 0
triggerall = command = "holdfwd"
trigger1 = stateno = 150
trigger2 = stateno = 151

[state -1,cd counter]
type = changestate
value = 712
triggerall = var(9) != 1
triggerall = power >= 500
triggerall = command = "knockdown"
triggerall = life > 0
trigger1 = stateno = 150
trigger2 = stateno = 151

[state -1,rollb]
type = changestate
value = 701
triggerall = var(9) != 1
triggerall = command = "roll"
triggerall = life > 0
triggerall = command = "holdback"
trigger1 = statetype = s
trigger1 = ctrl

[state -1,rollf]
type = changestate
value = 706
triggerall = var(9) != 1
triggerall = stateno = 100
triggerall = command = "roll"
triggerall = life > 0
triggerall = command = "holdfwd"
trigger1 = statetype = s
trigger1 = ctrl

[state -1,rollf]
type = changestate
value = 700
triggerall = var(9) != 1
triggerall = stateno != 100
triggerall = command = "roll"
triggerall = life > 0
triggerall = command = "holdfwd"
trigger1 = statetype = s
trigger1 = ctrl

[state -1,sidestep]
type = changestate
value = 702
triggerall = var(9) != 1
triggerall = command = "roll"
triggerall = life > 0
trigger1 = statetype = s
trigger1 = ctrl

;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

;=============================================================================
;-------------[throws]------------------------
;=============================================
;----[hyper throws]----
;=============================================
;===========================================================================
;graby
[state -1, graby ]
type = changestate
value = 300
triggerall = command = "y"
triggerall = statetype = s
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist x < 3
trigger1 = (p2statetype = s) || (p2statetype = c)
trigger1 = p2movetype != h
trigger2 = command = "holdback"
trigger2 = p2bodydist x < 5
trigger2 = (p2statetype = s) || (p2statetype = c)
trigger2 = p2movetype != h

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

;grabb
[state -1, grabb ]
type = changestate
value = 305
triggerall = command = "b"
triggerall = statetype = s
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist x < 3
trigger1 = (p2statetype = s) || (p2statetype = c)
trigger1 = p2movetype != h
trigger2 = command = "holdback"
trigger2 = p2bodydist x < 5
trigger2 = (p2statetype = s) || (p2statetype = c)
trigger2 = p2movetype != h
;===========================================================================
;========================[basic attacks]==================================

[state -1,12]
type = changestate
value = 280
triggerall = var(9) != 1
trigger1 = command = "knockdown" 
trigger1 = statetype = s
trigger1 = ctrl 

;lp Fwd
[state -1,13]
type = changestate
value = 215
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = command = "fwd_x"
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact

;lp
[state -1,15]
type = changestate
value = 200
triggerall = var(9) != 1
triggerall = command = "x"
trigger1 = statetype = s
trigger1 = ctrl

;lk Fwd
[state -1,16]
type = changestate
value = 235
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = command = "fwd_a"
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = command != "holddown"
trigger4 = movecontact
trigger5 = movecontact
trigger5 = stateno = 460
trigger5 = command != "holddown"

;lk close
[state -1,17]
type = changestate
value = 230
triggerall = var(9) != 1
triggerall = command = "a"
triggerall = p2bodydist x <= 10
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = command !=  "holddown"
trigger2 = stateno = 420
trigger2 = movecontact

;lk
[state -1,18]
type = changestate
value = 220
triggerall = p2bodydist x > 10
triggerall = var(9) != 1
triggerall = command = "a"
trigger1 = statetype = s
trigger1 = ctrl

;hp close
[state -1,19]
type = changestate
value = 250
triggerall = var(9) != 1
triggerall = command = "y"
triggerall = p2bodydist x <= 15
triggerall = ctrl
trigger1 = statetype = s
trigger1 = ctrl 

;hp 
[state -1,20]
type = changestate
value = 240
triggerall = var(9) != 1
triggerall = command = "y"
trigger1 = statetype = s
trigger1 = ctrl

;hk close
[state -1,21]
type = changestate
value = 270
triggerall = var(9) = 0
triggerall = command = "b"
triggerall = p2bodydist x <= 10
trigger1 = statetype = s
trigger1 = ctrl

;hk 
[state -1,22]
type = changestate
value = 260
triggerall = var(9) != 1
triggerall = command = "b"
trigger1 = statetype = s
trigger1 = ctrl

[state -1,clp]
type = changestate
value = 400
triggerall = var(9) != 1
triggerall = command = "x"
trigger1 = statetype = c
trigger1 = ctrl
trigger2 = stateno = 420
trigger2 = movecontact

[state -1,slide]
type = changestate
value = 470
triggerall = var(9) != 1
triggerall = numhelper(1901) = 0
triggerall = command = "a"
triggerall = command = "holdfwd"
trigger1 = statetype = c
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact

[state -1,clk]
type = changestate
value = 420
triggerall = var(9) != 1
triggerall = command = "a"
trigger1 = statetype = c
trigger1 = ctrl

[state -1,chp]
type = changestate
value = 440
triggerall = var(9) != 1
triggerall = command = "y"
trigger1 = statetype = c
trigger1 = ctrl

[state -1,chk]
type = changestate
value = 460
triggerall = var(9) != 1
triggerall = command = "b"
triggerall = statetype = c
trigger1 = ctrl

[state -1,27]
type = changestate
value = 680
triggerall = var(9) != 1
triggerall = command = "knockdown"
triggerall = statetype = a
trigger1 = ctrl

[state -1,28]
type = changestate
value = 610
triggerall = var(9) != 1
triggerall = command = "x"
triggerall = statetype = a
triggerall = ctrl
trigger1 = vel x != 0
trigger2 = stateno = 201

[state -1,28]
type = changestate
value = 630
triggerall = var(9) != 1
triggerall = command = "a"
triggerall = statetype = a
triggerall = ctrl
trigger1 = vel x != 0
trigger2 = stateno = 201

[state -1,28]
type = changestate
value = 650
triggerall = var(9) != 1
triggerall = command = "y"
triggerall = statetype = a
triggerall = ctrl
trigger1 = vel x != 0
trigger2 = stateno = 201

[state -1,28]
type = changestate
value = 670
triggerall = var(9) != 1
triggerall = command = "b"
triggerall = statetype = a
triggerall = ctrl
trigger1 = vel x != 0
trigger2 = stateno = 201

[state -1,28]
type = changestate
value = 600
triggerall = var(9) != 1
triggerall = vel x = 0
triggerall = command = "x"
triggerall = statetype = a
trigger1 = ctrl

[state -1,30]
type = changestate
value = 620
triggerall = var(9) != 1
triggerall = vel x = 0
triggerall = command = "a"
triggerall = statetype = a
trigger1 = ctrl

[state -1,31]
type = changestate
value = 640
triggerall = var(9) != 1
triggerall = vel x = 0
triggerall = command = "y"
triggerall = statetype = a
trigger1 = ctrl

[state -1,32]
type = changestate
value = 660
triggerall = var(9) != 1
triggerall = vel x = 0
triggerall = command = "b"
triggerall = statetype = a
trigger1 = ctrl

[state -1,33]
type = changestate
value = 195
triggerall = var(9) != 1
trigger1 = command = "s"
trigger1 = statetype = s
trigger1 = stateno != 195
trigger1 = ctrl

[state -1,34]
type = changestate
value = 100
triggerall = var(9) != 1
trigger1 = command = "ff"
trigger1 = statetype = s
;trigger1 = command = "holddown"
trigger1 = ctrl

[state -1,35]
type = changestate
value = 105
triggerall = var(9) != 1
trigger1 = command = "bb"
trigger1 = statetype = s
;trigger1 = command = "holddown"
trigger1 = ctrl

;=====================================================================================
;-----[ ai modification ]-----
;=====================================================================================

;---------------------------------------------------------------------------------
;-----[ cant beat me baby ]--------
;----------------------------------
;---------------------------------------------------------------------------
:beta ai 

; high percent air guard
[state -1]
type = changestate
value = 132
triggerall = p2movetype = a;access only when opponent attack
triggerall = p2bodydist x <= 40;access only when near
triggerall = p2life != 0;don't player when opponent had Die
triggerall = statetype = a;perform when in air
triggerall = random <= 500;high percent
triggerall = var(9) = 1;only ai can access
triggerall = ctrl;make sure ai had control
triggerall = stateno != 132
trigger1 = p2statetype = a

;-----------------------------------------------------------
; high percent stand guard
[state -1]
type = changestate
value = 130
triggerall = p2movetype = a;access only when opponent attack
triggerall = p2bodydist x <= 40;access only when near
triggerall = random <= 700;high percent
triggerall = statetype != a;perform when not in air
triggerall = var(9) = 1;only ai can access
triggerall = ctrl;make sure ai had control
triggerall = stateno != 120
trigger1 = p2statetype = s

[state -1]
type = changestate
value = 130
triggerall = p2movetype = a;access only when opponent attack
triggerall = p2bodydist x <= 40;access only when near
triggerall = random <= 700;high percent
triggerall = statetype != a;perform when not in air
triggerall = var(9) = 1;only ai can access
triggerall = ctrl;make sure ai had control
triggerall = stateno != 130
trigger1 = p2statetype = a

;---------------------------------------------------------------------------
; high percent crouch guard
[state -1]
type = changestate
value = 131
triggerall = p2movetype = a;access only when opponent attack
triggerall = p2bodydist x <= 40;access only when near
triggerall = statetype != a;perform when not in air
triggerall = random <= 700;high percent
triggerall = var(9) = 1;only ai can access
triggerall = ctrl;make sure ai had control
triggerall = stateno != 131
trigger1 = p2statetype = c
;---------------------------------------------------------------------------
;side step n rolls
[state -1]
type = changestate
value = 701
triggerall = p2movetype = a;access only when opponent attack
triggerall = p2bodydist x <= 40;access only when near
triggerall = random <= 100;high percent
triggerall = statetype != a;perform when not in air
triggerall = var(9) = 1;only ai can access
triggerall = ctrl
triggerall = stateno != 120
trigger1 = p2statetype = s

[state -1]
type = changestate
value =702
triggerall = p2movetype = a;access only when opponent attack
triggerall = p2bodydist x >= 40;access only when near
triggerall = random <= 100;high percent
triggerall = statetype != a;perform when not in air
triggerall = var(9) = 1;only ai can access
triggerall = ctrl
triggerall = stateno != 130
trigger1 = p2statetype = s

[state -1]
type = changestate
value =700
triggerall = p2movetype = a;access only when opponent attack
triggerall = p2bodydist x >= 100;access only when near
triggerall = random <= 1000;high percent
triggerall = statetype != a;perform when not in air
triggerall = var(9) = 1;only ai can access
triggerall = ctrl
triggerall = stateno != 130
trigger1 = p2movetype = a
trigger1 = p2movetype = i

[state -1]
type = changestate
value =706
triggerall = stateno = 100
triggerall = statetype != a
triggerall = var(9) = 1;only ai can access
triggerall = ctrl
trigger1 = random <= 100
trigger1 = prevstateno = 5120
trigger1 = p2movetype = a
trigger2 = random <= 100
trigger2 = prevstateno = 5120
trigger2 = p2movetype = i
trigger3 = p2bodydist x >=100
trigger3 = random <= 100
trigger3 = p2movetype = a
trigger4 = p2bodydist x >=80
trigger4= random <= 110
trigger4 = p2movetype = i

[state -1]
type = changestate
value =700
triggerall = stateno != 100
triggerall = statetype != a
triggerall = var(9) = 1;only ai can access
triggerall = ctrl
trigger1 = random <= 100
trigger1 = prevstateno = 5120
trigger1 = p2movetype = a
trigger2 = random <= 100
trigger2 = prevstateno = 5120
trigger2 = p2movetype = i
trigger3 = p2bodydist x >=100
trigger3 = random <= 110
trigger3 = p2movetype = a
trigger4 = p2bodydist x >=110
trigger4= random <= 100
trigger4 = p2movetype = i

[state -1,groundrecover]
type = changestate
value = 5201
triggerall = life >0
triggerall = random <= 700;high percent
triggerall = canrecover
triggerall = var(9) = 1;only ai can access
trigger1 = vel y > 0 && pos y >= 0
trigger1 = stateno = [5050,5060]

jump
[state -1,8]
type = changestate
value = 40
triggerall = stateno != 40
triggerall = p2life != 0;don't player when opponent had Die
triggerall = statetype != a;perform when not in air
triggerall = var(9) = 1;only ai can access
triggerall = p2statetype != a
triggerall = Frontedgebodydist >= 40
triggerall = p2movetype != h
triggerall = ctrl
trigger1 = p2stateno = 5120;player is in getup state
trigger1 = p2bodydist x >= 60
trigger1 = random <= 100
trigger1 = statetype != a
trigger2 = random <= 400;high percent
trigger2 = p2bodydist x >= 70
trigger2 = p2statetype = l
trigger2 = statetype = s
trigger3 = p2bodydist x = [40,70]
trigger3 = random <=400
trigger3 = p2movetype != h
trigger4 = p2bodydist x = [0,50]
trigger4 = random <=900
trigger4 = p2statetype = c
trigger4 = p2movetype != h
;-------------------------------------------

;--------------------------------------------------------
; keep running Forward when there is chance
[state -1]
type = changestate
value = 100
triggerall = var(9) = 1;only ai can access
triggerall = p2movetype != a;access only when opponent not attacking
triggerall = p2statetype != l;access only when opponent not lying Down
triggerall = p2bodydist x >= 40;access only when Far
trigger1 = stateno = 0
trigger1 = stateno != 100
trigger1 = ctrl 

;hp combo
[state -1,4]
type = changestate
value = 250
triggerall = p2statetype != l;player not lying Down
triggerall = p2bodydist x = [1,20];access only when near
triggerall = random <= 800
triggerall = p2movetype = h
triggerall = p2stateno != [120,152]
triggerall = p2life != 0;don't player when opponent had Die
triggerall = statetype != a;perform when not in air
triggerall = var(9) = 1;only ai can access
triggerall = stateno != 240
trigger1 = movetype != a
trigger1 = statetype = s
trigger1 = ctrl

;hk close
[state -1,19]
type = changestate
value = 270
triggerall = var(9) = 1
triggerall = p2bodydist x <= 15
triggerall = random <= 800
trigger1 = statetype = s
trigger1 = ctrl 

[state -1,clp]
type = changestate
value = 400
triggerall = var(9) = 1
triggerall = random <= 800
triggerall = p2bodydist x <= 15
trigger1 = statetype = c
trigger1 = ctrl
trigger2 = stateno = 420
trigger2 = movecontact

[state -1,clp]
type = changestate
value = 420
triggerall = var(9) = 1
triggerall = random <= 800
triggerall = p2bodydist x <= 15
trigger1 = statetype = c
trigger1 = ctrl

[state -1,chp]
type = changestate
value = 440
triggerall = random <= 800
triggerall = var(9) = 1
triggerall = p2bodydist x = [10,40]
trigger1 = statetype != a
trigger1 = ctrl

;lk Fwd
[state -1,16]
type = changestate
value = 235
triggerall = var(9) = 1
triggerall = numhelper(1901) = 0
triggerall = p2statetype = c
triggerall = random <=500
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = movecontact
trigger5 = stateno = 460

;lp Fwd
[state -1,16]
type = changestate
value = 215
triggerall = var(9) = 1
triggerall = numhelper(1901) = 0
triggerall = random <=500
trigger1 = stateno = 250
trigger1 = movecontact
trigger2 = stateno = 270
trigger2 = movecontact
trigger3 = stateno = 440
trigger3 = movecontact
trigger4 = movecontact
trigger4 = stateno = 460

[state -1,slide]
type = changestate
value = 470
triggerall = var(9) = 1
triggerall = numhelper(1901) = 0
triggerall = p2statetype = s || p2statetype = a
triggerall = p2movetype != h
triggerall = random <=500
trigger1 = statetype = c
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact

;-----------------------------------------------
[state -1,grab]
type = changestate
value = 300
triggerall = p2stateno != 1302
triggerall = var(9) = 1;only ai can access
triggerall = statetype != a
triggerall = p2statetype != a;player not in air
triggerall = p2statetype != l;player not lying Down
triggerall = p2stateno != 5120;player is not in getup state
triggerall = random < 900
triggerall = p2bodydist x <= 10;access only when near
triggerall = p2stateno != 130
triggerall = p2stateno != 131
trigger1 = p2movetype != h 
trigger1 = ctrl
;-------------------------------------------
;grab
[state -1,grab]
type = changestate
value = 305
triggerall = p2stateno != 1302
triggerall = p2stateno != 1302
triggerall = var(9) = 1;only ai can access
triggerall = statetype != a
triggerall = p2statetype != a;player not in air
triggerall = p2statetype != l;player not lying Down
triggerall = p2stateno != 5120;player is not in getup state
triggerall = random <= 1100
triggerall = p2bodydist x <= 10;access only when near
triggerall = p2stateno != 130
triggerall = p2stateno != 131
trigger1 = p2movetype != h 
trigger1 = ctrl

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

jump
[state -1,jump]
type = changestate
value = 40
triggerall = stateno != 40
triggerall = p2life != 0;don't player when opponent had Die
triggerall = statetype != a;perform when not in air
triggerall = var(9) = 1;only ai can access
triggerall = Frontedgebodydist >= 40
triggerall = ctrl
trigger1 = p2stateno = 5120;player is in getup state
trigger1 = p2bodydist x >= 90
trigger1 = random <= 300;high percent
trigger1 = statetype = s
trigger2 = random <= 700;high percent
trigger2 = p2bodydist x >= 120
trigger2 = p2statetype = a
trigger2 = statetype = s
trigger3 = p2bodydist x <=50
trigger3 = random <=100

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

[state -1,jumphk]
type = changestate
value = 660
triggerall = p2life != 0;don't player when opponent had Die
triggerall = var(9) = 1;only ai can access
triggerall = statetype = a
triggerall = p2bodydist x = [5,40]
triggerall = vel y >= 0
triggerall = vel x >= 0
trigger1 = ctrl

[state -1, cd]
type = changestate
value = 680
triggerall = p2life != 0;don't player when opponent had Die
triggerall = var(9) = 1;only ai can access
triggerall = statetype = a
triggerall = p2bodydist x = [5,30]
trigger1 = p2movetype = a
trigger1 = p2statetype = a
trigger1 = ctrl

;====[special attacks]=====
;groove Upper type 1^_^
[state -1,g1]
type = changestate
value = 1100
triggerall = var(9) = 1
triggerall = numhelper(1901) = 0
triggerall = numhelper(1101) = 0
triggerall = statetype != a
triggerall = p2bodydist x = [10,40]
triggerall = random <= 900;high percent
trigger1 = p2statetype = a
trigger1 = ctrl

;groove Upper type 2 ^_^
[state -1,g2]
type = changestate
value = 1110
triggerall = var(9) = 1
triggerall = numhelper(1901) = 0
triggerall = numhelper(1101) = 0
triggerall = statetype != a
triggerall = p2bodydist x = [10,40]
triggerall = random <= 900;high percent
trigger1 = ctrl

;charing 1
[state -1,c1]
type = changestate
value = 1500
triggerall = var(9) = 1
triggerall = numhelper(1501) = 0
triggerall = numhelper(1901) = 0
triggerall = p2bodydist x = [70,90]
triggerall = random <= 900;high percent
triggerall = p2movetype != a 
triggerall = statetype != a
trigger1 = ctrl
;trigger2 = ctrl
;trigger2 = p2statetype = a

;charing 2
[state -1,2]
type = changestate
value = 1510
triggerall = var(9) = 1
triggerall = numhelper(1501) = 0
triggerall = numhelper(1901) = 0
triggerall = p2bodydist x >= 110
triggerall = random <= 800;high percent
triggerall = p2movetype != a 
triggerall = statetype != a
trigger1 = ctrl
;trigger2 = ctrl
;trigger2 = p2statetype = a

;charing 3
[state -1,c1]
type = changestate
value = 1520
triggerall = var(9) = 1
triggerall = numhelper(1501) = 0
triggerall = numhelper(1901) = 0
triggerall = p2bodydist x = [70,90]
triggerall = random <= 100;high percent
triggerall = p2movetype != a 
triggerall = statetype != a
trigger1 = ctrl
;trigger2 = ctrl
;trigger2 = p2statetype = a

;charing 4
[state -1,2]
type = changestate
value = 1530
triggerall = var(9) = 1
triggerall = numhelper(1501) = 0
triggerall = numhelper(1901) = 0
triggerall = p2bodydist x >= 90
triggerall = random <= 100;high percent
triggerall = p2movetype != a 
triggerall = statetype != a
trigger1 = ctrl
;trigger2 = ctrl
;trigger2 = p2statetype = a


;kilikili 1
[state -1,c1]
type = changestate
value = 1550
triggerall = var(9) = 1
triggerall = numhelper(1901) = 0
triggerall = p2bodydist x >= 75
triggerall = random <= 800;high percent
triggerall = p2movetype =  h
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = moveguarded
trigger3 = stateno = 270
trigger3 = moveguarded
trigger4 = stateno = 440
trigger4 = moveguarded
trigger5 = stateno = 460
trigger5 = moveguarded
trigger6 = stateno = 215
trigger6 = moveguarded
trigger7 = stateno = 237
trigger7 = moveguarded
trigger8 = stateno = 280
trigger8 = moveguarded
trigger9 = stateno = 703
trigger9 = moveguarded

;kilikili 2
[state -1,2]
type = changestate
value = 1600
triggerall = var(9) = 1
triggerall = numhelper(1901) = 0
triggerall = p2bodydist x >= 75
triggerall = random <= 800;high percent
triggerall = p2movetype !=  a
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movehit
trigger3 = stateno = 270
trigger3 = movehit
trigger4 = stateno = 440
trigger4 = movehit
trigger5 = stateno = 460
trigger5 = movehit
trigger6 = stateno = 215
trigger6 = movehit
trigger7 = stateno = 237
trigger7 = movehit
trigger8 = stateno = 280
trigger8 = movehit
trigger9 = stateno = 703
trigger9 = movehit

;chika 1
[state -1,c1]
type = changestate
value = 1750
triggerall = var(9) = 1
triggerall = numhelper(1901) = 0
triggerall = p2bodydist x >= 75
triggerall = random <= 800;high percent
triggerall = p2movetype =  h
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = moveguarded
trigger3 = stateno = 270
trigger3 = moveguarded
trigger4 = stateno = 440
trigger4 = moveguarded
trigger5 = stateno = 460
trigger5 = moveguarded
trigger6 = stateno = 215
trigger6 = moveguarded
trigger7 = stateno = 237
trigger7 = moveguarded
trigger8 = stateno = 280
trigger8 = moveguarded
trigger9 = stateno = 703
trigger9 = moveguarded

;chika 2
[state -1,2]
type = changestate
value = 1800
triggerall = var(9) = 1
triggerall = numhelper(1901) = 0
triggerall = p2bodydist x >= 75
triggerall = random <= 800;high percent
triggerall = p2movetype !=  a
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movehit
trigger3 = stateno = 270
trigger3 = movehit
trigger4 = stateno = 440
trigger4 = movehit
trigger5 = stateno = 460
trigger5 = movehit
trigger6 = stateno = 215
trigger6 = movehit
trigger7 = stateno = 237
trigger7 = movehit
trigger8 = stateno = 280
trigger8 = movehit
trigger9 = stateno = 703
trigger9 = movehit

;mirror ball 1
[state -1,mb1]
type = changestate
value = 1000
triggerall = var(9) = 1
triggerall = numhelper(1901) = 0
triggerall = p2bodydist x = [20,50]
triggerall = random <= 100;high percent
triggerall = p2movetype !=  a
triggerall = p2statetype != a
trigger1 = statetype = s
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movehit
trigger3 = stateno = 270
trigger3 = movehit
trigger4 = stateno = 440
trigger4 = movehit
trigger5 = stateno = 460
trigger5 = movehit
trigger6 = stateno = 237
trigger6 = movehit
trigger7 = stateno = 237
trigger7 = movehit
trigger8 = stateno = 280
trigger8 = movehit
trigger9 = stateno = 703
trigger9 = movehit

;mirror ball 2
[state -1,mb2]
type = changestate
value = 1005
triggerall = var(9) = 1
triggerall = p2bodydist x = [20,50]
triggerall = random <= 100;high percent
triggerall = p2statetype != a
triggerall = p2movetype !=  a
triggerall = numhelper(1901) = 0
trigger1 = statetype = s
trigger1 = ctrl

;----------------------------------------------------
;dancing queen maximum
[state -1,Dance]
type = changestate
value = 1909
triggerall = var(9) = 1
triggerall = life <= 200
triggerall = numhelper(1901) = 0
triggerall = random <= 1000
triggerall = p2bodydist x = [0,50]
triggerall = p2statetype != l
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 237
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;dancing queen maximum
[state -1,Dance]
type = changestate
value = 1909
triggerall = var(9) = 1
triggerall = var(10) > 0
triggerall = numhelper(1901) = 0
triggerall = random <= 800
triggerall = p2bodydist x = [0,50]
triggerall = p2statetype != l
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 237
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

;dancing queen normal
[state -1,Dance]
type = changestate
value = 1900
triggerall = var(9) = 1
triggerall = var(10) <= 0
triggerall = numhelper(1901) = 0
triggerall = random <= 800
triggerall = p2bodydist x = [0,50]
triggerall = p2statetype != l
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movecontact
trigger3 = stateno = 270
trigger3 = movecontact
trigger4 = stateno = 440
trigger4 = movecontact
trigger5 = stateno = 460
trigger5 = movecontact
trigger6 = stateno = 237
trigger6 = movecontact
trigger7 = stateno = 237
trigger7 = movecontact
trigger8 = stateno = 280
trigger8 = movecontact
trigger9 = stateno = 703
trigger9 = movecontact

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

;yagball maximum
[state -1,ball]
type = changestate
value = 2010
triggerall = var(9) = 1
triggerall = life <= 200
triggerall = numhelper(1901) = 0
triggerall = random < 400
triggerall = p2bodydist x = [45,80]
triggerall = p2statetype != l
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl

;yagball maximum
[state -1,ball]
type = changestate
value = 2010
triggerall = var(9) = 1
triggerall = var(10) > 0
triggerall = life > 200
triggerall = numhelper(1901) = 0
triggerall = random < 400
triggerall = p2bodydist x = [45,80]
triggerall = p2statetype != l
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl

;yagball
[state -1,ball]
type = changestate
value = 2000
triggerall = var(9) = 1
triggerall = var(10) <= 0
triggerall = life > 200
triggerall = numhelper(1901) = 0
triggerall = random < 400
triggerall = p2bodydist x = [25,80]
triggerall = p2statetype != l
triggerall = power >= 1000
trigger1 = statetype != a
trigger1 = ctrl
trigger2 = stateno = 250
trigger2 = movehit
trigger3 = stateno = 270
trigger3 = movehit
trigger4 = stateno = 440
trigger4 = movehit
trigger5 = stateno = 460
trigger5 = movehit
trigger6 = stateno = 215
trigger6 = movehit
trigger7 = stateno = 237
trigger7 = movehit
trigger8 = stateno = 280
trigger8 = movehit
trigger9 = stateno = 703
trigger9 = movehit

;charge xy
[state -1]
type = changestate
value = 704
triggerall = var(9) != 1
triggerall = power < 3000
triggerall = p2bodydist x >= 80
triggerall = p2statetype = l
trigger1 = stateno = 0
trigger1 = ctrl
