; Goku's commands

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

[Command]
name = "hcombo"
command = ~B, DB, D, DF, F, z
time = 30

[Command]
name = "KiBlast"
command = ~D, DF, F, b

[Command]
name = "kienzan"
command = ~D, DB, B, a

[Command]
name = "kamehameha"
command = ~B, DB, D, DF, F, x

[Command]
name = "soms kamehameha"
command = ~D, DF, F, x


[Command]
name = "ShunGokuSatsu"
command = x, x, F, a, z
time = 30

[Command]
name = "fireballat"
command = ~D, DF, F, a
time = 20

[Command]
name = "genki dami"
command = ~D, DB, B, x

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

[Command]
name = "fireball"
command = D, DB, B, c

[Command]
name = "fly"
command = a+b

[Command]
name = "combo"
command = ~D, B, b

[Command]
name = "atack"
command = x+y

[Command]
name= "special kick"
command= ~F, D, DF, b

[Command]
name = "triple fireball"
command = D, DF, F, c

[Command]
name = "teleport"
command = ~B, D, DB, x

[Command]
name = "kick down"
command = ~D, DB, B, y

[Command]
name = "kick up"
command = D, DF, F, y

[Command]
name = "teleportb"
command = ~B, D, DB, a

[Command]
name = "kamez"
command = ~D, DF, F, z

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

[Command]
name = "air special kick"
command = ~F, D, a

[Command]
name = "air special kick"
command = ~F, D, b

[Command]
name = "air special kick"
command = ~F, D, c

[Command]
name = "ki burn"
command = b+c

[Command]
name = "highjump"
command = ~D, U
time = 10

;-| 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+b
time = 1

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

;-| Dir + Button |---------------------------------------------------------

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

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

[Command]
name = "fwd_c"
command = /F,c
time = 1

[Command]
name = "fwd_x"
command = /F,x
time = 1

[Command]
name = "fwd_y"
command = /F,y
time = 1

[Command]
name = "fwd_z"
command = /F,z
time = 1

[Command]
name = "back_a"
command = /B,a
time = 1

[Command]
name = "back_b"
command = /B,b
time = 1

[Command]
name = "back_c"
command = /B,c
time = 1

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

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

[Command]
name = "down_c"
command = /$D,c
time = 1

[Command]
name = "fwd_ab"
command = /F, a+b
time = 1

[Command]
name = "back_ab"
command = /B, a+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 = "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

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

[Command]
name = "charge"
command = /a
time = 1

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

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

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

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

[Command]
name = "jb"
command = a
time = 1

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

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

[Command]
name = "jb2"
command = a
time = 1

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

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

[Command]
name = "db"
command = a
time = 1

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

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

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

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

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

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

;-| AI Activation in DOS |----------------------------------------------------
[Command]
name = "cpu01"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,x,x,x,x,x
time = 0

[Command]
name = "cpu02"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,y,y,y,x,x
time = 0

[Command]
name = "cpu03"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,z,z,z,x,x
time = 0

[Command]
name = "cpu04"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,a,x,x
time = 0

[Command]
name = "cpu05"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,b,b,b,x,x
time = 0

[Command]
name = "cpu06"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,c,c,c,x,x
time = 0

[Command]
name = "cpu07"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,s,s,s,x,x
time = 0

[Command]
name = "cpu08"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,a,a,x,x
time = 0

[Command]
name = "cpu09"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,a,b,x,x
time = 0

[Command]
name = "cpu10"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,a,c,x,x
time = 0

[Command]
name = "cpu11"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,a,x,x,x
time = 0

[Command]
name = "cpu12"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,a,y,x,x
time = 0

[Command]
name = "cpu13"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,a,z,x,x
time = 0

[Command]
name = "cpu14"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,b,a,x,x
time = 0

[Command]
name = "cpu15"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,b,b,x,x
time = 0

[Command]
name = "cpu16"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,b,c,x,x
time = 0

[Command]
name = "cpu17"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,b,x,x,x
time = 0

