; 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, 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, F, x
;
; [Command] ;Half circle back + a
; name = "HCB_a"
; command = ~F, DF, D, B, a
;
; [Command] ;Two quarter circles forward + y
; name = "2QCF_y"
; command = ~D, F, D, 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
;

;-| Super Motions |--------------------------------------------------------
;The following two have the same name, but different motion.
;Either one will be detected by a "command = TripleKFPalm" trigger.
;Time is set to 20 (instead of default of 15) to make the move
;easier to do.
;

[Command]
name = "shinshoryukenEX"
command = ~D, F, D, F,a+b
time = 30
buffer.time=3

[Command]
name = "shinkuhadouA"
command = ~D, F, D, F, x
time = 20
buffer.time=3
[Command]
name = "shinkuhadouC"
command = ~D, F, D, F, y
time = 20
buffer.time=3
[Command]
name = "metsusrk"
command = ~D, F, D, F, x+y
time = 30
buffer.time=3
[Command]
name = "shinkutatsua"
command = ~D, B, D, B, a
time = 30
buffer.time=3
[Command]
name = "shinkutatsub"
command = ~D, B, D, B, b
time = 30
buffer.time=3
[Command]
name = "shinshoryuken"
command = ~D, F, D, F, a
time = 30
buffer.time=3
[Command]
name = "shinshoryuken"
command = ~D, F, D, F, b
time = 30
buffer.time=3
[Command]
name = "shinhadouken"
command = ~D, B, D, F, z
time = 30
buffer.time=3
;-| Special Motions |------------------------------------------------------
[Command]
name = "shoryux"
command = ~F, D, DF, x
time=20
buffer.time=3
[Command]
name = "shoryuEX"
command = ~F, D, DF, x+y
time=20
buffer.time=3
[Command]
name = "shoryuy"
command = ~F, D, DF, y
time=20
buffer.time=3
[Command]
name = "joudana"
command = ~B, D, F, a
time=20
buffer.time=3
[Command]
name = "joudanb"
command = ~B, D, F,b
time=20
buffer.time=3
[Command]
name = "joudanEX"
command = ~B, D, F,a+b
time=20
buffer.time=3
[Command]
name = "hadouEX"
command = ~D, F, x+y
buffer.time=3
[Command]
name = "shakuy"
command = ~B, D, F, y
buffer.time=3
[Command]
name = "shakuxb"
command = /$B, D, F, x
buffer.time=3
[Command]
name = "shakuyb"
command = /$B, D, F, y
buffer.time=3
[Command]
name = "tatsua"
command = ~D, B, a
buffer.time=3
[Command]
name = "tatsuEX"
command = ~D, B,a+b
buffer.time=3
[Command]
name = "tatsub"
command = ~D, B, b
buffer.time=3
[Command]
name = "hadoux"
command = ~D, F, x
buffer.time=3
[Command]
name = "hadouy"
command = ~D, F, y
buffer.time=3
[Command]
name = "hadous"
command = ~D, F, a
time=10
buffer.time=3
[Command]
name = "FF_ab"
command = F, F, a+b
buffer.time=3
[Command]
name = "FF_a"
command = F, F, a
buffer.time=3
[Command]
name = "FF_b"
command = F, F, b
buffer.time=3
;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = ~F, F
time = 5

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



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

[Command]
name = "evade"
command = a+x
time = 1

[Command]
name = "charge"
command = /$b+y
time = 1
[Command]
name = "CD"
command = y+b
time = 1
[Command]
name = "burst"
command = c+z
time = 1

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

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

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

[Command]
name = "up"
command = UB
time = 1

[Command]
name = "up"
command = UF
time = 1

[Command]
name = "a"
command = a
time = 1
buffer.time=2
[Command]
name = "b"
command = b
time = 1
buffer.time=2
[Command]
name = "c"
command = c
time = 1
buffer.time=2
[Command]
name = "x"
command = x
time = 1
buffer.time=2
[Command]
name = "y"
command = y
time = 1
buffer.time=2
[Command]
name = "z"
command = z
time = 1
buffer.time=2
[Command]
name = "start"
command = s
time = 1
;-| ?????????? |-----------------------------------------------------
[Command]
name = "holdfwd"   ;???? (?????????????????????????????)
command = /$F
time = 1
[Command]
name = "holdDfwd"   ;???? (?????????????????????????????)
command = /$DF
time = 1

[Command]
name = "holdback"  ;???? (?????????????????????????????)
command = /$B
time = 1

[Command]
name = "holdup"    ;???? (?????????????????????????????)
command = /$U
time = 1

[Command]
name = "holddown"  ;???? (?????????????????????????????)
command = /$D
time = 1

[Command]
name = "holdxy"
command = /$x+y
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 = "MAX"
command = a+y
time = 1

[Command]
name = "MAX"
command = c
time = 1
;
;--------------------------------------------------------------------------

[Command]
name = "hijump"
command = ~$D, $U
time = 18

[Command]
name = "chargedhijump"
command = ~13$D, $U
[command]
name="fwd"
command=F
time=1
[command]
name="back"
command=B
time=1
[command]
name="up"
command=U
time=1
[command]
name="down"
command=D
time=1
[command]
name="downf"
command=DF
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]

[State -1, Null]
type = Null
triggerall = movehit=1 
triggerall = !helper(10003),var(37)
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = (var(57)<500 || power<1000)||(enemy,backedgebodydist >25 && var(41)=0) || var(41)=[1,4]
triggerall = var(41)=[0,4]
trigger1= (stateno=450 &&p2bodydist x <55||stateno=410||stateno=215) && (var(41)=0)
trigger1 =var(41):=1
trigger1 =var(44):=ifelse(backedgebodydist <50&& p2bodydist x >75,1035,1050)
trigger2= (stateno=1050||stateno=1035)&& (var(41)=1)
trigger2 =var(41):=2
trigger2 =var(44):=0
ignorehitpause=0

[State -1, Null]
type = Null
triggerall = movehit=1 
triggerall = p2stateno!=5120	
triggerall = !helper(10003),var(37)
triggerall = AILevel >6 && p2life <420
triggerall = frontedgedist =[130,220]
triggerall = ((var(57)=[500,999]) && power=[2000,2999] ) || var(41)=[10,13];p2life<750&&
triggerall = var(41)=0|| var(41)=[10,18]
trigger1= (stateno=1025||stateno=1030) && (var(41)=0 )
trigger1 =var(41):=10
trigger1 =var(44):=1055
trigger2= (stateno=1055)&& (var(41)=10)
trigger2 =var(41):=11
trigger2 =var(44):=1010
ignorehitpause=0


[State -1, Null]
type = Null
triggerall = movehit=1 
triggerall = p2stateno!=5120
triggerall = !helper(10003),var(37)	
triggerall = AILevel >6
triggerall = (p2life<750&&var(57)=1000&& power=[2000,2999]  ) || var(41)=[30,38];
triggerall = var(41)=0|| var(41)=[30,38]
trigger1= (stateno=450||stateno=215||stateno=410||stateno=210||stateno=245) && (var(41)=0 || var(41)=30&& prevstateno!=215)
trigger1 =var(41):=30
trigger1 =var(44):=ifelse(var(10)=0,900,220)
trigger2= (stateno=220)&& (var(41)=30)
trigger2 =var(41):=31
trigger2 =var(44):=1050
trigger3= (stateno=1050) && (var(41)=31)
trigger3 =var(41):=32
trigger3 =var(44):=1035
trigger4= (stateno=1035) && (var(41)=32)
trigger4 =var(41):=33
trigger4 =var(44):=1025
trigger5= (stateno=1025) && (var(41)=33||var(41)=36)
trigger5 =var(41):=ifelse(var(57)>300,34,37)
trigger5 =var(44):=ifelse(var(41)=37,2030,1055)
trigger6= stateno=1055 && (var(41)=34)
trigger6 =var(41):=35
trigger6 =var(44):=1000
trigger7= stateno=2030 && (var(41)=37)
trigger7 =var(41):=38
trigger7 =var(44):=0
ignorehitpause=0

