

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

;controller user blazblue
;remove the ";" to use this layout but
;add the ";" to the layout above it.
;[Remap]
;x = x
;y = y
;b = z
;a = a
;z = b
;c = c
;s = s

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

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


command.buffer.time = 1

;-| 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 = "FE"
command = ~$F,D,$B,$U,a
time = 40
buffer.time=10
[command]
name = "FE"
command = ~$F,D,$B,$U,~a
time =40
buffer.time=10
[command]
name = "FE"
command = ~D,$B,$U,$F,a
time = 40
buffer.time=10
[command]
name = "FE"
command =~D,$B,$U,$F,~a
time = 40
buffer.time=10
[command]
name = "FE"
command = ~$B,$U,$F,D,a
time = 40
buffer.time=10
[command]
name = "FE"
command =~$B,$U,$F,D,~a
time = 40
buffer.time=10
[command]
name = "FE"
command = ~$U,$F,D,$B,a
time =40
buffer.time=10
[command]
name = "FE"
command =~$U,$F,D,$B,~a
time = 40
buffer.time=10

[Command]
name = "FC"   ;Same name as above
command = ~F, $D, B, $F,z
time = 20
[Command]
name = "FC"   ;Same name as above
command =~F, $D, B, $F,~z
time = 20
buffer.time=8

[Command]
name = "FD"
command = ~D, $F, D, $F, a
time =25

[Command]
name = "FD"
command =~D, $F, D, $F, ~a
time = 25
buffer.time=12

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

[Command]
name = "HCF2"
command = ~D,DF,$F,y

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

[Command]
name = "HCF4"
command = ~D,DF,$F,a
[Command]
name = "DP_y"
command = ~F, D,DF, y
time=15
[Command]
name = "DP_y"
command = F, D,DF, ~y
time=15
[Command]
name = "DP_z"
command = ~F, D,DF, z
time=15
[Command]
name = "DP_z"
command = F, D,DF, ~z
time=15
[Command]
name = "DP_a"
command = ~F, D,DF,a
time=15
[Command]
name = "DP_a"
command = F, D,DF,~a
time=15

[Command]
name = "HCB"
command = ~$F,D, $B,a
time=25


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

[Command]
name = "QCF_z"
command = ~F, D, B, z
[Command]
name = "QCF_z"
command = ~F, D, B, ~z

[Command]
name = "QCF_a"
command =~F, D, B, a
[Command]
name = "QCF_a"
command = ~F, D, B, ~a


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

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

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



[Command]
name = "DD_x"
command = D, D, x
[Command]
name = "DD_x"
command = D, D, ~x

[Command]
name = "DD_y"
command = D, D, y
[Command]
name = "DD_y"
command = D, D, ~y

[Command]
name = "DD_z"
command = D, D, z
[Command]
name = "DD_z"
command = D, D, ~z

[Command]
name = "DD_a"
command = D, D, a
[Command]
name = "DD_a"
command = D, D, ~a


;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10
[Command]
name = "SJ"
command = ~$D,$U
time = 15
[Command]
name = "FF+"     ;Required (do not remove)
command = F, F
time = 15
buffer.time = 2
;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery";Required (do not remove)
command = x+y
time = 1
[Command]
name = "recovery";Required (do not remove)
command = y+z
time = 1
[Command]
name = "recovery";Required (do not remove)
command = x+z
time = 1
[Command]
name = "cancel";Required (do not remove)
command = x+y+z
time = 1

[Command]
name = "cancel";Required (do not remove)
command = c
time = 1

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

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

;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time =2
[Command]
name = "b"
command = b
time = 2
[Command]
name = "c"
command = c
time = 2
[Command]
name = "x"
command = x
time = 1 
[Command]
name = "y"
command = y
time = 2
[Command]
name = "z"
command = z
time = 2
[Command]
name = "start"
command = s
time = 1
[Command]
name = "up" ;Required (do not remove)
command = $U
time = 1
;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1

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

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

[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1
;-| Hold button |--------------------------------------------------------------
[Command]
name = "holda";Required (do not remove)
command = /a
time = 1

[Command]
name = "holdb";Required (do not remove)
command = /b
time = 1

[Command]
name = "holdc" ;Required (do not remove)
command = /c
time = 1

[Command]
name = "holdx";Required (do not remove)
command = /x
time = 1

[Command]
name = "holdy";Required (do not remove)
command = /y
time = 1
[Command]
name = "holdz";Required (do not remove)
command = /z
time = 1
[Command]
name = "dwn";Required (do not remove)
command = D
time = 1
[Command]
name = "up";Required (do not remove)
command = U
time = 1
[Command]
name = "fwd";Required (do not remove)
command = F
time = 1
[Command]
name = "back";Required (do not remove)
command = B
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]
;--ordered list of combos
[State -1, Null]
type = Null
triggerall = movehit=1  || stateno=1000
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = var(31)=0&& var(21)<2 || var(31)=[1,12]
trigger1= (stateno=211)  && var(29)
trigger1 =var(31):=cond(var(31)=6,7,1)
trigger1 =var(34):=205
trigger2= (stateno=205) && (var(31)=1||var(31)=7)
trigger2 =var(31):=cond(var(31)=7,8,2)
trigger2 =var(34):=210
trigger3= (stateno=210) &&  (var(31)=2||var(31)=8)
trigger3 =var(31):=cond(var(31)=8,9,cond(frontedgebodydist >70,5,3))
trigger3 =var(34):=cond((var(31)=9)&&fvar(0)<=1,1050,1010)
trigger3 =var(2):=cond((var(31)=9),cond(frontedgebodydist >70||fvar(0)>1,2,1),1)
trigger4= (stateno=1010) && var(31)=5
trigger4 =var(31):=6
trigger4 =var(34):=211
trigger5= (stateno=1010) && (var(31)=3 ||var(31)=9)
trigger5 =var(31):=4
trigger5 =var(34):=0
trigger6= (stateno=1050) && var(31)=9
trigger6 =var(31):=10
trigger6 =var(34):=1000
trigger7= (stateno=1000) && var(31)=10
trigger7 =var(31):=11
trigger7 =var(34):=ifelse(p2life<175 && power>=500,3050,1004)
trigger8= (stateno=1004) && var(31)=11
trigger8 =var(31):=0
trigger8 =var(34):=0
ignorehitpause=0
[State -1, Null]
type = Null
triggerall = movehit=1 || (stateno=[810,831]) || stateno=1000
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = var(31)=0|| var(31)=[100,103]
trigger1= (stateno=810) && var(19)=1  
trigger1 =var(31):=100
trigger1 =var(34):=1000
trigger2= (stateno=1000) && var(19)=1  && p2statetype=L
trigger2 =var(31):=101
trigger2 =var(34):=1007
trigger3= (stateno=1007) && var(31)=101
trigger3 =var(31):=102
trigger3 =var(34):=1003
trigger4= stateno=1003 && (var(31)=102)
trigger4 =var(31):=6
trigger4 =var(34):=211
trigger5= (stateno=831)
trigger5 =var(31):=30
trigger5 =var(34):=605
ignorehitpause=1

