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

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

[Command]
name = "shinshoryukenEX"
command = ~D, F, D, F,x+y
time = 30
buffer.time=3
[Command]
name = "SGS"
command = ~x,x,F,a,y
time = 40
buffer.time=3
[Command]
name = "KKZ"
command = ~D, D,D, x+y
time = 30
buffer.time=3
[Command]
name = "Misogi"
command = ~F, D, B, F, D, B, a+b
time = 30
buffer.time=3
[Command]
name = "shinshoryuken"
command = ~D, F, D, F, x
time = 30
buffer.time=3
[Command]
name = "shinshoryuken"
command = ~D, F, D, F, y
time = 30
buffer.time=3

;-| Special Motions |------------------------------------------------------
[Command]
name = "ASKF"
command = F,D, DF, a+x
time=20
buffer.time=3
[Command]
name = "ASPF"
command = F,D, DF, b+y
time=20
buffer.time=3
[Command]
name = "ASKB"
command = B,D, DB, a+x
time=20
buffer.time=3
[Command]
name = "ASPB"
command = B,D, B+y
time=20
buffer.time=3
[Command]
name = "shoryuEX"
command = ~F, D, DF, 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
[Command]
name = "shakuEX"
command = ~F, D, B, x+y
time=20
buffer.time=3
[Command]
name = "shoryux"
command = ~F, D, DF, x
time=20
buffer.time=3
[Command]
name = "shoryuy"
command = ~F, D, DF, 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, D, B, y
time=20

[Command]
name = "shakux"
command = ~F, D, B, x
time=20



[Command]
name = "tatsua"
command = ~D, B, a
buffer.time=3
[Command]
name = "tatsuEX"
command = ~D, B,a+b
buffer.time=3
[Command]
name = "tatsub"
command = ~D, B, b
buffer.time=3
[Command]
name = "hadoux"
command = ~D, F, x

[Command]
name = "hadouy"
command = ~D, F, y

