; 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, DB, 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, B,x+y
time = 30
buffer.time=3
[Command]
name = "SGS"
command = ~x,x,F,a,y
time = 40

[Command]
name = "KKZ"
command = ~D,F,D,F, x+y
time = 30
buffer.time=3
[Command]
name = "DES"
command = ~D, F, D, F, a
time = 30
buffer.time=3
[Command]
name = "DES2"
command = ~D, F, D, F, b
time = 30
buffer.time=3
[Command]
name = "shinshoryuken"
command = ~D,DF, F, D, B, x
time =20
buffer.time=3
[Command]
name = "shinshoryuken"
command = ~D,DF, F, D, B, y
time = 20
buffer.time=3

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

[Command]
name = "shoryuEX"
command = ~F, D,B, x+y
time=20
buffer.time=3
[Command]
name = "joudanEX"
command = ~F, D, DF,a+b
time=20
buffer.time=3
[Command]
name = "hadouEX"
command = ~D, F, x+y
buffer.time=3
[Command]
name = "shakuEX"
command = ~F,B, D, F, x+y
time=20
buffer.time=3
[Command]
name = "shoryux"
command = ~F, D,B, x
time=20
buffer.time=3
[Command]
name = "shoryuy"
command = ~F, D, B, y
time=20
buffer.time=3
[Command]
name = "joudana"
command = ~F, D, DF, a
time=20
buffer.time=3
[Command]
name = "joudanb"
command = ~F, D, DF,b
time=20
buffer.time=3

[Command]
name = "shakuy"
command = ~F,B, D, F, y
time=20
buffer.time=3
[Command]
name = "shakux"
command = ~F,B, D, F, x
time=20
buffer.time=3


[Command]
name = "tatsua"
command = ~D, DF,F, a
buffer.time=3
[Command]
name = "tatsuEX"
command =~D, F,a+b
buffer.time=3
[Command]
name = "tatsub"
command = ~D, DF,F, 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 = "countera"
command = ~D, D, a
time=15
buffer.time=3
[Command]
name = "counterb"
command = ~D, D, b
time=15
buffer.time=3
[Command]
name = "counterex"
command = ~D, D, a+b
time=15
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

[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

[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]

;==============================================================================
;MAX???????????
[State -1, MAX GS]
type = ChangeState
value = 2030+var(0)
triggerall = AILevel >0
triggerall = random <= (449* (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = stateno != [800,899]
triggerall = enemy,anim!=5120
triggerall = stateno!=900
triggerall=var(5)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = statetype!=L
Triggerall = (RoundState = 2)
 triggerall= (var(0)=1&& p2bodydist y =[-75,-35])||var(0)=0
triggerall = enemy, anim !=5070
triggerall = (p2bodydist X < 75 && p2movetype=H&&var(0)=0) || ((p2movetype=A||p2movetype=H)&&var(0)=1)
trigger1 = ctrl&&((p2statetype=A&&p2bodydist y=[-60,-20])||p2movetype=A)&&var(10)=0
triggerall = power >= ifelse(var(10)=1,2000,3000)
triggerall = var(57)>=1000 || (var(10)=1 && var(57)<300) || (var(10)=1 && p2life <400)||(Var(37)=1&&var(10)=1)
trigger2= stateno = 300 && (movecontact&&AILevel<5||movehit&&AILevel>=5) && var(8)=1 && var(0)=1
trigger3=var(37)=1
trigger4 = (StateNo = 410)&& animelemtime(2)>0&&(!moveguarded && p2movetype=A)
trigger5= (stateno=1050&&movetype=A) && (var(57)>0 && var(10)=1)
trigger6= (stateno=[1000,1006]) && (animelemtime(7)>1 && animelemtime(9)<0)
trigger6= numhelper(1001)>0
trigger6= AIlevel <6||p2stateno!=[120,155]
trigger7= (stateno=[1010,1012]) && (animelemtime(12)>1 && animelemtime(14)<0)
trigger8= (stateno=1013) && (animelemtime(15)>1 && animelemtime(16)<2)
trigger9=stateno=220&&((animelemtime(6)<0&&var(10)=0)||(var(10)=1)) && (!moveguarded && p2movetype=A)
trigger10=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)&&var(8)=1
trigger11= stateno=2041&&movetype=A
trigger12= StateNo = 1020&&movetype=A &&( movecontact&&var(10)=1) && (var(57)>0 && var(10)=1)
trigger13= StateNo = 1025&&movetype=A&&( movecontact&&var(10)=1) && (var(57)<50 && var(10)=1)
trigger14= StateNo = 1026&&movetype=A&&( movecontact&&var(10)=1) && (var(57)>0 && var(10)=1)
trigger15= var(7)=1150 && ctrl
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 2005
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall=power>=ifelse(var(10)=1,4000,2000)
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = statetype!=L
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
Triggerall = (p2movetype=H&&P2BodyDist X = [-5 ,180])||(p2bodydist x =[0,75]) 
triggerall =(p2bodydist y =[-45,0]) ||(p2statetype=A&& (p2bodydist y =[-95,-35])&&enemy,vel y >0) || movecontact
triggerall = random <= (449* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(10)=0 || (var(57)<=200&&var(10)=1)||(var(57)<300&&var(10)=1 &&p2life<600)
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&((p2statetype=A||p2movetype=A) ||p2statetype=A && (enemy,hitfall ||var(5)=0)&&!var(14))
trigger2 = (StateNo = 410)&& animelemtime(2)>0&&movehit
trigger3= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger4= (animelemtime(6)>0&&animelemtime(9)<0&&stateno=[1150,1161])  && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1)) && (enemy,numproj >0)
trigger5= stateno=220&&((animelemtime(6)<0&&var(10)=0)||(var(10)=1)) && movehit
trigger6= (stateno=[1000,1006]) && (animelemtime(7)>1 && animelemtime(9)<0)
trigger6= numhelper(1001)>0
trigger6= AIlevel <6||p2stateno!=[120,155]
trigger7= (anim=1103) && (animelemtime(2)>1 && animelemtime(3)<0) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger8=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger9=stateno=300 && ((movetype=A && animelemtime(4)>0)||movehit)
trigger10= (animelemtime(3)>0&&anim=1204&&stateno=[1200,1210])  && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1)) 
trigger11=var(7)=1230 &&var(10)=1 &&var(57)<=200 && ctrl