;//25%
[State -1, Nulla]
type = Null
triggerall = movehit=1  || stateno=1000
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = p2life >350 || var(31)=[15,24]
triggerall = random<445 && frontedgebodydist >65|| var(31)=[15,24]
triggerall = power>=250|| var(31)=[15,24]
triggerall = var(31)=0&& var(21)<2 || var(31)=[15,24]
trigger1= (stateno=205)  && (p2statetype=S || var(31)=[18,24])
trigger1 =var(31):=cond(var(31)=19,20,15)
trigger1 =var(34):=210
trigger2= (stateno=210) &&  (var(31)=15||var(31)=20||var(31)=0)
trigger2 =var(31):=cond(var(31)=20,21,16)
trigger2 =var(34):=cond((var(31)=21 &&random<499),1050,1010)
trigger3= (stateno=1010) && var(31)=16
trigger3 =var(31):=17
trigger3 =var(34):=1003
trigger4= (stateno=211) && var(31)=18
trigger4 =var(31):=19
trigger4 =var(34):=205
trigger5= (stateno=1003) && var(31)=17
trigger5 =var(31):=18
trigger5 =var(34):=211
trigger6= (stateno=1050) && var(31)=21
trigger6 =var(31):=22
trigger6 =var(34):=1000
trigger7= (stateno=1000) && var(31)=22
trigger7 =var(31):=23
trigger7 =var(34):=ifelse(p2life<175 && power>=500,3050,1004)
trigger8= (stateno=1004) && var(31)=23
trigger8 =var(31):=0
trigger8 =var(34):=0
trigger9= (stateno=1010) && var(31)=21
trigger9 =var(31):=0
trigger9 =var(34):=0
ignorehitpause=0

;//25%2
[State -1, Null]
type = Null
triggerall = movehit=1  || stateno=1000
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = p2life >350 || var(31)=[25,34]
triggerall = power>=250||stateno=1050 || var(31)=[25,34]
triggerall = ((random<445) && frontedgebodydist <65)||stateno=1050&& frontedgebodydist <60 || var(31)=[25,34]
triggerall = var(31)=0&& var(21)<2 || var(31)=[25,34]
trigger1= (stateno=205)  && (p2statetype=S || var(31)=[25,34])
trigger1 =var(31):=25
trigger1 =var(34):=210
trigger2= (stateno=210) &&  (var(31)=25||var(31)=0)
trigger2 =var(31):=26
trigger2 =var(34):=1050
trigger2 =var(2):=3
trigger3= (stateno=1050) && (var(31)=26||var(31)=0)
trigger3 =var(31):=27
trigger3 =var(34):=1006
trigger4= (stateno=1006) && var(31)=27
trigger4 =var(31):=28
trigger4 =var(34):=1003
trigger5= (stateno=1003) && var(31)=28
trigger5 =var(31):=29
trigger5 =var(34):=211
trigger6= (stateno=211) && var(31)=29
trigger6 =var(31):=30
trigger6 =var(34):=605
trigger7= (stateno=605) && var(31)=30
trigger7 =var(31):=31
trigger7 =var(34):=610
trigger8= (stateno=610) && var(31)=[31,32]
trigger8 =var(31):=cond(var(31)=31,32,33)
trigger8 =var(34):=cond(var(31)=32,610,ifelse(p2life<175 && power>=500,3050,1004))
trigger9= (stateno=1004) && var(31)=33
trigger9 =var(31):=0
trigger9 =var(34):=0
ignorehitpause=0

;//%50
[State -1, Null]
type = Null
triggerall = movehit=1  || stateno=1000
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = power>=500|| var(31)=[35,39]
triggerall = ((random<345) && p2bodydist x <65) || var(31)=[35,39]
triggerall = var(31)=0&& var(21)<2 || var(31)=[35,39]
trigger1= (stateno=405)  && (var(31)=0)
trigger1 =var(31):=35
trigger1 =var(34):=210
trigger2= (stateno=210) &&  (var(31)=35)
trigger2 =var(31):=36
trigger2 =var(34):=1010
trigger2 =var(2):=1
trigger3= (stateno=1010) && (var(31)=36)
trigger3 =var(31):=6
trigger3 =var(34):=211
ignorehitpause=0

;//%50
[State -1, Null]
type = Null
triggerall = movehit=1 
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = power>=500|| var(31)=[45,54]
triggerall = ((random<345) && numexplod(1010)=0&& numexplod(1003)=0) || var(31)=[45,54]
triggerall = var(31)=0&& var(21)<2 || var(31)=[45,54]
trigger1= (stateno=1004)  && (var(31)=0)
trigger1 =var(31):=45
trigger1 =var(34):=610
trigger2= (stateno=610) &&  (var(31)=46)
trigger2 =var(31):=47
trigger2 =var(34):=205
trigger3= (stateno=205) && (var(31)=47)
trigger3 =var(31):=48
trigger3 =var(34):=210
trigger4= (stateno=210) && (var(31)=48)
trigger4 =var(31):=49
trigger4 =var(34):=1010
trigger4 = var(2):=1
trigger5= (stateno=1010) && (var(31)=49)
trigger5 =var(31):=50
trigger5 =var(34):=211
trigger6= (stateno=605) && (var(31)=50)
trigger6 =var(31):=51
trigger6 =var(34):=610
trigger7= (stateno=610) && (var(31)=52||var(31)=53)
trigger7 =var(31):=cond(var(31)=53,54,53)
trigger7 =var(34):=cond(var(31)=54,1004,610)
trigger8= (stateno=1004) && (var(31)=54)
trigger8 =var(31):=0
trigger8 =var(34):=0
ignorehitpause=0


;//2 control
[State -1, Null]
type = Null
triggerall = p2stateno!=5120	
triggerall = AILevel >6
trigger1= (var(34)=1010 && var(31)=21)
trigger1 =var(2):=2
trigger2= ((var(31)=158||var(31)=152||var(31)=158)) 
trigger2 =var(2):=1
trigger3= (var(34)=1010 && var(31)=16)
trigger3 =var(2):=3
ignorehitpause=0


