; The CMD file.
;
; Two parts: 1. Command definition and  2. State entry
; (state entry is after the commands def section)
;
; 1. Command definition
; ---------------------
; Note: The commands are CASE-SENSITIVE, and so are the command names.
; The eight directions are:
;   B, DB, D, DF, F, UF, U, UB     (all CAPS)
;   corresponding to back, down-back, down, downforward, etc.
; The six buttons are:
;   a, b, c, x, y, z               (all lower case)
;   In default key config, abc are are the bottom, and xyz are on the
;   top row. For 2 button characters, we recommend you use a and b.
;   For 6 button characters, use abc for kicks and xyz for punches.
;
; Each [Command] section defines a command that you can use for
; state entry, as well as in the CNS file.
; The command section should look like:
;
;   [Command]
;   name = some_name
;   command = the_command
;   time = time (optional -- defaults to 15 if omitted)
;
; - some_name
;   A name to give that command. You'll use this name to refer to
;   that command in the state entry, as well as the CNS. It is case-
;   sensitive (QCB_a is NOT the same as Qcb_a or QCB_A).
;
; - command
;   list of buttons or directions, separated by commas.
;   Directions and buttons can be preceded by special characters:
;   slash (/) - means the key must be held down
;          egs. command = /D       ;hold the down direction
;               command = /DB, a   ;hold down-back while you press a
;   tilde (~) - to detect key releases
;          egs. command = ~a       ;release the a button
;               command = ~D, F, a ;release down, press fwd, then a
;          If you want to detect "charge moves", you can specify
;          the time the key must be held down for (in game-ticks)
;          egs. command = ~30a     ;hold a for at least 30 ticks, then release
;   dollar ($) - Direction-only: detect as 4-way
;          egs. command = $D       ;will detect if D, DB or DF is held
;               command = $B       ;will detect if B, DB or UB is held
;   plus (+) - Buttons only: simultaneous press
;          egs. command = a+b      ;press a and b at the same time
;               command = x+y+z    ;press x, y and z at the same time
;   You can combine them:
;     eg. command = ~30$D, a+b     ;hold D, DB or DF for 30 ticks, release,
;                                  ;then press a and b together
;   It's recommended that for most "motion" commads, eg. quarter-circle-fwd,
;   you start off with a "release direction". This matches the way most
;   popular fighting games implement their command detection.
;
; - time (optional)
;   Time allowed to do the command, given in game-ticks. Defaults to 15
;   if omitted
;
; If you have two or more commands with the same name, all of them will
; work. You can use it to allow multiple motions for the same move.
;
; Some common commands examples are given below.
;
; [Command] ;Quarter circle forward + x
; name = "QCF_x"
; command = ~D, DF, F, x
;
; [Command] ;Half circle back + a
; name = "HCB_a"
; command = ~F, DF, D, DB, B, a
;
; [Command] ;Two quarter circles forward + y
; name = "2QCF_y"
; command = ~D, DF, F, D, DF, F, y
;
; [Command] ;Tap b rapidly
; name = "5b"
; command = b, b, b, b, b
; time = 30
;
; [Command] ;Charge back, then forward + z
; name = "charge_B_F_z"
; command = ~60$B, F, z
; time = 10
; 
; [Command] ;Charge down, then up + c
; name = "charge_D_U_c"
; command = ~60$D, U, c
; time = 10
; 