;------------------------------------------------------------------------------
;?????????
[State -1, L KW]
type = ChangeState
value = 2000
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = power >= ifelse(var(10)=1,3000,1000)
Triggerall = (P2BodyDist X = [-5,130])  || anim=1204
triggerall =(p2bodydist y =[-45,0]) ||(p2statetype=A&& (p2bodydist y =[-95,-15])&&enemy,vel y >0) || anim=1204
triggerall = statetype != A
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = statetype!=L
triggerall = random <= (449* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L || anim=1204
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = var(5)=0
triggerall = var(10)=0 || (var(57)<100&&var(10)=1)||(var(57)<300&&var(10)=1 &&p2life<600)
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))|| anim=1204
trigger1 =(ctrl||stateno=101)&&((p2statetype=A&&p2movetype=A)||p2statetype=A && (enemy,hitfall ||var(5)=0)&&!var(14))&&var(10)=0 
trigger2 = (StateNo = 410)&& animelemtime(2)>0&&movehit
trigger3= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1)) &&var(20)
trigger4= (animelemtime(6)>0&&animelemtime(9)<0&&stateno=[1150,1161])  && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1)) && var(20) && (enemy,numproj >0)
trigger5= (stateno=[1000,1006]) && (animelemtime(7)>1 && animelemtime(9)<0)
trigger5= numhelper(1001)>0
trigger5= AIlevel <6||p2stateno!=[120,155]
trigger6= (anim=1103) && (animelemtime(2)>1 && animelemtime(3)<0) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger7=stateno=300 && ((movetype=A && animelemtime(4)>0 &&!movecontact)||movehit);&&var(20)
trigger8= (animelemtime(3)>=0&&anim=1204&&stateno=[1200,1210])  && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1)) ;&& var(20)
trigger9= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
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 = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=var(7)=1230 &&var(10)=1 &&var(57)<=200 && ctrl
;------------------------------------------------------------------------------
;?????????
[State -1, L KW]
type = ChangeState
value = 2045
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = power >= ifelse(var(10)=1,3000,1000)
Triggerall = (P2BodyDist X = [55,90])
triggerall = enemy,vel x >0  
triggerall = statetype != A
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = statetype!=L
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2bodydist x >75
triggerall = random <= (349* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0&&var(0)=1
triggerall = var(10)=0 
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(p2movetype=A && p2statetype=A) 


;------------------------------------------------------------------------------
;?????????
[State -1, L KW]
type = ChangeState
value = 2040
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = power >= ifelse(var(10)=1,3000,1000)
Triggerall = (P2BodyDist X = [0,70]) 
triggerall =p2statetype!=A 
triggerall = statetype != A
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = statetype!=L
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2bodydist x >50
triggerall = (random <= (349* (AIlevel ** 2 / 64.0)))
triggerall = p2statetype !=L
triggerall = var(5)=0&&var(0)=1
triggerall = var(10)=0 
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(p2movetype=A && p2statetype!=A) 
trigger2= stateno=220 && ((animelemtime(3)>0&&animelemtime(4)<0 &&var(10)=0)||(var(10)=1)) && movehit&&var(20)
;------------------------------------------------------------------------------
;?????????
[State -1, L KW]
type = ChangeState
value = ifelse(p2bodydist x >100,2011,2010)
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = power >= ifelse(var(10)=1,3000,1000)
Triggerall = (P2BodyDist X = [0,220]) 
triggerall =p2statetype!=A || (p2bodydist y >-25 && enemy, vel y >0)
triggerall = statetype != A
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = statetype!=L
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2bodydist x >75
triggerall = (random <= (349* (AIlevel ** 2 / 64.0)))
triggerall = p2statetype !=L
triggerall = var(5)=0&&var(0)=0
triggerall = var(10)=0 || (var(57)<100&&var(10)=1)||(var(57)<300&&var(10)=1 &&p2life<600)
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(enemy,numproj>0||p2movetype=A) 
trigger2= (animelemtime(6)>0&&animelemtime(9)<0&&stateno=[1150,1161])  && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1)) && var(20) && (enemy,numproj >0)
trigger5= stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact&&var(20)
trigger6= (stateno=[1000,1006]) && (animelemtime(7)>1 && animelemtime(9)<0)
trigger6= numhelper(1001)>0
trigger6= AIlevel <6||p2stateno!=[120,155]
trigger7= (anim=1103) && (animelemtime(2)>1 && animelemtime(3)<0) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger24= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger25= StateNo = 1025&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger26= StateNo = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;------------------------------------------------------------------------------
;?????
[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 <= (499* (AIlevel ** 2 / 64.0)))
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
Triggerall = p2movetype=H || var(8)=1
triggerall = p2stateno!=[120,155]
triggerall = p2statetype !=L
triggerall =  (power>=3000 &&var(20)=1) || power>=4000
trigger1 = (StateNo = 410)&& animelemtime(2)>0&& movehit
trigger2 = stateno = 300 && movecontact && var(8)=1
trigger3=StateNo = 210 && animelemtime(4)>0&& movehit
trigger4=StateNo = 240 && animelemtime(3)>0&& movehit
trigger5= StateNo = 220 && animelemtime(3)>0 && movehit
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAiiiii]
type = ChangeState
value = 1052
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = power>=ifelse(var(10)=1,3000,ifelse(var(0)=0,2000,1000))&&var(20) 
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = statetype!=A
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
Triggerall = ( p2bodydist x =[-10,65])
triggerall = enemy,vel y >=0&&p2bodydist y =[-95,0]
Triggerall = Random <ifelse((var(10)=1&&stateno=220),999,249)
triggerall = var(5)=0 &&var(7)!=1150 
triggerall = var(7)!=1052
triggerall = p2statetype!=L
triggerall = AIlevel <6 ||p2stateno!=[120,155]
triggerall = var(10)=0 || var(0)=0
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(p2movetype!=I)
trigger2=stateno=220 && ((animelemtime(3)>0&&animelemtime(4)<0 &&var(10)=0)||(var(10)=1&&var(0)=0)) && (movehit) 
trigger3= (stateno=1050&&movetype=A&&p2statetype=A) && ((movehit&&var(10)=1) && (var(57)>0 && var(10)=1))&& frontedgebodydist >80&&var(0)=0
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAO]
type = ChangeState
value = 1051
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = statetype!=A
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2statetype=A
Triggerall = ( p2bodydist x =[-10,65])
triggerall = (p2movetype=H&&enemy,vel y >=0&&p2bodydist y =[-95,-20])||p2statetype!=A||(p2statetype=A && p2movetype!=H)
Triggerall = Random <249||p2movetype=A
triggerall = var(5)=0 &&var(7)!=1150 
triggerall = var(10)=0
triggerall = var(7)!=[1050,1052]
triggerall = p2statetype!=L
triggerall = AIlevel <6 ||p2stateno!=[120,155]
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(p2movetype!=I||p2statetype=A)
trigger2= (StateNo = 410)&& animelemtime(2)>0&&movehit
;trigger3= var(7)=1230 && ctrl && var(10)=0
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
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 = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2statetype=A
Triggerall = ( p2bodydist x =[-10,45])
triggerall =(p2movetype=H&&enemy,vel y >=0&&p2bodydist y =[-95,-20])||p2statetype!=A||(p2statetype=A && p2movetype!=H)
Triggerall = Random <ifelse((var(7)=1150||var(7)=1052),999,149)
triggerall = var(5)=0
triggerall = AIlevel <6 ||p2stateno!=[120,155]
triggerall = var(7)!=[1050,1051]
triggerall = p2statetype!=L
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(p2statetype=A)&&var(10)=0
;trigger2=var(0)=0&& var(7)=1150 && p2statetype=A && ctrl && enemy,vel y >0  && p2bodydist y=[-60,-25]
;trigger3= var(0)=0&&var(7)=1052 &&ctrl && enemy,vel y >0 &&p2bodydist y=[-38,-20]
trigger2= (StateNo = 410)&& animelemtime(2)>0&&movehit
;---------------------------------------------------------------------------
;?????
[State -1, T S]
type = ChangeState
value = 710
triggerall = movetype != H
triggerall = P2Life > 0
triggerall = roundstate = 2
triggerall = AIlevel >0
triggerall = stateno != 100
triggerall = random <=(128* (AIlevel ** 2 / 64.0))
triggerall = enemynear,NumProj > 0 || (stateno = 150||stateno=152)
trigger1 = statetype != A
trigger1 = movetype != A
trigger1 = BackEdgeBodyDist > 50
trigger1 = ctrl
trigger1 = p2bodydist x > 100
trigger1 = p2bodydist x <= 200
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 = movetype != H
triggerall = P2Life > 0
triggerall = roundstate = 2
triggerall = AIlevel >0
triggerall = statetype != A
triggerall = p2movetype!=H || p2statetype=L
triggerall = p2statetype!=L || enemy,pos y=0
triggerall = frontEdgeBodyDist > 100
trigger1 = movetype != A
trigger1 = ctrl
trigger1 = p2movetype = A
trigger1 = p2bodydist x <= 30
trigger1 = enemyNear, p2bodydist x >20
trigger1 = random <=(304 * (AIlevel ** 2 / 64.0))
trigger2 = stateno = 100
trigger2 = p2movetype = A
trigger2 = p2bodydist x <= 150
trigger2 = enemyNear, p2bodydist x > 20
trigger2 = random <= (496* (AIlevel ** 2 / 64.0))
trigger3 = stateno = 100
trigger3 = p2bodydist x <= 150
trigger3 = enemyNear, p2bodydist x > 20
trigger3 = random <= 2*AIlevel
trigger4 = ctrl
trigger4 = enemyNear, p2bodydist x > 20
trigger4 = enemynear,NumProj >= 1
trigger4 = random <= (496* (AIlevel ** 2 / 64.0))
trigger5 = power >= 1000
trigger5 = (stateno = 150||stateno=152) && p2bodydist x <75&& p2bodydist x <60&& (p2stateno=[1000,4999])
trigger5 = (stateno = [100,102]) && p2movetype=A