;fatal1
[State -1, Null]
type = Null
triggerall = movehit=1 || stateno=1000
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = var(31)=0 || var(31)=[145,164]
trigger1= anim=1051 && var(21)=2
trigger1 =var(31):=cond((var(31)=149),150,145)
trigger1 =var(34):=cond(var(31)=149,1006,200)
trigger2= stateno=200&& var(31)=145
trigger2 =var(31):=146
trigger2 =var(34):=205
trigger3= stateno=205 && (var(31)=146||var(31)=157||var(31)=159)
trigger3 =var(31):=cond(var(31)=159,160,cond(var(31)=157,158,147))
trigger3 =var(34):=cond(var(31)=160,1050,cond(var(31)=158,211,210))
trigger4= stateno=210&& (var(31)=147||var(31)=151||var(31)=157)
trigger4 =var(31):=cond(var(31)=157,158,cond(var(31)=151,152,148))
trigger4 =var(34):=cond(var(31)=160,1050,1010)
trigger4 =var(2):=cond(var(31)=158,1,2) 
trigger5= stateno=211&& (var(31)=150||var(31)=158)
trigger5 =var(31):=cond(var(31)=158,159,151)
trigger5 =var(34):=cond(var(31)=159,205,210)
trigger6= stateno=1010 && (var(31)=148||var(31)=152)
trigger6 =var(31):=cond(var(31)=152,153,149)
trigger6 =var(34):=cond((var(31)=153),1000,1003)
trigger7= stateno=1003 && (var(31)=149||var(31)=155|| var(31)=0 && var(21)=2)
trigger7 =var(31):=cond(var(31)=155,156,150)
trigger7 =var(34):=cond(var(31)=156,400,211)
trigger8= stateno=1000 && (var(31)=153||var(31)=161)
trigger8 =var(31):=cond(var(31)=161,162,154)
trigger8 =var(34):=cond(var(31)=162,ifelse(p2life<200&& power>=500,3050,1006),1007)
trigger9= stateno=1007 &&(var(31)=154)
trigger9 =var(31):=155
trigger9 =var(34):=1003
trigger10= stateno=1050 &&(var(31)=160)
trigger10 =var(31):=161
trigger10 =var(34):=1000
trigger11= stateno=1006 && var(31)=162
trigger11 =var(31):=163
trigger11 =var(34):=ifelse(p2life<175&& power>=500,3000,405)
trigger12= stateno=400 && var(31)=156
trigger12 =var(31):=157
trigger12 =var(34):=205
trigger13= (stateno=405||Stateno=3000||Stateno=3051) 
trigger13 =var(31):=0
trigger13 =var(34):=0
ignorehitpause=0
;
;
;fatal2
;[State -1, Null]
;type = Null
;triggerall = movehit=1 || stateno=1000
;triggerall = p2stateno!=5120	
;triggerall = AILevel >6
;triggerall = var(31)=0 || var(31)=[128,144]
;trigger1= anim=1051 && var(21)=2 && var(31)=136
;trigger1 =var(31):=137
;trigger1 =var(34):=205
;trigger2= stateno=10&& var(31)=145
;trigger2 =var(31):=146
;trigger2 =var(34):=205
;trigger3= stateno=205 && (var(31)=146||var(31)=157||var(31)=159)
;trigger3 =var(31):=cond(var(31)=159,160,cond(var(31)=157,158,147))
;trigger3 =var(34):=cond(var(31)=160,1050,cond(var(31)=158,211,210))
;trigger4= stateno=210&& (var(31)=147||var(31)=151||var(31)=157)
;trigger4 =var(31):=cond(var(31)=157,158,cond(var(31)=151,152,148))
;trigger4 =var(34):=cond(var(31)=160,1050,1010)
;trigger4 =var(2):=cond(var(31)=158,1,2) 
;trigger5= stateno=211&& (var(31)=150||var(31)=158)
;trigger5 =var(31):=cond(var(31)=158,159,151)
;trigger5 =var(34):=cond(var(31)=159,205,210)
;trigger6= stateno=1010 && (var(31)=148||var(31)=152)
;trigger6 =var(31):=cond(var(31)=152,153,149)
;trigger6 =var(34):=cond((var(31)=153),1000,1003)
;trigger7= stateno=1003 && var(21)=2 && var(31)=0
;trigger7 =var(31):=128
;trigger7 =var(34):=211
;trigger8= stateno=1000 && (var(31)=153||var(31)=161)
;trigger8 =var(31):=cond(var(31)=161,162,154)
;trigger8 =var(34):=cond(var(31)=162,ifelse(p2life<200&& power>=500,3050,1006),1007)
;trigger9= stateno=1007 &&(var(31)=154)
;trigger9 =var(31):=155
;trigger9 =var(34):=1003
;trigger10= stateno=1050 &&(var(31)=160)
;trigger10 =var(31):=161
;trigger10 =var(34):=1000
;trigger11= stateno=1006 && var(31)=162
;trigger11 =var(31):=163
;trigger11 =var(34):=ifelse(p2life<175&& power>=500,3000,405)
;trigger12= stateno=400 && var(31)=156
;trigger12 =var(31):=157
;trigger12 =var(34):=205
;trigger13= (stateno=405||Stateno=3000||Stateno=3051) 
;trigger13 =var(31):=0
;trigger13 =var(34):=0
;ignorehitpause=0
;
[State -1, AIgh4]
type = ChangeState
value = var(34)
triggerall = var(34)>0
triggerall = var(34)!=var(35) 
triggerall = stateno!=[3001,3020]
triggerall = var(34)=3000&&power>=500|| var(34)!=3000
triggerall = roundstate=2
triggerall = var(32)=0
triggerall = stateno!=var(34)
;triggerall = numhelper(1001)=0 || var(45)!=[1000,1007] 
trigger1 = (ctrl&& statetype!=A||stateno=20||stateno=100) && p2bodydist x <35 && (p2bodydist y >-40|| p2bodydist  y>=(-105-(helper(10003),var(18)))&& p2stateno=[300,303])
trigger1=var(31)=1||var(31)=7||var(31)=19||var(31)=145||var(31)=159||var(31)=46
trigger2 = (ctrl&& statetype!=A||stateno=20 ||stateno=100)&& p2bodydist x <60 && p2bodydist y >-11
trigger2=var(31)=6||var(31)=18||var(31)=29||var(31)=150||var(31)=49
trigger3 = (ctrl&& statetype!=A||stateno=20 ||stateno=100)&& p2bodydist x <120
trigger3=(var(31)=17&& (enemy, vel y>0||frontedgebodydist<85))||((var(31)=102||var(31)=155) && p2bodydist y >-195)||var(31)=28||var(31)=149
trigger4 = stateno=1000 && animelemtime(3)>0 && statetype=A
trigger4=(var(31)=11||var(31)=23||var(31)=24) 
trigger5 =movehit
trigger5=(var(31)=2||var(31)=3||var(31)=15||var(31)=16||var(31)=4||var(31)=5||var(31)=8||var(31)=9||var(31)=20||var(31)=21||var(31)=25||var(31)=26||var(31)=31||var(31)=33||var(31)=36||var(31)=47||var(31)=48||var(31)=51||var(31)=53)
trigger6 =movehit && animelemtime(11)>0&&var(34)=1000
trigger6=(var(31)=10||var(31)=22||var(31)=161) 
trigger7 = (ctrl&& statetype!=A||stateno=20 ||stateno=100)&& p2bodydist x <160
trigger7=var(31)=100 || var(31)=35
trigger8 = stateno=1000 && animelemtime(3)>0 && statetype=A&& p2bodydist x <45 && enemy,vel x =0
trigger8=(var(31)=101||var(31)=154) 
trigger9 = stateno=50 && statetype=A && ctrl
trigger9=(var(31)=30||var(31)=32&&var(34)!=3050||var(31)=50||var(31)=52||var(31)=45 && pos y >-40) 
trigger10 =movehit && animelemtime(24)>0&&var(34)=1006
trigger10=(var(31)=27) 
trigger11 =movehit ;fatal hits
trigger11=(var(31)=146||var(31)=147||var(31)=148||var(31)=152||var(31)=158||var(31)=153||var(31)=157||var(31)=160)
trigger12 = animelemtime(5)>0&&(var(34)=1006||var(34)=3050 &&power>=500) && p2bodydist y =[-50,20] 
trigger12=(var(31)=162||var(31)=32&&var(34)=3050) 
trigger13 = (ctrl&& statetype!=A||stateno=20 ||stateno=100)&& p2bodydist x =[-25,60]
trigger13=var(31)=151||var(31)=163 && p2bodydist y <-30||var(31)=156&& p2stateno=20014
;===========================================================================
;-----------------------------------------------------------------------
[State -1, Falcon Overdrive AI]
type = ChangeState
value = 3060
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) && (p2statetype!=L)
triggerall = p2bodydist x = [-30,30]
triggerall = p2bodydist y = [-45,0]
triggerall = stateno !=[800,899]
triggerall = movetype!=H
triggerall = p2stateno!=5120
triggerall = p2stateno!=[5200,5210]
triggerall = p2stateno!=[1025,1029]
triggerall = statetype!=A
triggerall = numenemy=1
triggerall= roundno>1 && random<75 * AIlevel
triggerall = enemynear,life <=var(9)
triggerall=power>=1000
trigger1= ctrl && (p2movetype=H || p2statetype=A)
;;-----------------------------------------------------------------------
[State -1, TMAI]
type = ChangeState
value = 3000
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) 
triggerall = movetype!=H
triggerall = p2stateno!=5120
triggerall = p2stateno!=[5201,5210]
triggerall = (helper(10003),var(10)=0&& helper(10003),var(11)=0)
triggerall =(Random <=60*AIlevel)
triggerall =  power >=500
triggerall = StateType != A && var(31)=0
triggerall = p2bodydist y >-15
triggerall = p2stateno!=[20012,20013]
triggerall = p2statetype!=L
triggerall =var(31)=0
triggerall = roundstate = 2&& p2bodydist x =[-10,35]
triggerall = stateno !=[3000,9999]
trigger1 =(ctrl||stateno=20||stateno=[100,101]) 
trigger2 = stateno=200&&movecontact 
trigger3 = stateno=205&&movecontact
;----------------------------------------------------------------------------
[State -1, Rapter DriveAI]
type = ChangeState
value = 3050
triggerall = power >=500
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != [800,3999]
Triggerall = (p2bodydist x =[-10,25])||p2statetype=A &&P2BodyDist X = [-10,50]
triggerall =( p2bodydist y= [-35,10])
Triggerall = (Random <=63*AIlevel)
triggerall = (helper(10003),var(10)=0&& helper(10003),var(11)=0)
triggerall = p2statetype !=L && p2stateno!=20014
triggerall = movetype!=H
triggerall = stateno!=[3000,3055]
triggerall = p2stateno!=[5200,5210]
triggerall = p2stateno!=[1031,1032]
triggerall =var(31)=0
triggerall = p2stateno!=[120,150]
trigger1 = ctrl && (p2movetype!=A || p2statetype=A)
trigger2 = stateno=200&&movecontact &&p2statetype=A
trigger3 = stateno=205&&movecontact&&p2statetype=A
trigger4 = stateno=210&&movecontact&&p2statetype=A
trigger5 = stateno=400&&movecontact&&p2statetype=A
trigger6 = stateno=1000&&animelemtime(3)>0
;