;-| Button Remapping |-----------------------------------------------------
; This section lets you remap the player's buttons (to easily change the
; button configuration). The format is:
;   old_button = new_button
; If new_button is left blank, the button cannot be pressed.
[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

;-| Default Values |-------------------------------------------------------
[Defaults]
; Default value for the "time" parameter of a Command. Minimum 1.
command.time = 30

; Default value for the "buffer.time" parameter of a Command. Minimum 1,
; maximum 30.













command.buffer.time = 1

;-| Super Motions |--------------------------------------------------------
[command]
name = "supergts"
command = ~F,D,B,z
time = 15

[command]
name = "pc"
command = ~D,DF,F,z
time = 15

[command]
name = "clobbering"
command = ~F,D,DF,z
time = 15
;-| Special Motions |------------------------------------------------------
[command]
name = "sw"
command = ~D,DF,F,~b
time = 15

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[command]
name = "exgts"
command = ~F,D,B,y+x
time = 15

[command]
name = "gts"
command = ~F,D,B,~y
time = 15

[command]
name = "gts2"
command = ~F,D,B,~x
time = 15

[command]
name = "gts"
command = ~F,D,B,y
time = 15

[command]
name = "gts2"
command = ~F,D,B,x
time = 15
;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery" ;Required (do not remove)
command = x+y
time = 1

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

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

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

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

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

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "back_x"
command = /$B,x
time = 1

[Command]
name = "back_y"
command = /$B,y
time = 1

[Command]
name = "back_z"
command = /$B,z
time = 1

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

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

[Command]
name = "down_z"
command = /$D,z
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 = "up_x"
command = /$U,x
time = 1

[Command]
name = "up_y"
command = /$U,y
time = 1

[Command]
name = "up_z"
command = /$U,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_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 = "up_a"
command = /$U,a
time = 1

[Command]
name = "up_b"
command = /$U,b
time = 1

[Command]
name = "up_c"
command = /$U,c
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

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

[Command]
name = "downfwd"
command = $DF
time = 1

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

[Command]
name = "downback"
command = $DB
time = 1

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

[Command]
name = "upback"
command = $UB
time = 1

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

[Command]
name = "upfwd"
command = $UF
time = 1

;-| Hold Button |--------------------------------------------------------------
[Command]
name = "hold_x"
command = /x
time = 1

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

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

[Command]
name = "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_s"
command = /s
time = 1

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

[Command]
name = "holddownfwd"
command = /$DF
time = 1

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

[Command]
name = "holddownback"
command = /$DB
time = 1

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

[Command]
name = "holdupback"
command = /$UB
time = 1

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

[Command]
name = "holdupfwd"
command = /$UF
time = 1

;---------------------------------------------------------------------------
; 2. State entry
; --------------
; This is where you define what commands bring you to what states.
;
; Each state entry block looks like:
;   [State -1, Label]           ;Change Label to any name you want to use to
;                               ;identify the state with.
;   type = ChangeState          ;Don't change this
;   value = new_state_number
;   trigger1 = command = command_name
;   . . .  (any additional triggers)
;
; - new_state_number is the number of the state to change to
; - command_name is the name of the command (from the section above)
; - Useful triggers to know:
;   - statetype
;       S, C or A : current state-type of player (stand, crouch, air)
;   - ctrl
;       0 or 1 : 1 if player has control. Unless "interrupting" another
;                move, you'll want ctrl = 1
;   - stateno
;       number of state player is in - useful for "move interrupts"
;   - movecontact
;       0 or 1 : 1 if player's last attack touched the opponent
;                useful for "move interrupts"
;
; Note: The order of state entry is important.
;   State entry with a certain command must come before another state
;   entry with a command that is the subset of the first.  
;   For example, command "fwd_a" must be listed before "a", and
;   "fwd_ab" should come before both of the others.
;
; For reference on triggers, see CNS documentation.
;
; Just for your information (skip if you're not interested):
; This part is an extension of the CNS. "State -1" is a special state
; that is executed once every game-tick, regardless of what other state
; you are in.


; Don't remove the following line. It's required by the CMD standard.
[Statedef -1]
;clobbering
[State -1, clobbering]
type = ChangeState
value = 3100
triggerall = power >= 3000
Triggerall = (RoundState = 2) && AILevel >2
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2movetype!=A
triggerall = ((p2bodydist y = [-45,-25])&&p2statetype=A&&enemy,vel y >=0)||((p2bodydist y = 0)&&p2statetype!=A)
Triggerall = Random <25*AILevel
triggerall = p2statetype !=L
triggerall = ((p2bodydist x =[80,180])&&p2movetype!=H)||((p2bodydist x =[0,120])&&p2movetype=H)
triggerall = enemy, statetype != C
triggerall = p2bodydist y =[-70,0]
triggerall = movetype !=H
trigger1=ctrl
trigger2 = stateno = 1205 && movecontact
trigger3 = stateno = 1200 && movecontact
trigger4 = stateno = 1215 && movecontact
trigger5 = stateno = 1210 && movecontact
trigger6 = stateno = 1220 && movecontact
trigger7 = stateno = 215 && movecontact
trigger8 = stateno = 210 && movecontact
trigger9 = stateno = 240 && movecontact
trigger10 = stateno = 441 && movecontact
trigger11 = stateno = 205 && movecontact
trigger12 = stateno = 211 && movecontact
trigger13 = stateno = 235 && movecontact
trigger14 = stateno = 245 && movecontact
;--------------------------------------------------------------------
;pc
[State -1, pc]
type = ChangeState
value = 3300
triggerall = power >= 1000
triggerall = AILevel>2 && roundstate = 2
triggerall = (p2stateno!=[120,155]) && (p2statetype!=L)
triggerall = ((p2bodydist y = [-45,-25])&&p2statetype=A&&enemy,vel y >=0)||((p2bodydist y = 0)&&p2statetype!=A)
triggerall = stateno !=[800,899]
triggerall =statetype!=A
triggerall = random<19*AILevel
triggerall = p2movetype!=A
triggerall = p2bodydist x =[0,60]
trigger1 = ctrl
trigger2 = stateno = 1205 && movecontact
trigger3 = stateno = 1200 && movecontact
trigger4 = stateno = 1215 && movecontact
trigger5 = stateno = 1210 && movecontact
trigger6 = stateno = 1220 && movecontact
trigger7 = stateno = 215 && movecontact
trigger8 = stateno = 210 && movecontact
trigger9 = stateno = 240 && movecontact
trigger10 = stateno = 441 && movecontact
trigger11 = stateno = 205 && movecontact
trigger12 = stateno = 211 && movecontact
trigger13 = stateno = 235 && movecontact
trigger14 = stateno = 245 && movecontact
;-------------------------------------------------------------------------------
;supergts
[State -1, supergts]
type = ChangeState
value = 3900
triggerall = power >= 1000
triggerall = AILevel >2 && StateType != A
triggerall = roundstate = 2
triggerall = random <= 30*AILevel
triggerall = p2statetype != A
triggerall = ctrl
triggerall = stateno != [200,9999]
Triggerall = (RoundState = 2)
triggerall = (p2MoveType != H)
triggerall = p2statetype!=L
trigger1 = p2bodydist X < 40 && p2dist y <= 0
trigger2 = (p2stateno =[120,150]) &&(p2bodydist X < 40 && p2dist y <= 0)
;-------------------------------------------------------------------------------
;av
[State -1, av]
type = ChangeState
value = 2498
triggerall = roundstate=2
triggerall = random <499
triggerall =  AILevel > 0
triggerall = statetype!=A&&p2statetype=S
triggerall = p2movetype = A
triggerall = movetype!=H
triggerall = stateno !=[800,4999]
triggerall = p2statetype != L
triggerall = p2stateno!=[120,155]
triggerall = p2bodydist x =[0,80]
trigger1 =  ctrl
;-------------------------------------------------------------------------------
;av2
[State -1, av2]
type = ChangeState
value = 2495
triggerall = roundstate=2
triggerall = random <499
triggerall =  AILevel > 0
triggerall = statetype!=A&&p2statetype=C
triggerall = p2movetype = A
triggerall = movetype!=H
triggerall = stateno !=[800,4999]
triggerall = p2statetype != L
triggerall = p2stateno!=[120,155]
triggerall = p2bodydist x =[0,80]
trigger1 =  ctrl
;--------------------------------------------
[State -1, Guard]
type = ChangeState
value = 120
triggerall = movetype !=H
triggerall = roundstate = 2
triggerall = stateno!=[120,155]
triggerall=AILevel>0
triggerall = (statetype!=A)||(statetype=A && p2bodydist x >5)
triggerall =(StateNo !=[200,3999])&&(StateNo != 105)
Triggerall =  Random < (113*AILevel)
triggerall =InGuardDist || enemynear,hitdefattr=SCA,NP,SP,HP || enemynear,hitdefattr = SCA,AA
triggerall =((EnemyNear, movetype=A&& enemynear,hitdefattr!=SCA,AA)||( enemynear,hitdefattr=SCA,NP,SP,HP || enemynear,hitdefattr = SCA,AA))|| enemy,numproj >0
trigger1 = ctrl ||stateno=20
;---------------------------------------------------------------------------
;Stand Light Punch
;立ち弱パンチ
[State -1, Stand Light PunchAI]
type = ChangeState
value = ifelse(p2bodydist x <17,205,200)
Triggerall = (RoundState = 2) && (AILevel > 0)
Triggerall = (StateType = S)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,40]
triggerall = enemy, statetype != C
Triggerall = Random < 70*AILevel
triggerall = p2statetype !=L
triggerall = enemynear,anim!=5120
triggerall = enemy, statetype != A; || (p2movetype= H && (p2bodydist y =[-65,-25])&&enemy,vel y >=0&& AILevel >3)
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && time >= 6
trigger3 = stateno = 205 && time >= 6



;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2AI]
type = ChangeState
value = ifelse(p2bodydist x <17,211,210)
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall =  Random < 70*AILevel
triggerall = p2statetype !=L
triggerall = enemy, statetype != A ;|| (p2movetype= H && (p2bodydist y =[-85,-25])&&enemy,vel y >=0&& AILevel >3)
triggerall = enemynear,anim!=5120
triggerall = p2bodydist x = [0,50]
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 205 && movecontact
trigger7 = stateno = 235 && movecontact
trigger8 = stateno = 245 && movecontact
;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2AI]
type = ChangeState
value = 215
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall =  Random < 55*AILevel
triggerall = p2statetype !=L
triggerall = enemy, statetype != A ;|| (p2movetype= H && (p2bodydist y =[-85,-25])&&enemy,vel y >=0&& AILevel >3)
triggerall = enemynear,anim!=5120
triggerall = p2bodydist x = [65,85]
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 205 && movecontact
trigger7 = stateno = 235 && movecontact
trigger8 = stateno = 245 && movecontact
;---------------------------------------------------------------------------
;Stand Light Kick
;立ち弱キック
[State -1, Stand Light KickAI]
type = ChangeState
value = 230
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType = S)
triggerall = stateno != [800,3999]
Triggerall =  Random < 70*AILevel
triggerall = p2statetype !=L
triggerall = enemy, statetype != A
triggerall = enemynear,anim!=5120
triggerall = p2bodydist x = [0,30]
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 230 && time >= 10