;------------------------------------------------------------------------
[State -1, AI Throw]
type = ChangeState
value = ifelse(backedgebodydist <40,801,800)
triggerall = AILevel >0
triggerall = random <= (128* (AIlevel ** 2 / 64.0))
triggerall = statetype = S
triggerall = p2statetype != A
triggerall = ctrl 
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2movetype!=A
triggerall = var(10)=0|| p2movetype!=H
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, Guard]
type = ChangeState
value = 120
triggerall = P2Life > 0
triggerall = roundstate = 2 && stateno!=5040
triggerall = AIlevel >0
triggerall = p2movetype = a && InGuardDist || enemy,numproj>0
triggerall = p2bodydist X > -20
triggerall = p2statetype!=L && statetype!=A
triggerall = enemyNear, p2bodydist X >= -20
trigger1 = ctrl || stateno=20 || stateno=100
trigger1 = random <= (496* (AIlevel ** 2 / 64.0))
trigger2 = enemynear,NumProj >= 1
trigger2 = ctrl

;????????
[State -1, SC]
type = ChangeState
value = 220
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (P2BodyDist X = [-8,70]) 
triggerall = p2statetype!=A||(p2stateno=[120,155])
Triggerall = Random < (650* (AIlevel ** 2 / 64.0))
triggerall = helper(10003),var(10)=0||movecontact
triggerall = helper(10003),var(11)=0 ||movecontact
triggerall = helper(10003),var(8)=0
triggerall = p2statetype !=L
;triggerall = var(15)=0|| moveguarded
trigger1 = anim = 201  && movecontact
trigger2 = anim=211&& movecontact
trigger3 = (stateno=230||stateno=410)&&(movehit||(p2statetype=S && movecontact))
trigger4 =(anim=241) &&animelemtime(4)<0 && movecontact
trigger5=  ctrl && p2statetype=S && p2bodydist x = [40,65]
;---------------------------------------------------------------------
[State -1, AI_Stand Light Punch]
type = ChangeState
value = 200
triggerall = movetype != H
triggerall = AIlevel >0
triggerall = P2Life > 0
triggerall = helper(10003),var(8)=0
triggerall = roundstate = 2
triggerall = p2bodydist x = [-12,80]
triggerall = p2stateno=20004||p2statetype != L
triggerall =  p2statetype!=A ||(p2movetype!=H&&p2bodydist Y = [-65,-35])
triggerall = p2statetype != L 
triggerall = stateno!=900
triggerall = statetype != A && random <= (400* (AIlevel ** 2 / 64.0))
triggerall = p2statetype!=C || AIlevel <4
trigger1 = (ctrl||stateno=20||stateno=[100,101])&& (p2bodydist x =[55,75]) && random <=23*AIlevel &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)
trigger2 = StateNo = 430&& animelemtime(2)>0 &&(movecontact && AIlevel <6||movecontact && AIlevel >=6 &&p2bodydist x<20) 
trigger3= animelemtime(2)>0&& stateno=400 &&(movecontact && AIlevel <6||movecontact && AIlevel >=6 &&p2bodydist x<20)
trigger4 = ctrl&& (p2bodydist x =[0,15]) && random <=63*AIlevel&&(helper(10003),var(10)=1&& helper(10003),var(11)=0)
;----------------------------------------------------------------------------
;?????????
[State -1, Stand Strong Punch]
type = ChangeState
value =210
triggerall = movetype != H
triggerall = AIlevel >0
triggerall = P2Life > 0
triggerall = helper(10003),var(8)=0
triggerall = roundstate = 2
triggerall = stateno!=900
triggerall = p2bodydist x = [-0,120]
triggerall =  p2statetype!=A ||p2bodydist Y = [-45,-20]
triggerall = movecontact||p2statetype != L
triggerall = statetype != A&& random <= (400* (AIlevel ** 2 / 64.0))
trigger1 = (ctrl||stateno=20||stateno=[100,101])&& (p2bodydist x =[80,115]) && random <=23*AIlevel &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)
trigger2 = (ctrl||stateno=20||stateno=[100,101])&& (p2bodydist x =[0,38]) && random <=63*AIlevel&&(helper(10003),var(10)=0&& helper(10003),var(11)>0) 



;------------------------------------------------------------------------------
;?????????
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = movetype != H
triggerall = AIlevel >0
triggerall = P2Life > 0
triggerall = helper(10003),var(8)=0
triggerall = roundstate = 2
triggerall = p2bodydist x = [-12,65]
triggerall = p2stateno=20004||p2statetype != L
triggerall =  p2statetype!=A ;||(p2movetype!=H&&p2bodydist Y = [-65,-35])
triggerall = p2statetype != L 
triggerall = stateno!=900
triggerall = statetype != A && random <= (400* (AIlevel ** 2 / 64.0))
triggerall = p2statetype!=C || AIlevel <4
trigger1 = (ctrl||stateno=20||stateno=[100,101])&& (p2bodydist x =[40,60]) && random <=23*AIlevel &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)
trigger2 = StateNo = 430&& animelemtime(2)>0 &&(movecontact) 
trigger3= animelemtime(2)>0&& stateno=400 &&(movecontact )
trigger4 = ctrl&& (p2bodydist x =[0,60]) && random <=63*AIlevel&&(helper(10003),var(10)=1&& helper(10003),var(11)=0)
;---------------------------------------------------------------------------

;?????????
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = movetype != H
triggerall = AIlevel >0
triggerall = P2Life > 0
triggerall = helper(10003),var(8)=0
triggerall = roundstate = 2
triggerall = stateno!=900
triggerall = p2bodydist x = [-0,90]
triggerall =  p2statetype!=A ||p2bodydist x >40&&p2bodydist Y = [-85,-20]
triggerall = movecontact||p2statetype != L
triggerall = statetype != A&& random <= (400* (AIlevel ** 2 / 64.0))
trigger1 = (ctrl||stateno=20||stateno=[100,101])&& (p2bodydist x =[55,85]) && random <=23*AIlevel &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)
trigger2 = (ctrl||stateno=20||stateno=[100,101])&& (p2bodydist x =[0,38]) && random <=63*AIlevel&&(helper(10003),var(10)=0&& helper(10003),var(11)>0) 


;?????????