[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(9)
triggerall = AILevel >0
triggerall = (random <= (449* (AIlevel ** 2 / 64.0)));||var(10)=1
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 = enemy, anim !=5070
triggerall = (p2bodydist X < 75 && p2movetype=H&&var(9)=0) || ((p2movetype=A||p2movetype=H)&&var(9)=1)
trigger1 = ctrl&&(p2statetype=A||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(9)=1
trigger3=var(37)=1
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 2010
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall = (random <= (399* (AIlevel ** 2 / 64.0)))
triggerall=power>=2000
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = (P2BodyDist X = [-8,50]) 
triggerall =(p2bodydist y =[-35,0]) ||(p2statetype=A&& (p2bodydist y =[-40,-15]))
triggerall = p2statetype !=L
triggerall = statetype!=L
triggerall = var(5)=0
triggerall = var(10)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
;;triggerall = var(27)<5
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 = StateNo = 220&& var(33)=1 &&animelemtime(6)<0&& p2bodydist x <30
trigger2 = movetype=A&& ctrl && p2statetype!=A && p2bodydist x <20
trigger3 = enemy,anim=47 && p2bodydist x <20 && ctrl
trigger4= (p2stateno!=[0,899]) && p2movetype=I && ctrl
trigger5= (stateno=[1000,1006]) && (animelemtime(5)>1 && animelemtime(7)<0) && enemy,numproj>0
trigger6= (stateno=[1010,1012]) && (animelemtime(12)>1 && animelemtime(14)<0)&& enemy,numproj>0
trigger7= (stateno=1013) && (animelemtime(15)>1 && animelemtime(16)<2)&& enemy,numproj>0
trigger8= p2stateno=1220 && ctrl
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 2005+var(9)
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 = p2stateno!=1220
Triggerall = (P2BodyDist X = [-9,50]) 
triggerall =(p2bodydist y =[-35,0]) ||(p2statetype=A&& (p2bodydist y =[-60,-15]))
triggerall = (random <= (349* (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 = var(27)<5
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =ctrl&&(p2statetype=A||p2movetype=A) ||stateno=101
trigger2 = StateNo = 215 &&(movecontact&&AILevel<5||movehit&&AILevel>=5) &&movetype=A
trigger3 = stateno = 235 && (movecontact&&AILevel<5||movehit&&AILevel>=5)&&movetype=A
trigger4 = stateno = 400 &&(movecontact&&AILevel<5||movehit&&AILevel>=5) && random<45&&movetype=A
trigger5 = stateno = 430 &&(movecontact&&AILevel<5||movehit&&AILevel>=5) && random<45&&movetype=A
trigger6=(stateno=1025&&movetype=A) && ( (movehit&&var(10)=1) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))
trigger7=(stateno=1030&&movetype=A) && ((movehit&&var(10)=1) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))

;------------------------------------------------------------------------------
;?????????
[State -1, L KW]
type = ChangeState
value = 2000
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = power >= ifelse(var(10)=1,3000,1000)
triggerall = var(20)=1
Triggerall = (P2BodyDist X = [-9,50]) 
triggerall =(p2bodydist y =[-45,0]) ||(p2statetype=A&& (p2bodydist y =[-50,-15]))
triggerall = statetype != A
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = p2stateno != [800,899]
triggerall = p2stateno!=1220
triggerall = stateno != [2000,3999]
triggerall = statetype!=L
triggerall = (random <= (299* (AIlevel ** 2 / 64.0)));&&var(20)=1
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(10)=0 || (var(57)<100&&var(10)=1)||(var(57)<300&&var(10)=1 &&p2life<600)
;;triggerall = var(27)<5
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =ctrl&&(p2statetype=A||p2movetype=A) ||stateno=101
trigger2 = StateNo = 215 &&(movecontact&&AILevel<5||movehit&&AILevel>=5) &&movetype=A
trigger3 = stateno = 235 && (movecontact&&AILevel<5||movehit&&AILevel>=5)&&movetype=A
trigger4 = stateno = 400 &&(movecontact&&AILevel<5||movehit&&AILevel>=5) && random<45&&movetype=A
trigger5 = stateno = 430 &&(movecontact&&AILevel<5||movehit&&AILevel>=5) && random<45&&movetype=A
trigger6=(stateno=1025&&movetype=A) && ( (movehit&&var(10)=1) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))
trigger7=(stateno=1030&&movetype=A) && ((movehit&&var(10)=1) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && 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 = p2movetype=H || var(8)=1
triggerall = p2stateno!=[120,155]
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = p2statetype !=L
triggerall = (random <= (499* (AIlevel ** 2 / 64.0)))
triggerall =  (power>=2000) || power>=4000
trigger1 = stateno = 215 && movehit
trigger2 = stateno = 245 && movehit
trigger3 = (StateNo = 410+var(9)) && movehit
trigger4 = stateno = 300 && movehit && var(8)=1 && (prevstateno!=[120,155])
trigger5 = stateno = 220 && movehit
trigger6 = stateno = 450 && movehit
trigger7= stateno=430 && movehit
trigger8=stateno=210&& movehit
trigger9=stateno=240 && movehit
trigger10 = statetype=A && ctrl&& var(8)=1
;------------------------------------------------------------------------------

;????????
[State -1, S KC]
type = ChangeState
value = 1251
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = p2stateno != [800,899]
triggerall = p2stateno!=1220
Triggerall = P2BodyDist X = [-20,110]
triggerall = power >=2000 || (p2life<enemy,lifemax/3.4)
triggerall = var(5)=0
triggerall = var(9)=1
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = power >=1000
triggerall = statetype!=L
triggerall =p2movetype=A
Triggerall = Random < (129* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
trigger1 = ( p2movetype=A && ctrl)||( p2movetype=A && statetype!=C &&stateno=101)
;????????
[State -1, S KC]
type = ChangeState
value = 1250
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = p2stateno != [800,899]
Triggerall = P2BodyDist X = [0,90]
triggerall = p2stateno!=1220
triggerall = var(5)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = statetype!=L
triggerall = enemy,vel x >0
triggerall = var(9)=1
triggerall = enemy,numproj=0 && (enemynear,hitdefattr!=SCA,AP)
triggerall =p2movetype=A
Triggerall =  (random <= (129* (AIlevel ** 2 / 64.0)))
triggerall = p2statetype !=L
triggerall = p2statetype!=A
trigger1 = ( p2movetype=A && statetype!=C && ctrl)||( p2movetype=A && statetype!=C &&stateno=101)
;????????
[State -1, L KC]
type = ChangeState
value = 1200
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = p2stateno != [800,899]
Triggerall = P2BodyDist X = [-20,70]
triggerall = var(5)=0
triggerall = var(9)=1
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = statetype!=L
triggerall = enemy,numproj=0 && (enemynear,hitdefattr!=SCA,AP)
triggerall =p2movetype=A
triggerall = (random <= (199* (AIlevel ** 2 / 64.0)))
triggerall = p2statetype !=L
trigger1 = ( p2movetype=A && statetype!=C && ctrl)||( p2movetype=A && statetype!=C &&stateno=101)


;-----------
[State -1, S LT EX]
type = ChangeState
value = 1031
triggerall = power >=1000
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = (P2BodyDist X = [0,40]) || (p2statetype=A && p2bodydist x =[0,65])
triggerall =p2statetype!=A||p2bodydist y =[-75,-40]
Triggerall = Random < (159* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = p2stateno!=1220
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = power>=1000
triggerall = p2statetype=A||p2stateno!=[120,155]
;triggerall = var(27)<5
triggerall = p2statetype!=A || p2movetype=H
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl&&(p2statetype=A&&p2movetype!=H||p2movetype=A)  ||stateno=101)
;trigger2 =stateno=215 && movehit
;trigger3 = stateno = 235 && (movecontact&&AILevel<5||movehit&&AILevel>=5)&&movetype=A
;trigger4 = StateNo = 400 && (time=[4,5]) && random<45&&movetype=A
;trigger5 = StateNo = 205 && animelemtime(2)>0 && random<45&&movetype=A
trigger2 = stateno=[1025,1031]
trigger2 = animelemtime(3)<0 && (movecontact&&AILevel<5||movehit&&AILevel>=5)
trigger2 = var(57)>500 || var(10) && var(57)>100
;------------------------------------------------------------------------------
;?????????
[State -1, S LTAI]
type = ChangeState
value = 1030
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = (P2BodyDist X = [-15,35]) || (p2statetype=A && p2bodydist x =[-11,65])
triggerall =(var(10)=0&&p2bodydist y =[-65,0])||(var(10)=1&&p2bodydist y =[-35,0])
Triggerall =Random < (299* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = var(15)=0 ||var(20)||var(10)
;triggerall = var(27)<5
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = p2stateno!=1220
triggerall = p2statetype=A||p2stateno!=[120,155]
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl&&(p2movetype=A||p2movetype=H) ||stateno=101)
trigger2 = stateno=215 && movehit
trigger3 = stateno = 235 && (movecontact&&AILevel<5||movehit&&AILevel>=5)&&movetype=A
trigger4 = StateNo = 400 && (time=[4,5]) && random<45&&movetype=A
trigger5 = StateNo = 205 && animelemtime(2)>0 && random<45&&movetype=A
trigger6=var(10)=1&&p2statetype=A&&ctrl

;?????????
[State -1, L LTAI]
type = ChangeState
value = 1025
Triggerall = (RoundState = 2) && (AILevel>0) 
Triggerall = (StateType != A)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = (P2BodyDist X = [-15,30]) || (p2statetype=A && p2bodydist x =[0,55])
triggerall =p2bodydist y =[-75,18]
Triggerall = Random < (229* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = p2stateno!=1220
triggerall = p2statetype=A||p2stateno!=[120,155]
;triggerall = var(27)<5
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl&&(p2movetype=A) ||stateno=101)&&  (helper(10003),var(10)=0&&helper(10003),var(11)=0)
trigger2 = stateno=215 && movehit
trigger3 = stateno = 235 && (movecontact&&AILevel<5||movehit&&AILevel>=5)&&movetype=A
trigger4 = StateNo = 400 && (time=[4,5]) && random<45&&movetype=A
trigger5 = StateNo = 205 && animelemtime(2)>0 && random<45&&movetype=A


;---------------------------------------------------------------------
[State -1, AIaw]
type=changestate
value=1100
triggerall = statetype !=A
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = AILevel >0
triggerall = random < (139* (AIlevel ** 2 / 64.0))
Triggerall = (P2BodyDist X = [125,999])
triggerall  = frontedgedist > 100
trigger1 = enemy,numproj >= 1 || p2movetype =A
triggerall=ctrl
;--------------------------------------------------------------------------------------------------
[State -1, AIaw]
type=changestate
value=1101
triggerall =  statetype !=A
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = AILevel >0
triggerall = random < (139* (AIlevel ** 2 / 64.0))
triggerall  = backedgedist > 75
trigger1 = enemy,numproj >= 1 || p2movetype =A
triggerall=ctrl
;--------------------------------------------------------------------------------------------------
[State -1, AIaw]
type=changestate
value=1102
triggerall =  statetype !=A
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = AILevel >0
triggerall = random < (139* (AIlevel ** 2 / 64.0))
triggerall  = frontedgedist > 100
Triggerall = (P2BodyDist X = [76,100] )
trigger1 = p2movetype =A
triggerall=ctrl
;--------------------------------------------------------------------------------------------------
[State -1, AIaw]
type=changestate
value=1103
triggerall = statetype !=A
triggerall = AILevel >0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = random < (139* (AIlevel ** 2 / 64.0))
triggerall  = backedgedist > 75
Triggerall = (P2BodyDist X = [25,75])
trigger1 =  p2movetype =A
triggerall=ctrl
;---------------------------------------------------------------------------
;?????
[State -1, T S]
type = ChangeState
value = 700
triggerall = random < (169* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = backedgebodydist <50
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = statetype != A
trigger1 = (p2movetype=A || enemy,numproj >0)&&ctrl
trigger2 = power >= 1000
trigger2 = (stateno = 150||stateno=152) && p2bodydist x <75&& p2bodydist x <60&& (p2stateno=[1000,4999])
trigger3 = (stateno = [100,102]) && p2movetype=A
;------------------------------------------------------------------------
[State -1, AI Throw]
type = ChangeState
value =  ifelse(backedgebodydist <40,805,800)
triggerall = AILevel >0
triggerall = random <= (199* (AIlevel ** 2 / 64.0))
triggerall = statetype = S
triggerall = p2statetype != A
triggerall = ctrl 
triggerall = p2stateno!=1220
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
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 < 35 && p2dist y <= 0
trigger2 = (p2stateno =[120,150]) &&(p2bodydist X < 35 && p2dist y <= 0)
;==============================================================================
[State -1, Guard]
type = ChangeState
value = 120
triggerall = movetype !=H
triggerall = roundstate = 2
triggerall = stateno!=[120,155]
triggerall=AILevel>0
triggerall = (statetype!=A)
triggerall =(StateNo !=[200,3999])&&(StateNo != 105)
Triggerall =  Random <  (999* (AIlevel ** 2 / 64.0))
triggerall =InGuardDist || enemynear,hitdefattr=SCA,NP,SP,HP || enemynear,hitdefattr = SCA,AA
triggerall =((EnemyNear, movetype=A&& enemynear,hitdefattr!=SCA,AA)||( enemynear,hitdefattr=SCA,NP,SP,HP || enemynear,hitdefattr = SCA,AA))|| enemy,numproj >0
trigger1 = (ctrl ||stateno=20) 
trigger2= prevstateno=5120 && p2movetype=A && p2bodydist x <70
trigger3= stateno=5129 && ctrl&& p2movetype=A && p2bodydist x <70
;????????

;????????
[State -1, SC]
type = ChangeState
value = 220
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = p2stateno!=1220
triggerall = stateno != [800,3999]
Triggerall = (P2BodyDist X = [0,60]) 
triggerall = p2statetype!=A||(p2stateno=[120,155])
Triggerall = Random < (399* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L || p2stateno=5120 && enemy,time>5
triggerall = var(15)=0|| moveguarded
triggerall = p2statetype=C || movecontact
trigger1 = stateno = 215 && (movecontact && AIlevel <6 || movehit&& var(57)>=1000&&AIlevel >=6)
trigger2 = stateno = 205 && (movecontact && AIlevel <6 || movehit&& var(57)>=1000&&AIlevel >=6)
trigger3 = p2statetype=C && p2movetype!=A&&var(10)=0&&ctrl && (p2stateno=5120||p2bodydist x =[35,65])
[State -1, Standing Strong Kick]
type = ChangeState
value = 250
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,75]
;triggerall = var(27)<5 
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = movetype!=H
triggerall = p2stateno!=1220
triggerall = p2statetype!=A
Triggerall = Random < (249* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L|| p2stateno=5120 && enemy,time>5
triggerall = p2statetype = C || p2stateno=5120&& enemy,time>5
triggerall  =var(10)=0|| p2movetype!=H
trigger1= (p2statetype=C || p2movetype!=A)&&var(10)=0&&ctrl
[State -1, SC]
type = ChangeState
value = 450
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,60]
triggerall = p2statetype!=A
Triggerall = Random < (449* (AIlevel ** 2 / 64.0))
triggerall = var(9)=1
triggerall = p2stateno!=1220
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = p2statetype !=L
triggerall = var(10)=0
trigger1 = StateNo = 205 && animelemtime(2)>0 && ((movehit&&AILevel >5)||(movecontact&&AILevel<=5))
trigger2 = stateno = 235 && ((movehit&&AILevel >5)||(movecontact&&AILevel<=5))
trigger3 = StateNo = 430 && ((movehit&&AILevel >5)||(movecontact&&AILevel<=5))&&p2bodydist x  <50
trigger4 = stateno=411  && ((movehit&&AILevel >5)||(movecontact&&AILevel<=5))
;------------------------------------------------------------------------------
;Stand Light Punch
;?§?????p?“?`
[State -1, Stand Light Punch]
type = ChangeState
value =ifelse(p2bodydist x<20,205,200)
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,45]
;triggerall = var(27)<5
triggerall = (p2bodydist y= [-55,0]) && enemy,vel y >=0 && p2movetype!=A
Triggerall =   random <= (400* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = movetype!=H
triggerall = p2statetype != C
triggerall = p2stateno!=1220
triggerall  =var(10)=0|| p2movetype!=H
triggerall = stateno!=900
triggerall = p2movetype!=H 
trigger1= ( ctrl||stateno=20 ||stateno=[101,102])&& helper(10003),var(10)>0&& p2bodydist x <=20
;----------------------------------------------------------------------------
;?????????
[State -1, Stand Strong Punch]
type = ChangeState
value = ifelse(p2bodydist x<30,215,210)
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
;triggerall = var(27)<5
Triggerall = P2BodyDist X = [0,75]
triggerall = p2statetype!=A || p2bodydist x <30 &&p2bodydist y = [-85,-35]
triggerall = helper(10003),var(8)=0
Triggerall =  random <= (400* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = movetype!=H
triggerall = p2stateno!=1220
triggerall = p2statetype != C || p2bodydist x <25
trigger1= ( ctrl||stateno=20 ||stateno=[101,102])&& helper(10003),var(11)>0&& p2bodydist x <=30
trigger2 = ctrl&& stateno=900 && p2bodydist x<60
trigger3=( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[60,75]) && p2statetype!=A &&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0
trigger4=( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[0,30]) && p2statetype=A &&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0


;------------------------------------------------------------------------------
;?????????
[State -1, Stand Light Kick]
type = ChangeState
value = ifelse(p2bodydist x<25,235,230)
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,55]
Triggerall = random <= (400* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = p2statetype!=A || p2bodydist y <-45
triggerall = helper(10003),var(8)=0
triggerall = movetype!=H
triggerall = p2stateno!=1220
triggerall  =var(10)=0|| p2movetype!=H
triggerall = stateno!=900
trigger1= ( ctrl||stateno=20 ||stateno=[101,102])&& helper(10003),var(10)>0&& p2bodydist x <=20
trigger2=( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[26,50]) && p2statetype=A && p2movetype=I&&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0
;---------------------------------------------------------------------------

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

;?????????


;------------------------------------------------------------------------------
;????????
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,40]
triggerall = p2statetype!=A
triggerall = p2stateno!=1220
triggerall = movetype!=H
Triggerall = Random < (400* (AIlevel ** 2 / 64.0)) 
;triggerall = var(27)<5 
triggerall = p2movetype!=A || (enemy,hitdefattr!=SC,AA,AT)
triggerall = p2statetype !=L
triggerall = stateno!=900
triggerall = var(34)=0
triggerall = p2stateno!=1220
triggerall = p2stateno!=[120,155]
triggerall = helper(10003),var(8)=0
triggerall = movetype!=H
triggerall  =var(10)=0|| (p2movetype=H && (p2stateno!=[120,155]))
trigger1 =  ( ctrl||stateno=20 ||stateno=[101,102])&& helper(10003),var(10)>0&& p2bodydist x <=30

;????????
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410+var(9)
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,40]
triggerall = p2statetype!=A
triggerall = movetype!=H
triggerall = p2stateno!=1220
Triggerall = Random < (400* (AIlevel ** 2 / 64.0)) 
triggerall = p2statetype !=L
;triggerall = var(27)<5 
triggerall  =var(10)=0|| p2movetype!=H
;triggerall = var(16)!=1100
triggerall = helper(10003),var(8)=0||p2statetype=A && !var(9)
triggerall = p2movetype!=A || (enemy,hitdefattr!=SC,AA,AT)
triggerall = statetype != A
trigger1=( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[21,40]) && p2statetype=A && p2movetype=I&&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0
trigger2= ( ctrl||stateno=20 ||stateno=[101,102])&& helper(10003),var(11)>0&& p2bodydist x <=30
trigger3 = ctrl&& stateno=900 && p2bodydist x<20
;------------------------------------------------------------------------------
;????????
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,45]
triggerall = p2statetype!=A
triggerall = p2stateno!=1220
;triggerall = var(27)<5 || p2statetype=S
Triggerall = Random < (400* (AIlevel ** 2 / 64.0)) 
triggerall = p2statetype !=L
triggerall = helper(10003),var(8)=0
triggerall = movetype!=H
triggerall = p2movetype!=A || (enemy,hitdefattr!=CA,AA,AT)
triggerall  =var(10)=0 || (p2movetype=H && (p2stateno!=[120,155]))
trigger1= ( ctrl||stateno=20 ||stateno=[101,102])&& helper(10003),var(10)>0&& p2bodydist x <=40
trigger2= p2statetype=S && ctrl && p2bodydist x <40&& (helper(10003),var(10)=0 && helper(10003),var(11)=0)
trigger4= var(34)=1 && p2bodydist x <45&&ctrl
trigger5 = StateNo = 400&& movehit
;????????
[State -1, Crouching Strong Kick]
type = ChangeState
value =  440
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,80]
triggerall = p2statetype!=A
triggerall = p2stateno!=1220
;triggerall = var(27)<5 || p2statetype=S
Triggerall = Random <(400* (AIlevel ** 2 / 64.0)) 
triggerall = p2statetype !=L
triggerall = helper(10003),var(8)=0
triggerall = stateno!=900
triggerall = movetype!=H
triggerall = helper(10003),var(8)=0
triggerall = p2movetype!=A || (enemy,hitdefattr!=CA,AA,AT)
triggerall  =var(10)=0|| p2movetype!=H
trigger1=( ctrl||stateno=20 ||stateno=[101,102]) && (p2bodydist x=[55,80]) && p2statetype!=A &&random <199&&helper(10003),var(11)=0&&helper(10003),var(10)=0

;------------------------------------------------------------------------------
;???????
[State -1, DK]
type = ChangeState
value = 660
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,3999]
triggerall = (p2bodydist y>=-20)
Triggerall = Random <(450* (AIlevel ** 2 / 64.0)) 
triggerall = pos y <-35
triggerall = vel y =[-1.5,1.5]
triggerall = vel x >0
triggerall = ((p2bodydist x  / p2bodydist y) > .4 && (p2bodydist x  /p2bodydist y) <= 1.35) && p2bodydist x  > 0
triggerall = stateno != 105 &&var(3)!=2
trigger1 = var(3)!=2 && ctrl && statetype=A
;------------------------------------------------------------------------------
;????????
[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 = [-8,40]
Triggerall = Random <= (450* (AIlevel ** 2 / 64.0))
triggerall = stateno!=901
;triggerall = p2statetype !=L
trigger1 = ctrl || stateno=57

;??????????
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = A)
triggerall = stateno != [800,3999]
triggerall = vel y>-1 || p2statetype=A
triggerall = ( p2statetype=C &&p2bodydist y=[-15,70])||( p2statetype!=C&&p2bodydist y=[-28,90]) 
triggerall = p2bodydist x = [-8,65]
Triggerall = Random <= (450* (AIlevel ** 2 / 64.0))
triggerall = stateno!=901
;triggerall = p2statetype !=L
trigger1 = ctrl || stateno=57




;------------------------------------------------------------------------------
;????????
[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 = [-25,40]
Triggerall = Random <= (450* (AIlevel ** 2 / 64.0))
triggerall = stateno!=901
;triggerall = p2statetype !=L
trigger1 = ctrl || stateno=57

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

;------------------------------------------------------------------------------
;???????
[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,85]
Triggerall = Random < (ifelse(p2movetype=A,300,75)* (AIlevel ** 2 / 64.0))
;triggerall = p2statetype !=L
trigger1 = ctrl


;??????????
[State -1, S BB AI]
type = ChangeState
value = 1017
triggerall = random< (350* (AIlevel ** 2 / 64.0))
triggerall = (time>5&&statetype=A)
Triggerall = (RoundState = 2) && (AILevel>0)&&power>=1000&&var(20)
triggerall = numhelper(1001)<=0
triggerall = vel y >-2|| p2statetype=A
triggerall = (stateno!=41 && pos y <-35)
triggerall =((p2bodydist x  / p2bodydist y) > .5 && (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=(stateno=1030&&animelemtime(4)>=0) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))
trigger3=(stateno=1031 &&animelemtime(4)>=0) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))
;trigger4= stateno=50
;??????????
[State -1, S BB AI]
type = ChangeState
value =  1016
triggerall = random< (350* (AIlevel ** 2 / 64.0))
triggerall = (time>5&&statetype=A)
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1001)<=0
triggerall = vel y >-2|| p2statetype=A
;triggerall = var(15)=0
;triggerall= var(9)=1
triggerall = (stateno!=41 && pos y <-35)
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=(stateno=1030&&animelemtime(3)>=0) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))
trigger3=(stateno=1031 &&animelemtime(3)>=0) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))
;trigger4= stateno=50

;------------------------------------------------------
;??????????
[State -1, L BB AI]
type = ChangeState
value = 1015
triggerall = random< (350* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1001)<=0
triggerall = (statetype=A)
triggerall = vel y >-2 || p2statetype=A
triggerall = (stateno!=41 && pos y <-35)
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=57)) ;&&(var(19)=1||var(17)<=7)
trigger2=(stateno=1030&&animelemtime(3)>=0) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))
trigger3=(stateno=1031 &&animelemtime(3)>=0) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1)))

;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1052
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = statetype!=A
triggerall = power>=1000&&(var(20)||p2bodydist x >240) 
Triggerall = (p2stateno=5110 &&P2BodyDist X = [130,290])||( p2bodydist x =[106,240])
Triggerall = Random < (250* (AIlevel ** 2 / 64.0))
triggerall = var(9)=0
;triggerall = var(5)=0
;;triggerall = var(27)<5
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl ||stateno=101)&&(enemy,numproj>0||p2stateno=5120)
trigger2= p2stateno=5110&& ctrl


;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
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 = (p2stateno=5110 &&P2BodyDist X = [130,220])||(p2bodydist x =[106,230])
Triggerall = Random < (250* (AIlevel ** 2 / 64.0))
triggerall = var(9)=0
;triggerall = var(5)=0
;;triggerall = var(27)<5
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl ||stateno=101)&&(enemy,numproj>0||p2stateno=5110)
trigger2= (stateno=205||stateno=235||stateno=215||stateno=245||stateno=[400,499]) &&movecontact && p2statetype=A
;------------------------------------------------------------------------------
;?????????
[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 = ((p2stateno=5110 &&P2BodyDist X = [70,130])||( p2bodydist x =[35,105]))||movecontact
Triggerall = Random <(250* (AIlevel ** 2 / 64.0))
triggerall = var(9)=0
;triggerall = var(5)=0
triggerall = p2statetype!=A || p2stateno=105||movecontact
;;triggerall = var(27)<5
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl ||stateno=101)&&(enemy,numproj>0||p2stateno=5110)
trigger2= (stateno=205||stateno=235||stateno=215||stateno=245||stateno=[400,499]) &&movecontact && (p2statetype=A || moveguarded && (stateno=410||stateno=215||stateno=440))
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1042-var(9)
Triggerall = (RoundState = 2) && (AILevel>0)&&power>=1000
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = P2BodyDist X = [0,60]
triggerall =(p2bodydist y =[-65,10]) ||(p2movetype=H &&p2statetype=A&& (p2bodydist y =[-65,-35]))
Triggerall = Random < (199* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = p2stateno!=1220
;;triggerall = var(27)<5
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = stateno!=41
triggerall = power>=1000
triggerall = var(16)=0
triggerall= var(20) ||var(10) 
triggerall = p2statetype!=C  ||( stateno=250 && movecontact &&var(9)=1)
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(p2statetype=A) 
trigger2 = stateno = 450 && (movecontact&&AILevel<5||movehit&&AILevel>=5)
;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1040
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
Triggerall = P2BodyDist X = [0,140]
triggerall = p2stateno!=1220
triggerall =(p2bodydist y =[-65,25]) ||(p2movetype=H &&p2statetype=A&& ((p2bodydist y =[-85,-35])||stateno=[1025,1031]))
Triggerall = Random < (199* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0
triggerall = stateno!=41
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = var(16)=0
;;triggerall = var(27)<5
triggerall = p2statetype!=C ||( stateno=250 && movecontact &&var(9)=1)
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =(ctrl||stateno=101)&&(enemy,numproj>0)
trigger2 = stateno = 450 && (movecontact&&AILevel<5||movehit&&AILevel>=5)
trigger3= (StateNo = 410+var(9))&&movehit
trigger4= stateno=250 && movecontact &&var(9)=1


;------------------------------------------------------------------------------
;?????????
[State -1, L LTAI]
type = ChangeState
value = 1035
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,899]
triggerall = p2stateno != [800,899]
triggerall = stateno != [2000,3999]
triggerall = p2stateno!=1220
Triggerall = P2BodyDist X = [0,70]
triggerall =(p2bodydist y =[-65,25]) ||(p2movetype=H &&p2statetype=A&& ((p2bodydist y =[-65,-25])||stateno=[1025,1031]))
Triggerall =Random < (399* (AIlevel ** 2 / 64.0))
triggerall = p2statetype !=L
triggerall = var(5)=0
;;triggerall = var(27)<5
triggerall = var(38)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = stateno!=41
triggerall = p2statetype!=C  ||( stateno=250 && movecontact &&var(9)=1)
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]))
trigger1 =ctrl&&(p2movetype=H &&p2statetype=A)||stateno=101
trigger2 = stateno = 450 && (movecontact&&AILevel<5||movehit&&AILevel>=5)
trigger3= (StateNo = 410+var(9))&&movehit 
trigger4= stateno=430 && movehit && (var(9)=0 ||p2bodydist x<40)
trigger5 = stateno=215 && movehit
trigger6= stateno=245 && movehit
trigger7=stateno=235&&movehit
trigger8= stateno=250 && movecontact &&var(9)=1
trigger9 = (p2bodydist y=[-45,0])&& (stateno=1030&&animelemtime(3)>0&&statetype!=A) && (((movehit&&var(10)=0) || (movehit&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>100 && var(10)=1))) &&(var(20)||var(10))

;??????????
[State -1, S BB AI]
type = ChangeState
value = 1006
triggerall = random< (199* (AIlevel ** 2 / 64.0))
triggerall = (p2bodydist x <40 && var(9)=0) ||  (p2bodydist x >70 && var(9)=1)
triggerall = (statetype!=A &&p2bodydist y =[-55,0])
Triggerall = (RoundState = 2) && (AILevel>0)&&power>=1000&&var(20)
triggerall = numhelper(1001)<=0
triggerall =p2bodydist x >70
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = (StateNo = 410+var(9)) &&(movecontact&&AILevel<5||movehit&&AILevel>=5)
trigger2 = stateno=430 &&var(9)=0 && movehit
trigger3 = stateno=450 &&var(9)=1 && movehit

;??????????
[State -1, S BB AI]
type = ChangeState
value = 1005
triggerall =  random< (199* (AIlevel ** 2 / 64.0))
triggerall = (statetype!=A &&p2bodydist y =[-55,0])
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1001)<=0
triggerall = var(15)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = p2bodydist x >70
triggerall = !movehit || stateno=215 ||StateNo = 410+var(9)||stateno=450 
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = helper(10003),var(20)
trigger2 = StateNo = 215 && (time=[6,8])
trigger3 = (StateNo = 410+var(9)) && movecontact
trigger4 = stateno = 440 &&(moveguarded)&& movetype=A
trigger6=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)&&(prevstateno=[120,155])
trigger7= (StateNo = 410+var(9))&& (time=[4,11])
trigger8=stateno=450 &&var(9)=1 && movehit && p2statetype=C
;------------------------------------------------------
;??????????
[State -1, L BB AI]
type = ChangeState
value =  1000
triggerall = random< (199* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1001)<=0
triggerall = (statetype!=A &&p2bodydist y =[-55,0])
triggerall = var(15)=0
triggerall = p2bodydist x >70
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = !movehit || stateno=215 ||StateNo = 410+var(9)||stateno=450 
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = helper(10003),var(20)
trigger2 = StateNo = 215 && (time=[6,8])
trigger3 = (StateNo = 410+var(9))&& (time=[4,11])
trigger4 = stateno=450 &&var(9)=1 && movehit && p2statetype=C

;------------------------------------------------------
;??????????
[State -1, L BB AI]
type = ChangeState
value = 1013
triggerall = random< (199* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1001)<=0
triggerall = p2bodydist y =[-55,0]
triggerall = statetype!=A
triggerall = var(15)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall =var(9)=1 && (power>2000||(var(20)&&power>=1000))
triggerall = p2bodydist x >150
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = helper(10003),var(21)
;------------------------------------------------------
;??????????
[State -1, L BB AI]
type = ChangeState
value = 1011
triggerall = random< (199* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1001)<=0
triggerall = p2bodydist y =[-55,0]
triggerall = statetype!=A
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = var(15)=0
triggerall = p2bodydist x >150
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = helper(10003),var(21)
;------------------------------------------------------
;??????????
[State -1, L BB AI]
type = ChangeState
value = 1010
triggerall = random< (199* (AIlevel ** 2 / 64.0))
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = numhelper(1001)<=0
triggerall = p2bodydist y =[-55,0]
triggerall = statetype!=A
triggerall = var(15)=0
triggerall = helper(10003),var(10)=0
triggerall = helper(10003),var(11)=0
triggerall = helper(10003),var(8)=0
triggerall = p2bodydist x >150
triggerall = (p2stateno!=1151&&(p2stateno!=[1360,1361]) &&(p2stateno!=[1290,1292]))
trigger1 = helper(10003),var(20)
;---------------------------------------------------------------------------
;?????
;[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, 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)
trigger1 = statetype != A
trigger1 = (ctrl ||stateno=101) && p2statetype=A &&( p2bodydist x =[45,75])&&enemy,vel x >4
trigger2 = power >= 1000
trigger2 = (stateno = [150,153])&& p2bodydist x <60&& (p2stateno=[1000,4999])

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


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

[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
trigger1 = (ctrl && p2bodydist x <25&&(p2statetype=L || p2stateno=1220))

[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(9)
triggerall = (var(9)=1&&command = "Misogi") || (command="KKZ"&&var(9)=0) 
triggerall = power >= ifelse(var(10)=1,2000,3000)
triggerall = var(57)>=1000 || (var(10)=1 && var(57)>0)
triggerall = AILevel=0
triggerall = roundstate=2
triggerall= statetype != A
trigger1 = ctrl ||(stateno=101)
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0
trigger10= (stateno=1025&&movetype=A) && ( (movecontact&&var(10)=1)) &&  (var(57)>0 && var(10)=1)
trigger11= (stateno=1030&&movetype=A) && ( (movecontact&&var(10)=1)) && (var(57)>0 && var(10)=1)
trigger12= (stateno=1031) && ((movecontact&&var(10)=1)) && (var(57)>0 && var(10)=1)
trigger13= (stateno=1035) && ( (movecontact&&var(10)=1)) && (var(57)>0 && var(10)=1)
trigger14= (stateno=1040) && ( (movecontact&&var(10)=1)) && (var(57)>0 && var(10)=1)
trigger15=stateno=200 && var(10)=1&&movecontact 
trigger16=stateno=210 && var(10)=1&&movecontact
trigger17=stateno=230 && var(10)=1&&movecontact
trigger18=stateno=240 && var(10)=1&&movecontact
trigger19=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger20= StateNo = 1050 &&((movecontact&&var(10)=1)) && (var(57)>0 && var(10)=1)
trigger21= stateno=220&&(var(10)=1) && movecontact
trigger22= (stateno=[1000,1006]) && (animelemtime(5)>1 && animelemtime(7)<0)
trigger23= (stateno=[1010,1012]) && (animelemtime(12)>1 && animelemtime(14)<0)
trigger24= (stateno=1013) && (animelemtime(15)>1 && animelemtime(16)<2)
trigger25=stateno=220 && ((animelem=7&&movecontact)||(var(10)=1&&movecontact)||(animelemtime(5)>0))
trigger26=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
trigger27=(stateno=[2000,2006]) && movecontact&& (var(57)>0 && var(10)=1)
;---------------------------------------------------------------------------
;Shin Shouryuu Ken LDM
[State -1, SGS]
type = ChangeState
value = 2010
triggerall = command = "SGS" && Power >= 2000
triggerall = statetype!=A
triggerall = roundstate=2
triggerall = AILevel=0
trigger1 = ctrl ||(stateno=101)
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13= (stateno=1035) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger14= (stateno=1040) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger15=stateno=200 &&animelemtime(2)>0
trigger16=stateno=210 &&animelemtime(4)>0
trigger17=stateno=230 &&animelemtime(2)>0
trigger18=stateno=240 && animelemtime(6)>0
trigger19=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger20= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21= stateno=220&&((animelemtime(6)<0&&var(10)=0)||(var(10)=1)) && movecontact
trigger22= (stateno=[1000,1006]) && (animelemtime(5)>1 && animelemtime(7)<0)
trigger24= (stateno=[1010,1012]) && (animelemtime(12)>1 && animelemtime(14)<0)
trigger25= (stateno=1013) && (animelemtime(15)>1 && animelemtime(16)<2)
trigger26=stateno=220 && animelemtime(5)>0
trigger27=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
;---------------------------------------------------------------------------
;Shin Shouryuu Ken LDM
[State -1, Shin Shouryuu Ken EX]
type = ChangeState
value = 2005+var(9)
triggerall = command = "shinshoryukenEX" && Power >= 2000
triggerall = statetype!=A
triggerall = roundstate=2
triggerall = AILevel=0
trigger1 = ctrl ||(stateno=101)
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13= (stateno=1035) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger14= (stateno=1040) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger15=stateno=200 && var(10)=1&&movecontact
trigger16=stateno=210 && var(10)=1&&movecontact
trigger17=stateno=230 && var(10)=1&&movecontact
trigger18=stateno=240 && var(10)=1&&movecontact
trigger19=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger20=stateno=440 && animelemtime(5)>0
trigger21= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger22= stateno=220&&((animelemtime(6)<0&&var(10)=0)||(var(10)=1)) && movecontact
trigger23= (stateno=[1000,1006]) && (animelemtime(5)>1 && animelemtime(7)<0)
trigger24= (stateno=[1010,1012]) && (animelemtime(12)>1 && animelemtime(14)<0)
trigger25= (stateno=1013) && (animelemtime(15)>1 && animelemtime(16)<2)
trigger26=stateno=220 && var(10)=1&&movecontact
trigger27=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
trigger28= stateno=220 && animelemtime(5)>0
;---------------------------------------------------------------------------
;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
trigger1 = ctrl ||(stateno=101)
trigger2 = StateNo = 205&&animelemtime(2)>=0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13= (stateno=1035) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger14= (stateno=1040) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger15=stateno=200 && var(10)=1&&movecontact
trigger16=stateno=210 && var(10)=1&&movecontact
trigger17=stateno=230 && var(10)=1&&movecontact
trigger18=stateno=240 && var(10)=1&&movecontact
trigger19=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger20= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21= stateno=220&&((animelemtime(6)<0&&var(10)=0)||(var(10)=1)) && movecontact
trigger22= (stateno=[1000,1006]) && (animelemtime(5)>1 && animelemtime(7)<0)
trigger23= (stateno=[1010,1012]) && (animelemtime(12)>1 && animelemtime(14)<0)
trigger24= (stateno=1013) && (animelemtime(15)>1 && animelemtime(16)<2)
trigger25=stateno=220 && var(10)=1&&movecontact
trigger26=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
trigger27= stateno=220 && animelemtime(5)>0

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



;---------------------------------------------------------------------------
;EX Tatsumaki Senpuu Kyaku
[State -1, EX Tatsumaki Senpuu Kyaku]
type = ChangeState
value = 1042-var(9)
triggerall = command = "tatsuEX"
triggerall = power>=1000
triggerall =  stateno!=41
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13= (stateno=1035&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger14= (stateno=1040&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger15=stateno=200 && var(10)=1&&movecontact
trigger16=stateno=210 && var(10)=1&&movecontact
trigger17=stateno=230 && var(10)=1&&movecontact
trigger18=stateno=240 && var(10)=1&&movecontact
trigger19=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger20= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21=stateno=220 && var(10)=1&&movecontact
trigger22=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
trigger23= stateno=250 && movecontact &&var(9)=1
trigger24= stateno=1055 && ((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 = 1031
triggerall = command = "shoryuEX" || command = "hadouEX"&& StateNo = 100 
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = power>=1000
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12=stateno=200 && var(10)=1&&movecontact
trigger13=stateno=210 && var(10)=1&&movecontact
trigger14=stateno=230 && var(10)=1&&movecontact
trigger15=stateno=240 && var(10)=1&&movecontact
trigger16=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger17= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger18=stateno=220 && var(10)=1&&movecontact
trigger19=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)

;---------------------------------------------------------------------------
;EX Hadou Ken
[State -1, EX Hadou Ken]
type = ChangeState
value = ifelse(statetype=A,1017,1006)
triggerall = command = "hadouEX" 
triggerall = AILevel=0
triggerall = NumProj = 0
triggerall = roundstate=2
triggerall = (stateno!=41 && pos y <-35)||statetype!=A
triggerall = power>=1000
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
trigger21=(stateno=1035||stateno=1040||stateno=1041)&& ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger22= stateno=1055 && ((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  shaka Hadou Ken]
type = ChangeState
value = 1012+var(9)
triggerall = command = "shakuEX" 
triggerall = statetype != A
triggerall = AILevel=0
triggerall = NumProj = 0
triggerall = roundstate=2
triggerall = power>=1000
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
;---------------------------------------------------------------------------
;weak Joudan Sokutou Geri
[State -1, EX demon flip]
type = ChangeState
value = ifelse(var(9)=1,1251,1052)
triggerall = (command = "joudanEX" &&var(9)=0)||(command = "counterex" &&var(9)=1)
triggerall = statetype != A
triggerall = AILevel=0
triggerall = power>=1000
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10=stateno=200 && var(10)=1&&movecontact
trigger11=stateno=210 && var(10)=1&&movecontact
trigger12=stateno=230 && var(10)=1&&movecontact
trigger13=stateno=240 && var(10)=1&&movecontact
trigger14=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger15= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger16= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger17= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger18= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
;---------------------------------------------------------------------------
;EX Hadou Ken
[State -1, Asura Senkuu P F]
type = ChangeState
value = 1100
triggerall = command = "ASPF" 
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = statetype!=A
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
;---------------------------------------------------------------------------
;EX Hadou Ken
[State -1, Asura Senkuu P B]
type = ChangeState
value = 1101
triggerall = command = "ASPB" 
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = statetype!=A
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
;---------------------------------------------------------------------------
;EX Hadou Ken
[State -1, Asura Senkuu K B]
type = ChangeState
value = 1102
triggerall = command = "ASKF" 
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = statetype!=A
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18=stateno=440 && animelemtime(5)>0
trigger19= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger20=stateno=220 && var(10)=1&&movecontact
trigger21=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
;---------------------------------------------------------------------------
;EX Hadou Ken
[State -1, Asura Senkuu K B]
type = ChangeState
value = 1103
triggerall = command = "ASKB" 
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = statetype!=A
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)

;---------------------------------------------------------------------------
;Weak Shouryuu Ken
[State -1, Weak Shouryuu Ken]
type = ChangeState
value = 1025
triggerall = command = "shoryux" || command = "hadoux" && StateNo = 100
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10=stateno=200 && var(10)=1&&movecontact
trigger11=stateno=210 && var(10)=1&&movecontact
trigger12=stateno=230 && var(10)=1&&movecontact
trigger13=stateno=240 && var(10)=1&&movecontact
trigger14=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger15= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger16=stateno=220 && var(10)=1&&movecontact
trigger17=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
;---------------------------------------------------------------------------
;Strong Shouryuu Ken
[State -1, Strong Shouryuu Ken]
type = ChangeState
value = 1030
triggerall = command = "shoryuy" || command = "hadouy" && StateNo = 100
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205&&animelemtime(2)>=0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10=stateno=200 && var(10)=1&&movecontact
trigger11=stateno=210 && var(10)=1&&movecontact
trigger12=stateno=230 && var(10)=1&&movecontact
trigger13=stateno=240 && var(10)=1&&movecontact
trigger14=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger15= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger16=stateno=220 && var(10)=1&&movecontact
trigger17=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
;---------------------------------------------------------------------------
;weak Joudan Sokutou Geri
[State -1, strong demon flip]
type = ChangeState
value = ifelse(var(9)=1,1250,1051)
triggerall = (command = "joudanb" &&var(9)=0)||(command = "counterb" &&var(9)=1)
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205&&animelemtime(2)>=0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10=stateno=200 && var(10)=1&&movecontact
trigger11=stateno=210 && var(10)=1&&movecontact
trigger12=stateno=230 && var(10)=1&&movecontact
trigger13=stateno=240 && var(10)=1&&movecontact
trigger14=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger15= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger16= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger17= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger18=stateno=220 && var(10)=1&&movecontact
trigger19=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
;---------------------------------------------------------------------------
;weak Joudan Sokutou Geri
[State -1, weak demon flip]
type = ChangeState
value = ifelse(var(9)=1,1200,1050)
triggerall = (command = "joudana" &&var(9)=0)||(command = "countera" &&var(9)=1)
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10=stateno=200 && var(10)=1&&movecontact
trigger11=stateno=210 && var(10)=1&&movecontact
trigger12=stateno=230 && var(10)=1&&movecontact
trigger13=stateno=240 && var(10)=1&&movecontact
trigger14=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger15=stateno=440 && animelemtime(5)>0
trigger16= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger17= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger18= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
;---------------------------------------------------------------------------
;Weak Hadou Ken
[State -1, Weak shaku Hadou Ken]
type = ChangeState
value = 1010
triggerall = command = "shakux"
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = NumProj = 0
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
;---------------------------------------------------------------------------
;Strong Hadou Ken
[State -1, Weak shaku Hadou Ken]
type = ChangeState
value = 1011
triggerall = command = "shakuy"
triggerall = statetype != A
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = NumProj = 0
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)

;---------------------------------------------------------------------------
;Weak Tatsumaki Senpuu Kyaku
[State -1, Weak Tatsumaki Senpuu Kyaku]
type = ChangeState
value = 1035
triggerall = command = "tatsua"
triggerall = AILevel=0
triggerall =  stateno!=41
triggerall = roundstate=2
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
trigger21= stateno=250 && movecontact &&var(9)=1
trigger22= stateno=1055 && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;Strong Tatsumaki Senpuu Kyaku
[State -1, Strong Tatsumaki Senpuu Kyaku]
type = ChangeState
value = 1040
triggerall = command = "tatsub"
triggerall = AILevel=0
triggerall = roundstate=2
triggerall =  stateno!=41
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18=stateno=410 && animelemtime(5)>0
trigger19=stateno=440 && animelemtime(5)>0
trigger20= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger21=stateno=220 && var(10)=1&&movecontact
trigger22=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
trigger23= stateno=250 && movecontact &&var(9)=1
trigger24= stateno=1055 && ((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 Hadou Ken]
type = ChangeState
value = ifelse(statetype=A,1015,1000)
triggerall = command = "hadoux"
triggerall = AILevel=0
triggerall = roundstate=2
triggerall = (stateno!=41 && pos y <-35)||statetype!=A
triggerall = NumProj = 0
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
trigger21=(stateno=1035||stateno=1040||stateno=1041)&& ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger22= stateno=1055 && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;---------------------------------------------------------------------------
;Strong Hadou Ken
[State -1, Weak Hadou Ken]
type = ChangeState
value = ifelse(statetype=A,1016,1005)
triggerall = command = "hadouy"
triggerall = AILevel=0
triggerall = (stateno!=41 && pos y <-35)||statetype!=A
triggerall = roundstate=2
triggerall = NumProj = 0
trigger1 = ctrl ||(stateno=101) 
trigger2 = StateNo = 205 &&animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0
trigger8 = stateno=440 && animelemtime(5)>0
trigger9 = StateNo = 450&& animelemtime(3)>0&&movetype=A
trigger10= (stateno=1025&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger11= (stateno=1030&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger12= (stateno=1031&&movetype=A) && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger13=stateno=200 && var(10)=1&&movecontact
trigger14=stateno=210 && var(10)=1&&movecontact
trigger15=stateno=230 && var(10)=1&&movecontact
trigger16=stateno=240 && var(10)=1&&movecontact
trigger17=stateno=245 && ((var(9)=1&&var(10)=1)||var(9)=0)&&((var(9)=1&&movecontact)||(var(9)=0&&animelemtime(3)>0))
trigger18= StateNo = 1050 &&((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger19=stateno=220 && var(10)=1&&movecontact
trigger20=stateno=300 && ((movetype=A && animelemtime(ifelse(var(9)=0,3,5))>0)||movecontact)
trigger21=(stateno=1035||stateno=1040||stateno=1041)&& ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
trigger22= stateno=1055 && ((movehit&&var(10)=0) || (movecontact&&var(10)=1)) && ((var(57)>=500 && var(10)=0)||(var(57)>0 && var(10)=1))
;===========================================================================
;---------------------------------------------------------------------------
;?????
[State -1, T S]
type = ChangeState
value = 710
triggerall = command = "evade" && command = "holdback"
triggerall = AILevel=0
trigger1 = statetype = S
trigger1 = ctrl ||stateno=101
trigger2 = power >= 1000
trigger2 = stateno = [150,151]

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

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


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

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

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

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

;------------------------------------------------------------------------------
;?????
[State -1, MAXACTIVATE]
type = ChangeState
value = ifelse(statetype=A,901,900)
triggerall = command = "MAX"
triggerall = var(57)>=1000
triggerall = AILevel=0
trigger1 = ctrl ||stateno=101
trigger2 = StateNo = 205 && animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 = StateNo = 245 &&animelemtime(8)>0
trigger6 =StateNo = 400&& animelemtime(2)>0
trigger7 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger8 = StateNo = 430&& animelemtime(2)>0
trigger9 = stateno=440 && animelemtime(5)>0
trigger10 = stateno = 300 && movecontact
trigger11 = stateno = 310 && movecontact
trigger12=StateNo = 200 && 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(6)>0
trigger17= StateNo = 450 && animelemtime(3)>0


;===========================================================================
;?????
[State -1, Throw]
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 = "x"
triggerall = command = "holdfwd"
triggerall = command!="holddown"
triggerall = statetype != A
triggerall = AILevel=0
trigger1 = ctrl||stateno=101
trigger2 = StateNo = 205 && animelemtime(2)>0
trigger3 = StateNo = 215 &&((animelemtime(3)>0&&var(9)=0)||(animelemtime(2)>0&&var(9)=1))
trigger4 = StateNo = 235&&animelemtime(2)>0
trigger5 =StateNo = 400&& animelemtime(2)>0
trigger6 = (StateNo = 410+var(9))&& animelemtime(ifelse(var(9)=1,3,5))>0
trigger7 = StateNo = 430&& animelemtime(2)>0

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


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

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




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

;?????????


;?????????
[State -1, Standing Strong Kick]
type = ChangeState
value = ifelse(p2bodydist x<=20,245,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 = 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

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

[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = command = "y"
triggerall = AILevel=0
triggerall = command = "holddown"&&command="holdfwd"
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
trigger4 = StateNo = 200&& animelemtime(2)>0
;????????
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"&&(command!="holdfwd"||var(9)=0)
triggerall = AILevel=0
triggerall = statetype != A
trigger1 = ctrl ||stateno=101


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

;------------------------------------------------------------------------------
;????????
[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 
;------------------------------------------------------------------------------
;divekick
[State -1, Divekick]
type = ChangeState
value = 660
triggerall = command = "a" && command="holddown"
triggerall = AILevel=0
triggerall = vel y =[-1.5,1.5]
triggerall = vel x >0
triggerall = stateno != 105 && stateno!=41
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 