;--------------------------------------------------------
;Stand hard Kick
;立ち弱キック
[State -1, Stand hard KickAI]
type = ChangeState
value = 240
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall =  Random < 70*AILevel
triggerall = p2statetype !=L
triggerall = enemynear,anim!=5120
triggerall =enemy, statetype != A
triggerall = p2bodydist x = [0,60]
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 235 && movecontact
trigger7 = stateno = 205 && movecontact

;--------------------------------------------------------
;Stand hard Kick
;立ち弱キック
[State -1, Stand hard KickAI]
type = ChangeState
value = 241
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall =  Random < 70*AILevel
triggerall = p2statetype !=L
triggerall = enemynear,anim!=5120
triggerall =enemy, statetype != A
triggerall = p2bodydist x = [60,90]
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 205 && movecontact
trigger7 = stateno = 235 && movecontact
trigger8 = stateno = 210 && movecontact
trigger9 = stateno = 240 && movecontact
trigger10 = stateno = 211 && movecontact
trigger11 = stateno = 245 && movecontact


;------------------------------------------------------
[State -1, AI5]
Type = ChangeState
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (P2BodyDist X = [0,35])&&(P2BodyDist Y = 0 )
Triggerall =  Random < 70*AILevel
triggerall = (p2statetype !=L)
triggerall = enemynear,anim!=5120
triggerall = (movetype !=H)
trigger1 = ctrl
value = 400

;------------------------------------------------------
[State -1, AI2]
Type = ChangeState
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall =  (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (P2BodyDist X = [0,50]) &&((P2BodyDist Y = [-70,0] )&&enemy,vel y >=0)
Triggerall = enemy, statetype != A
triggerall = enemynear,anim!=5120
Triggerall = Random < 50*AILevel
triggerall = p2statetype !=L
triggerall = (movetype !=H)
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 235 && movecontact
trigger7 = stateno = 240 && movecontact
trigger8 = stateno = 210 && movecontact
trigger9 = stateno = 211 && movecontact
trigger10 = stateno = 205 && movecontact
value = 410
;------------------------------------------------------
[State -1, AI9]
Type = ChangeState
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = StateType != A
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,40]
triggerall = enemynear,anim!=5120
triggerall = (movetype !=H)
Triggerall = (  Random < 70*AILevel) && (enemy, statetype != A && enemy,statetype !=L)
trigger1 = ctrl
trigger2 = enemy,statetype = S  && ctrl
value = 430



;------------------------------------------------------
[State -1, AI8]
Type = ChangeState
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = StateType != A
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,55]
triggerall = enemynear,anim!=5120
triggerall = (movetype !=H)
Triggerall = (  Random < 70*AILevel) && (enemy, statetype != A && enemy,statetype !=L)
trigger1 = ctrl || (stateno=[100,101])
trigger2 = enemy,statetype = S  && ctrl
trigger3 = stateno = 200 && movecontact
trigger4 = stateno = 230 && movecontact
trigger5 = stateno = 400 && movecontact
trigger6 = stateno = 430 && movecontact
trigger7 = stateno = 235 && movecontact
trigger8 = stateno = 205 && movecontact
value = 440

;---------------------------------------------------------------------------
;Jump Light Punch
;空中弱パンチ
[State -1, AI9]
type = ChangeState
value = 600
triggerall = AILevel >0
triggerall = statetype = A
triggerall = stateno !=610
triggerall = stateno !=640
triggerall = vel y <0 ||p2statetype=A
Triggerall = (P2BodyDist X = [0,50])
Triggerall = Random <= 70*AILevel
triggerall = roundstate = 2
triggerall = stateno!=[100,105]
triggerall= p2bodydist y =[-20,20]
triggerall = p2statetype=A
trigger1 = ctrl