;-----------------------------------------------------------------------
[State -1, TMAI]
type = ChangeState
value = 1001
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) 
triggerall = movetype!=H
triggerall = p2stateno!=[5110,5120]
triggerall = p2stateno!=[5201,5210]
triggerall =(Random <=55*AIlevel)
triggerall = StateType != A
triggerall =  p2bodydist x <35
triggerall = roundstate = 2&& var(31)=0
triggerall = stateno !=[3000,9999]
trigger1 = (ctrl||stateno=20||stateno=[100,101])&&(EnemyNear, HitDefAttr = SCA,AA) 
trigger2= helper(10003),var(8)>0 &&ctrl&& p2movetype=A
;-----------------------------------------------------------------------
[State -1, TMAI]
type = ChangeState
value = 1002
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) 
triggerall = movetype!=H
triggerall = p2stateno!=[5110,5120]
triggerall = p2stateno!=[5201,5210]
triggerall =(Random <=55*AIlevel)
triggerall = StateType != A
triggerall = p2statetype!=C
triggerall =  p2bodydist x <60
triggerall = roundstate = 2&& var(31)=0
triggerall = stateno !=[3000,9999]
trigger1 = (ctrl||stateno=20||stateno=[100,101]) &&(EnemyNear, HitDefAttr = SCA,AA) 
trigger2= helper(10003),var(8)>0 &&ctrl&& p2movetype=A
;-----------------------------------------------------------------------
[State -1, TMAI]
type = ChangeState
value = 1003
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) 
triggerall = movetype!=H
triggerall = p2stateno!=[5110,5120]
triggerall = p2stateno!=[5201,5210]
triggerall =(Random <=75*AIlevel)
triggerall = StateType != A
triggerall = p2statetype=C || p2statetype=A 
triggerall =  p2bodydist x =[35,120]
triggerall =  p2bodydist y =[-195,0]
triggerall = roundstate = 2&& var(31)=0
triggerall = stateno !=[3000,9999]
trigger1 = (ctrl||stateno=20||stateno=[100,101]) &&p2movetype=A
trigger2= helper(10003),var(8)>0 &&ctrl&& p2movetype=A && p2bodydist x >30
trigger3 = (enemy,hitfall) && (ctrl||stateno=20||stateno=[100,101]) && p2bodydist y <-90 && (var(21)>0 ||var(19)>0)
trigger4 = ctrl&& (p2bodydist x=[85,125]) &&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)&&var(31)=0&& p2movetype!=H
;------------------------------------------------------------------------------
[State -1, DPAI]
type = ChangeState
value = 1050
triggerall = AILevel >0
triggerall = roundstate = 2
triggerall =p2bodydist y=[-80,0]
triggerall = (p2statetype=A && p2bodydist x= [0,50]) || (p2bodydist x=[0,60])||movecontact && p2bodydist x <50;|| var(31)>0
triggerall = stateno !=[800,4999]
triggerall = p2statetype != L && p2stateno!=5201&& p2stateno!=5210&& p2stateno!=[301,303]
triggerall = movetype != H
triggerall = statetype!=A&& var(31)=0
triggerall = p2stateno!=[1029,1032]
triggerall = p2stateno!=[833,834]
triggerall = random < 55*AILevel||helper(10003),var(8)>0 ;|| var(31)>0
triggerall = p2movetype!=I
trigger1=  (ctrl||stateno=20||stateno=[100,101]) && (p2movetype=A) && var(31)=0 && (!enemy,hitfall) 
trigger2 = movehit && stateno=210 
triggerall =(p2movetype=A||p2statetype=A)&&p2stateno !=[120,150]
 ;--------------------------------------------
[State -1, Guard]
type = ChangeState
value = 120
triggerall = movetype !=H || stateno=5210
triggerall = roundstate = 2
triggerall = stateno!=[120,155]
triggerall = ctrl||stateno!=[55,59]
triggerall=AILevel>0
triggerall = (statetype!=A)||(statetype=A && p2bodydist x >5)
triggerall =(StateNo !=[200,3999])&&(StateNo != 105)
Triggerall =  Random < (113*AILevel)
triggerall =InGuardDist||((EnemyNear, movetype=A&& enemynear,hitdefattr!=SCA,AA)||( enemynear,hitdefattr=SCA,NP,SP,HP || enemynear,hitdefattr = SCA,AA))|| enemy,numproj >0
trigger1 = ctrl ||stateno=20||stateno=100