;------------------------------------------------------------------------------
;????????
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = movetype != H
triggerall = AIlevel >0
triggerall = P2Life > 0
triggerall = helper(10003),var(8)=0
triggerall = roundstate = 2
triggerall = p2bodydist x = [-12,40]
triggerall = p2stateno=20004||p2statetype != L
triggerall =  p2statetype!=A ;||(p2movetype!=H&&p2bodydist Y = [-65,-35])
triggerall = p2statetype != L 
triggerall = stateno!=900
triggerall = statetype != A && random <= (400* (AIlevel ** 2 / 64.0))
trigger1 = (ctrl||stateno=20||stateno=[100,101])&& (p2bodydist x =[0,40]) && random <=23*AIlevel &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)
trigger2 = StateNo = 430&& animelemtime(2)>0 &&(movecontact) && p2bodydist x <20
trigger3= animelemtime(2)>0&& stateno=400 &&(movecontact )&& p2bodydist x <20
trigger4 = ctrl&& (p2bodydist x =[0,35]) && random <=63*AIlevel&&(helper(10003),var(10)=1&& helper(10003),var(11)=0)

;-------------------------------------------------------------------------------------------------
;????????
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = movetype != H
triggerall = AIlevel >0
triggerall = P2Life > 0
triggerall = helper(10003),var(8)=0
triggerall = roundstate = 2
triggerall = stateno!=900
triggerall = p2bodydist x = [-0,45]
triggerall =  p2statetype!=A ||p2bodydist Y = [-45,-20]
triggerall = movecontact||p2statetype != L
triggerall = statetype != A&& random <= (400* (AIlevel ** 2 / 64.0))
trigger1 = (ctrl||stateno=20||stateno=[100,101])&& (p2bodydist x =[20,40]) && random <=23*AIlevel &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)
trigger2 = (ctrl||stateno=20||stateno=[100,101])&& (p2bodydist x =[0,40]) && random <=63*AIlevel&&(helper(10003),var(10)=0&& helper(10003),var(11)>0) 

;------------------------------------------------------------------------------
;????????
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = movetype != H
triggerall = AIlevel >0
triggerall = P2Life > 0
triggerall = helper(10003),var(8)=0
triggerall = roundstate = 2
triggerall = p2bodydist x = [-12,50]
triggerall = p2stateno=20004||p2statetype != L
triggerall =  p2statetype!=A ;||(p2movetype!=H&&p2bodydist Y = [-65,-35])
triggerall = p2statetype != L 
triggerall = stateno!=900
triggerall = statetype != A && random <= (400* (AIlevel ** 2 / 64.0))
trigger1 = (ctrl||stateno=20||stateno=[100,101])&& (p2bodydist x =[0,50]) && random <=23*AIlevel&&p2statetype=S &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)
trigger2 = StateNo = 430&& animelemtime(2)>0 &&(movecontact) 
trigger3= animelemtime(2)>0&& stateno=400 &&(movecontact )
trigger4 = ctrl&& (p2bodydist x =[0,45]) && random <=63*AIlevel&&(helper(10003),var(10)=1&& helper(10003),var(11)=0)

;????????
[State -1, Crouching Strong Kick]
type = ChangeState
value =  440
triggerall = movetype != H
triggerall = AIlevel >0
triggerall = P2Life > 0
triggerall = helper(10003),var(8)=0
triggerall = roundstate = 2&&random <= (350* (AIlevel ** 2 / 64.0))
triggerall = p2bodydist x = [-0,85]
triggerall = p2bodydist Y = 0
triggerall = p2statetype!=L&& p2stateno!=20004
triggerall = statetype != A
triggerall  =var(10)=0|| p2movetype!=H
trigger1 = (ctrl||stateno=20||stateno=[100,101])&&p2statetype=S&& (p2bodydist x =[40,85]) && random <=23*AIlevel &&(helper(10003),var(10)=0&& helper(10003),var(11)=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=A
triggerall = ( p2statetype=C &&p2bodydist y=[-15,70])||( p2statetype!=C&&p2bodydist y=[-28,90]) 
triggerall = p2bodydist x = [0,25]
Triggerall = Random <= (450* (AIlevel ** 2 / 64.0))
triggerall = stateno!=901
triggerall = p2statetype !=L
trigger1 = ctrl
;??????????
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = movetype != H
triggerall = AIlevel >0
triggerall = random <= (406* (AIlevel ** 2 / 64.0))
triggerall = P2Life > 0
triggerall = roundstate = 2
triggerall = stateno!=50000
triggerall = p2bodydist x = [0,60]
triggerall =( p2statetype=C &&p2bodydist y=[-15,70])||( p2statetype!=C&&p2bodydist y=[-25,90])
triggerall =vel y>0 || p2statetype=A
triggerall = statetype = A
trigger1 = ctrl

;------------------------------------------------------------------------------
;????????
[State -1, Jump Light Kick]
type = ChangeState
value = 630
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = A)
triggerall = stateno != [800,3999]
triggerall = vel y>0 || p2statetype=A
triggerall = ( p2statetype=C &&p2bodydist y=[-15,70])||( p2statetype!=C&&p2bodydist y=[-28,90]) 
triggerall = p2bodydist x = [-cond(vel x !=0,25,0),cond(vel x !=0,30,55)]
Triggerall = Random <= (450* (AIlevel ** 2 / 64.0))
triggerall = stateno!=901
triggerall = p2statetype !=L
trigger1 = ctrl

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

;??????????
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = movetype != H
triggerall = AIlevel >0
triggerall = random <= (406* (AIlevel ** 2 / 64.0))
triggerall = P2Life > 0
triggerall = roundstate = 2
triggerall = stateno!=50000
triggerall =  p2bodydist x = [-cond(vel x !=0,20,0),cond(vel x !=0,65,55)]
triggerall =( p2statetype=C &&p2bodydist y=[-15,60])||( p2statetype!=C&&p2bodydist y=[-25,80])
triggerall =vel y>0 || p2statetype=A
triggerall = statetype = A
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])&&stateno=50 && vel y >0)|| ((p2bodydist y=[-10,45])&&stateno=41)
triggerall = p2bodydist x = [15,90]
Triggerall = Random < (ifelse(p2movetype=A,300,75)* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
trigger1 = ctrl
;??????????
[State -1, S BB AI]
type = ChangeState
value = 1036
triggerall = random<  (450* (AIlevel ** 2 / 64.0))
triggerall = (statetype=A && p2bodydist y =[-5,100])
Triggerall = (RoundState = 2) && (AILevel>0)&&power>=1000&&var(20)
triggerall =  numhelper(1101)=0&&numhelper(1001)=0
triggerall= var(0)=1
triggerall =p2bodydist x <50 && (vel x >0||(stateno=[1050,1051]))
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = (ctrl||(stateno=101)) &&(p2stateno=5120)
trigger2=(stateno=1050&&animelemtime(10)>=0) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1))) && var(20) && frontedgebodydist <70
trigger3=(stateno=1051 &&animelemtime(10)>=0) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1))) && var(20) && frontedgebodydist <70
;??????????
[State -1, S BB AI]
type = ChangeState
value =  1035
triggerall = random<  (450* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1101)=0&&numhelper(1001)=0
triggerall = (time>5&&statetype=A )
triggerall= var(0)=1
triggerall =((p2bodydist x  / p2bodydist y) > -.4 && (p2bodydist x  /p2bodydist y) <= 2.15) && p2bodydist x  > 0
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = (ctrl||(stateno=101)) ;&&(var(19)=1||var(17)<=7)
trigger2 =var(0)&& stateno=[1050,1051]
trigger2 = (movehit&&Ailevel>=6 || movecontact&&AIlevel <6) && (var(57)>=500 || var(10) && var(57)>100)


;------------------------------------------------------
;??????????
[State -1, L BB AI]
type = ChangeState
value = 1030
triggerall = random<  (450* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1101)=0&&numhelper(1001)=0
triggerall = (time>5&&statetype=A )
triggerall= var(0)=1

triggerall =((p2bodydist x  / p2bodydist y) > -.4 && (p2bodydist x  /p2bodydist y) <= 1.85) && p2bodydist x  > 0
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = (ctrl||(stateno=101)) ;&&(var(19)=1||var(17)<=7)
trigger2 =var(0)&& stateno=[1050,1051]
trigger2 = (movehit&&Ailevel>=6 || movecontact&&AIlevel <6) && (var(57)>=500 || var(10) && var(57)>100)