;---------------------------------------------------------------------------
;Jump Strong Punch
[State -1, AI9]
type = ChangeState
value = 610
triggerall = AILevel >0
triggerall = statetype = A
triggerall = stateno !=620
triggerall = stateno !=650
Triggerall = (P2BodyDist X = [0,60])
Triggerall = Random <= 70*AILevel
triggerall = roundstate = 2
triggerall = stateno!=[100,105]
triggerall = movecontact || p2statetype!=A
triggerall = vel y >=0 ||(p2statetype=A)
triggerall= p2bodydist y =[-20,60]
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 630 && movecontact


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

[State -1, AI9]
type = ChangeState
value = 630
triggerall = AILevel >0
triggerall = statetype = A
triggerall = stateno !=610
triggerall = stateno !=640
Triggerall = (P2BodyDist X = [0,65])
Triggerall = Random <= 70*AILevel
triggerall = roundstate = 2
triggerall = stateno!=[100,105]
triggerall= p2bodydist y =[-20,40]
triggerall =(p2statetype=A)
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, AI9]
type = ChangeState
value = 640
triggerall = AILevel >0
triggerall = statetype = A
triggerall = stateno !=620
triggerall = stateno !=650
Triggerall = (P2BodyDist X = [0,70])
Triggerall = Random <= 70*AILevel
triggerall = roundstate = 2
triggerall = stateno!=[100,105]
triggerall = movecontact || p2statetype!=A
triggerall = vel y >=0 ||(p2statetype=A)
triggerall= p2bodydist y =[-20,75]
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 630 && movecontact
trigger4 = stateno = 610 && movecontact
;---------------------------------------------------------------------------
;bthrow
[state -1, fthrow]
Type = changestate
value = 800
triggerall = AILevel >3
triggerall = random <= 30*AILevel
triggerall = statetype != A
triggerall = p2statetype != A
triggerall = ctrl
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)
;---------------------------------------------------------------------------
;throw
[state -1, throw]
Type = changestate
value = 850
triggerall = AILevel >3
triggerall = random <= 30*AILevel
triggerall = statetype != A
triggerall = p2statetype != A
triggerall = ctrl
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)

;-------------------------------------------------------------------------------
;gts
[State -1, gts]
type = ChangeState
value = 1690
triggerall = AILevel >3 && StateType != A
triggerall = roundstate = 2
triggerall = random <= 30*AILevel
triggerall = p2statetype != A
triggerall = ctrl
triggerall = stateno != [200,9999]
Triggerall = (RoundState = 2)
triggerall = (p2MoveType != H)
trigger1 = p2bodydist X < 32 && p2dist y <= 0
trigger2 = (p2stateno =[120,150]) &&(p2bodydist X < 32 && p2dist y <= 0)
;-------------------------------------------------------------------------------
;gts2
[State -1, gts2]
type = ChangeState
value = 1691
triggerall = AILevel >3 && StateType != A
triggerall = roundstate = 2
triggerall = random <= 30*AILevel
triggerall = p2statetype != A
triggerall = ctrl
triggerall = stateno != [200,9999]
Triggerall = (RoundState = 2)
triggerall = (p2MoveType != H)
trigger1 = p2bodydist X < 38 && p2dist y <= 0
trigger2 = (p2stateno =[120,150]) &&(p2bodydist X < 38 && p2dist y <= 0)
;-------------------------------------------------------------------------------
;mtc2
[State -1, mtcAI]
type = ChangeState
value = 1205
triggerall = AILevel>3 && roundstate = 2
triggerall = (p2stateno!=[120,155]) && (p2statetype!=L)
triggerall = ((p2bodydist y = [-55,-25])&&p2statetype=A&&enemy,vel y >=0)||((p2bodydist y = 0)&&p2statetype!=A)
triggerall = stateno !=[800,899]
triggerall =statetype!=A
triggerall = random<13*AILevel
triggerall = p2movetype!=A
triggerall = p2bodydist x =[0,65]
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 215 && movecontact
trigger3 = stateno = 210 && movecontact
trigger4 = stateno = 240 && movecontact
trigger5 = stateno = 441 && movecontact
trigger6 = stateno = 205 && movecontact
trigger8 = stateno = 211 && movecontact
trigger9 = stateno = 235 && movecontact
trigger10 = stateno = 245 && movecontact
;-------------------------------------------------------------------------------
;mtc
[State -1, mtcAI]
type = ChangeState
value = 1200
triggerall = AILevel>3 && roundstate = 2
triggerall = (p2stateno!=[120,155]) && (p2statetype!=L)
triggerall = ((p2bodydist y = [-55,-25])&&p2statetype=A&&enemy,vel y >=0)||((p2bodydist y = 0)&&p2statetype!=A)
triggerall = stateno !=[800,899]
triggerall =statetype!=A
triggerall = random<13*AILevel
triggerall = p2movetype!=A
triggerall = p2bodydist x =[0,85]
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 215 && movecontact
trigger3 = stateno = 210 && movecontact
trigger4 = stateno = 240 && movecontact
trigger5 = stateno = 441 && movecontact
trigger6 = stateno = 205 && movecontact
trigger8 = stateno = 211 && movecontact
trigger9 = stateno = 235 && movecontact
trigger10 = stateno = 245 && movecontact
;-------------------------------------------------------------------------------
;mtcbh2
[State -1, mtcAI]
type = ChangeState
value = 1215
triggerall = AILevel>3 && roundstate = 2
triggerall =random<17*AILevel
trigger1 = stateno = 1200 && ((movecontact&&AILevel <4)|| (movehit&&AILevel >=4))
trigger2 = stateno = 1200 && time > 26
trigger3 = stateno = 1205 && ((movecontact&&AILevel <4)|| (movehit&&AILevel >=4))
trigger4 = stateno = 1205 && time > 20
;-------------------------------------------------------------------------------
;mtcbh
[State -1,mtcAI]
type = ChangeState
value = 1210
triggerall = AILevel>3 && roundstate = 2
triggerall =random<17*AILevel
trigger1 = stateno = 1200 &&  ((movecontact&&AILevel <4)|| (movehit&&AILevel >=4))
trigger2 = stateno = 1200 && time > 26
trigger3 = stateno = 1205 && ((movecontact&&AILevel <4)|| (movehit&&AILevel >=4))
trigger4 = stateno = 1205 && time > 26
;-------------------------------------------------------------------------------
;mtcrh
[State -1, mtcAI]
type = ChangeState
value = 1220
triggerall = AILevel>3 && roundstate = 2
triggerall =random<17*AILevel
trigger1 = stateno = 1210 && time > 18
trigger2 = stateno = 1210 &&  ((movecontact&&AILevel <4)|| (movehit&&AILevel >=4))
trigger3 = stateno = 1215 && time > 14
trigger4 = stateno = 1215 &&  ((movecontact&&AILevel <4)|| (movehit&&AILevel >=4))
;-------------------------------------------------------------------------------
;mtcsweep
;[State -1, mtcAI]
;type = ChangeState
;value = 1230
;triggerall = AILevel>3 && roundstate = 2
;triggerall =random<17*AILevel
;trigger1 = stateno = 1210 && time > 18
;trigger2 = stateno = 1210 &&  ((movecontact&&AILevel <4)|| (movehit&&AILevel >=4))
;trigger3 = stateno = 1215 && time > 14
;trigger4 = stateno = 1215 && ((movecontact&&AILevel <4)|| (movehit&&AILevel >=4))