[Command]
name = "cpu18"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,b,y,x,x
time = 0

[Command]
name = "cpu19"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,b,z,x,x
time = 0

[Command]
name = "cpu20"
command = ~U+a+b+c+x+y+z+s,DF, F, D,DF, F,a,a,c,a,x,x
time = 0
;---------------------------------------------------------------------------
[Statedef -1]

[State -1,AI Fido]
type = VarSet
triggerall = var(59) != 1
triggerall = RoundState != 3
trigger1=Command="cpu01"
trigger2= Command="cpu02"
trigger3= Command="cpu03"
trigger4= Command="cpu04"
trigger5= Command="cpu05"
trigger6=Command="cpu06"
trigger7= Command="cpu07"
trigger8= Command="cpu08"
trigger9= Command="cpu09"
trigger10= Command="cpu10"
trigger11=Command="cpu11"
trigger12= Command="cpu12"
trigger13= Command="cpu13"
trigger14= Command="cpu14"
trigger15= Command="cpu15"
trigger16=Command="cpu16"
trigger17= Command="cpu17"
trigger18= Command="cpu18"
trigger19= Command="cpu19"
trigger20= Command="cpu20"
v = 59
value = 1

[State -1, AI Deactivate] 
type = VarSet
triggerall = var(59)= 1
trigger1 = win = 1
trigger2 = loseko = 1
trigger3 = life <= 0
v = 59
value = 0

[State -1, AI Run Fwd]
type = ChangeState
value = 100
triggerall = var(59)=1
triggerall = stateno != 20 && stateno != 100
trigger1 = (p2movetype != A) && statetype != A && ctrl
trigger1 = (p2bodydist x = [40,150]) ;&& (p2bodydist y = [-100,0])
trigger1 = random < 700 && enemy,vel x <= 0 

[State -1, AI Run Bwd]
type = ChangeState
value = 105
triggerall = var(59)=1
triggerall = stateno != 105 && backedgedist > 50 && p2movetype != A && enemy,vel x <= 0
trigger1 = frontedgedist < 70 && statetype = S && ctrl && random < 80
trigger2 = p2statetype = L && statetype = S && ctrl && random < 80 && (p2bodydist x = [0,40])

[State -1, AI Stand to Crouch Guard Transition]
type = ChangeState
triggerall = var(59)=1
triggerall = stateno != [100,105]
triggerall = inguarddist && StateType != A && P2statetype = C && P2Movetype = A
triggerall = Pos Y != [-1,-999]
trigger1 = stateno = 150
trigger1 = 1
value = 152

[State -1, AI Crouch to Stand Guard Transition]
type = ChangeState
triggerall = var(59)=1
triggerall = (stateno != [100,105]) && Statetype != A && P2statetype != C && P2Movetype = A
trigger1 = 1
trigger1 = stateno = 152
value = 150

[State -1]
type = ChangeState
triggerall = var(59)=1
triggerall = stateno != [100,105]
triggerall = (Ctrl) && (p2movetype = A) && (statetype = A)
trigger1 = (p2bodydist X <= 500) && (random <= 800)
value = 132

[State -1]
type = ChangeState
triggerall = var(59)=1
triggerall = stateno != [100,105]
triggerall = (Ctrl) && (p2movetype = A) && (statetype = C)
trigger1 = (p2bodydist X <= 500) && (random <= 800)
value = 131

[State -1]
type = ChangeState
triggerall = var(59)=1
triggerall = stateno != [100,105]
triggerall = (Ctrl) && (p2movetype = A) && (statetype = S) && (p2statetype != C)
trigger1 = (p2bodydist X <= 500) && (random <= 800)
value = 130

[State -1, AI Kick Counter]
type = ChangeState
value = 1070
triggerall = var(59) = 1
triggerall = stateno != [3900, 3914]
Triggerall = power>=500
triggerall = stateno != 1070
triggerall = p2bodydist x = [0,30]
triggerall = p2bodydist y = [-5,5]
triggerall = P2MoveType = A
trigger1 = stateno >= 150 && stateno <= 153