;-----------------------------------------------------------------------------
[State -1,Nope]
type = ChangeState
value = 700
triggerall = random = 15*AIlevel
triggerall = AILevel>0
triggerall =power>=350
triggerall = p2bodydist x <70
trigger1 = ((stateno=[150,155])&&statetype!=A)
;------------------------------------------------------------------------
[State -1, AI Throw]
type = ChangeState
value = ifelse(statetype=A,830,800)
triggerall = AILevel>0
triggerall = (Random <=41*AIlevel)
triggerall = stateno != [1000,9999]
Triggerall = (RoundState = 2)
triggerall = (MoveType != H)
triggerall = (statetype!=A&&p2bodydist X = [-5,29])||(statetype=A&&p2bodydist X = [-5,35])
triggerall = p2bodydist y = [-30,30]
triggerall = stateno!=56 || ctrl
triggerall = helper(10003),var(8)=0
triggerall = p2statetype!=L
triggerall = var(31)=0
triggerall = p2movetype!=H||(p2stateno=[120,155])
triggerall = (p2statetype != A&& statetype!=A)||(statetype=A&&p2statetype=A)||var(33)=1
trigger1 = ctrl
trigger2 = stateno=200&&moveguarded&& random<99 && p2statetype=S
trigger3 = stateno=210&&movecontact&&var(31)=0&& random<99
trigger4= stateno=400&&moveguarded&& random<99 && p2statetype=S
trigger5=stateno=600&&movecontact&&var(31)=0
trigger6=stateno=605&&movecontact&&var(31)=0
trigger7=stateno=610&&movecontact&&var(31)=56 && random<99
trigger8=(p2stateno=[120,155])&& ctrl
trigger9 = (stateno=205||stateno=405||stateno=200||stateno=400)&&movehit &&p2stateno!=[5000,5020]
trigger10= var(33)=1 && ctrl
;---------------------------------------------------------------------------
;Stand Light Punch
;—§‚¿Žãƒpƒ“ƒ`
[State -1, Stand Light Punch]
type = ChangeState
value = 200
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = S)
triggerall = stateno != [800,3999]
triggerall = helper(10003),var(8)=0
Triggerall = (P2BodyDist X = [-15,25])&&(p2movetype!=H||p2stateno=[120,155])
triggerall = ((p2bodydist y= [-65,5]));||var(31)=32&&var(32)<=0;||((p2bodydist y= [-125,5])&& (p2movetype=H)&&p2stateno=[300,303])
Triggerall = (Random <=43*AIlevel)&&var(31)=0
triggerall = p2statetype !=L
triggerall =p2statetype != C
trigger1 =(ctrl||stateno=20)&& helper(10003),var(10)>0&& p2bodydist x <22 && var(31)=0
trigger2 = ctrl&& (p2bodydist x=[0,25]) &&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)&&var(31)=0
;---------------------------------------------------------------------------
;Stand Strong Punch
;—§‚¿‹­ƒpƒ“ƒ`
[State -1, Stand strong Punch]
type = ChangeState
value = 205
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=55*AIlevel)
triggerall = p2statetype !=L&&var(31)=0
triggerall = helper(10003),var(8)=0
triggerall = p2stateno!=[20010,20014]
triggerall = (p2statetype!=A&&p2bodydist x = [-15,40])||((p2bodydist y=[-75,0])&&(p2bodydist x=[-15,40])&&p2statetype=A && enemy,vel y >=0)||((p2bodydist y=[-130,-90])&&(p2bodydist x=[-15,40])&&var(11) && enemy,vel y >=0)
trigger1 = ctrl &&( helper(10003),var(11)>0)&&var(31)=0
trigger2 = ctrl&& (p2stateno=1030||(p2stateno=[301,303]))
trigger3 =( stateno=200 || stateno=400) && movecontact
trigger4 = ctrl&& (p2bodydist x=[0,40]) &&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)&&var(31)=0
;trigger4=(var(31)=5||var(31)=32||var(31)=41||var(31)=52||var(31)=58||var(31)=1||var(31)=95)&&ctrl

;---------------------------------------------------------------------------------------------
[State -1, Stand strong Punch2]
type = ChangeState
value = 211
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = StateType !=A
triggerall = stateno != [800,3999]
Triggerall = (P2BodyDist X = [-0,60]) && ((p2bodydist y = [-9,0]) &&(enemy,vel y >0)||p2statetype!=A)
Triggerall =Random <= ifelse(movecontact &&p2statetype!=C,15,65)*AILevel 
triggerall = p2statetype != L
triggerall = enemynear,anim!=5120
triggerall = movetype != H&&var(31)=0
triggerall = p2movetype!=A || p2statetype=C
triggerall = helper(10003),var(8)=0
triggerall = p2stateno!=20014
trigger1 = (ctrl||stateno=20||stateno=[100,101]) &&p2stateno=[20012,20013]
trigger2 = stateno = 205 && movehit && p2bodydist x <55
trigger3 =  (ctrl||stateno=20||stateno=[100,101])&& (p2bodydist x=[35,55]) &&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)&&var(31)=0&& p2statetype=C
;trigger5 = (ctrl||stateno=20) && var(31)=21
;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = 210
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=60*AIlevel);|| (var(31)>0) ;|| (AILevel=8&&(var(31)=8||var(31)=23||var(31)=30||var(31)=48||var(31)=72||var(31)=77||var(31)=91) )
triggerall = helper(10003),var(8)=0
triggerall = p2statetype !=L &&var(31)=0
triggerall = p2stateno!=[20010,20014]
triggerall = ((p2bodydist y= [-60,0]) && (enemy,vel y >=-1) && enemy,hitfall) ||p2statetype!=A; || movehit && var(31)>0 
triggerall = p2statetype != C
trigger1 = ctrl&& (p2bodydist x=[0,25]) && p2statetype=A&&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)>0)&&var(31)=0
trigger2 = stateno=205&&movecontact&&var(31)=0;;&& AIlevel <7
trigger3 = ctrl&& (p2bodydist x=[45,75]) &&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)&&var(31)=0

;---------------------------------------------------------------------------
;Stand Light Punch
;—§‚¿Žãƒpƒ“ƒ`
[State -1, Stand Light Punch]
type = ChangeState
value = 400
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = P2BodyDist X = [0,40]
Triggerall = (Random <=63*AIlevel)
triggerall = var(31)=0
triggerall = helper(10003),var(8)=0
triggerall = p2bodydist y >-13
triggerall  =var(4)<4
trigger1 = ctrl && (p2bodydist x=[0,40]) && (p2statetype=S) && (enemy,vel x >0 ||p2movetype=I)&&random <199 && var(31)=0&& helper(10003),var(10)=0&& helper(10003),var(11)=0
trigger2 = stateno = 400 && moveguarded
trigger3=(ctrl||stateno=20)&& helper(10003),var(10)>0&& p2bodydist x <30 && var(31)=0
trigger4= p2stateno=20014 && ctrl && p2statetype=C

;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = 405
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=65*AIlevel) ;|| (var(31)=27||var(31)=5||var(31)=70)
triggerall = p2statetype !=L&&var(31)=0 
triggerall = helper(10003),var(8)=0
triggerall = p2statetype=S || movecontact
;triggerall = (p2bodydist y=[-65,0]) && enemy,vel y >=0|| (p2bodydist y >-115&&(var(31)=27||var(31)=5||var(31)=70))
trigger1 = ctrl && (p2bodydist x=[35,70]) && p2statetype=S && (enemy,vel x >0 ||p2movetype=I)&&random <199 && var(6)=0
trigger2 = stateno=400&&movecontact
trigger2 = stateno=200&&movecontact && p2statetype=S 
;---------------------------------------------------------------------------
;Stand Strong Punch
;—§‚¿‹­ƒpƒ“ƒ`
[State -1, Stand strong Punch]
type = ChangeState
value = 410
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = StateType !=A
triggerall = stateno != [800,3999]
triggerall = p2statetype != L || movehit
Triggerall = (P2BodyDist X = [-15,20])
Triggerall = Random <= 75*AILevel || (AIlevel >6 && movehit)
triggerall = movetype != H
triggerall = (p2bodydist y= [-40,0]) 
triggerall = helper(10003),var(8)=0
triggerall = p2stateno!=[20010,20014]
triggerall = p2stateno!=[5200,5210]
triggerall = p2stateno!=[3002,3005]
trigger1 = (stateno=405||stateno=205 && p2statetype=A)&&movehit && var(31)=0 && p2bodydist x <7
trigger2= ctrl && p2statetype=A&&(helper(10003),var(10)=0|| helper(10003),var(11)=0)&&var(31)=0
;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = 610
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=100*AIlevel) 
triggerall = p2statetype !=L
triggerall = var(32)<=0
triggerall =var(31)=0
triggerall = p2bodydist y=[-15,80]
triggerall = (p2bodydist x = [-5,85])
triggerall =vel y>0 || p2statetype=A
trigger1 = ctrl  
trigger2 = stateno=605&&movecontact;&& AIlevel <7