;-------------------------------------------------------------------------------
;knee
[State -1, kneeAI]
type = ChangeState
value = 1000
triggerall = AILevel >3 && StateType != A
triggerall = roundstate = 2
triggerall = ((p2bodydist y =[-120,-25])&&p2statetype=A) || p2statetype!=A
triggerall = (p2bodydist x=[0,75])|| ((p2bodydist x=[0,90])&& p2statetype=A)
triggerall = stateno !=[800,4999]
triggerall = enemy,stateno !=[800,899]
triggerall = !(EnemyNear,IsHelper)
triggerall = (p2stateno!=[120,159])
triggerall = p2statetype != L
triggerall = movetype != H
triggerall = p2movetype!=I
triggerall=(random < 13*AILevel)
trigger1 = ctrl|| (stateno=[100,101])
trigger2 = stateno = 215 && movecontact
trigger3 = stateno = 210 && movecontact
trigger4 = stateno = 240 && movecontact
trigger5 = stateno = 441 && movecontact
trigger6 = stateno = 205 && movecontact
trigger8 = stateno = 211 && movecontact
trigger9 = stateno = 235 && movecontact
trigger10 = stateno = 245 && movecontact
;-------------------------------------------------------------------------------
;knee2
[State -1, kneeAI]
type = ChangeState
value = 1001
triggerall = AILevel >3 && StateType != A
triggerall = roundstate = 2
triggerall = ((p2bodydist y =[-90,-25])&&p2statetype=A) || p2statetype!=A
triggerall = (p2bodydist x=[0,65])|| ((p2bodydist x=[0,80])&& p2statetype=A)
triggerall = stateno !=[800,4999]
triggerall = enemy,stateno !=[800,899]
triggerall = !(EnemyNear,IsHelper)
triggerall = (p2stateno!=[120,159])
triggerall = p2statetype != L
triggerall = movetype != H
triggerall = p2movetype!=I
triggerall=(random < 13*AILevel)
trigger1 = ctrl|| (stateno=[100,101])
trigger2 = stateno = 215 && movecontact
trigger3 = stateno = 210 && movecontact
trigger4 = stateno = 240 && movecontact
trigger5 = stateno = 441 && movecontact
trigger6 = stateno = 205 && movecontact
trigger8 = stateno = 211 && movecontact
trigger9 = stateno = 235 && movecontact
trigger10 = stateno = 245 && movecontact
;-------------------------------------------------------------------------------
;suicidedive

;-------------------------------------------------------------------------------
[state -1, suicidedive]
Type = changestate
value = 1600
Triggerall = (RoundState = 2) && AILevel >2
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [60,115]
Triggerall = Random <250
triggerall = p2statetype !=L
triggerall = enemy, statetype = A
triggerall = movetype !=H
trigger1 = stateno = 1400 && time > 15
trigger2 = stateno = 1401 && time > 9
;-------------------------------------------------------------------------------
;sw2
[State -1, sw2]
type = ChangeState
value = 1401
Triggerall = (RoundState = 2) && AILevel >2
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2movetype!=A
Triggerall = Random <12*AILevel
triggerall = p2statetype !=L
triggerall = p2bodydist x =[80,140]
triggerall = enemy, statetype != C
triggerall = p2bodydist y =[-70,0]
triggerall = movetype !=H
trigger1=ctrl
;-------------------------------------------------------------------------------
;sw
[State -1, sw]
type = ChangeState
value = 1400
Triggerall = (RoundState = 2) && AILevel >2
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2movetype!=A
Triggerall = Random <8*AILevel
triggerall = p2statetype !=L
triggerall = p2bodydist x =[80,180]
triggerall = enemy, statetype != C
triggerall = p2bodydist y =[-70,0]
triggerall = movetype !=H
trigger1=ctrl
;------------------------------------------------------
; AI ROLL CODE
[State -1, AI]
type=changestate
value=4000
triggerall = AILevel >2 && StateType != A
triggerall = statetype = S
triggerall = roundstate = 2
triggerall = stateno !=4000
triggerall = stateno !=[3000,9999]
triggerall = ((p2bodydist x = [55,755]))
triggerall = random < 6*AILEvel
trigger2 =(EnemyNear, HitDefAttr = SCA,AA)
triggerall=ctrl
trigger1 = ctrl ||  backedgedist <= 20
trigger3 = enemy,numproj >= 1
;-------------------------------------------------
[state -1, AI jump]
type = changestate
triggerall=AILevel>0
triggerall = p2statetype !=L||p2stateno=5120
triggerall = (p2stateno!=[5090,5119]) &&(p2stateno!=[5121,5899])
triggerall = statetype != A
triggerall = var(30)=1
triggerall = random< 25*AILevel || (ctrl && p2movetype=A && p2statetype=C && random<23*AILevel)||(enemy,hitdefattr=SC,AT  && (ctrl||(stateno=130||stateno=120))  && random<35*AILevel)
trigger1 = ctrl && p2movetype=A && p2statetype=C && random<23*AILevel
trigger2 =p2statetype = C && (p2bodydist x = [80,120]) && ctrl&& random<15*AILevel
trigger3= enemy,hitdefattr=SC,AT  && (ctrl||(stateno=130||stateno=120))  && random<25*AILevel
trigger4= p2bodydist x >60 && ctrl&& random<49 && (p2movetype!=A|| enemynear,hitdefattr= SC,AA)
value = 40