[State -1,AI.Sair.do.Voa]
type = ChangeState
triggerall = var(59) = 1
triggerall = stateno = 2000
triggerall = MoveType != A 
trigger1 = p2statetype = S
trigger1 = p2bodydist Y > 30
value = 50
ctrl = 1

[State -1, AI Throw]
type = ChangeState
value = 800
triggerall = var(59)=1
triggerall = random <= 30*var(59)
triggerall = statetype != A
triggerall = p2statetype != A && p2statetype!=L
triggerall = ctrl || stateno=20
triggerall = stateno != [200,9999]
Triggerall = (RoundState = 2)
triggerall = (p2MoveType != H)
trigger1 = p2bodydist X < 25 && p2dist y <= 0
trigger2 = (p2stateno =[120,150]) &&(p2bodydist X < 25 && p2dist y <= 0)

[State -1, AI5]
Type = ChangeState
Triggerall = (RoundState = 2) && (var(59)=1)
Triggerall = StateType !=A
triggerall = stateno != [800,3999]
Triggerall = (P2BodyDist Y = [-85,0])&&enemy,vel y >=0
Triggerall = Random <= 600
triggerall = p2bodydist x = [0,25]
triggerall = p2statetype != L
triggerall = p2stateno !=[120,150]
triggerall = movetype !=H
Triggerall = stateno !=200
trigger1 = ctrl
trigger2= stateno = 240 && movecontact && animelemtime(2)>0
trigger3= stateno = 250 && movecontact && animelemtime(2)>0
value = 200

[State -1, AI9]
Type = ChangeState
Triggerall = (RoundState = 2) && (var(59) = 1)
triggerall = stateno != [3000,8000]
triggerall = (prevstateno != [3000,8000])
trigger1 = stateno = 200
trigger1 = (animelemtime(3)>0) && movecontact
value = 205

;Stand Strong Punch
;立ち強パンチ
[State -1, AI]
type = ChangeState
value = 201
Triggerall = (RoundState = 2) && (var(59)=1)
Triggerall = StateType !=A
triggerall = stateno != [800,3999]
Triggerall = (P2BodyDist Y = [-85,0])&&enemy,vel y >=0
Triggerall = Random < 300
triggerall = p2statetype != L
triggerall = p2stateno !=[120,150]
Triggerall = stateno !=201
triggerall = movetype !=H
triggerall = p2bodydist x = [0,30]
trigger1 = stateno = 205 && movecontact
 
[State -1, AI9]
Type = ChangeState
Triggerall = (RoundState = 2) && (var(59) = 1)
triggerall = stateno != [3000,8000]
triggerall = (prevstateno != [3000,8000])
trigger1 = stateno = 201
trigger1 = (animelemtime(3)>0) && movecontact
value = 220

[State -1, AI9]
Type = ChangeState
Triggerall = (RoundState = 2) && (var(59) = 1)
triggerall = stateno != [3000,8000]
triggerall = (prevstateno != [3000,8000])
trigger1 = stateno = 220
trigger1 = (animelemtime(3)>0) && movecontact
value = 210

[State -1, AI9]
Type = ChangeState
Triggerall = (RoundState = 2) && (var(59) = 1)
triggerall = stateno != [3000,8000]
triggerall = (prevstateno != [3000,8000])
trigger1 = stateno = 210
trigger1 = (animelemtime(3)>0) && movecontact
value = 221


;Jump Light Punch
;空中弱パンチ
[State -1, AI9]
type = ChangeState
value = 600
triggerall = (var(59)=1)
triggerall = statetype = A
triggerall = stateno !=600
triggerall = stateno !=620
triggerall = var(50) =1
triggerall = vel y >=0||p2statetype=A
Triggerall = (P2BodyDist X = [0,60])
triggerall = p2bodydist y = [-30,70]
Triggerall = Random <=400
triggerall = roundstate = 2
trigger1 = ctrl