;---------------------------------------------------------------------------
;Stand Strong Punch
;—§‚¿‹­ƒpƒ“ƒ`
[State -1, Stand strong Punch]
type = ChangeState
value = 605
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType =A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=75*AIlevel) ;(var(31)=3||Var(31)=10||Var(31)=21||Var(31)=25||Var(31)=32||Var(31)=44||Var(31)=50||Var(31)=74||Var(31)=79||Var(31)=93||Var(31)=96)
triggerall = p2statetype !=L
triggerall = var(32)<=0
triggerall =var(31)=0
triggerall =((p2bodydist y=[-53,70])&& (p2movetype=H)&&p2stateno!=[300,303])||((p2bodydist y= [-80,80])&& (p2movetype=H)&&p2stateno=[300,303])||(p2movetype!=H&&p2bodydist y= [-30,70])
triggerall = (p2bodydist x = [-05,55])
triggerall =vel y>=0 || p2statetype=A
trigger1 = ctrl 
;trigger2 = stateno=600&&movecontact;&& AIlevel <7





;---------------------------------------------------------------------------
;Stand Light Punch
;—§‚¿Žãƒpƒ“ƒ`
[State -1, Stand Light Punch]
type = ChangeState
value = 600
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = A)
triggerall = stateno != [800,3999]
triggerall = p2bodydist y=[-30,45]
triggerall = p2bodydist x = [0,40]
Triggerall = (Random <=20*AIlevel)
triggerall = p2statetype=A
triggerall = var(32)<=0
triggerall = var(31)=0
triggerall = p2statetype !=L
triggerall = var(4)<=2;||var(31)>0
trigger1 = ctrl
;trigger2 = stateno = 600 && movecontact


;--------------------------------------------------------------------
[State -1, sokoAI]
type = ChangeState
value = 1010
triggerall = AILevel>0 && roundstate = 2&& statetype!=A
triggerall = ((p2stateno!=[120,155]) && (p2statetype!=L))&&var(31)=0
triggerall = p2bodydist x = [-15,190]
triggerall = stateno !=[800,899]
triggerall = stateno!=1010
triggerall = stateno!=[3000,3065]
triggerall = (Random <=55*AIlevel)
triggerall = (p2bodydist y =[-55,0]) && enemy,vel y >=0
triggerall = movetype!=H
triggerall = helper(10003),var(8)=0
triggerall = p2stateno!=[1025,1028]
triggerall = p2stateno!=[1040,1045]
trigger1 =(ctrl||stateno=20) && (p2bodydist x=[120,140]) && (enemy,vel x >0 ||p2movetype!=H)&&random <88 && var(31)=0
trigger2 = stateno=210&&movehit &&var(31)=0
;--------------------
[State -1, SUPAH JAWMP]
type = ChangeState
value =1000
Triggerall = (Random <=75*AIlevel)&&var(31)=0
triggerall = statetype!=A
triggerall = (helper(10003),var(10)=0&& helper(10003),var(11)=0)
triggerall = p2bodydist x >50 || p2movetype=H || movecontact||p2stateno=5120
Triggerall = (RoundState = 2) && (AILevel>0) &&((p2bodydist y= [-45,40])||movecontact)
trigger1 = (ctrl||stateno=20||stateno=[100,101]) && (var(19)=1||p2stateno=5120) && ((p2stateno=[3004,3005])||p2stateno=[833,834]) && p2bodydist x < 150
trigger2= stateno=210&& moveguarded 
trigger3= stateno=405 && moveguarded
trigger4= stateno=410 && movecontact
trigger5 = (ctrl||stateno=20||stateno=[100,101]) &&p2bodydist x >170&& p2stateno=[20012,20014]
trigger6= (stateno=1010||stateno=1050 && animelemtime(11)>0) && var(2)=1 && movehit
trigger7= (ctrl||stateno=20||stateno=[100,101]) && (p2bodydist x =[120,200]) && random <25*AIlevel && p2stateno!=[20012,20014]
trigger8 = (ctrl||stateno=20||stateno=[100,101]) &&p2bodydist x <60&&p2statetype=L&& p2stateno=[20012,20014]
trigger9= (ctrl||stateno=20||stateno=[100,101]) && (p2bodydist x =[20,70]) && random <15*AIlevel && p2stateno=5120
;-------------------------
[State -1, SUPAH JAWMP]
type = ChangeState
value =1006
Triggerall = (Random <=45*AIlevel)&&var(31)=0
Triggerall = (RoundState = 2) && (AILevel>0) &&(p2bodydist x= [-15,160]) 
triggerall = stateno=1050 ||p2bodydist y >-20  ||p2statetype=A&&p2bodydist y =[-60,20] 
triggerall = (pos y <-40 || vel y >0)
triggerall = p2statetype!=L || p2stateno=5120 && enemy,time>6
triggerall = enemy,pos y <-40||p2stateno!=[20012,20014]
trigger1= stateno=1000 && animelemtime(5)>0 && (p2bodydist x >70) && (pos y <-50 || vel y > 0)
trigger2= stateno=1000 && animelemtime(3)>0 && (p2bodydist x <70) && (var(19)>0 || p2movetype!=H||p2stateno=5120)
trigger3 = stateno=1050 && var(2)=3 &&animelemtime(23)>0 
[State -1, SUPAH JAWMP]
type = ChangeState
value =1004
Triggerall = (Random <=75*AIlevel)&&var(31)=0
triggerall = statetype=A && p2statetype=A
triggerall = p2stateno!=[5200,5210]
Triggerall = (RoundState = 2) && (AILevel>0) &&(p2bodydist y= [-45,60])  && (var(21)!=1||p2statetype=A)
trigger1 = ctrl && (p2bodydist x =[-10,65])
trigger2= stateno=610 && movecontact && p2statetype=A
trigger3= stateno=1000 && animelemtime(3)>0&& (p2bodydist x =[-10,65]) && p2statetype!=C&& p2statetype!=L && var(19)=0

[State -1, SUPAH JAWMP]
type = ChangeState
value =1007
Triggerall = (Random <=35*AIlevel)&&var(31)=0
Triggerall = (RoundState = 2) && (AILevel>0) &&(p2bodydist x= [-25,40])  
triggerall = p2statetype=A&&p2movetype!=H || p2statetype=L && var(19)=1 || p2bodydist x < -5 && p2stateno=5120 && enemy,time>7|| (p2stateno=[20013,20014])
trigger1= stateno=1000 && animelemtime(3)>0 && (p2bodydist x <0||p2statetype=L && (p2stateno!=[5100,5120])  || (p2stateno=[20013,20014])|| p2bodydist x <40&&p2stateno=[833,834])