[State -1, jump2]
Type = changestate
value = 40000
triggerall = (AILevel >0)
triggerall = statetype !=A
trigger1 = (StateNo = 410) && movehit

[State -1, AI run]
type=changestate
value=100
triggerall = roundstate = 2
triggerall=AILevel>0 && statetype!=A && ctrl
triggerall = (stateno!=[100,105])
triggerall = p2bodydist y =[-150,0]
triggerall = p2bodydist x >80
trigger1= p2movetype!=A && (p2bodydist x=[140,788])&& random < 99
trigger2= p2movetype=H && p2statetype=A && p2bodydist x>40&& random < 399

[State -1, AI run]
type=changestate
value = 20
triggerall = roundstate = 2
triggerall = p2bodydist x >50
triggerall=AILevel>0 && statetype=S && ctrl && random < 249
triggerall = p2movetype!=H
triggerall=p2statetype!=L
trigger1= (stateno!=[20,105]) && p2movetype!=A && (p2bodydist x=[20,139])

[State -1, Taunt]
type = ChangeState
value = 195
triggerall = AILevel >0
triggerall = roundstate=2||winko
triggerall = random<299
triggerall = gametime%30=0
triggerall = enemy,life < (enemy,lifemax/2.25) ||winko
triggerall = life >700 ||winko
triggerall = p2statetype = L
triggerall = p2bodydist x >120
triggerall = statetype != A
trigger1 = ctrl
[State -1, AIRun Back]
type = ChangeState
value = 105
triggerall = AILevel >0
triggerall = stateno !=105
triggerall = statetype != A
triggerall = random <  19*AILevel
triggerall = roundstate = 2
triggerall = ctrl
trigger1 = (p2statetype =L || p2movetype = A) && (p2bodydist x=[-99,15])
;=======================================================================
;clobbering
[State -1, clobbering]
type = ChangeState
value = 3100
triggerall = command = "clobbering"
triggerall = power >= 3000
triggerall = AILevel =0
trigger1 = (statetype != A) && ctrl
trigger2 = stateno = 1205 && movecontact
trigger3 = stateno = 1200 && movecontact
trigger4 = stateno = 1215 && movecontact
trigger5 = stateno = 1210 && movecontact
trigger6 = stateno = 1220 && movecontact
trigger7 = stateno = 215 && movecontact
trigger8 = stateno = 200 && movecontact
trigger9 = stateno = 210 && movecontact
trigger10 = stateno = 230 && movecontact
trigger11 = stateno = 240 && movecontact
trigger12 = stateno = 400 && movecontact
trigger13 = stateno = 410 && movecontact
trigger14 = stateno = 430 && movecontact
trigger15 = stateno = 211 && movecontact

;pc
[State -1, pc]
type = ChangeState
value = 3300
triggerall = command = "pc"
triggerall = power >= 1000
triggerall = AILevel =0
trigger1 = (statetype != A) && ctrl
trigger2 = stateno = 1205 && movecontact
trigger3 = stateno = 1200 && movecontact
trigger4 = stateno = 1215 && movecontact
trigger5 = stateno = 1210 && movecontact
trigger6 = stateno = 1220 && movecontact
trigger7 = stateno = 215 && movecontact
trigger8 = stateno = 200 && movecontact
trigger9 = stateno = 210 && movecontact
trigger10 = stateno = 230 && movecontact
trigger11 = stateno = 240 && movecontact
trigger12 = stateno = 400 && movecontact
trigger13 = stateno = 410 && movecontact
trigger14 = stateno = 430 && movecontact
trigger15 = stateno = 211 && movecontact

;supergts
[State -1, supergts]
type = ChangeState
value = 3900
triggerall = AILevel =0
triggerall = command = "supergts"
triggerall = power >= 1000
trigger1 = (statetype != A) && ctrl

;exmtc
[State -1, exmtc]
type = ChangeState
value = 1204
triggerall = command = "exmtc"
triggerall = power >= 500
triggerall = AILevel <=3
trigger1 = (statetype != A) && ctrl
trigger2 = stateno = 215 && movecontact
trigger3 = stateno = 201 && movecontact
trigger4 = stateno = 200 && movecontact
trigger5 = stateno = 210 && movecontact
trigger6 = stateno = 230 && movecontact
trigger7 = stateno = 240 && movecontact
trigger8 = stateno = 400 && movecontact
trigger9 = stateno = 410 && movecontact
trigger10 = stateno = 430 && movecontact
trigger11 = stateno = 441 && movecontact
trigger12 = stateno = 205 && movecontact
trigger13 = stateno = 211 && movecontact
trigger14 = stateno = 235 && movecontact
trigger15 = stateno = 245 && movecontact

;mtc2
[State -1, mtc2]
type = ChangeState
value = 1205
triggerall = command = "mtc2"
triggerall = AILevel <=3
trigger1 = (statetype != A) && ctrl
trigger2 = stateno = 215 && movecontact
trigger3 = stateno = 201 && movecontact
trigger4 = stateno = 200 && movecontact
trigger5 = stateno = 210 && movecontact
trigger6 = stateno = 230 && movecontact
trigger7 = stateno = 240 && movecontact
trigger8 = stateno = 400 && movecontact
trigger9 = stateno = 410 && movecontact
trigger10 = stateno = 430 && movecontact
trigger11 = stateno = 441 && movecontact
trigger12 = stateno = 205 && movecontact
trigger13 = stateno = 211 && movecontact
trigger14 = stateno = 235 && movecontact
trigger15 = stateno = 245 && movecontact