;Jump Light Kick
[State -1, AI9]
type = ChangeState
value = 610
triggerall = (var(59)=1)
triggerall = statetype = A
triggerall = stateno !=610
triggerall = stateno !=620
triggerall = vel x = 0
triggerall = vel y >=0||p2statetype=A
triggerall = var(50) =1
Triggerall = (P2BodyDist X = [0,60])
triggerall = p2bodydist y = [-30,70]
Triggerall = Random <= 500
triggerall = roundstate = 2
trigger1 = ctrl

[State -1, AI9]
type = ChangeState
value = 620
triggerall = (var(59)=1)
triggerall = statetype = A
triggerall = stateno !=615
triggerall = stateno !=620
triggerall = vel x != 0
triggerall = vel y >=0||p2statetype=A
triggerall = var(50) =1
Triggerall = (P2BodyDist X = [0,60])
triggerall = p2bodydist y = [-30,70]
Triggerall = Random <= 500
triggerall = roundstate = 2
trigger1 = ctrl

[State -1, AI9]
Type = ChangeState
Triggerall = (RoundState = 2) && (var(59)=1)
Triggerall = StateType !=A
triggerall = stateno != [800,3999]
triggerall = stateno != [3000,8000]
triggerall = (prevstateno != [3000,8000])
triggerall = stateno != 310
triggerall = (prevstateno != 310)
Triggerall = Random < 250
triggerall = p2statetype != L
Triggerall = (P2BodyDist Y = [-75,0])
triggerall = p2stateno !=[120,150]
triggerall = p2bodydist x = [0,115]
triggerall = var(11) <= 12
triggerall = movetype !=H ||   ((stateno =[150,153]) && !hitshakeover)
trigger1 = ctrl||   ((stateno =[150,153]) && !hitshakeover)
trigger2= stateno = 201 && movecontact
trigger3= stateno = 220 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact
value = 310

[State -1, KICKS GAME]
type = ChangeState
value = 345
triggerall = var(59) = 1 && roundstate = 2 && statetype !=L
triggerall = (p2stateno!=[120,155]) && (p2statetype!=L)
triggerall = stateno != [3000,8000]
triggerall = (prevstateno != [3000,8000])
triggerall = stateno != 345
triggerall = (prevstateno != 345)
triggerall = p2bodydist x = [0,50]
triggerall = movetype != H
triggerall = stateno !=[800,899]
triggerall = stateno !=440
triggerall = enemynear,statetype !=L  || enemynear,stateno!=5120
trigger1 =ctrl && (random = [12,36])
trigger2 = (stateno= [200,435]) && movehit &&(random = [12,36])
trigger3 = ((stateno= [600,635]) && movecontact &&(random = [12,36])) && (enemy,gethitvar(hitcount) > 2)

[State -1, AI]
type = ChangeState
value = 219
triggerall = var(59) = 1 && StateType != A
triggerall = roundstate = 2
triggerall = stateno != [3000,8000]
triggerall = (prevstateno != [3000,8000])
triggerall = stateno != 219
triggerall = (prevstateno != 219)
triggerall = ((p2bodydist y=[-75,0]) && p2movetype!=H) || ((p2bodydist y=[-55,0]) &&enemy,vel y >=0 && p2movetype=H)
triggerall = p2bodydist x<=40
triggerall = stateno !=[800,4999]
triggerall = p2statetype != L
triggerall = !(EnemyNear,IsHelper)
triggerall = movetype != H ||   ((stateno =[150,153]) && !hitshakeover)
triggerall =(random = [0,40])
triggerall = var(11) <= 12
trigger1 = ctrl||   ((stateno =[150,153]) && !hitshakeover)
trigger2= stateno = 205 && movecontact
trigger3= stateno = 220 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 410 && movecontact
triggerall = p2stateno !=[120,150]