;-------------------------------------------------
[state -1, AI jump]
type = changestate
triggerall = stateno!=40
triggerall = statetype!=A
triggerall = roundstate = 2
triggerall = AILevel>0
triggerall = stateno!=[3000,3055]
trigger1= var(30)=1 &&ctrl
trigger2 = stateno=205 && p2statetype=A && movehit && (random<(50*AIlevel))
trigger3 = (var(31)=120||var(31)=30) && (ctrl&& statetype!=A||stateno=20 ||stateno=100)
value = 40
[state -1, AI jump]
type = changestate
triggerall = stateno!=45 && prevstateno!=45
triggerall = statetype=A
triggerall = roundstate = 2
triggerall = AILevel>0
triggerall= var(6)=0
trigger1= (stateno=610) && movecontact && p2statetype=A && var(31)>0
trigger2 = p2movetype= A && ctrl && vel x >0 && (stateno=50||stateno=57)
trigger3 = backedgebodydist < 30 && ctrl  
value = 45
;[State -1, AISuper Jump]
;type = ChangeState
;value = 55
;triggerall = roundstate = 2
;triggerall = AILevel>0
;triggerall= var(8)=0
;triggerall = statetype = A
;triggerall = random < 33*AIlevel|| var(31)>0
;triggerall = pos y <-41
;triggerall = frontedgebodydist > 40 || var(31)>0
;triggerall = p2bodydist y =[-90,450]
;triggerall = helper(10003),var(14) || var(31)>0
;trigger1= ctrl&&var(31)=0
;trigger2 = (var(31)=4||var(31)=44||var(31)=25||var(31)=75||var(31)=113) && movehit

[State -1, AI run]
type=changestate
value=100
triggerall = roundstate = 2
triggerall = var(58)!=2
triggerall=AILevel>0 && statetype!=A 
triggerall = (stateno!=[100,105])
triggerall = p2bodydist y =[-180,15]
triggerall = p2stateno!=834 || p2bodydist x >100 || var(31)>0
trigger1= p2movetype!=A && (p2bodydist x=[110,788])&& (Random <=25*AIlevel)&& (ctrl || stateno=20) && var(31)=0
trigger2= p2movetype=H && p2statetype=A && p2bodydist x>75&& (Random <=50*AIlevel)&& (ctrl || stateno=20) && var(31)=0
trigger3= (p2stateno=[1029,1030]) && p2bodydist x >80&& ctrl && var(31)=0
trigger4= var(15)=1 && p2bodydist x >60 && ctrl && var(31)=0
trigger5=  p2bodydist x >80 && ctrl && var(31)>0

[State -1, AI run]
type=changestate
value=20
triggerall = roundstate = 2
triggerall = p2stateno!=834 || p2bodydist x >20
triggerall=AILevel>0 && statetype=S && ctrl && (Random <=31*AIlevel) || var(31)>0&& statetype=S 
trigger1= (stateno!=[20,105]) && p2movetype!=A && (p2bodydist x=[20,109]) && var(31)=0
trigger2 = p2stateno=1030 && p2bodydist x >20&& var(31)=0
trigger3 = var(31)>0 && ctrl && (p2bodydist x >40 || p2bodydist x <15) && p2stateno!=[300,303] 

[State -1, AIRun Back]
type = ChangeState
value = 105
triggerall = AILevel>0
triggerall = stateno !=105
triggerall = statetype != A
triggerall = random < 149
triggerall = backedgebodydist >30
triggerall = roundstate = 2
triggerall =var(31)=0
trigger1 = ( p2movetype = A) && (p2bodydist x=[-99,100])&& (ctrl || stateno=20)
trigger2 = p2movetype=A && prevstateno=140 && (ctrl || stateno=20)

;===========================================================================
[State -1, Falcon Overdrive]
type = ChangeState
value = 3060
triggerall = command="FE"
triggerall = statetype !=A
triggerall = power >=1000
triggerall = AILevel=0
triggerall = numenemy=1
triggerall = roundstate=2
triggerall= roundno>1
triggerall =p2life <=var(9)
trigger1= ctrl || stateno=40 || stateno=52

;-----------------------------------------------------------------------------
[State -1, Dragon Kick]
type = ChangeState
value = 3050
triggerall =command="FD"
triggerall = power >=500
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl
trigger2 = stateno=400 && movecontact
trigger3 = stateno=200 && movecontact
trigger4 = stateno=205 && movecontact
trigger5 = stateno=210 && movecontact
trigger6 = stateno=410 && movecontact
trigger7 = stateno=610&& movecontact
trigger8 = stateno=605&& movecontact
trigger9 = stateno=600&& movecontact
trigger10 = stateno = 1000&& animelemtime(3)>0 
;---------------------------------------------------------------------------
[State -1, Falcon Dive]
type = ChangeState
value = 3000
triggerall =command="FC"
triggerall = power >=500
triggerall = AILevel=0
triggerall = statetype!=A
triggerall = roundstate=2
trigger1 = ctrl
trigger2 = stateno=400 && movecontact
trigger3 = stateno=200 && movecontact
trigger4 = stateno=205 && movecontact
trigger5 = stateno=210 && movecontact
trigger6 = stateno=410 && movecontact
;---------------------------------------------------------------------------
[State -1, Falcon kick]
type = ChangeState
value = 1050
triggerall = AILevel=0
triggerall = statetype!=A
triggerall =  command="DP_y" ||command="DP_z"||(command="DP_a"&&power>=250);
trigger1 = ctrl
trigger2 = stateno=400 && movecontact
trigger3 = stateno=200 && movecontact
trigger4 = stateno=205 && movecontact
trigger5 = stateno=210 && movecontact
trigger6 = stateno=410 && movecontact


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

[State -1, Rapter Boost]
type = ChangeState
value = 1010
triggerall = command="QCF_y"||command="QCF_z"||command="QCF_a"&&power>=250
triggerall = statetype !=A
triggerall = AILevel=0
trigger1 = ctrl
trigger2 = stateno=400 && movecontact
trigger3 = stateno=200 && movecontact
trigger4 = stateno=205 && movecontact
trigger5 = stateno=210 && movecontact
trigger6 = stateno=410 && movecontact



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

;[State -1, Rapter Boost]
;type = ChangeState
;value = 1100
;triggerall = command="QCB_y"||command="QCB_z"||((command="holddown"|| command="dwn")&&command!="holdup"&&command!="holdfwd"&&command="a"&&stateno=[1001,1009])
;triggerall = statetype !=A
;triggerall = numhelper(1003)=0
;triggerall = AILevel=0
;trigger1 = ctrl
;trigger2 = anim=201&&movecontact
;trigger3 = stateno=205&&movecontact
;trigger4 = stateno=210&&movecontact
;trigger5 = stateno=400&&movecontact
;trigger6 = stateno=405&&movecontact
;trigger7 = anim=212&&movecontact
;trigger8 = stateno=206&&movecontact
;trigger9= stateno=1001 && animelemtime(6)>=1&&animelemtime(7)<=1
;trigger10= stateno=1003 && animelemtime(4)>=10&&animelemtime(4)<=20

;---------------------------------------------------------------------------
;Run Fwd
;ƒ_ƒbƒVƒ…
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = AILevel=0
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl
;trigger2= anim=1000 && movehit && time>52&&command="holdfwd"
;trigger3= anim=1005 && movehit && time>5&&command="holdfwd"

;---------------------------------------------------------------------------
;Run Back
;Œã‘Þƒ_ƒbƒVƒ…
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = AILevel=0
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl


;[State -1, air dash]
;type = ChangeState
;value = 55
;triggerall = AILevel =0
;triggerall= var(8)=0
;triggerall = pos y <-35
;trigger1 = command = "FF"
;trigger1 = statetype = A
;trigger1 = ctrl
;trigger2= (stateno=[600,610]) && movecontact && command = "FF"
;
;[State -1, air dash]
;type = ChangeState
;value = 59
;triggerall = AILevel =0
;triggerall= var(8)=0
;triggerall = pos y <-35
;trigger1 = command = "BB"
;trigger1 = statetype = A
;trigger1 = ctrl

[State -1, SUPAH JAWMP]
type = ChangeState
value = 45
triggerall = AILevel =0
triggerall = stateno!=45
triggerall= var(6)=0
triggerall = (time >9 && stateno=50)|| (stateno=600 ||stateno=605||stateno=610)
trigger1 = statetype = A&&command = "up"
trigger1 = ctrl
trigger2= (stateno=[600,610]) && movecontact &&command = "holdup"

[State -1,  JAWMP]
type = ChangeState
value = 40
triggerall = stateno!=1000
triggerall = AILevel =0
triggerall = statetype!=A
triggerall = command = "holdup"
trigger1 = ctrl

;---------------------------------------------------------------------------
;Kung Fu Throw
;“Š‚°
[State -1, Throw]
type = ChangeState
value = ifelse(statetype=A,830,800)
triggerall = AILevel=0
triggerall =(command="y" && command="z") || (command="b")
triggerall = stateno != 100
triggerall = p2bodydist X < 35
triggerall = command="holdfwd"||command="holdback"
triggerall = (((p2statetype = S) || (p2statetype = C)) && statetype!=A)||(statetype=A&&p2statetype=A)
trigger1 = ctrl
trigger2 = anim=201&&movecontact
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = anim=212&&movecontact
trigger8 = stateno=206&&movecontact
trigger9=stateno=600&&movecontact
trigger10=stateno=605&&movecontact
trigger11=stateno=610&&movecontact

[State -1,Nope]
type = ChangeState
value = 700
triggerall = command="x"&& command="y"
triggerall = AILevel=0
triggerall =power>=350
trigger1 = ((stateno=[150,155])&&statetype!=A)


;===========================================================================
;---------------------------------------------------------------------------
;Stand Light Punch
;—§‚¿Žãƒpƒ“ƒ`
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = AILevel=0
triggerall = command="x"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno=100
trigger2 = stateno=400 && movecontact
trigger3 = stateno=200 && movecontact
;---------------------------------------------------------------------------
;Stand Light Kick
;—§‚¿ŽãƒLƒbƒN
[State -1, Stand Light Kick]
type = ChangeState
value =205
triggerall = AILevel=0
triggerall = command="y"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno=100
trigger2 = stateno=400 && movecontact
trigger3 = stateno=200 && movecontact
;---------------------------------------------------------------------------
;Stand Strong Punch
;—§‚¿‹­ƒpƒ“ƒ`
[State -1, Stand Strong Punch]
type = ChangeState
value = 211
triggerall = AILevel=0
triggerall = command="z"
triggerall = command = "holdfwd"
triggerall = command!="holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno=100
trigger2 = stateno=205 && movecontact
;trigger3 = stateno=210 && movecontact
;---------------------------------------------------------------------------
;Stand Strong Punch
;—§‚¿‹­ƒpƒ“ƒ`
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = AILevel=0
triggerall = command="z"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno=100
trigger2 = stateno=205 && movecontact




;---------------------------------------------------------------------------
;Taunt
;’§”­
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = AILevel=0
triggerall = command = "start"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Crouching Light Punch
;‚µ‚á‚ª‚ÝŽãƒpƒ“ƒ`
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = AILevel=0
triggerall = command="x"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl || stateno=100
trigger2 = stateno=400&&movecontact
trigger3 = stateno=200&&movecontact
;---------------------------------------------------------------------------
;Crouching Light Kick
;‚µ‚á‚ª‚ÝŽãƒLƒbƒN
[State -1, Crouching Light Kick]
type = ChangeState
value = 405
triggerall =command="y"
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = AILevel=0
trigger1 = ctrl || stateno=100
trigger2 = stateno=400&&movecontact
trigger3= stateno=200&&movecontact

;---------------------------------------------------------------------------
;Crouching Strong Punch
;‚µ‚á‚ª‚Ý‹­ƒpƒ“ƒ`
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall =command="z"
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = AILevel=0
trigger1 = ctrl || stateno=100
trigger2 = stateno=405&&movecontact
trigger3 = stateno=205&&movecontact
;----------------------------------------------------------------------
[State -1, low]
type = ChangeState
value = 1003
triggerall = AILevel=0
triggerall = command!="holdback"
triggerall = command!="holdfwd"
triggerall = command="holddown"|| command="dwn"
triggerall = command="a"
triggerall=statetype!=A
trigger1=ctrl
;----------------------------------------------------------------------
[State -1, Backroll]
type = ChangeState
value = 1000
triggerall = AILevel=0
triggerall = command!="holdback"||stateno=1010|| stateno=[200,440]
triggerall = command!="holdfwd" ||stateno=100||stateno=1010|| stateno=[200,440]
triggerall = command!="holddown"||stateno=1010|| stateno=[200,440]
triggerall = command="a"
triggerall=statetype!=A
trigger1 = ctrl || stateno=100
trigger2 = stateno=400 && movecontact
trigger3 = stateno=200 && movecontact
trigger4 = stateno=405 && movecontact
trigger5 = stateno=205 && movecontact
trigger6 = stateno=210 && movecontact
trigger7 = stateno=410 && movecontact
trigger8 = anim=1000 && movehit
trigger9 = anim=1050 && animelemtime(11)>0 && movehit
;----------------------------------------------------------------------
[State -1, roll]
type = ChangeState
value = 1001
triggerall = AILevel=0
triggerall = command!="holdback"
triggerall = command="holdfwd"|| command="fwd"
triggerall = command!="holddown"
triggerall = command="a"
triggerall=statetype!=A
trigger1 = ctrl|| stateno=100

;----------------------------------------------------------------------
[State -1, dodge]
type = ChangeState
value = 1002
triggerall = AILevel=0
triggerall = command="holdback"|| command="back"
triggerall = command!="holdfwd"
triggerall = command!="holddown"
triggerall = command="a"
triggerall=statetype!=A
trigger1 = ctrl
;---------------------------------------------------------------------------
;Jump Light Punch
;‹ó’†Žãƒpƒ“ƒ`
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = command="x"
triggerall = statetype = A
triggerall = AILevel=0
trigger1 = ctrl
trigger2 = stateno=600&&movecontact

;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 605
triggerall = command="y"
triggerall = statetype = A
triggerall = AILevel=0
trigger1 = ctrl
trigger2 = stateno=600&&movecontact

;---------------------------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = command="z"
triggerall = statetype = A
triggerall = AILevel=0
trigger1 = ctrl
trigger2 = stateno=605&&movecontact
;----------------------------------------------------------------------
[State -1, SUPAH JAWMP]
type = ChangeState
value =1004
triggerall = AILevel =0
triggerall = stateno!=45
triggerall = command!="holdback"&&command!="holdfwd" &&command!="holddown" || stateno!=1000
trigger1 = command = "a"
trigger1 = ctrl &&((stateno=50)||statetype = A&&stateno!=50)
trigger2= (stateno=[600,610]) && movecontact &&command = "a"
trigger3= stateno=1000 && animelemtime(3)>=1&&command = "a"