;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1211+(var(0)*20)
triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = (var(0)=1 && ((p2movetype!=H&&p2bodydist x=[50,170])||(p2movetype=H&&p2bodydist x <140)))||(var(0)=0&&P2BodyDist X = [0,140])
triggerall =(p2bodydist y =[-65,0]) ||(p2movetype=H &&p2statetype=A&& ((p2bodydist y =[-55,-15])))||var(0)=1
triggerall = random<  (349* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 
triggerall = statetype!=A
triggerall =p2statetype=A|| p2stateno!=[120,155]
triggerall = stateno!=41
triggerall = (power>=2000&&var(10)=1)||(var(20)&&var(10)=0&&power>=1000)
;triggerall= var(20) ||var(10) 
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(p2movetype=H||p2statetype=A)&& (var(10)=0|| (var(10)=1 && var(57)>600&&power>=3000))
trigger2=stateno=220 && ((animelemtime(3)>=0&&animelemtime(4)<0 &&var(10)=0)||(var(10)=1))&& ((moveguarded && AIlevel >=6||AIlevel <6&&movecontact))&&var(0)=0
trigger3=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;trigger4= var(7)=1230 && ctrl && var(20)&&var(10)=0 

;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1210+(var(0)*20)
triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = P2BodyDist X = [-25,150]
triggerall = random<  (349* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 
triggerall =p2statetype=A|| p2stateno!=[120,155]
triggerall = statetype!=A
triggerall =p2statetype!=A|| p2bodydist y =[-75,-30]
triggerall = var(7)!=1230
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =((ctrl||stateno=101)&&(p2movetype=H||p2statetype=A))&& (var(10)=0|| (var(10)=1 && var(57)<300&&power>=3000))
trigger2=stateno=220 && ((animelemtime(3)>=0&&animelemtime(4)<0 &&var(10)=0)||(var(10)=1)) && (movehit)
trigger3=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger4= p2stateno=1202 && ctrl && p2bodydist y =[-75,-15]
trigger5= StateNo = 1020&&movetype=A&&(((moveguarded && AIlevel >=6||AIlevel <6&&movecontact)&&var(10)=0)) && ((var(57)>=500 && var(10)=0)||(var(57)>300 && var(10)=1))
trigger6= StateNo = 1025&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>200 && var(10)=1)) && p2bodydist y =[-105,-55]
trigger7= StateNo = 1026&&movetype=A&&(((moveguarded && AIlevel >=6||AIlevel <6&&movecontact)&&var(10)=0)) && ((var(57)>=500 && var(10)=0)||(var(57)>300 && var(10)=1))
;trigger8 =var(7)=1231 && ctrl
;------------------------------------------------------------------------------
;Press
[State -1, L LTAI]
type = ChangeState
value = 1200+(var(0)*20)
triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = (var(0)=1 && ((p2movetype!=H&&p2bodydist x=[20,130])||(p2movetype=H&&p2bodydist x <90)))||(var(0)=0&&P2BodyDist X = [0,90])
triggerall =(p2bodydist y =[-75,0])||var(0)=1 
triggerall = random<  (349* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall =p2statetype=A|| p2stateno!=[120,155]
triggerall = helper(10003),var(8)=0 
triggerall = var(10)=0 ||var(0)=0
triggerall = statetype!=A
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl&&(p2movetype=H||p2statetype=A)||stateno=101)&& (var(10)=0|| (var(10)=1 && var(57)<300&&power>=3000&&var(0)=0))
trigger2=stateno=220 && ((animelemtime(3)>=0&&animelemtime(4)<0 &&var(10)=0)||(var(10)=1))&& (movehit && AIlevel >=6||AIlevel <6&&moveguarded)&&var(0)=0
trigger3=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)


;;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1161
Triggerall = (RoundState = 2) && (AILevel>0)&&power>=1000
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = P2BodyDist X = [40,110]
Triggerall =Random < (349* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2bodydist x >90 && enemy,numproj>0
triggerall = stateno!=41
triggerall = statetype!=A
triggerall = p2statetype!=A || p2movetype!=H
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(enemy,numproj>0||(enemy,hitdefattr=SCA,AP))
;------------------------------------------------------------------------------
;?????????
[State -1, H LTAI]
type = ChangeState
value = 1160
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = P2BodyDist X >= 40
Triggerall =Random <(349* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2bodydist x >90 && enemy,numproj>0
triggerall = var(5)=0
triggerall = stateno!=41
triggerall = statetype!=A
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(enemy,numproj>0||(enemy,hitdefattr=SCA,AP))


;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1150
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = P2BodyDist X = [-9,120]
triggerall =(var(0)=0&&p2bodydist y =[-65,8]) || (var(0)=1&&enemy,numproj>0)
Triggerall =Random < (349* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2bodydist x >90 && enemy,numproj>0
triggerall = var(5)=0
triggerall = stateno!=41
triggerall = statetype!=A
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(enemy,numproj>0||(enemy,hitdefattr=SCA,AP||p2statetype=A))&& (var(10)=0|| (var(10)=1 && var(57)<300&&var(0)=0))
trigger2= (stateno=1050&&p2statetype=A) && ( (movecontact&&var(10)=1) && (var(57)>200 && var(10)=1))&&var(0)=0


;??????????
[State -1, EX BB AI]
type = ChangeState
value = 1006+(var(0)*20)
triggerall = random<  (349* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1101)=0&&numhelper(1001)=0&&power>=1000
triggerall =(statetype!=A &&(((var(0)=1&&p2bodydist y =[-75,-45])||p2statetype!=A)||(var(0)=0&&p2bodydist y =[-55,0]))) =1
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2movetype!=A
triggerall = p2statetype!=L ||helper(10003),var(22) 
triggerall = (p2bodydist x >50 &&var(0)=0) || (var(0)=1 && p2movetype=H)||(var(0)=1 && p2bodydist x >70 && p2movetype!=H)||movecontact
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = (ctrl||(stateno=101))  &&(helper(10003),var(22)||var(0)) && var(0)=0
trigger2 = anim = 201 &&animelemtime(2)>0 &&movecontact && var(0)=0 && AIlevel <6
trigger3 = anim=211 &&animelemtime(3)>0&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) && var(0)=0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0&&movecontact && var(0)=0&& AIlevel <6
trigger5 =StateNo = 400&& animelemtime(2)>0&&movecontact && var(0)=0&& AIlevel <6
trigger6 = (StateNo = 410)&& animelemtime(2)>0&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact)  && var(0)=0
trigger7 = stateno=440 && animelemtime(5)>0&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact)  && var(0)=0
trigger8=anim=200 && var(10)=1&&movecontact&& AIlevel <6
trigger9=anim=210 && var(10)=1&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) 
trigger10=anim=230 && var(10)=1&&movecontact&& AIlevel <6
trigger11=anim=240 && var(10)=1&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) 
trigger12=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0) && var(0)=0 &&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) 
trigger13=stateno=220 && ((animelemtime(3)>0&&animelemtime(4)<0 &&var(10)=0)||(var(10)=1)) && (moveguarded && AIlevel >=6||AIlevel <6&&movecontact) && var(0)=0
trigger14=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)&&var(8)=1