[State -1,JDMKMSH]
type = ChangeState
value = 1050
triggerall = (var(59)=1)
triggerall = pos y <= -92
trigger1 = statetype = A && ctrl && stateno != 672 && (p2bodydist x = [45,80]) 
trigger1 = random <= 100 && var(15) <= 0 
trigger2 = stateno = 610 && animelemtime(3) > 0 && movecontact && p2bodydist y <= 80 && var(15) <= 0

[State -1, AI fireball]
type = ChangeState
value = 1500
triggerall = stateno != [3000,8000]
triggerall = (prevstateno != [3000,8000])
Triggerall = numhelper(1500) < 1
triggerall = (roundstate = 2) && (var(59) = 1)
triggerall = (Ctrl) && (Statetype = S) && (random = [0,100])
trigger1 = ((p2bodydist x >= 90)) && (prevstateno != 5120) && (p2movetype != H) && (statetype != A)

[State -1, AI ki_blast]
type = ChangeState
trigger1 = Ctrl 
trigger1 = RoundState = 2
trigger1 = var(59) =1
triggerall = (prevstateno != [3000,8000])
triggerall = power >=160
trigger1 = p2bodydist X >= 90
trigger1 = Random <= 100
trigger1 = statetype = S 
trigger1 = p2statetype != C
value    = ifelse(random<300,1010,1000)

[State -1, AI dodge]
type = changestate
value = ifelse(random<300,325,1600)
triggerall = roundstate = 2
triggerall = var(59) =1 && StateType != A
triggerall = var(58) = 0
trigger1 =  random < 249
triggerall = p2movetype = A
triggerall=ctrl
triggerall = movetype !=H

[State -1, 50 firebballs / super beam / kienzan] 
type = ChangeState
triggerall = (roundstate = 2) && (var(59) = 1)
triggerall = stateno != [3000,8000]
triggerall = (prevstateno != [3000,8000])
triggerall = (Ctrl=1) && (Statetype != A) && (p2statetype != A)
triggerall = stateno < 4900 ;Add to avoid chaining hypes
trigger1 = prevstateno != 5120
trigger1 = (power = [1000,1500]) && (random = [0,100])
value = ifelse((p2bodydist x = [0,90]),3200,ifelse((p2bodydist x >= 130),1750,1700))

[State -1, kamehamehaaa!!] 
type = ChangeState
triggerall = (roundstate = 2) && (var(59) = 1)
triggerall = stateno != [3000,8000]
triggerall = (prevstateno != [3000,8000])
triggerall = p2bodydist x >95
triggerall = (Ctrl=1) && (Statetype != A) && (p2statetype != A)
triggerall = stateno < 4900 ;Add to avoid chaining hypes
trigger1 = prevstateno != 5120
trigger1 = (power = [1500,2500]) && (random = [0,160])
value = 1800

[State -1, ssj3 meteor]
type = ChangeState
value = 4010
triggerall = (var(59) = 1) && roundstate =2 &&statetype!=A
triggerall = (p2stateno!=[120,155])
triggerall = (enemy,vel y>-1)
triggerall = numhelper(3001) <= 0
triggerall = random < 800
triggerall = life <=200
triggerall = p2statetype != L
trigger1 = ctrl||   ((stateno =[150,153]) && !hitshakeover)

[State -1, genkidama / FSKameha] 
type = ChangeState
triggerall = (roundstate = 2) && (var(59) = 1)
triggerall = stateno != [3000,8000]
triggerall = (prevstateno != [3000,8000])
triggerall = (Ctrl=1) && (Statetype != A) && (p2statetype != A)
triggerall = stateno < 4900 ;Add to avoid chaining hypes
trigger1 = prevstateno != 5120
trigger1 = (power = [2500,3000]) && (random = [0,200])
value = ifelse((p2bodydist x>95),1900,5656)
;===========================================================================
;---------------------------------------------------------------------------
;Hyper Combo
[State -1]
type = ChangeState
value = 4010
triggerall = command = "hcombo"
triggerall = power >= 3000
triggerall = numproj = 0
trigger1 = ctrl = 1
trigger1 = statetype != A