;mtc
[State -1, mtc]
type = ChangeState
value = 1200
triggerall = command = "mtc"
triggerall = AILevel <=3
trigger1 = (statetype != A) && ctrl
trigger2 = stateno = 215 && movecontact
trigger3 = stateno = 201 && movecontact
trigger4 = stateno = 200 && movecontact
trigger5 = stateno = 210 && movecontact
trigger6 = stateno = 230 && movecontact
trigger7 = stateno = 240 && movecontact
trigger8 = stateno = 400 && movecontact
trigger9 = stateno = 410 && movecontact
trigger10 = stateno = 430 && movecontact
trigger11 = stateno = 441 && movecontact
trigger12 = stateno = 205 && movecontact
trigger13 = stateno = 211 && movecontact
trigger14 = stateno = 235 && movecontact
trigger15 = stateno = 245 && movecontact

;mtcbh2
[State -1, mtcbh2]
type = ChangeState
value = 1215
triggerall = AILevel <=3
triggerall = command = "x"&& command = "holdfwd"
trigger1 = stateno = 1200 && movecontact
trigger2 = stateno = 1200 && time > 26
trigger3 = stateno = 1205 && movecontact
trigger4 = stateno = 1205 && time > 20
trigger5 = stateno = 1204 && movecontact
trigger6 = stateno = 1204 && time > 26

;mtcbh
[State -1, mtcbh]
type = ChangeState
value = 1210
triggerall = AILevel <=3
triggerall = command = "y"&& command = "holdfwd"
trigger1 = stateno = 1200 && movecontact
trigger2 = stateno = 1200 && time > 26
trigger3 = stateno = 1205 && movecontact
trigger4 = stateno = 1205 && time > 26
trigger5 = stateno = 1204 && movecontact
trigger6 = stateno = 1204 && time > 26

;mtcrh
[State -1, mtcrh]
type = ChangeState
value = 1220
triggerall = AILevel <=3
triggerall = command = "b"&& command = "holdfwd"
trigger1 = stateno = 1210 && time > 18
trigger2 = stateno = 1210 && movecontact
trigger3 = stateno = 1215 && time > 14
trigger4 = stateno = 1215 && movecontact

;mtcsweep
[State -1, mtcsweep]
type = ChangeState
value = 1230
triggerall = AILevel <=3
triggerall = command = "a"&& command = "holdfwd"
trigger1 = stateno = 1210 && time > 18
trigger2 = stateno = 1210 && movecontact
trigger3 = stateno = 1215 && time > 14
trigger4 = stateno = 1215 && movecontact

;av
[State -1, av]
type = ChangeState
value = 2498
triggerall = AILevel <=3
triggerall = command = "av"
trigger1 = (statetype != A) && ctrl

;av2
[State -1, av2]
type = ChangeState
value = 2495
triggerall = AILevel <=3
triggerall = command = "av2"
trigger1 = (statetype != A) && ctrl

;exgts
[State -1, exgts]
type = ChangeState
value = 1692
triggerall = AILevel <=3
triggerall = command = "exgts"
triggerall = power >= 500
trigger1 = (statetype != A) && ctrl

;gts
[State -1, gts]
type = ChangeState
value = 1690
triggerall = AILevel <=3
triggerall = command = "gts"
trigger1 = (statetype != A) && ctrl

;gts2
[State -1, gts2]
type = ChangeState
value = 1691
triggerall = AILevel <=3
triggerall = command = "gts2"
trigger1 = (statetype != A) && ctrl

;exknee
[State -1, exknee]
type = ChangeState
value = 1002
triggerall = AILevel <=3
triggerall = command = "exsrk"
triggerall = power >= 500
trigger1 = (statetype != A) && ctrl
trigger2 = stateno = 215 && movecontact
trigger3 = stateno = 201 && movecontact
trigger4 = stateno = 200 && movecontact
trigger5 = stateno = 210 && movecontact
trigger6 = stateno = 230 && movecontact
trigger7 = stateno = 240 && movecontact
trigger8 = stateno = 400 && movecontact
trigger9 = stateno = 410 && movecontact
trigger10 = stateno = 430 && movecontact
trigger11 = stateno = 441 && movecontact
trigger12 = stateno = 205 && movecontact
trigger13 = stateno = 211 && movecontact
trigger14 = stateno = 235 && movecontact
trigger15 = stateno = 245 && movecontact

;knee2
[State -1, knee2]
type = ChangeState
value = 1001
triggerall = AILevel <=3
triggerall = command = "srk2"
triggerall = numproj = 0
trigger1 = (statetype != A) && ctrl
trigger2 = stateno = 215 && movecontact
trigger3 = stateno = 201 && movecontact
trigger4 = stateno = 200 && movecontact
trigger5 = stateno = 210 && movecontact
trigger6 = stateno = 230 && movecontact
trigger7 = stateno = 240 && movecontact
trigger8 = stateno = 400 && movecontact
trigger9 = stateno = 410 && movecontact
trigger10 = stateno = 430 && movecontact
trigger11 = stateno = 441 && movecontact
trigger12 = stateno = 205 && movecontact
trigger13 = stateno = 211 && movecontact
trigger14 = stateno = 235 && movecontact
trigger15 = stateno = 245 && movecontact

;knee
[State -1, knee]
type = ChangeState
value = 1000
triggerall = AILevel <=3
triggerall = command = "srk"
triggerall = numproj = 0
trigger1 = (statetype != A) && ctrl
trigger2 = stateno = 215 && movecontact
trigger3 = stateno = 201 && movecontact
trigger4 = stateno = 200 && movecontact
trigger5 = stateno = 210 && movecontact
trigger6 = stateno = 230 && movecontact
trigger7 = stateno = 240 && movecontact
trigger8 = stateno = 400 && movecontact
trigger9 = stateno = 410 && movecontact
trigger10 = stateno = 430 && movecontact
trigger11 = stateno = 441 && movecontact
trigger12 = stateno = 205 && movecontact
trigger13 = stateno = 211 && movecontact
trigger14 = stateno = 235 && movecontact
trigger15 = stateno = 245 && movecontact