;;??????????
[State -1, S BB AI]
type = ChangeState
value = 1005+(var(0)*20)
triggerall = random< (349* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall =numhelper(1101)=0&&numhelper(1001)=0
triggerall = statetype!=A &&((var(0)=1&&(p2bodydist y < -45||p2statetype!=A))||(var(0)=0&&p2bodydist y =[-55,0]))
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2movetype!=A
triggerall = p2statetype!=L ||helper(10003),var(21) 
triggerall = (p2bodydist x >50 &&var(0)=0) || (var(0)=1 && p2movetype=H)||(var(0)=1 && p2bodydist x >70 && p2movetype!=H)||movecontact
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = (ctrl||(stateno=101))  &&(helper(10003),var(21)||var(0)) && var(10)=0
trigger2 = anim = 201 &&animelemtime(2)>0 &&movecontact && var(0)=0 && AIlevel <6
trigger3 = anim=211 &&animelemtime(3)>0&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) && var(0)=0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0&&movecontact && var(0)=0&& AIlevel <6
trigger5 =StateNo = 400&& animelemtime(2)>0&&movecontact && var(0)=0&& AIlevel <6
trigger6 = (StateNo = 410)&& animelemtime(2)>0&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact)  && var(0)=0
trigger7 = stateno=440 && animelemtime(5)>0&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact)  && var(0)=0
trigger8=anim=200 && var(10)=1&&movecontact&& AIlevel <6
trigger9=anim=210 && var(10)=1&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) 
trigger10=anim=230 && var(10)=1&&movecontact&& AIlevel <6
trigger11=anim=240 && var(10)=1&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) 
trigger12=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0) && var(0)=0 &&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) 
trigger13=stateno=220 && ((animelemtime(3)>0&&animelemtime(4)<0 &&var(10)=0)||(var(10)=1)) && (moveguarded && AIlevel >=6||AIlevel <6&&movecontact) && var(0)=0
trigger14=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)&&var(8)=1

;------------------------------------------------------
;??????????
[State -1, L BB AI]
type = ChangeState
value =  1000+(var(0)*20)
triggerall = random<  (349* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall =numhelper(1101)=0&&numhelper(1001)=0
triggerall = (statetype!=A &&(((var(0)=1&&p2bodydist y =[-75,-45])||p2statetype!=A)||(var(0)=0&&p2bodydist y =[-55,0])))
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2movetype!=A
triggerall = p2statetype!=L ||helper(10003),var(20) 
triggerall = (p2bodydist x >50 &&var(0)=0) || (var(0)=1 && p2movetype=H)||(var(0)=1 && p2bodydist x >70 && p2movetype!=H)||movecontact
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = (ctrl||(stateno=101)) &&(helper(10003),var(20)||var(0))
trigger2 = anim = 201 &&animelemtime(2)>0 &&movecontact && var(0)=0 && AIlevel <6
trigger3 = anim=211 &&animelemtime(3)>0&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) && var(0)=0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0&&movecontact && var(0)=0&& AIlevel <6
trigger5 =StateNo = 400&& animelemtime(2)>0&&movecontact && var(0)=0&& AIlevel <6
trigger6 = (StateNo = 410)&& animelemtime(2)>0&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact)  && var(0)=0
trigger7 = stateno=440 && animelemtime(5)>0&&(movecontact)  && var(0)=0
trigger8=anim=200 && var(10)=1&&movecontact&& AIlevel <6
trigger9=anim=210 && var(10)=1&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) 
trigger10=anim=230 && var(10)=1&&movecontact&& AIlevel <6
trigger11=anim=240 && var(10)=1&&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) 
trigger12=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0) && var(0)=0 &&(moveguarded && AIlevel >=6||AIlevel <6&&movecontact) 
trigger13=stateno=220 && ((animelemtime(3)>0&&animelemtime(4)<0 &&var(10)=0)||(var(10)=1)) && (moveguarded && AIlevel >=6||AIlevel <6&&movecontact) && var(0)=0
trigger14=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)&&var(8)=1



;trigger15= var(7)=1230 && ctrl && (p2bodydist y =[-35,-135])&& p2bodydist x =[-35,40]
;------------------------------------------------------
;??????????
[State -1, L BB AI]
type = ChangeState
value = 1010
triggerall = random< (115* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1101)=0&&numhelper(1001)=0
triggerall = (statetype!=A &&p2bodydist y =[-55,0])
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 
triggerall = var(0)=0
triggerall = enemy,numproj =0
triggerall = p2statetype!=L
triggerall = (p2bodydist x >160 &&var(0)=0)
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = (ctrl||(stateno=101)) &&(var(19)=1||var(17)<=7)
;------------------------------------------------------
;??????????
[State -1, L BB AI]
type = ChangeState
value = 1015
triggerall = random<(115* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1101)=0&&numhelper(1001)=0
triggerall = (statetype!=A &&p2bodydist y =[-55,0])
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 
triggerall = enemy,numproj =0
triggerall = var(0)=0
triggerall = p2statetype!=L
triggerall = (p2bodydist x >160 &&var(0)=0)
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = (ctrl||(stateno=101)) &&(var(19)=1||var(17)<=7)


;---------------------------------------------------------------------------
;??
[State -1, UKEMI]
type = ChangeState
value = 52000
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall= random <(ifelse((enemy,hitdefattr=SCA,SA,HA),75,700)* (AIlevel ** 2 / 64.0))
triggerall = alive = 1
trigger1 = stateno = 5050
trigger1 = pos y > -5
trigger1 = vel y > 0 && vel y < 9