;---------------------------------------------------------------------------
;Teleport
[State -1]
type = ChangeState
value = 1600
triggerall = command = "teleport"
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
;Teleport Back
[State -1]
type = ChangeState
value = 1630
triggerall = command = "teleportb"
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
;3D attack
[State -1]
type = ChangeState
value = 325
triggerall = command = "atack"
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;kameha (up)
[State -1]
type = ChangeState
value = 2500
triggerall = command = "kameup"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;kameha (down)
[State -1]
type = ChangeState
value = 6000
triggerall = command = "kameup"
triggerall = command != "holddown"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
;Kienzan
[State -1]
type = ChangeState
value = 1750
triggerall = command = "kienzan"
triggerall = numproj = 0
triggerall = power >= 500
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
;Combo
[State -1]
type = ChangeState
value = 345
triggerall = command = "combo"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
;fly
[State -1]
type = ChangeState
value = 2000
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger1 = Pos Y < 0
trigger1 = command = "fly"

;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 2000
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger1 = Pos Y < 0
trigger1 = command = "fly"

;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 2000
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger1 = Pos Y < 0
trigger1 = command = "fly"
trigger1 = P2BodyDist Y <= 200

;---------------------------------------------------------------------------
; Knee
[State -1]
type = ChangeState
value = 1120
triggerall = command = "special kick"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
;Hyper Teleport
[State -1]
type = ChangeState
value = 3500
triggerall = command = "ShunGokuSatsu"
triggerall = power >= 3000
triggerall = statetype != A
trigger1 = ctrl = 0

;---------------------------------------------------------------------------
;Genki Dami
[State -1]
type = ChangeState
value = 1900
triggerall = command = "genki dami"
triggerall = numproj = 0
triggerall = power >= 3000
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
; fireball atttack
[State -1]
type = ChangeState
value = 3200
triggerall = command = "fireballat"
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
;Air Special Kick
[State -1]
type = ChangeState
value = 1050
triggerall = command = "air special kick"
triggerall = numproj = 0
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
; CHARGE
[State -1]
type = ChangeState
value = 730
triggerall = Power < 3000
triggerall = command = "charge"
triggerall = command = "charge 1"
trigger1 = ctrl = 1
trigger1 = statetype = S
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
; Ki Blast
[State -1]
type = ChangeState
value = 1700
triggerall = command = "KiBlast"
triggerall = power >= 1000
triggerall = stateno != 1700 
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger3 = stateno = 2000

;---------------------------------------------------------------------------
; Kamehameha
[State -1]
type = ChangeState
value = 1800
triggerall = command = "kamehameha"
triggerall = power >= 2000
triggerall = stateno != 1800 
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA
trigger3 = stateno = 2000

;---------------------------------------------------------------------------
; Soms Kamehameha
[State -1]
type = ChangeState
value = 5656
triggerall = Pos Y = 0
triggerall = command = "soms kamehameha"
triggerall = power >= 3000
triggerall = stateno != 5656 
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA

;---------------------------------------------------------------------------
;kameha
[State -1]
type = ChangeState
value = 1503
triggerall = command = "kamez"
triggerall = command != "holddown"
triggerall = numproj = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = StateNo = 2000

;---------------------------------------------------------------------------
;KI Burn
[State -1]
type = ChangeState
value = 1070
triggerall = command = "ki burn"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
;RunFwd
[State -1]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;RunBack
[State -1]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
; Throw
[State -1]
type = ChangeState
value = 800
trigger1 = command = "fwd_b"
trigger1 = statetype = S
trigger1 = stateno != 100
trigger1 = p2movetype != H
trigger1 = p2statetype != A
trigger1 = ctrl = 1
trigger1 = P2bodydist X <= 10