[State -1, Null]
type = Null
triggerall = numhelper(1001)
triggerall = !helper(10003),var(37)
triggerall = helper(1001),movecontact=1	
triggerall = AILevel >6
trigger1=var(41)=35;||var(40)=9||
trigger1 =var(41):=36
trigger1 =var(44):=1025
trigger2=var(41)=11;||var(40)=9||
trigger2 =var(41):=12
trigger2 =var(44):=2010


[State -1, AIgh4]
type = ChangeState
value = var(44)
triggerall = var(44)>0
triggerall = var(44)!=var(45) 
triggerall = roundstate=2
triggerall = var(43)=0
triggerall = stateno!=var(44)
trigger1 = (ctrl&& statetype!=A) 
trigger1=var(41)=36||var(41)=37||var(41)=33||var(41)=35 && p2bodydist y >-95||var(41)=10
trigger2=(movehit) && statetype!=A
trigger2=var(41)=30||var(41)=31||var(41)=32||var(41)=34||var(41)=37||var(41)=11||var(41)=12||var(41)=1
trigger3=(movehit && var(57)<200) && statetype!=A
trigger3=var(41)=48

;==============================================================================
;MAX???????????
[State -1, MAX GS]
type = ChangeState
value = 2030
triggerall = AILevel >0
triggerall = (random = [0,449])
triggerall = statetype != A
triggerall = stateno != [800,899]
triggerall = enemy,anim!=5120
triggerall = stateno!=900
triggerall=var(5)=0
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = statetype!=L
triggerall = p2bodydist y<-15|| p2statetype!=A
Triggerall = (RoundState = 2)
triggerall = enemy, anim !=5070
triggerall = (p2bodydist X < 85 && p2movetype=H) || (p2movetype=A&&p2bodydist x =[50,90])
trigger1 = var(10)=0 &&ctrl&&(p2statetype=A||p2movetype=A) ||stateno=101
triggerall = power >= ifelse(var(10)=1,2000,3000)
triggerall = var(57)>=1000 || (var(10)=1 && var(57)<300) || (var(10)=1 && p2life <400)
trigger2 = stateno = 450 && (movecontact&&AILevel<5||movehit&&AILevel>=5) && random <49
trigger3 = StateNo = 410&&(movecontact&&AILevel<5||movehit&&AILevel>=5) && random <49
trigger4 = StateNo = 215 && (movecontact&&AILevel<5||movehit&&AILevel>=5) && random <49
trigger5= stateno = 300 && (movecontact&&AILevel<5||movehit&&AILevel>=5) && var(8)=1
trigger6=(stateno=1025&&movetype=A) && ((movehit&&var(10)=1) && (var(57)<100 && var(10)=1))
trigger7=(stateno=1030&&movetype=A) && ((movehit&&var(10)=1) && (var(57)<100 && var(10)=1))
trigger8=(stateno=1031&&movetype=A) && ((movehit&&var(10)=1) && (var(57)<100 && var(10)=1))
trigger9=(stateno=1050&&movetype=A) && ((movehit&&var(10)=1) && (var(57)<100 && var(10)=1))
trigger10=(stateno=2015&&anim=2011) && ((movehit&&var(10)=1) && (var(57)<250 && var(10)=1))
trigger11=(stateno=2020&&anim=2015) && ((movehit&&var(10)=1) && (var(57)<250 && var(10)=1))
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 2020
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall = (random = [0,399])
triggerall=power>=ifelse(var(10)=1,4000,2000)
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = (P2BodyDist X = [0,50]) 
triggerall =(p2bodydist y =[-40,0]) ||(p2statetype=A&& (p2bodydist y =[-40,-15]))
triggerall = p2statetype !=L
triggerall = statetype!=L
triggerall = var(5)=0
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = var(10)=0 || (var(57)<350&&var(10)=1)
triggerall = var(27)<5
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =ctrl&&(p2statetype=A||p2movetype=A) ||stateno=101
trigger2 = StateNo = 215 && (movecontact&&AILevel<5||movehit&&AILevel>=5) &&movetype=A
trigger3 = stateno = 235 && (movecontact&&AILevel<5||movehit&&AILevel>=5)&&movetype=A
trigger4 = stateno = 400 &&(movecontact&&AILevel<5||movehit&&AILevel>=5) && random<45&&movetype=A
trigger5=(stateno=1025&&movetype=A) && (movehit && ((var(57)>=500 && var(10)=0)||(var(57)<350 && var(10)=1)))
trigger6=(stateno=1030&&movetype=A) && (movehit && ((var(57)>=500 && var(10)=0)||(var(57)<350 && var(10)=1)))
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 2015
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall=power>=ifelse(var(10)=1,ifelse(power<2000,1000,3000),1000)
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = statetype!=L
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
Triggerall = (P2BodyDist X = [0,50]) 
triggerall =(p2bodydist y =[-40,0]) ||(p2statetype=A&& (p2bodydist y =[-40,-15]))
triggerall = (random = [100,249])&&var(20)=1
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(10)=0 || (var(57)<350&&var(10)=1)
triggerall = var(27)<5
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =ctrl&&(p2statetype=A||p2movetype=A) ||stateno=101
trigger2 = StateNo = 215 &&(movecontact&&AILevel<5||movehit&&AILevel>=5) &&movetype=A
trigger3 = stateno = 235 && (movecontact&&AILevel<5||movehit&&AILevel>=5)&&movetype=A
trigger4 = stateno = 400 &&(movecontact&&AILevel<5||movehit&&AILevel>=5) && random<45&&movetype=A
trigger5=(stateno=1025&&movetype=A) && (movehit && ((var(57)>=500 && var(10)=0)||(var(57)<350 && var(10)=1)))
trigger6=(stateno=1030&&movetype=A) && (movehit && ((var(57)>=500 && var(10)=0)||(var(57)<350 && var(10)=1)))
;------------------------------------------------------------------------------
;?????????
[State -1, L KW]
type = ChangeState
value = ifelse(p2bodydist x >150,2010,2000)
triggerall = power >= 1000
triggerall = numhelper(2001)=0
triggerall = var(20)=1
triggerall = random<= ifelse((movecontact&&AILevel<5||movehit&&AILevel>=5),99,ifelse((p2bodydist x>150&&p2movetype=A),55,25))
triggerall = statetype != A
triggerall = var(27)<5
triggerall = statetype!=L
triggerall = stateno!=900
triggerall = var(20)=1
triggerall = var(41)=0 &&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = p2bodydist x >0
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = p2statetype!=L
triggerall = p2movetype!=A||p2bodydist x>85
triggerall = var(5)=0
triggerall = var(10)=0 || (p2life <= (enemy,lifemax/3.6))
triggerall = p2bodydist y =[-75,0]
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=1290))
trigger1 =(ctrl && p2movetype=A) ||(stateno=101)
trigger2= (stateno=1050) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))&& frontedgebodydist <90
trigger3= stateno=450 &&movehit&&var(10)=0
trigger4= (stateno=[1000,1010]) && (animelemtime(5)>1 && animelemtime(6)<6)&& ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger5= stateno=220&&((animelemtime(4)<0&&var(10)=0)) && movehit
;------------------------------------------------------------------------------
;?????
[State -1, MAXACTIVATE]
type = ChangeState
value = ifelse(statetype=A&&var(8)=1,901,900)
triggerall = var(57)>=1000
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = P2BodyDist X = [0,170]
Triggerall = Random < ifelse(p2movetype!=H,1,399)
triggerall = enemy,backedgedist <70
triggerall = p2statetype !=L
triggerall = var(41)=0 &&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall =  (power>=2000 &&var(20)=1) || power>=4000
trigger1 = stateno = 215 && movehit
trigger2 = stateno = 245 && movehit
trigger3 = stateno = 410 && movehit
trigger4 = stateno = 300 && movehit && var(8)=1 && (prevstateno!=[120,155])
trigger5 = stateno = 220 && movehit
trigger6 = stateno = 450 && movehit
trigger7=stateno=210&& movehit
trigger8=stateno=240 && movehit
trigger9 = statetype=A && ctrl&& var(8)=1
;==============================================================================
[State -1, Guard]
type = ChangeState
value = 120
triggerall = movetype !=H
triggerall = roundstate = 2
triggerall = stateno!=[120,155]
triggerall=AILevel>0
triggerall = var(41)=0
triggerall = (statetype!=A)
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
trigger2= prevstateno=5120 && p2movetype=A && p2bodydist x <70
trigger3= stateno=5129 && ctrl&& p2movetype=A && p2bodydist x <70
;????????
[State -1, SC]
type = ChangeState
value = 450
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,60]
triggerall = p2statetype!=A
Triggerall = Random < 450
triggerall = var(41)=0 &&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = helper(10003),var(8)=0
triggerall = p2statetype !=L
triggerall = var(10)=0
trigger1 = StateNo = 205 && (time=[4,5])
trigger2 = stateno = 235 && ((movehit&&AILevel >5)||(movecontact&&AILevel<=5))
trigger3 = StateNo = 400 && (time=[4,5])&&p2bodydist x  <50