;sw
[State -1, sw]
type = ChangeState
value = 1400
triggerall = AILevel <=3
triggerall = command = "sw"
trigger1 = (statetype != A) && ctrl

;sw2
[State -1, sw2]
type = ChangeState
value = 1401
triggerall = AILevel <=3
triggerall = command = "sw2"
trigger1 = (statetype != A) && ctrl

;launch
[State -1, upfwd]
Type = changestate
value = 40000
triggerall = command = "upfwd" || command = "up"
triggerall = var(59) = 0
trigger1 = (StateNo = 410)
trigger1 = movehit

;suicidedive
[state -1, suicidedive]
Type = changestate
value = 1600
triggerall = AILevel <=3
triggerall = command = "y" && command = "x"
trigger1 = stateno = 100

;runstop
[state -1, runstop]
Type = changestate
value = 101
triggerall = AILevel <=3
triggerall = command = "x" || command = "a"
trigger1 = stateno = 1400 && time > 15
trigger2 = stateno = 1401 && time > 9

;broll
[state -1, broll]
Type = changestate
value = 991
triggerall = (AILevel <= 3)
triggerall = command = "z"
triggerall = command = "holdback"
trigger1 = (statetype != a) && ctrl

;roll
[state -1, roll]
Type = changestate
value = 990
triggerall = (AILevel <= 3)
triggerall = command = "z"
trigger1 = (statetype != a) && ctrl

;bthrow
[state -1, fthrow]
Type = changestate
value = 800
triggerall = (AILevel <= 3)
triggerall = command = "c" && command = "holdback"
trigger1 = (statetype != a) && ctrl

;throw
[state -1, throw]
Type = changestate
value = 850
triggerall = (AILevel <= 3)
triggerall = command = "c"
trigger1 = (statetype != a) && ctrl

;===========================================================================
;---------------------------------------------------------------------------

;===========================================================================
;---------------------------------------------------------------------------
; Air Dash
;[State -1, Air Dash]
;type = ChangeState
;value = 110
;triggerall = pos y <= -35
;trigger1 = command = "FF"
;trigger1 = statetype = a
;trigger1 = ctrl

; Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = AILevel =0
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Run Back
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = AILevel =0
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

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


;===========================================================================
;---------------------------------------------------------------------------
; Taunt
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = AILevel =0
triggerall = command = "s"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Stand Strong Punch 2
[State -1, Stand Strong Punch 3]
type = ChangeState
value = 220
triggerall = command = "x"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
triggerall = AILevel =0
trigger1 = statetype != A
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 205 && movecontact
trigger7 = stateno = 235 && movecontact
trigger8 = stateno = 245 && movecontact

;---------------------------------------------------------------------------
;Stand Strong Punch 2
[State -1, Stand Strong Punch 2]
type = ChangeState
value = 215
triggerall = command = "y"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
triggerall = AILevel =0
trigger1 = statetype != A
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 205 && movecontact
trigger7 = stateno = 235 && movecontact
trigger8 = stateno = 245 && movecontact

;---------------------------------------------------------------------------
; FWD+HK
[State -1, FWD+HK]
type = ChangeState
value = 241
triggerall = command = "b" && command = "holdfwd"
triggerall = command != "holddown"
triggerall = AILevel =0
trigger1 = statetype != A
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 205 && movecontact
trigger7 = stateno = 235 && movecontact
trigger8 = stateno = 210 && movecontact
trigger9 = stateno = 240 && movecontact
trigger10 = stateno = 211 && movecontact
trigger11 = stateno = 245 && movecontact

;---------------------------------------------------------------------------
; Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = AILevel =0
trigger1 = statetype != A
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && time >= 6
trigger3 = stateno = 205 && time >= 6

;---------------------------------------------------------------------------
;Stand Strong Punch
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = command = "y"
triggerall = command != "holddown"
triggerall = AILevel =0
trigger1 = statetype != A
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 205 && movecontact
trigger7 = stateno = 235 && movecontact
trigger8 = stateno = 245 && movecontact

;---------------------------------------------------------------------------
; Stand Light Kick
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = AILevel =0
trigger1 = statetype != A
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 230 && time >= 10

;---------------------------------------------------------------------------
; Standing Strong Kick
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = AILevel =0
trigger1 = statetype != A
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 235 && movecontact
trigger7 = stateno = 205 && movecontact

;---------------------------------------------------------------------------
; Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
triggerall = AILevel =0
triggerall = statetype != A
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 400 && time >= 6

;---------------------------------------------------------------------------
; Crouching Strong Punch
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = command = "y"
triggerall = command = "holddown"
triggerall = AILevel =0
triggerall = statetype != A
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 235 && movecontact
trigger7 = stateno = 240 && movecontact
trigger8 = stateno = 210 && movecontact
trigger9 = stateno = 211 && movecontact
trigger10 = stateno = 205 && movecontact

;---------------------------------------------------------------------------
;Crouching Light Kick
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = AILevel =0
triggerall = statetype != A
trigger1 = ctrl || (stateno=[100,101])

;---------------------------------------------------------------------------
; Crouching Strong Kick
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
triggerall = AILevel =0
triggerall = statetype != A
trigger1 = ctrl || (stateno=[100,101])
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 230 && movecontact
trigger4 = stateno = 400 && movecontact
trigger5 = stateno = 430 && movecontact
trigger6 = stateno = 235 && movecontact
trigger7 = stateno = 205 && movecontact

;---------------------------------------------------------------------------
; Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = command = "x"
triggerall = AILevel =0
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = command = "y"
triggerall = AILevel =0
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 630 && movecontact

;---------------------------------------------------------------------------
; Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = command = "a"
triggerall = AILevel =0
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jump Strong Kick
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = command = "b"
triggerall = AILevel =0
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 630 && movecontact
trigger4 = stateno = 610 && movecontact

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