;---------------------------------------------------------------------------
; Triple Fireball
[State -1]
type = ChangeState
value = 1010
triggerall = command = "triple fireball"
triggerall = numproj = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
;Fireball
[State -1]
type = ChangeState
value = 1000
triggerall = command = "fireball"
triggerall = numproj = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000

;---------------------------------------------------------------------------
; Super Pulo
[State -1]
type = ChangeState
value = 300
triggerall = command = "highjump"
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;kick down
[State -1]
type = ChangeState
value = 217
triggerall = command = "kick down"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl = 1
trigger2 = stateno = 2000
trigger3 = stateno = 210
trigger3 = movecontact = 1
trigger4 = stateno = 221
trigger4 = movecontact = 1
trigger5 = stateno = 220
trigger5 = movecontact = 1
trigger6 = stateno = 201
trigger6 = movecontact = 1
trigger7 = stateno = 205
trigger7 = movecontact = 1
trigger8 = stateno = 240
trigger8 = movecontact = 1
trigger9 = stateno = 250
trigger9 = movecontact = 1
trigger10 = stateno = 200
trigger10 = movecontact = 1

;-------------------------------------
;kick down (air)
[State -1]
type = ChangeState
value = 217
triggerall = command = "kick down"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = 600
trigger2 = movecontact = 1
trigger3 = stateno = 610
trigger3 = movecontact = 1
trigger4 = stateno = 620
trigger4 = movecontact = 1

;---------------------------------------------------------------------------
; Kick up
[State -1]
type = ChangeState
value = 218
triggerall = command = "kick up"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000
trigger3 = stateno = 210
trigger3 = movecontact = 1
trigger4 = stateno = 221
trigger4 = movecontact = 1
trigger5 = stateno = 220
trigger5 = movecontact = 1
trigger6 = stateno = 201
trigger6 = movecontact = 1
trigger7 = stateno = 205
trigger7 = movecontact = 1
trigger8 = stateno = 240
trigger8 = movecontact = 1
trigger9 = stateno = 250
trigger9 = movecontact = 1
trigger10 = stateno = 200
trigger10 = movecontact = 1
trigger11 = stateno = 345
trigger11 = movecontact = 1

;---------------------------------------------------------------------------
;Round Kick
[State -1]
type = ChangeState
value = 310
triggerall = command = "fwd_c"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;===========================================================================
;---------------------------------------------------------------------------
;punch close
[State -1]
type = ChangeState
value = 240
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger1 = P2bodydist X <= 15

;---------------------------------------------------------------------------
;kick close
[State -1]
type = ChangeState
value = 250
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger1 = P2bodydist X <= 15

;---------------------------------------------------------------------------
;Stand_X
[State -1]
type = ChangeState
value = 200
triggerall = command = "x"          ;Place name of command here
triggerall = command != "holddown"  ;Standing moves should have this line
 ;The following is true if Player is in stand state, and has control
trigger1 = statetype = S
trigger1 = ctrl = 1
 ;Uncomment the following if you want to be able to do a Stand_A rapidly
;trigger2 = stateno = 200
;trigger2 = time >= 7
trigger2 = stateno = 2000
trigger3 = stateno = 210
trigger3 = movecontact = 1
trigger4 = stateno = 221
trigger4 = movecontact = 1
trigger5 = stateno = 220
trigger5 = movecontact = 1
trigger6 = stateno = 201
trigger6 = movecontact = 1
trigger7 = stateno = 205
trigger7 = movecontact = 1
trigger8 = stateno = 240
trigger8 = movecontact = 1
trigger9 = stateno = 250
trigger9 = movecontact = 1
trigger10 = stateno = 400
trigger10 = movecontact = 1

;---------------------------------------------------------------------------
;Stand_Y
[State -1]
type = ChangeState
value = 205
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000
trigger3 = stateno = 210
trigger3 = movecontact = 1
trigger4 = stateno = 221
trigger4 = movecontact = 1
trigger5 = stateno = 200
trigger5 = movecontact = 1
trigger6 = stateno = 201
trigger6 = movecontact = 1
trigger7 = stateno = 220
trigger7 = movecontact = 1
trigger8 = stateno = 240
trigger8 = movecontact = 1
trigger9 = stateno = 250
trigger9 = movecontact = 1
trigger10 = stateno = 400
trigger10 = movecontact = 1