;------------------------------------------------------------------------------
;?????
[State -1, BLOWBACKAI]
type = ChangeState
value = 300
triggerall = random <(ifelse((enemy,hitdefattr=SCA,SA,HA),500,49)* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = p2bodydist x<50
triggerall = p2statetype!=L
triggerall =life <= (lifemax/2.25)
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 || p2movetype!=A
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=AILevel>0 && statetype!=A && ctrl
triggerall = (stateno!=[100,105])
triggerall = p2bodydist y =[-150,0]
triggerall = var(41)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0 
triggerall = var(10)=0 || p2movetype!=H|| enemy,hitfall
triggerall = enemy,numproj =0 || numhelper(1001)>0 || enemy,hitfall
triggerall = p2stateno!=834 || p2bodydist x >80
trigger1= p2movetype!=A && (p2bodydist x=[150,788])&& random < (100* (AIlevel ** 2 / 64.0))
trigger2= ((p2stateno=[1360,1361])||stateno=1151)&& p2bodydist x >55&& random < (149* (AIlevel ** 2 / 64.0))
trigger3 = numhelper(1001)>0 && ctrl&& random < (149* (AIlevel ** 2 / 64.0)) && p2bodydist x >60
trigger4 = (enemy,hitfall||p2statetype=L) && var(5)=0 && p2bodydist x >35 && frontedgebodydist >50&& random < (149* (AIlevel ** 2 / 64.0))

[State -1, AI run]
type=changestate
value=20
triggerall = roundstate = 2
triggerall = p2stateno!=834 || p2bodydist x >60
triggerall=AILevel>0 && statetype=S && ctrl && random < (249* (AIlevel ** 2 / 64.0))
triggerall = var(10)=0 || p2movetype!=H
triggerall = var(41)=0
triggerall=p2statetype!=L || numhelper(1001)>0
trigger1= (stateno!=[20,105]) && p2movetype!=A && (p2bodydist x=[30,149])
trigger2 = numhelper(1001)>0 && ctrl && p2bodydist x =[30,70]
[State -1, AIRun Back]
type = ChangeState
value = 105
triggerall = AILevel>0
triggerall = stateno !=105
triggerall = statetype != A
triggerall = (p2stateno!=1151&&(p2stateno!=[1290,1292]))
triggerall = random < (100* (AIlevel ** 2 / 64.0))
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = var(41)=0
triggerall = roundstate = 2
triggerall = p2statetype!=A
triggerall = ctrl
trigger1 = (ctrl && p2bodydist x <20&&p2statetype=L)

[State -1, Taunt]
type = ChangeState
value = 195
triggerall = AILevel >0
triggerall = random<(299* (AIlevel ** 2 / 64.0))
triggerall = gametime%30=0
triggerall = enemy,life < (enemy,lifemax/2.25) 
triggerall = life >700 
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = p2statetype = L
triggerall = p2bodydist x >120
triggerall = statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------

;Shin Shouryuu Ken LDM
[State -1, Misogi/KKZ]
type = ChangeState
value = 2030+var(0)
triggerall =  (command="KKZ") 
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 = anim!=1051
triggerall= statetype != A
trigger1 = ctrl ||(stateno=101)
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8= (stateno=1050&&movetype=A) && (var(57)>0 && var(10)=1)
trigger9= (stateno=1051&&movetype=A) && (var(57)>0 && var(10)=1)
trigger10= (stateno=1052&&movetype=A)  && (var(57)>0 && var(10)=1)
trigger11= (stateno=1150) && ( (movecontact&&var(10)=1)) && (var(57)>0 && var(10)=1)
trigger12= (stateno=1160) && ( (movecontact&&var(10)=1)) && (var(57)>0 && var(10)=1)
trigger13=anim=200 && var(10)=1&&movecontact 
trigger14=anim=240 && var(10)=1&&movecontact
trigger15=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger16= (stateno=[1000,1006]) && (animelemtime(5)>1 && animelemtime(7)<0)
trigger17= (stateno=[1010,1012]) && (animelemtime(12)>1 && animelemtime(14)<0)
trigger18= (stateno=1013) && (animelemtime(15)>1 && animelemtime(16)<2)
trigger19=stateno=220 && ((animelem=7&&movecontact)||(var(10)=1&&movecontact)||(animelemtime(5)>0))
trigger20=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger21=(stateno=[2000,2006]) && anim=1204&&animelemtime(2)>=5&& (var(57)>0 && var(10)=1) ;&& p2stateno=2002
trigger22= stateno=2041&&movetype=A&& var(10)=1
trigger23= (animelemtime(2)>=5&&anim=1204&&stateno=[1200,1211])  && (var(57)>0 && var(10)=1)
trigger24= StateNo = 1020&&movetype=A &&( movecontact&&var(10)=1) && (var(57)>0 && var(10)=1)
trigger25= StateNo = 1025&&movetype=A&&( movecontact&&var(10)=1) && (var(57)>0 && var(10)=1)
trigger26= StateNo = 1026&&movetype=A&&( movecontact&&var(10)=1) && (var(57)>0 && var(10)=1)
;---------------------------------------------------------------------------
;Shin Shouryuu Ken LDM
[State -1, Shin Shouryuu Ken EX]
type = ChangeState
value = 2005
triggerall = command = "shinshoryukenEX" && Power >= 2000
triggerall = statetype!=A
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = AILevel=0
triggerall = anim!=1051
trigger1 = ctrl ||(stateno=101)
trigger2 = anim = 201&&animelemtime(2)>=0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7= stateno=440 && animelemtime(5)>0
trigger8= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger9= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1052&&movetype=A)  && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (animelemtime(5)>0&&animelemtime(7)<0&&stateno=[1150,1161])  && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<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&&((animelemtime(6)<0&&var(10)=0)||(var(10)=1)) && movecontact
trigger19= (stateno=[1000,1006]) && (animelemtime(7)>1 && animelemtime(9)<0)
trigger20= (anim=1103) && (animelemtime(2)>1 && animelemtime(3)<0) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger22=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger23= (animelemtime(3)>0&&anim=1204&&stateno=[1200,1211])  && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger24= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger25= StateNo = 1025&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger26= StateNo = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;Shin Shouryuu Ken LDM
[State -1, Shin Shouryuu Ken]
type = ChangeState
value = 2000
triggerall = command = "shinshoryuken" && Power >= 1000
triggerall = statetype!=A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = anim!=1051
trigger1 = ctrl ||(stateno=101)
trigger2 = anim = 201&&animelemtime(2)>=0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7= stateno=440 && animelemtime(5)>0
trigger8= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger9= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1052&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (animelemtime(5)>0&&animelemtime(7)<0&&stateno=[1150,1161])  && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<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&&((animelemtime(6)<0&&var(10)=0)||(var(10)=1)) && movecontact
trigger19= (stateno=[1000,1006]) && (animelemtime(7)>1 && animelemtime(9)<0)
trigger20= (anim=1103) && (animelemtime(2)>1 && animelemtime(3)<0) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger22=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger23= (animelemtime(3)>0&&anim=1204&&stateno=[1200,1211])  && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger24= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger25= StateNo = 1025&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger26= StateNo = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;===========================================================================
;---------------------------------------------------------------------------
;Dead end screamer close
[State -1, DESC]
type = ChangeState
value = ifelse(command="DES",2010+(var(0)*30),2011+(var(0)*34))
triggerall = (command = "DES" ||command="DES2")&& Power >= 1000
triggerall = statetype!=A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = anim!=1051
trigger1 = ctrl ||(stateno=101)
trigger2 = anim = 201&&animelemtime(2)>=0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7= stateno=440 && animelemtime(5)>0
trigger8= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger9= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1052&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (animelemtime(5)>0&&animelemtime(7)<0&&stateno=[1150,1161])  && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger17= stateno=220&&((animelemtime(6)<0&&var(10)=0)||(var(10)=1)) && movecontact
trigger18= (stateno=[1000,1006]) && (animelemtime(7)>1 && animelemtime(9)<0)
trigger19= (anim=1103) && (animelemtime(2)>1 && animelemtime(3)<0) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger20=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger21=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger22= (animelemtime(3)>0&&anim=1204&&stateno=[1200,1211])  && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger23= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger24= StateNo = 1025&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger25= StateNo = 1026&&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, strong Kaiser Wave]
type = ChangeState
value = 1016
triggerall = command = "shakuEX"
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = power>=1000
triggerall = var(0)=0
triggerall = numhelper(1101)=0&&numhelper(1001)=0
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A)  && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A)  && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger18=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger19=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Weak Tatsumaki Senpuu Kyaku
[State -1, Weak Tatsumaki Senpuu Kyaku]
type = ChangeState
value = 1211+(var(0)*20)
triggerall = command = "shoryuEX"
triggerall = AILevel=0
triggerall =  stateno!=41
triggerall = power>=1000
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = stateno!=[1200,1211]
triggerall = statetype!=A
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger17=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger18=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger19= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger20= StateNo = 1025&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21= StateNo = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))