;????????
[State -1, SC]
type = ChangeState
value = 220
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,60]
triggerall = p2statetype!=A
Triggerall = Random < 450
triggerall = helper(10003),var(8)=0
triggerall = var(41)=0 &&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = p2statetype !=L
triggerall = p2statetype=C ||var(10)=1
trigger1 = stateno = 215 && movehit && var(57)>=970
trigger2 = p2statetype=C && p2movetype!=A&&var(10)=0&&( ctrl||stateno=20 ||stateno=[101,102])
trigger3=p2bodydist x<30&&p2statetype=C && ( ctrl||stateno=20 ||stateno=[101,102])
;------------------------------------------------------------------------------
;Stand Light Punch
;?§?????p?“?`
[State -1, Stand Light Punch]
type = ChangeState
value =ifelse(p2bodydist x<20,205,200)
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,45]
triggerall = var(27)<5
triggerall = (p2bodydist y= [-55,0]) && enemy,vel y >=0 && p2movetype=A
Triggerall = Random < ifelse(p2statetype=A,150,ifelse(p2bodydist x<30,500,100))
triggerall = p2statetype !=L
triggerall = movetype!=H
triggerall = var(41)=0
triggerall = p2statetype != C && helper(10003),var(14)=1
triggerall  =var(10)=0|| p2movetype!=H
triggerall = p2movetype!=A || (enemy,hitdefattr!=SC,AA,AT)
triggerall = stateno!=900
trigger1= ( ctrl||stateno=20 ||stateno=[101,102])&& helper(10003),var(10)>0&& p2bodydist x <=20
trigger2=( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[21,40]) && p2statetype=A && p2movetype=I&&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0
;----------------------------------------------------------------------------
;?????????
[State -1, Stand Strong Punch]
type = ChangeState
value = ifelse(p2bodydist x<30,215,210)
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
triggerall = var(27)<5
Triggerall = P2BodyDist X = [0,65]
triggerall = (p2bodydist y= [-45,0]) && enemy,vel y >=0 && p2movetype!=A
Triggerall = Random < ifelse(p2statetype=A,150,ifelse((p2bodydist x<31&&p2movetype=H),400,200))
triggerall = p2statetype !=L
triggerall = movetype!=H
triggerall = helper(10003),var(8)=0
triggerall = var(41)=0
triggerall = p2movetype!=A || (enemy,hitdefattr!=SC,AA,AT)
triggerall = p2statetype != C&& helper(10003),var(14)=1
trigger1= ( ctrl||stateno=20 ||stateno=[101,102])&& helper(10003),var(11)>0&& p2bodydist x <=30
trigger2=( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[0,60]) && p2statetype!=A &&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0



;------------------------------------------------------------------------------
;?????????
[State -1, Stand Light Kick]
type = ChangeState
value = ifelse(p2bodydist x<30,235,230)
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,55]
triggerall = var(27)<5 ||(p2statetype=S&&p2bodydist x <30)
Triggerall = Random <ifelse(p2bodydist x<30,350,75)
triggerall = p2statetype !=L
triggerall = helper(10003),var(8)=0
triggerall = movetype!=H
triggerall = var(41)=0
triggerall = p2movetype!=A || (enemy,hitdefattr!=SCA,AA,AT)
triggerall  =var(10)=0|| p2movetype!=H
triggerall = stateno!=900
trigger1= ( ctrl||stateno=20 ||stateno=[101,102])&& helper(10003),var(10)>0&& p2bodydist x <=30
trigger2=( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[31,55]) && p2statetype=A && p2movetype=I&&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0
;---------------------------------------------------------------------------

;?????????
[State -1, Standing Strong Kick]
type = ChangeState
value = ifelse(p2bodydist x<=30,245,240)
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,75]
triggerall = var(27)<5 
triggerall = helper(10003),var(8)=0
triggerall = var(41)=0
triggerall = movetype!=H
triggerall = (p2bodydist y= [-45,0]) && enemy,vel y >=0 && p2movetype!=A
Triggerall = Random < ifelse(p2statetype=A,150,ifelse(p2bodydist x<40&&prevstateno=52&&p2movetype=H,400,200))
triggerall = p2statetype !=L
triggerall = p2movetype!=A || (enemy,hitdefattr!=SCA,AA,AT)
triggerall = p2statetype != C || (p2bodydist x <30)
triggerall  =var(10)=0|| p2movetype!=H
trigger1 =  ( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[30,75]) && p2movetype=I&&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0


[State -1, Taunt]
type = ChangeState
value = 195
triggerall = AILevel >0
triggerall = random<299
triggerall = gametime%30=0
triggerall = enemy,life < (enemy,lifemax/2.25) 
triggerall = life >700 
triggerall = p2statetype = L
triggerall = p2bodydist x >120
triggerall = statetype != A
trigger1 = ctrl
;------------------------------------------------------------------------------
;????????
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,50]
triggerall = p2statetype!=A
triggerall = movetype!=H
Triggerall = Random < 500
triggerall = helper(10003),var(8)=0
triggerall = var(27)<5 
triggerall = var(41)=0
triggerall = p2movetype!=A || (enemy,hitdefattr!=SC,AA,AT)
triggerall = p2statetype !=L
triggerall = stateno!=900
triggerall = movetype!=H
triggerall  =var(10)=0|| (p2movetype=H && (p2stateno!=[120,155]))
trigger1 = ( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[15,45]) && p2statetype!=A && p2movetype=I&&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0
trigger2 = stateno = 430 && movecontact
trigger3= time >= 7 && stateno=400 && random<50

;????????
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,40]
triggerall =  ((P2BodyDist y = [-60,0]) && p2movetype!=H)||p2statetype!=A
triggerall = movetype!=H
Triggerall = Random < ifelse(p2statetype=A,300,100)
triggerall = p2statetype !=L
triggerall = var(27)<5 
triggerall = var(41)=0
triggerall = helper(10003),var(8)=0
triggerall  =var(10)=0|| p2movetype!=H
triggerall = var(16)!=1100
triggerall = p2movetype!=A || (enemy,hitdefattr!=SC,AA,AT)
triggerall = statetype != A
trigger1 =  ( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[25,35]) && p2statetype=A && p2movetype=I&&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0
trigger2 = ctrl&& stateno=900 && p2bodydist x<60
trigger3= ( ctrl||stateno=20 ||stateno=[101,102])&& helper(10003),var(11)>0&& p2bodydist x <35
;------------------------------------------------------------------------------
;????????
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,55]
triggerall = p2statetype!=A
triggerall = var(27)<5 || p2statetype=S
Triggerall = Random < ifelse(p2bodydist x <40,350,150)
triggerall = p2statetype !=L
triggerall = var(41)=0
triggerall = movetype!=H
triggerall = p2movetype!=A || (enemy,hitdefattr!=CA,AA,AT)
triggerall  =var(10)=0 || (p2movetype=H && (p2stateno!=[120,155]))
trigger1 = ( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[0,35]) && p2statetype=S && p2movetype=I&&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0
trigger2=( ctrl||stateno=20 ||stateno=[101,102])&& (helper(10003),var(10)>0||(helper(10003),var(11)>0 &&p2statetype=C))&& p2bodydist x <40
;????????
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,80]
triggerall = p2statetype!=A
triggerall = var(27)<5 || p2statetype=S
Triggerall = Random < ifelse(p2bodydist x >40,150,100)
triggerall = p2statetype !=L
triggerall = stateno!=900
triggerall = var(41)=0
triggerall = helper(10003),var(8)=0
triggerall = movetype!=H
triggerall = p2movetype!=A || (enemy,hitdefattr!=CA,AA,AT)
triggerall  =var(10)=0|| p2movetype!=H
trigger1 =( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[55,80]) && p2statetype=S && p2movetype=I&&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0

;------------------------------------------------------------------------------
;????????
[State -1, Jump Light Punch]
type = ChangeState
value = 600
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = A)
triggerall = stateno != [800,3999]
triggerall = (vel y>0 && (p2statetype=S||p2statetype=C)) || p2statetype=A
triggerall = ((((p2bodydist y=[-30,40])&&p2movetype!=A)||((p2bodydist y=[-30,65])&&p2movetype=A))&&stateno=50)||((((p2bodydist y=[20,25])&&p2movetype!=A)||((p2bodydist y=[20,35])&&p2movetype=A))&&stateno=41) 
triggerall = p2bodydist x = [0,40]
Triggerall = Random < 450
triggerall =p2statetype!=C
triggerall = stateno!=901
triggerall = p2statetype !=L
trigger1 = ctrl

;??????????
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = A)
triggerall = (vel y>0 && (p2statetype=S||p2statetype=C))
triggerall = stateno!=901
triggerall = stateno != [800,3999]
triggerall =p2statetype!=C
triggerall = ((p2bodydist y=[55,75])&&stateno=50)|| ((p2bodydist y=[30,40])&&var(3)=2)
triggerall = p2bodydist x = [0,60]
Triggerall = Random < 500
triggerall = p2statetype !=L
trigger1 = ctrl




;------------------------------------------------------------------------------
;????????
[State -1, Jump Light Kick]
type = ChangeState
value = 630
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = A)
triggerall = stateno != [800,3999]
triggerall = stateno!=901
triggerall = (vel y>0 && (p2statetype=S||p2statetype=C)) || p2statetype=A
triggerall = ((p2bodydist y=[-30,40])&&var(3)!=2)|| ((p2bodydist y=[20,25])&&var(3)=2)
triggerall = p2bodydist x = [-20,40]
Triggerall = Random < 450
triggerall = p2statetype !=L
trigger1 = ctrl

;??????????
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = A)
triggerall = (vel y>0 && (p2statetype=S||p2statetype=C))
triggerall = stateno!=901
triggerall = stateno != [800,3999]
triggerall = ((p2bodydist y=[50,77])&&var(3)!=2)|| ((p2bodydist y=[30,40])&&var(3)=2)
triggerall = p2bodydist x = [-35,70]
Triggerall = Random < 500
triggerall = p2statetype !=L
trigger1 = ctrl

;------------------------------------------------------------------------------
;???????
[State -1, CD]
type = ChangeState
value = 650
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = A)
triggerall = stateno != [800,3999]
triggerall = ((p2bodydist y=[-25,75])&&var(3)!=2)|| ((p2bodydist y=[-10,45])&&var(3)=2)
triggerall = p2bodydist x = [40,75]
Triggerall = Random < ifelse(p2movetype=A,300,75)
triggerall = p2statetype !=L
trigger1 = ctrl
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1025
Triggerall = (RoundState = 2) && (AILevel>0) 
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = (P2BodyDist X = [-5,40]) || (p2statetype=A && p2bodydist x =[0,55])
triggerall =(var(10)=0&&p2bodydist y =[-85,0])||(var(10)=1&&p2bodydist y =[-35,0])
Triggerall = Random < ifelse(var(10)=1,999,ifelse((p2movetype=H&&p2stateno!=[120,155])&&var(10)=0,399,129))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(27)<5
triggerall = var(41)=0
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(( ctrl||stateno=20 ||stateno=[101,102])&&(p2statetype=A||p2movetype=A) )&&helper(10003),var(11)=0&&helper(10003),var(10)=0
trigger2 = StateNo = 215 && (time=[6,8])&&movetype=A
trigger3 = stateno = 235 && (movecontact&&AILevel<5||movehit&&AILevel>=5)&&movetype=A
trigger4 = StateNo = 400 && (time=[4,5]) && random<45&&movetype=A
trigger5= (stateno=1050&&movetype=A) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))&&frontedgedist<40
trigger6=var(10)=1&&p2statetype=A&&p2movetype=H&&ctrl

;?????????
[State -1, S LTAI]
type = ChangeState
value = 1030
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = (P2BodyDist X = [0,45]) || (p2statetype=A && p2bodydist x =[0,65])
triggerall =(p2bodydist y =[-75,0]) ||(p2statetype=A&& (p2bodydist y =[-75,10]))
Triggerall = Random < ifelse(((var(10)||var(20))&&stateno=1025),399,129)
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(41)=0
triggerall = var(27)<5
triggerall = p2statetype!=A || p2movetype=H
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(( ctrl||stateno=20 ||stateno=[101,102])&&(p2movetype=A))&&helper(10003),var(11)=0&&helper(10003),var(10)=0
trigger2 = StateNo = 215 && (time=[6,8])&&movetype=A
trigger3 = stateno = 235 && (movecontact&&AILevel<5||movehit&&AILevel>=5)&&movetype=A
trigger4 = StateNo = 400 && (time=[4,5]) && random<45&&movetype=A
trigger5= (stateno=1050&&movetype=A) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))&&frontedgedist<40

;-----------
[State -1, S LT EX]
type = ChangeState
value = 1031
triggerall = power >=1000
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = (P2BodyDist X = [0,45]) || (p2statetype=A && p2bodydist x =[0,65])
triggerall =(p2bodydist y =[-75,0]) ||(p2statetype=A&& (p2bodydist y =[-75,-5]))
Triggerall = Random < ifelse((p2movetype=H&&p2stateno!=[120,155]),60,40)
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(27)<5
triggerall = helper(10003),var(8)=0
triggerall = var(41)=0
triggerall = p2statetype!=A || p2movetype=H
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl&&(p2statetype=A||p2movetype=A) ||stateno=101)&&helper(10003),var(11)=0&&helper(10003),var(10)=0
trigger2 = StateNo = 215 && (time=[6,8])&&movetype=A
trigger3 = stateno = 235 && (movecontact&&AILevel<5||movehit&&AILevel>=5)&&movetype=A
trigger4 = StateNo = 400 && (time=[4,5]) && random<45&&movetype=A
trigger5= (stateno=1050&&movetype=A) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))&&frontedgedist<40
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1035
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = P2BodyDist X = [0,70]
triggerall =(p2bodydist y =[-65,25]) ||(p2movetype=H &&p2statetype=A&& ((p2bodydist y =[-85,-35])||stateno=[1025,1031]))
Triggerall =Random < 129||var(10)=1||(p2movetype=H&&p2stateno!=[120,155])
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = var(27)<5
triggerall = helper(10003),var(8)=0
triggerall =stateno!=41
triggerall = p2statetype!=C 
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =ctrl&&(enemy,numproj>0) ||stateno=101
trigger2 = stateno = 450 && (movecontact&&AILevel<5||movehit&&AILevel>=5)
trigger3= StateNo = 410&& (time=[4,11])
trigger4= (stateno=1050&&movetype=A) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>300 && var(10)=1)))&&frontedgedist<70
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1040
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = P2BodyDist X = [0,140]
triggerall =(p2bodydist y =[-65,25]) ||(p2movetype=H &&p2statetype=A&& ((p2bodydist y =[-85,-35])||stateno=[1025,1031]))
Triggerall = Random < 129||var(10)=1||(p2movetype=H&&p2stateno!=[120,155])
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(16)=0
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall =stateno!=41
triggerall = helper(10003),var(8)=0
triggerall = var(27)<5
triggerall = p2statetype!=C 
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =ctrl&&(enemy,numproj>0) ||stateno=101
trigger2 = stateno = 450 && (movecontact&&AILevel<5||movehit&&AILevel>=5)
trigger3= StateNo = 410&& (time=[4,11])
trigger4=stateno=220 && var(10)=1 && movehit&&movetype=A
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1041
Triggerall = (RoundState = 2) && (AILevel>0)&&power>=ifelse(Var(10)=1,3000,1000)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = P2BodyDist X = [0,60]
triggerall =(p2bodydist y =[-65,10]) ||(p2movetype=H &&p2statetype=A&& (p2bodydist y =[-65,-25]))
Triggerall = Random < ifelse((var(10)=1&&p2statetype=A &&p2movetype=H),999,ifelse(p2statetype=A &&p2movetype=H&&var(10)=0,199,1))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(27)<5
triggerall = helper(10003),var(8)=0
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = var(16)=0
triggerall= var(20) ||var(10) 
triggerall = p2statetype!=C 
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =ctrl&&(p2statetype=A||enemy,numproj>0) ||stateno=101
trigger2 = stateno = 450 && (movecontact&&AILevel<5||movehit&&AILevel>=5)
trigger3=(stateno=1035&&movetype=A) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>300 && var(10)=1)))&&frontedgedist<80
trigger4=(stateno=1040&&movetype=A) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>300 && var(10)=1)))&&frontedgedist<80
;------------------------------------------------------------------------------
;?????????
[State -1, L DK]
type = ChangeState
value = 1050
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = statetype!=A
Triggerall = P2BodyDist X = [25,55]
triggerall =(p2bodydist y =[-65,0]) ||(p2movetype=H &&p2statetype=A&& ((p2bodydist y =[-70,-45])||stateno=[1025,1031]))
Triggerall = Random < 99
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = helper(10003),var(8)=0
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(27)<5
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl&&(enemy,numproj=0) ||stateno=101) && p2statetype=A
trigger2 = stateno = 450 && (movecontact&&AILevel<5||movehit&&AILevel>=5)
trigger3= StateNo = 410&& (time=[4,11])

;------------------------------------------------------------------------------
;?????????
[State -1, L DK]
type = ChangeState
value = 1055
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = statetype!=A
triggerall = helper(10003),var(8)=0
Triggerall = (P2BodyDist X = [60,115])||(p2movetype=H && p2bodydist x=[0,115])
triggerall =(p2bodydist y =[-65,0]) ||(p2movetype=H &&p2statetype=A&& ((p2bodydist y =[-70,-45])||stateno=[1025,1031]))
Triggerall = Random < ifelse((stateno=1030 ||stateno=300),140,20)
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = var(27)<5
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =ctrl&&(stateno=5120) ||stateno=101
trigger2=(stateno=1025&&movetype=A) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>300 && var(10)=1)))
trigger3=(stateno=1030&&movetype=A) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>300 && var(10)=1)))
trigger4=(stateno=1031 &&animelemtime(3)>=0&&movetype=A) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))
trigger5= stateno=300 &&var(8)=1&&movehit&&frontedgedist<70&&(prevstateno=[120,155])
;------------------------------------------------------------------------------
;?????????
[State -1, L DK]
type = ChangeState
value = 1056
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = P2BodyDist X = [25,75]
triggerall = statetype!=A
triggerall =(p2bodydist y =[-65,0]) ||(p2movetype=H &&p2statetype=A&& ((p2bodydist y =[-70,-45])||stateno=[1025,1031]))
Triggerall = Random < 29
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = var(20)
triggerall = helper(10003),var(8)=0
triggerall = power>=1000
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(27)<5
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =ctrl||stateno=101
trigger2 = stateno = 450 && movehit
trigger3= StateNo = 410&& (time=[4,11])
;------------------------------------------------------------------------
[State -1, AI Throw]
type = ChangeState
value = ifelse(frontedgebodydist <100,800,805)
triggerall = AILevel >0
triggerall = random <= 225
triggerall = statetype = S
triggerall = p2statetype != A
triggerall = ctrl
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = p2statetype!=L
triggerall = (stateno!=[900,901])
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, L BB AI]
type = ChangeState
value = 1000
triggerall = random< 14*AIlevel
triggerall = statetype != A
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1001)=0
triggerall = p2bodydist y =[-55,0]
triggerall = helper(10003),var(8)=0 || p2bodydist x >50
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = stateno!=200 &&stateno!=210 &&stateno!=220 &&stateno!=230 &&stateno!=240&&stateno!=245 
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = helper(10003),var(20)

;??????????
[State -1, S BB AI]
type = ChangeState
value = 1005
triggerall = random< 14*AIlevel
triggerall = statetype != A
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1001)=0
triggerall = p2bodydist y =[-55,0]
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = helper(10003),var(8)=0 || p2bodydist x >110
triggerall = stateno!=200 &&stateno!=210 &&stateno!=220 &&stateno!=230 &&stateno!=240&&stateno!=245 
triggerall = p2bodydist x >70
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = helper(10003),var(21)

;??????????
[State -1, S BB AI]
type = ChangeState
value = 1010
triggerall = random< 50
triggerall = p2bodydist x >70
triggerall = statetype != A
Triggerall = (RoundState = 2) && (AILevel>0)&&power>=1000&&var(20)
triggerall = numhelper(1001)=0
triggerall = (p2bodydist y =[-75,-35]) || p2statetype!=A
triggerall = p2statetype!=C
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall = helper(10003),var(8)=0 || p2bodydist x >70
triggerall = p2statetype!=L
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 =((ctrl && var(10)=0&&enemy,numproj>0) ||(stateno=101))&&(var(19)=1||var(17)<=10)
trigger2 = StateNo = 215 && (time=[6,8])
trigger3 = stateno = 410 &&(movecontact&&AILevel<5||movehit&&AILevel>=5)
trigger4 = stateno=450 && movehit && (var(57)=1000&&var(10)=0&&power>=3000)

;---------------------------------------------------------------------------
;?????
[State -1, T S]
type = ChangeState
value = 710
triggerall = random <ifelse(((p2bodydist x <40)||numproj >0),150,99)
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = backedgebodydist >100
triggerall = statetype != A
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
trigger1 = (p2movetype=A&&enemy,numproj =0)&&ctrl
trigger2 = power >= 1000
trigger2 = (stateno = 150||stateno=152) && p2bodydist x <75&& p2bodydist x <60&& (p2stateno=[1000,4999])
trigger3 = (stateno = [100,102]) && p2movetype=A
;---------------------------------------------------------------------------
;?????
[State -1, T S]
type = ChangeState
value = 700
triggerall = random <ifelse(((p2bodydist x <40)||numproj >0),150,99)
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = backedgebodydist <50 || enemy,numproj >0
triggerall = statetype != A
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
trigger1 = (p2movetype=A || enemy,numproj >0)&&ctrl
trigger2 = power >= 1000
trigger2 = (stateno = 150||stateno=152) && p2bodydist x <75&& p2bodydist x <60&& (p2stateno=[1000,4999])
trigger3 = (stateno = [100,102]) && p2movetype=A
;---------------------------------------------------------------------------
;??
[State -1, UKEMI]
type = ChangeState
value = 52000
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall= random <ifelse((enemy,hitdefattr=SCA,SA,HA),75,700)
triggerall = alive = 1
trigger1 = stateno = 5050
trigger1 = pos y > -2
trigger1 = vel y > 0 && vel y < 9

;------------------------------------------------------------------------------
;?????
[State -1, BLOWBACKAI]
type = ChangeState
value = 300
triggerall = random <ifelse((enemy,hitdefattr=SCA,SA,HA),500,49)
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = p2bodydist x<50
triggerall = p2statetype!=L
triggerall = var(41)=0&&helper(10003),var(11)=0&&helper(10003),var(10)=0
triggerall =life <= (lifemax/2.25)
trigger1 = statetype != A
trigger1 = (ctrl ||stateno=101) && p2statetype=A &&( p2bodydist x =[45,75])&&enemy,vel x >4
trigger2 = power >= 1000
trigger2 = (stateno = [150,153])&& p2bodydist x <60&& (p2stateno=[1000,4999])

;-------------------------------------------------
[state -1, AI jump]
type = changestate
triggerall = stateno!=[40,51]
triggerall = statetype!=A
triggerall = roundstate = 2
triggerall = AILevel>0
triggerall = var(10)=0|| p2movetype!=H
trigger1= var(30)=1&&ctrl
value = 40


[State -1, AI run]
type=changestate
value=100
triggerall = roundstate = 2
triggerall = var(58)!=2
triggerall=AILevel>0 && statetype!=A && ctrl
triggerall = (stateno!=[100,105])
triggerall = p2bodydist y =[-150,0]
triggerall = var(41)=0
triggerall = var(10)=0 || p2movetype!=H
triggerall = p2stateno!=834 || p2bodydist x >80
trigger1= (p2movetype!=A&&p2statetype!=L||numproj>0) && (p2bodydist x=[150,788])&& random < 99
trigger2= ((p2stateno=[1360,1361])||stateno=1151)&& p2bodydist x >65&& random < 149

[State -1, AI run]
type=changestate
value=20
triggerall = roundstate = 2
triggerall = p2stateno!=834 || p2bodydist x >80
triggerall=AILevel>0 && statetype=S && ctrl && random < 249
triggerall = var(10)=0 || p2movetype!=H
triggerall=p2statetype!=L
triggerall = var(41)=0
trigger1= (stateno!=[20,105]) && p2movetype!=A && (p2bodydist x=[20,149])

[State -1, AIRun Back]
type = ChangeState
value = 105
triggerall = AILevel>0
triggerall = stateno !=105
triggerall = statetype != A
triggerall = (p2stateno!=1151&& p2stateno!=1360&&p2stateno!=1361&&(p2stateno!=[1290,1292]))
triggerall = random < 79
triggerall = var(41)=0
triggerall = roundstate = 2
triggerall = ctrl
trigger1 = ((p2statetype =L&&(p2stateno!=1151 && p2stateno!=1360&&p2stateno!=1361)) || p2movetype = A) && (p2bodydist x=[-99,20])
;---------------------------------------------------------------------------

;Shin Shouryuu Ken LDM
[State -1, Metsu Shouryuu Ken EX]
type = ChangeState
value = 2030
triggerall = command = "metsusrk" 
triggerall = power >= ifelse(var(10)=1,2000,3000)
triggerall = var(57)>=1000 || (var(10)=1 && var(57)>0)
triggerall = AILevel=0
triggerall = roundstate=2
triggerall= statetype != A
trigger1 = ctrl ||(stateno=101)
trigger2 = StateNo = 205 &&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10= (stateno=1025&&movetype=A) && ( (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ( (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&&movetype=A) && ((movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13= (stateno=1035&&movetype=A) && ( (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger14= (stateno=1040&&movetype=A) && ( (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger15=stateno=200 && var(10)=1&&movecontact 
trigger16=stateno=210 && var(10)=1&&movecontact
trigger17=stateno=230 && var(10)=1&&movecontact
trigger18=stateno=240 && var(10)=1&&movecontact
trigger19=stateno=245 && var(10)=1&&movecontact
trigger20=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger21=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger22= (StateNo = 1050&&movetype=A) &&((movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger23= stateno=220&&((animelemtime(4)<0&&var(10)=0)||(var(10)=1)) && movecontact
trigger24= (stateno=[1000,1010]) && (animelemtime(5)>1 && animelemtime(6)<6)
trigger25=(StateNo = 2015||stateno=2020) &&(movecontact) &&var(10)=1
trigger26=stateno=220 && var(10)=1&&movecontact
trigger27=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Shin Shouryuu Ken LDM
[State -1, Shin Shouryuu Ken EX]
type = ChangeState
value = 2020
triggerall = command = "shinshoryukenEX" && Power >= 2000
triggerall = statetype!=A
triggerall = roundstate=2
triggerall = AILevel=0
trigger1 = ctrl ||(stateno=101)
trigger2 = StateNo = 205 &&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13= (stateno=1035&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger14= (stateno=1040&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger15=stateno=200 && var(10)=1&&movecontact
trigger16=stateno=210 && var(10)=1&&movecontact
trigger17=stateno=230 && var(10)=1&&movecontact
trigger18=stateno=240 && var(10)=1&&movecontact
trigger19=stateno=245 && var(10)=1&&movecontact
trigger20=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger21=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger22= (StateNo = 1050&&movetype=A)  &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger23= stateno=220&&((animelemtime(4)<0&&var(10)=0)||(var(10)=1)) && movecontact
trigger24= (stateno=[1000,1010]) && (animelemtime(5)>1 && animelemtime(6)<6)
trigger25=stateno=220 && var(10)=1&&movecontact
trigger26=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Shin Shouryuu Ken LDM
[State -1, Shin Shouryuu Ken]
type = ChangeState
value = 2015
triggerall = command = "shinshoryuken" && Power >= 1000
triggerall = statetype!=A
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101)
trigger2 = StateNo = 205&&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13= (stateno=1035&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger14= (stateno=1040&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger15=stateno=200 && var(10)=1&&movecontact
trigger16=stateno=210 && var(10)=1&&movecontact
trigger17=stateno=230 && var(10)=1&&movecontact
trigger18=stateno=240 && var(10)=1&&movecontact
trigger19=stateno=245 && var(10)=1&&movecontact
trigger20=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger21=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger22= (StateNo = 1050&&movetype=A)  &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger23= stateno=220&&((animelemtime(4)<0&&var(10)=0)||(var(10)=1)) && movecontact
trigger24= (stateno=[1000,1010]) && (animelemtime(5)>1 && animelemtime(6)<6)
trigger25=stateno=220 && var(10)=1&&movecontact
trigger26=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Shinkuu Hadou Ken DM
[State -1, Shinkuu Hadou Ken DM]
type = ChangeState
value = ifelse( command = "shinkuhadouA",2000,2010)
triggerall = (command = "shinkuhadouA"||command = "shinkuhadouC") && Power >= 1000
triggerall = statetype!=A
triggerall = roundstate=2
triggerall = AILevel=0
trigger1 = ctrl ||(stateno=101)
trigger2 = StateNo = 205 &&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13= (stateno=1035&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger14= (stateno=1040&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger15=stateno=200 && var(10)=1&&movecontact
trigger16=stateno=210 && var(10)=1&&movecontact
trigger17=stateno=230 && var(10)=1&&movecontact
trigger18=stateno=240 && var(10)=1&&movecontact
trigger19=stateno=245 && var(10)=1&&movecontact
trigger20=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger21=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger22=( StateNo = 1050&&movetype=A) &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger23= stateno=220&&((animelemtime(4)<0&&var(10)=0)||(var(10)=1)) && movecontact
trigger24= (stateno=[1000,1010]) && (animelemtime(5)>1 && animelemtime(6)<6)&& ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger25=stateno=220 && var(10)=1&&movecontact
trigger26=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;===========================================================================



;---------------------------------------------------------------------------
;EX Tatsumaki Senpuu Kyaku
[State -1, EX Tatsumaki Senpuu Kyaku]
type = ChangeState
value = 1041
triggerall = command = "tatsuEX"
triggerall = power>=1000
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13= (stateno=1035&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger14= (stateno=1040&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger15=stateno=200 && var(10)=1&&movecontact
trigger16=stateno=210 && var(10)=1&&movecontact
trigger17=stateno=230 && var(10)=1&&movecontact
trigger18=stateno=240 && var(10)=1&&movecontact
trigger19=stateno=245 && var(10)=1&&movecontact
trigger20=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger21=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger22= ((StateNo = 1050 || stateno=1055)&& movetype=A) &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger23=stateno=220 && var(10)=1&&movecontact
trigger24=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Weak Shakunetsu Hadou Ken
[State -1,EX Shoryuken]
type = ChangeState
value = 1031
triggerall = command = "shoryuEX" || command = "hadouEX"&& StateNo = 100 
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = power>=1000
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10= (stateno=1025&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=stateno=200 && var(10)=1&&movecontact
trigger13=stateno=210 && var(10)=1&&movecontact
trigger14=stateno=230 && var(10)=1&&movecontact
trigger15=stateno=240 && var(10)=1&&movecontact
trigger16=stateno=245 && var(10)=1&&movecontact
trigger17=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger18=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger19= ((StateNo = 1050 || stateno=1055)&& movetype=A) &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger20=stateno=220 && var(10)=1&&movecontact
trigger21=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Weak Shakunetsu Hadou Ken
[State -1, EX Hadou Ken]
type = ChangeState
value = 1010
triggerall = command = "hadouEX" 
triggerall = statetype != A
triggerall = AILevel=0
triggerall = numhelper(1001)=0
triggerall = roundstate=2
triggerall = power>=1000
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10= (stateno=1025&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger18=stateno=245 && var(10)=1&&movecontact
trigger19=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger20=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger21=stateno=220 && var(10)=1&&movecontact
trigger22=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger23= ((StateNo = 1050 || stateno=1055)&& movetype=A) &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;weak Joudan Sokutou Geri
[State -1, EX Joudan Sokutou Geri]
type = ChangeState
value = 1056
triggerall = command = "joudanEX" 
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = power >=1000
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10=stateno=200 && var(10)=1&&movecontact
trigger11=stateno=210 && var(10)=1&&movecontact
trigger12=stateno=230 && var(10)=1&&movecontact
trigger13=stateno=240 && var(10)=1&&movecontact
trigger14=stateno=245 && var(10)=1&&movecontact
trigger15=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger16=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger17= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger18= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19= (stateno=1031&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger20= (StateNo = 1050&& movetype=A) &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21=stateno=220 && var(10)=1&&movecontact
trigger22=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Weak Shouryuu Ken
[State -1, Weak Shouryuu Ken]
type = ChangeState
value = 1025
triggerall = command = "shoryux" || command = "hadoux" && StateNo = 100
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10=stateno=200 && var(10)=1&&movecontact
trigger11=stateno=210 && var(10)=1&&movecontact
trigger12=stateno=230 && var(10)=1&&movecontact
trigger13=stateno=240 && var(10)=1&&movecontact
trigger14=stateno=245 && var(10)=1&&movecontact
trigger15=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger16=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger17= (StateNo = 1050&& movetype=A) &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger18=stateno=220 && var(10)=1&&movecontact
trigger19=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Strong Shouryuu Ken
[State -1, Strong Shouryuu Ken]
type = ChangeState
value = 1030
triggerall = command = "shoryuy" || command = "hadouy" && StateNo = 100
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205&&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10=stateno=200 && var(10)=1&&movecontact
trigger11=stateno=210 && var(10)=1&&movecontact
trigger12=stateno=230 && var(10)=1&&movecontact
trigger13=stateno=240 && var(10)=1&&movecontact
trigger14=stateno=245 && var(10)=1&&movecontact
trigger15=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger16=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger17= (StateNo = 1050&& movetype=A) &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger18=stateno=220 && var(10)=1&&movecontact
trigger19=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;weak Joudan Sokutou Geri
[State -1, weak Joudan Sokutou Geri]
type = ChangeState
value = 1055
triggerall = command = "joudanb" 
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205&&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10=stateno=200 && var(10)=1&&movecontact
trigger11=stateno=210 && var(10)=1&&movecontact
trigger12=stateno=230 && var(10)=1&&movecontact
trigger13=stateno=240 && var(10)=1&&movecontact
trigger14=stateno=245 && var(10)=1&&movecontact
trigger15=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger16=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger17= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger18= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19= (stateno=1031&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger20=stateno=220 && var(10)=1&&movecontact
trigger21=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;weak Joudan Sokutou Geri
[State -1, weak Joudan Sokutou Geri]
type = ChangeState
value = 1050
triggerall = command = "joudana" 
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10=stateno=200 && var(10)=1&&movecontact
trigger11=stateno=210 && var(10)=1&&movecontact
trigger12=stateno=230 && var(10)=1&&movecontact
trigger13=stateno=240 && var(10)=1&&movecontact
trigger14=stateno=245 && var(10)=1&&movecontact
trigger15=stateno=410 && animelemtime(5)>0
trigger16=stateno=440 && animelemtime(5)>0 
trigger17= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger18= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19= (stateno=1031&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger20=stateno=220 && var(10)=1&&movecontact
trigger21=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Weak Tatsumaki Senpuu Kyaku
[State -1, Weak Tatsumaki Senpuu Kyaku]
type = ChangeState
value = 1035
triggerall = command = "tatsua"
triggerall = AILevel=0
triggerall = roundstate=2
triggerall =stateno!=41
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>=0
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && var(10)=1&&movecontact
trigger18=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger19=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger20= ((StateNo = 1050 || stateno=1055)&& movetype=A) &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21=stateno=220 && var(10)=1&&movecontact
trigger22=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Strong Tatsumaki Senpuu Kyaku
[State -1, Strong Tatsumaki Senpuu Kyaku]
type = ChangeState
value = 1040
triggerall = command = "tatsub"
triggerall = AILevel=0
triggerall = roundstate=2
triggerall =stateno!=41
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 && (time=[4,5])
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && var(10)=1&&movecontact
trigger18=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger19=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger20= ((StateNo = 1050 || stateno=1055)&& movetype=A) &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21=stateno=220 && var(10)=1&&movecontact
trigger22=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Weak Hadou Ken
[State -1, Weak Hadou Ken]
type = ChangeState
value = 1000
triggerall = command = "hadoux"
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = numhelper(1001)=0
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 && (time=[4,5])
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10= (stateno=1025&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && var(10)=1&&movecontact
trigger18=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger19=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger20=stateno=220 && var(10)=1&&movecontact
trigger21=stateno=300&& ((movetype=A && animelemtime(4)>1)||movecontact)
trigger22= ((StateNo = 1050 || stateno=1055)&& movetype=A) &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))

;---------------------------------------------------------------------------
;Strong Hadou Ken
[State -1, Weak Hadou Ken]
type = ChangeState
value = 1005
triggerall = command = "hadouy"
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = numhelper(1001)=0
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 && (time=[4,5])
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = StateNo = 440&& animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(4)>0
trigger10= (stateno=1025&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&& movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && var(10)=1&&movecontact
trigger18=stateno=410 && animelemtime(5)>1 && animelemtime(7)<0
trigger19=stateno=440 && animelemtime(5)>1 && animelemtime(7)<0
trigger20=stateno=220 && var(10)=1&&movecontact
trigger21=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger22= ((StateNo = 1050 || stateno=1055)&& movetype=A) &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))

;===========================================================================
;---------------------------------------------------------------------------
;?????
[State -1, T S]
type = ChangeState
value = 710
triggerall = command = "evade" && command = "holdback"
triggerall = AILevel=0
trigger1 = statetype = S
trigger1 = ctrl ||stateno=101
trigger2 = power >= 1000
trigger2 = stateno = [150,151]

;---------------------------------------------------------------------------
;?????
[State -1, T S]
type = ChangeState
value = 700
triggerall = command = "evade"
triggerall = AILevel=0
trigger1 = statetype = S
trigger1 = ctrl ||stateno=101
trigger2 = power >= 1000
trigger2 = stateno = [150,151]
trigger3 = stateno = 100

;---------------------------------------------------------------------------
;??
[State -1, UKEMI]
type = ChangeState
value = 52000
triggerall = command = "evade"
triggerall = AILevel=0
triggerall = alive = 1
trigger1 = stateno = 5050
trigger1 = pos y > -30
trigger1 = vel y > 0 && vel y < 9


;---------------------------------------------------------------------------
;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

;---------------------------------------------------------------------------
;Punch Throw
[State -1, Punch Throw]
type = ChangeState
value = 800
triggerall = command = "y"
triggerall = statetype = S
triggerall = ctrl
triggerall = AILevel=0
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 25
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H

;---------------------------------------------------------------------------
;Kick Throw
[State -1, Kick Throw]
type = ChangeState
value = 805
triggerall = command = "b"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 25
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H

;------------------------------------------------------------------------------
;?????
[State -1, MAXACTIVATE]
type = ChangeState
value = ifelse(statetype=A,901,900)
triggerall = command = "MAX"
triggerall = var(57)>=1000
triggerall = AILevel=0
trigger1 = ctrl ||stateno=101
trigger2 = StateNo = 205 && (time=[4,5])
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 = StateNo = 245 && (time=[4,16])
trigger6 =StateNo = 400&& animelemtime(2)>0
trigger7 = StateNo = 410&& animelemtime(5)>0
trigger8 = StateNo = 430&& animelemtime(2)>0
trigger9 = StateNo = 440&& animelemtime(5)>0
trigger10 = stateno = 300 && movecontact
trigger11 = stateno = 310 && movecontact
trigger12=StateNo = 200 && (time=[4,5])
trigger13=StateNo = 210 && (time=[8,10])
trigger14=StateNo = 230 && (time=[4,5])
trigger15=StateNo = 240 && (time=[12,13])
trigger16= StateNo = 220 && (time=[13,17])
trigger17= StateNo = 450 && (time=[8,11])

;===========================================================================
;?????
[State -1, Throw]
type = ChangeState
value = 300
triggerall = command = "CD"
triggerall = statetype = S
triggerall = stateno != 100
triggerall = AILevel=0
trigger1 = ctrl ||stateno=101
trigger2 = power >= 1000
trigger2 = stateno = [150,151]
[State -1, Throw]
type = ChangeState
value = 650
triggerall = command = "CD"
triggerall = statetype = A
triggerall = stateno != 100
triggerall = AILevel=0
trigger1 = ctrl ||stateno=101
trigger2 = power >= 1000
trigger2 = stateno = [150,151]

;---------------------------------------------------------------------------
;Stand Forward Punch
[State -1, Stand Forward Punch]
type = ChangeState
value = 220
triggerall = command = "x"
triggerall = command = "holdfwd"
triggerall = command!="holddown"
triggerall = statetype != A
triggerall = AILevel=0
trigger1 = ctrl||stateno=101
trigger2 = StateNo = 205 && (time=[4,5])
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0





;---------------------------------------------------------------------------
;?????????
[State -1, Stand Light Punch]
type = ChangeState
value = ifelse(p2bodydist x<20,205,200)
triggerall = command = "x"
triggerall = AILevel=0
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl ||stateno=101 ||stateno=101
trigger2= time >= 7 && stateno=400

;?????????
[State -1, Stand Strong Punch]
type = ChangeState
value = ifelse(p2bodydist x<30,215,210)
triggerall = command = "y"
triggerall = AILevel=0
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl ||stateno=101




;------------------------------------------------------------------------------
;?????????
[State -1, Stand Light Kick]
type = ChangeState
value = ifelse(p2bodydist x<20,235,230)
triggerall = command = "a"
triggerall = AILevel=0
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl ||stateno=101
trigger2 = StateNo = 430&& animelemtime(2)>0 &&p2bodydist x<=20

;?????????


;?????????
[State -1, Standing Strong Kick]
type = ChangeState
value = ifelse(p2bodydist x<=30,245,240)
triggerall = command = "b"
triggerall = AILevel=0
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl ||stateno=101


;---------------------------------------------------------------------------
;Crouching Strong Diagonal Kick
[State -1, Crouching Strong Diagonal Kick]
type = ChangeState
value = 450
triggerall = command = "b"
triggerall = command = "holddown" && command = "holdfwd"
triggerall = statetype!= A
triggerall = AILevel=0
trigger1 = ctrl||stateno=101
trigger2 = StateNo = 205 && (time=[4,5])
trigger3 = StateNo = 215 &&animelemtime(3)>0
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = StateNo = 410&& animelemtime(5)>0
trigger7 = StateNo = 430&& animelemtime(2)>0

;------------------------------------------------------------------------------
;??
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "start"

triggerall = AILevel=0
trigger1 = statetype != A
trigger1 = ctrl ||stateno=101

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

;????????
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = command = "y"
triggerall = AILevel=0
triggerall = command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl ||stateno=101

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

;????????
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
triggerall = command!="holdfwd"
triggerall = AILevel=0
triggerall = statetype != A
trigger1 = ctrl ||stateno=101

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

;??????????
[State -1, Jump Strong Punch]
type = ChangeState
value =610
triggerall = AILevel=0
triggerall = command = "y"
triggerall = stateno != 105
trigger1 = statetype = A
trigger1 = ctrl 



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

;??????????
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = AILevel=0
triggerall = command = "b"
triggerall = stateno != 105
trigger1 = statetype = A
trigger1 = ctrl 