;---------------------------------------------------------------------------
;Stand_Z
[State -1]
type = ChangeState
value = 201
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000
trigger3 = stateno = 210
trigger3 = movecontact = 1
trigger4 = stateno = 221
trigger4 = movecontact = 1
trigger5 = stateno = 200
trigger5 = movecontact = 1
trigger6 = stateno = 220
trigger6 = movecontact = 1
trigger7 = stateno = 205
trigger7 = movecontact = 1
trigger8 = stateno = 240
trigger8 = movecontact = 1
trigger9 = stateno = 250
trigger9 = movecontact = 1
trigger10 = stateno = 400
trigger10 = movecontact = 1

;---------------------------------------------------------------------------
;Stand_A
[State -1]
type = ChangeState
value = 220
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000
trigger3 = stateno = 210
trigger3 = movecontact = 1
trigger4 = stateno = 221
trigger4 = movecontact = 1
trigger5 = stateno = 200
trigger5 = movecontact = 1
trigger6 = stateno = 201
trigger6 = movecontact = 1
trigger7 = stateno = 205
trigger7 = movecontact = 1
trigger8 = stateno = 240
trigger8 = movecontact = 1
trigger9 = stateno = 250
trigger9 = movecontact = 1
trigger10 = stateno = 400
trigger10 = movecontact = 1

;---------------------------------------------------------------------------
;Stand_B
[State -1]
type = ChangeState
value = 210
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000
trigger3 = stateno = 221
trigger3 = movecontact = 1
trigger4 = stateno = 220
trigger4 = movecontact = 1
trigger5 = stateno = 200
trigger5 = movecontact = 1
trigger6 = stateno = 201
trigger6 = movecontact = 1
trigger7 = stateno = 205
trigger7 = movecontact = 1
trigger8 = stateno = 240
trigger8 = movecontact = 1
trigger9 = stateno = 250
trigger9 = movecontact = 1
trigger10 = stateno = 400
trigger10 = movecontact = 1

;---------------------------------------------------------------------------
;Stand_C
[State -1]
type = ChangeState
value = 221
triggerall = command = "c"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 2000
trigger3 = stateno = 210
trigger3 = movecontact = 1
trigger4 = stateno = 220
trigger4 = movecontact = 1
trigger5 = stateno = 200
trigger5 = movecontact = 1
trigger6 = stateno = 201
trigger6 = movecontact = 1
trigger7 = stateno = 205
trigger7 = movecontact = 1
trigger8 = stateno = 240
trigger8 = movecontact = 1
trigger9 = stateno = 250
trigger9 = movecontact = 1
trigger10 = stateno = 400
trigger10 = movecontact = 1

;---------------------------------------------------------------------------
;Crouch_A
[State -1]
type = ChangeState
value = 400
triggerall = command = "da"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;Crouch_B
[State -1]
type = ChangeState
value = 410
triggerall = command = "db"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;Jump_A
[State -1]
type = ChangeState
value = 600
triggerall = command = "ja"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = 620
trigger2 = movecontact = 1
trigger3 = stateno = 610
trigger3 = movecontact = 1

;---------------------------------------------------------------------------
;Jump_B
[State -1]
type = ChangeState
value = 620
triggerall = command = "jb2"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger1 = vel X != 0
trigger2 = stateno = 600
trigger2 = movecontact = 1
trigger3 = stateno = 610
trigger3 = movecontact = 1

;---------------------------------------------------------------------------
;Jump_B
[State -1]
type = ChangeState
value = 610
triggerall = command = "jb"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = stateno = 600
trigger2 = movecontact = 1
trigger3 = stateno = 620
trigger3 = movecontact = 1