;---------------------------------------------------------------------------
;Weak Shakunetsu Hadou Ken
[State -1,EX Shoryuken]
type = ChangeState
value = 1052
triggerall = command = "joudanEX" 
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = power>=1000
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A)  && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11=anim=200 && var(10)=1&&movecontact
trigger12=anim=240 && var(10)=1&&movecontact
trigger13=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger14=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger15=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger16= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
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 = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;EX Tatsumaki Senpuu Kyaku
[State -1, EX Tatsumaki Senpuu Kyaku]
type = ChangeState
value = 1161
triggerall = command = "tatsuEX"
triggerall = power>=1000
triggerall = statetype!=A
triggerall =  stateno!=41
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = anim!=1051
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger17=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger18=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger19= stateno=250 && movecontact &&var(0)=1
trigger20= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21= StateNo = 1025&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger22= StateNo = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;EX Hadou Ken
[State -1, EX Hadou Ken]
type = ChangeState
value =1006+(var(0)*20)+(statetype=A*10)
triggerall = statetype!=A|| var(0)
triggerall = command = "hadouEX" 
triggerall = AILevel=0
triggerall = numhelper(1001)=0
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = power>=1000
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger17=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger18=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger19=stateno=1020+(statetype=A*10) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger20=stateno=1025+(statetype=A*10) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;Weak Tatsumaki Senpuu Kyaku
[State -1, Weak Tatsumaki Senpuu Kyaku]
type = ChangeState
value = 1200+(var(0)*20)
triggerall = command = "shoryux"
triggerall = AILevel=0
triggerall =  stateno!=41
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = statetype!=A
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger17=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger18=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger19= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger20= StateNo = 1025&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21= StateNo = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;Weak Tatsumaki Senpuu Kyaku
[State -1, Weak Tatsumaki Senpuu Kyaku]
type = ChangeState
value = 1210+(var(0)*20)
triggerall = command = "shoryuy"
triggerall = AILevel=0
triggerall =  stateno!=41
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = statetype!=A
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger17=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger18=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger19= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger20= StateNo = 1025&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21= StateNo = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;Weak Shouryuu Ken
[State -1, Weak Shouryuu Ken]
type = ChangeState
value = 1050
triggerall = command = "joudana" 
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = anim!=1051
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9=anim=200 && var(10)=1&&movecontact
trigger10=anim=210 && var(10)=1&&movecontact
trigger11=anim=230 && var(10)=1&&movecontact
trigger12=anim=240 && var(10)=1&&movecontact
trigger13=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger14=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger15=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger16= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
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 = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))

;---------------------------------------------------------------------------
;Strong Shouryuu Ken
[State -1, Strong Shouryuu Ken]
type = ChangeState
value = 1051
triggerall = command = "joudanb" 
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = anim!=1051
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201&&animelemtime(2)>=0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9=anim=200 && var(10)=1&&movecontact
trigger10=anim=210 && var(10)=1&&movecontact
trigger11=anim=230 && var(10)=1&&movecontact
trigger12=anim=240 && var(10)=1&&movecontact
trigger13=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger14=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger15=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger16= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
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 = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;Weak Hadou Ken
[State -1, Weak Kaiser Wave]
type = ChangeState
value = 1010
triggerall = command = "shakux"
triggerall = statetype != A
triggerall = var(0)=0
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = numhelper(1101)=0&&numhelper(1001)=0
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A)  && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A)  && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger17=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger18=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Strong Hadou Ken
[State -1, strong Kaiser Wave]
type = ChangeState
value = 1015
triggerall = command = "shakuy"
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = var(0)=0
triggerall = numhelper(1101)=0&&numhelper(1001)=0
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A)  && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A)  && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger18=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger19=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
;---------------------------------------------------------------------------
;Strong Tatsumaki Senpuu Kyaku
[State -1, Strong Dark Barrier]
type = ChangeState
value = 1160
triggerall = command = "tatsub"
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = anim!=1051
triggerall =  stateno!=41
triggerall = statetype!=A
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger17=stateno=410 && animelemtime(5)>0
trigger18=stateno=440 && animelemtime(5)>0
trigger19=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger21= stateno=250 && movecontact &&var(0)=1
trigger22= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger22= StateNo = 1025&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger23= StateNo = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;Weak Tatsumaki Senpuu Kyaku
[State -1, Weak Dark Barrier]
type = ChangeState
value = 1150
triggerall = command = "tatsua"
triggerall = AILevel=0
triggerall =  stateno!=41
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = statetype!=A
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger17=stateno=410 && animelemtime(5)>0
trigger18=stateno=440 && animelemtime(5)>0
trigger19=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)
trigger21= stateno=250 && movecontact &&var(0)=1
trigger22= StateNo = 1020&&movetype=A &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger22= StateNo = 1025&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger23= StateNo = 1026&&movetype=A&&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;Weak Hadou Ken
[State -1, Weak reppuken]
type = ChangeState
value = 1000+(var(0)*20)+(statetype=A*10)
triggerall = command = "hadoux"
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = statetype!=A|| var(0)
triggerall = numhelper(1001)=0
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger17=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger18=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)


;---------------------------------------------------------------------------
;Strong Hadou Ken
[State -1, strong reppuken]
type = ChangeState
value =1005+(var(0)*20)+(statetype=A*10)
triggerall = command = "hadouy"
triggerall = AILevel=0
triggerall = statetype!=A|| var(0)
triggerall = roundstate=2
triggerall = anim!=1051
triggerall = numhelper(1001)=0
trigger1 = ctrl ||(stateno=101) 
trigger2 = anim = 201 &&animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410)&& animelemtime(2)>0
trigger7 = stateno=440 && animelemtime(5)>0
trigger8 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger9= (stateno=1050&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger10= (stateno=1051&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1052&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=anim=200 && var(10)=1&&movecontact
trigger13=anim=210 && var(10)=1&&movecontact
trigger14=anim=230 && var(10)=1&&movecontact
trigger15=anim=240 && var(10)=1&&movecontact
trigger16=anim=241&& (animelemtime(3)>0 &&animelemtime(4)<0)
trigger17=stateno=220 && ((animelemtime(3)>0&&animelemtime(6)<0 &&var(10)=0)||(var(10)=1)) && movecontact
trigger18=stateno=300 && ((movetype=A && animelemtime(4)>0)||movecontact)

;===========================================================================
;---------------------------------------------------------------------------
;?????
[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 = 801
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 = anim = 201 && animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 = (anim=241 && animelemtime(3)>0) &&animelemtime(4)<0
trigger6 =StateNo = 400&& animelemtime(2)>0
trigger7 = (StateNo = 410)&& animelemtime(2)>0
trigger8 = StateNo = 430&& animelemtime(2)>0
trigger9 = stateno=440 && animelemtime(5)>0
trigger10 = stateno = 300 && movecontact
trigger11 = stateno = 310 && movecontact
trigger12=StateNo = 200 && animelemtime(2)>0
trigger13=StateNo = 210 && animelemtime(4)>0
trigger14=StateNo = 230 && animelemtime(2)>0
trigger15=StateNo = 240 && animelemtime(3)>0
trigger16= StateNo = 220 && animelemtime(3)>0
trigger17= StateNo = 450 && animelemtime(3)>0


;===========================================================================
;?????
[State -1, blow back]
type = ChangeState
value = 300
triggerall = command = "CD" || command="z"
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"|| command="z"
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 = "a"
triggerall = command = "holdfwd"
triggerall = command!="holddown"
triggerall = statetype != A
triggerall = AILevel=0
trigger1 = ctrl||stateno=101
trigger2 = anim = 201 && animelemtime(2)>0
trigger3 = anim=211 &&animelemtime(3)>0
trigger4 = stateno=230&&animelemtime(ifelse(anim=231,3,4))>0
trigger5 =(anim=241 && animelemtime(3)>0) &&animelemtime(4)<0
;---------------------------------------------------------------------------
;Hop kick
[State -1, Crouching Strong Diagonal Kick]
type = ChangeState
value =220
triggerall = command = "a"&&command="holdfwd"
triggerall = command != "holddown" 
triggerall = statetype!= A
triggerall = AILevel=0 
trigger1 = ctrl||stateno=101



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

;?????????
[State -1, Stand Strong Punch]
type = ChangeState
value =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 = 230
triggerall = command = "a"
triggerall = AILevel=0
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl ||stateno=101
trigger2 = StateNo = 430&& animelemtime(2)>0 
trigger3= animelemtime(2)>0&& stateno=400
;?????????


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



;------------------------------------------------------------------------------
;??
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "start"
triggerall = roundstate=2
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 = StateNo = 400&& animelemtime(2)>0
;????????
[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
trigger2 = StateNo = 430&& animelemtime(2)>0
trigger3 = StateNo = 400&& animelemtime(2)>0
;????????
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
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 
