

;-| 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
;[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 = "FC"
command = ~F, $D, B,F, z
time =30

[Command]
name = "FC"
command =~F, $D, B,F,~z
time = 30
buffer.time=5
[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 = "FD"   ;Same name as above
command = ~F, $D, B,F,a
time = 30
[Command]
name = "FD"   ;Same name as above
command = ~F, $D, B,F,~a
time = 30
buffer.time=8



;-| Special Motions |------------------------------------------------------
[Command]
name = "upper_x"
command = ~F, D, DF, x
buffer.time=5
[Command]
name = "upper_y"
command = ~F, D, DF, y
buffer.time=5
[Command]
name = "upper_xy"
command = ~F, D, DF, z
buffer.time=5

[Command]
name = "QCF1"
command = ~D,DF, F,x
time=12

[Command]
name = "QCF2"
command = ~D,DF, F,y
time=12

[Command]
name = "QCF3"
command = ~D,DF, F,z
time=12

[Command]
name = "QCF4"
command = ~D,DF, F,a
time=12



[Command]
name = "QCB1"
command = ~D,DB, B,a
time=12
buffer.time=5
[Command]
name = "QCB2"
command = ~D,DB, B,y
time=12
buffer.time=5
[Command]
name = "QCB3"
command = ~D,DB, B,z
time=12
buffer.time=5


[Command]
name = "HCBF1"
command = ~F, $D, B,F, y
time=20
buffer.time=5
[Command]
name = "QCF_xy"
command = ~D, DF, F, z

[Command]
name = "QCB_x"
command = ~D, DB, B, x

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

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

;-| 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
buffer.time=3
[Command]
name = "recovery";Required (do not remove)
command = y+z
time = 1
buffer.time=3
[Command]
name = "recovery";Required (do not remove)
command = x+z
time = 1
buffer.time=3


[Command]
name = "push"
command = ~F+z
time=1
buffer.time=3

[Command]
name = "push"
command = F,z
time=3
buffer.time=3
[Command]
name = "ice"
command = /F,a
time=1

[Command]
name = "lightning"
command = /D,a
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



;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time =1
[Command]
name = "b"
command = b
time = 1
[Command]
name = "c"
command = c
time = 1
[Command]
name = "x"
command = x
time = 1
[Command]
name = "y"
command = y
time = 1
[Command]
name = "z"
command = z
time = 1
[Command]
name = "start"
command = s
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 = "up" ;Required (do not remove)
command = $U
time = 1
[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1

[Command]
name = "dwn";Required (do not remove)
command = D
time = 1
[Command]
name = "up1";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
;-| 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
;---------------------------------------------------------------------------
; 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]
;random bnb 1
[State -1, Null]
type = Null
triggerall = movehit=1 
triggerall = stateno!=3049
triggerall = p2stateno!=5120	
triggerall = var(21)<2
trigger1= (stateno=221)&& power <300
trigger1 =var(31):=1
trigger2= stateno=200 && var(31)=1 
trigger2 =var(31):=2
trigger3= anim=201 && (var(31)=2||movehit=1 && var(31)=0)
trigger3 =var(31):=3
trigger4= stateno=600&& var(31)=3
trigger4 =var(31):=4
trigger5= stateno=600 &&prevstateno=600&& var(31)=4
trigger5 =var(31):=5
trigger6= stateno=605&& var(31)=5
trigger6 =var(31):=6
ignorehitpause=1

;add on into bnb 1
[State -1, Null]
type = Null
triggerall = movehit=1 
triggerall = stateno!=3049
triggerall = p2stateno!=5120	
triggerall = frontedgebodydist <500
triggerall = var(21)=0
triggerall = var(31)=0 || var(31)>10
trigger1= (stateno=220)&& power <300
trigger1 =var(31):=10
trigger2= anim=221 && var(31)=10
trigger2 =var(31):=1
ignorehitpause=1

;random bnb 2
[State -1, Null]
type = Null
triggerall=  movehit=1 || p2movetype=H  && stateno=1000
triggerall = stateno!=3049
triggerall = p2stateno!=5120	
triggerall = var(21)<2
triggerall = var(31)=0 || var(31)>=20
trigger1= (stateno=220||stateno=1073) && power >=250 && frontedgedist <350
trigger1 =var(31):=ifelse(random<249&&power>=250,ifelse( frontedgedist >400 &&power>=500,150,ifelse(frontedgebodydist <300,120,20)),20)
trigger1= var(38):=1010
trigger2= (stateno=1000&& var(31)=20||stateno=620&&var(21)=1) 
trigger2 =var(31):=ifelse(random<249,110,21)
trigger2= var(38):=210
trigger3= (stateno=221) && var(31)=20&& frontedgedist <450
trigger3 =var(31):=1
trigger4= stateno=410 && p2statetype=A 
trigger4=var(31):=22
trigger5= anim=610 && var(31)=22&&var(6)=0
trigger5 =var(31):=23
trigger6= stateno=610&& var(31)=23&&var(6)=1
trigger6 =var(31):=24
trigger7= stateno=620&& var(31)=24
trigger7 =var(31):=25
ignorehitpause=1

;add on into bnb 2
[State -1, Null]
type = Null
triggerall = movehit=1 
triggerall = stateno!=3049
triggerall = p2stateno!=5120	
triggerall = var(21)=1
triggerall = var(31)=0 || var(31)>30
trigger1= (stateno=220||stateno=1073)&& power <500&& frontedgedist <350
trigger1 =var(31):=31
trigger2= (stateno=220||stateno=1073)&& (power =[250,499])&& frontedgedist <250
trigger2 =var(31):=ifelse(random<499&&power>=250,ifelse( frontedgedist >400 &&power>=500,150,ifelse(frontedgebodydist <300,120,31)),31)
trigger2= var(38):=1010
trigger3= (stateno=220||stateno=1073)&& power <500 && frontedgedist >350
trigger3 =var(31):=30
ignorehitpause=1

;add on to anything really
[State -1, Null]
type = Null
triggerall = movehit=1 
triggerall = stateno!=3049
triggerall = p2stateno!=5120	
triggerall = var(21)<2
triggerall = var(31)=[110,118]
trigger1= (stateno=210)&& var(31)=110
trigger1 =var(31):=111
trigger1= var(38):=1010
trigger2= stateno=205 && var(31)=112
trigger2 =var(31):=113
trigger2= var(38):=410
trigger3= stateno=410 && var(31)=113
trigger3 =var(31):=114
trigger3= var(38):=610
trigger4= stateno=610&& var(31)=114 
trigger4 =var(31):=ifelse(var(6)=0,114,115)
trigger4= var(38):=ifelse(var(6)=0,610,620)
trigger5= stateno=620 && var(31)=115
trigger5 =var(31):=0
trigger5= var(38):=0
ignorehitpause=1

;corner only
[State -1, Null]
type = Null
triggerall = movehit=1 
triggerall = stateno!=3049
triggerall = p2stateno!=5120	
triggerall = var(21)<2
triggerall = var(31)=0||var(31)=[120,128]
trigger1= (stateno=210)&& (var(31)=121)
trigger1 =var(31):=122
trigger1= var(38):=1010
trigger2= stateno=205 && var(31)=123
trigger2 =var(31):=124
trigger2= var(38):=410
trigger3= stateno=410 && var(31)=124
trigger3 =var(31):=125
trigger3= var(38):=610
trigger4= stateno=610&& var(31)=125 
trigger4 =var(31):=ifelse(var(6)=0,125,126)
trigger4= var(38):=ifelse(var(6)=0,610,620)
trigger5= stateno=620 && var(31)=126
trigger5 =var(31):=0
trigger5= var(38):=0
ignorehitpause=1

;midscreen  only
[State -1, Null]
type = Null
triggerall = movehit=1 
triggerall = stateno!=3049
triggerall = p2stateno!=5120	
triggerall = var(21)<2
triggerall = var(31)=0||var(31)=[150,158]
trigger1= (stateno=210)&& (var(31)=153)
trigger1 =var(31):=154
trigger1= var(38):=1010
trigger2= stateno=205 && var(31)=155
trigger2 =var(31):=156
trigger2= var(38):=410
trigger3= stateno=410 && var(31)=156
trigger3 =var(31):=157
trigger3= var(38):=610
trigger4= stateno=610&& var(31)=125 
trigger4 =var(31):=ifelse(var(6)=0,125,126)
trigger4= var(38):=ifelse(var(6)=0,610,620)
trigger5= stateno=620 && var(31)=126
trigger5 =var(31):=0
trigger5= var(38):=0
ignorehitpause=1

;from throw alt
[State -1, Null]
type = Null
triggerall=  movehit=1
triggerall = p2stateno!=5120	
triggerall = var(21)<2
triggerall = var(31)=0
trigger1= (anim=212) && p2statetype=L && prevstateno!=210
trigger1 =var(31):=130
trigger1 =var(38):=1010
ignorehitpause=1


;from piyo saboro super
[State -1, Null]
type = Null
triggerall=  movehit=1 || p2movetype=H  && stateno=1000
triggerall = p2stateno!=5120	
triggerall = var(21)<2
triggerall = var(31)=0 || var(31)=[40,47]
trigger1= (stateno=3000)  
trigger1 =var(31):=40
trigger2= (stateno=200) && (var(31)=40||var(31)=44)
trigger2 =var(31):=ifelse((var(31)=[44,45]),45,41)
trigger3= (stateno=205) && var(31)=41
trigger3 =var(31):=42
trigger4= stateno=210&& (var(31)=42||var(31)=46)
trigger4 =var(31):=ifelse( power>=250,ifelse( frontedgedist >400 &&power>=500,150,ifelse(frontedgebodydist <300,120,43)),43)
trigger4= var(38):=1010
trigger5= stateno=221 && (var(31)=43 || (power >=300 && var(31)=0)) 
trigger5 =var(31):=44
trigger6= stateno=1010&& var(31)=45
trigger6 =var(31):=24
trigger7= stateno=410&& var(31)=46
trigger7 =var(31):=22
ignorehitpause=1

;from counter  a
[State -1, Null]
type = Null
triggerall=  movehit=1
triggerall = p2stateno!=5120	
triggerall = var(21)<2
triggerall = var(31)=0 || var(31)>=50
trigger1= (stateno=1071) && p2statetype!=A 
trigger1 =var(31):=50
trigger2= (stateno=200) && (var(31)=50)
trigger2 =var(31):=51
trigger3= (stateno=205) && var(31)=51
trigger3 =var(31):=52
trigger4= stateno=410&& (var(31)=52)
trigger4=var(31):=22
ignorehitpause=1

;from counter  a
[State -1, Null]
type = Null
triggerall=  movehit=1
triggerall = p2stateno!=5120	
triggerall = var(21)<2
triggerall = var(31)=0 || var(31)>=50
trigger1= (stateno=1071)  && p2statetype=A 
trigger1 =var(31):=55
ignorehitpause=1

;from counter  b
[State -1, Null]
type = Null
triggerall=  movehit=1
triggerall = p2stateno!=5120	
triggerall = var(21)<2
triggerall = var(31)=0 || var(31)>=70
trigger1= (stateno=1072|| stateno=831&&var(19)=1|| stateno=3050&&var(21)=1||stateno=605&&var(21)=1) 
trigger1 =var(31):=ifelse(random<499,73,70)
trigger2= (stateno=210) && (var(31)=70)
trigger2 =var(31):=111
trigger2= var(38):=1010
trigger3= (stateno=211) && var(31)=71
trigger3 =var(31):=72
trigger4= stateno=410&& (var(31)=73)
trigger4=var(31):=22
ignorehitpause=1


;The only fatal that matters....
[State -1, Null]
type = Null
triggerall=  movehit=1  || p2movetype=H  && stateno=1000
triggerall = p2stateno!=5120	
triggerall = AIlevel >6
triggerall = var(31)=0 || var(31)>=80
trigger1= (stateno=212)  
trigger1 =var(31):=80
trigger2= (stateno=220) && (var(31)=80||var(31)=83)
trigger2 =var(31):=ifelse((var(31)=[83,84]),84,81)
trigger3= (stateno=1000) && var(31)=81
trigger3 =var(31):=82
trigger4= stateno=210&& (var(31)=82||var(31)=84||var(31)=103)
trigger4=var(31):=ifelse((var(31)=[103,104]),104,ifelse((var(31)=[84,85]),85,83))
trigger5= stateno=410 && (var(31)=85 ||var(31)=89 )
trigger5 =var(31):=ifelse((var(31)=[89,90]),90,86) 
trigger6= stateno=410 && (var(31)=93 ||var(31)=98||var(31)=101 ||var(31)=104 )
trigger6 =var(31):=ifelse((var(31)=[104,105]),105,ifelse((var(31)=[101,102]),102,ifelse((var(31)=[98,99]),99,94)))
trigger7= stateno=610&& (var(31)=86||var(31)=90||var(31)=94|| var(31)=98|| var(31)=105)&&var(6)=0
trigger7 =var(31):=ifelse((var(31)=[105,106]),106,ifelse((var(31)=[98,99]),99,ifelse((var(31)=[94,95]),95,ifelse((var(31)=[90,91]),91,87)))) 
trigger8= stateno=610&& (var(31)=87|| var(31)=91||var(31)=95||var(31)=99)&&var(6)=1
trigger8 =var(31):=ifelse((var(31)=[100,101]),101,ifelse((var(31)=[95,96]),96,ifelse((var(31)=[91,92]),92,88))) 
trigger9= stateno=620&& (var(31)=88||var(31)=92||var(31)=96||var(31)=100||var(31)=106)
trigger9 =var(31):=ifelse((var(31)=[106,107]),107,ifelse((var(31)=[100,101]),101,ifelse((var(31)=[96,97]),97,ifelse((var(31)=[92,93]),93,89)))) 
ignorehitpause=1


;fatal two
[State -1, Null]
type = Null
triggerall=  movehit=1
triggerall = p2stateno!=5120	
triggerall = var(21)=2|| var(31)=[140,155]
triggerall = var(31)=0 && power >=250 || var(31)=[140,155]
trigger1= (stateno=1100) 
trigger1 =var(31):=140
trigger1 =var(38):=205
trigger2= (stateno=205)  &&(var(31)=145 || var(31)=140)
trigger2 =var(31):=ifelse((var(31)=[145,146]),146,141)
trigger2 =var(38):=210
trigger3= (stateno=210) &&(var(31)=141 || var(31)=143)
trigger3 =var(31):=ifelse((var(31)=[143,144]),144,142)
trigger3 =var(38):=1010
trigger4= (stateno=410)  &&(var(31)=146)
trigger4 =var(31):=93
ignorehitpause=1

;[State -1, Null]
;type = Null
;triggerall = numhelper(1010)
;triggerall = helper(1010),movecontact=1	
;triggerall = AILevel >6
;trigger1=var(31)=13||var(41)=16;||var(40)=9||
;trigger1 =var(31):=ifelse((var(31)=[16,17]),17,14)
;trigger1 =var(38):=ifelse(var(31)=17,ifelse(power>=2000,3100,2100),1300)
;trigger2=var(31)=35
;trigger2 =var(31):=36
;trigger2 =var(38):=1300
;trigger3=var(31)=45
;trigger3 =var(31):=46
;trigger3 =var(38):=1300
[State -1, Null]
type = Null
triggerall = numhelper(1001) && var(2)=1
triggerall = helper(1001),movecontact=1	
triggerall = AILevel >6
trigger1=var(31)=151
trigger1 =var(31):=152
trigger1 =var(38):=1000
[State -1, Null]
type = Null
triggerall = numhelper(1001) && var(2)=0
triggerall = helper(1001),movecontact=1	
triggerall = AILevel >6
trigger1=var(31)=111||var(31)=130||var(31)=122||var(31)=154
trigger1 =var(31):=ifelse((var(31)=[154,155]),155,ifelse((var(31)=[122,123]),123,112))
trigger1 =var(38):=205

[State -1, Null]
type = Null
triggerall = numhelper(1010) 
triggerall = helper(1010),movecontact=1	
triggerall = helper(1010),anim!=1023
triggerall = AILevel >6
trigger1=var(31)=45||var(31)=20||var(31)=0
trigger1 =var(31):=ifelse(random<333,121,ifelse((var(31)=[45,46]),46,21))
trigger1 =var(38):=210
trigger2=var(31)=120|| var(31)=122
trigger2 =var(31):=ifelse((var(31)=[122,123]),123,121)
trigger2 =var(38):=210
trigger3=var(31)=150
trigger3 =var(31):=151
trigger3 =var(38):=1010
trigger4=var(31)=30
trigger4 =var(31):=110
trigger4 =var(38):=210
[State -1, Null]
type = Null
triggerall = numhelper(1001) && var(2)=1
triggerall = helper(1001),movecontact=1	
triggerall = AILevel >6
trigger1=var(31)=45||var(31)=20
trigger1 =var(31):=ifelse((var(31)=[45,46]),46,21)
[State -1, AIgh4]
type = ChangeState
value = var(38)
triggerall = var(38)>0
triggerall = var(38)!=var(39) || stateno=610
triggerall = stateno!=[3001,3020]
;triggerall = var(38)=3000&&power>=500|| var(38)!=3000
triggerall = roundstate=2
triggerall = var(32)<=0&&AIlevel>0
;triggerall = stateno!=var(39)
;triggerall = numhelper(1001)=0 || var(45)!=[1000,1007]
trigger1 = (ctrl&& statetype!=A||stateno=20||stateno=100)&&fvar(7)>-180
trigger1=var(31)=110||var(31)=112||var(31)=121&&fvar(6) <95||var(31)=123||var(31)=125||var(31)=140&&fvar(6)<40||var(31)=143||var(31)=145||var(31)=150||var(31)=151||var(31)=153||var(31)=155
trigger2=(var(31)=114||var(31)=115||var(31)=127||var(31)=128) 
trigger2 = ctrl &&statetype=A&& fvar(6)<70
trigger3=(var(31)=111||var(31)=113||var(31)=116||var(31)=121||var(31)=122||var(31)=124||var(31)=126||var(31)=128||var(31)=130||var(31)=141||var(31)=142||var(31)=144||var(31)=146||var(31)=154||var(31)=156||var(31)=157||var(31)=150||var(31)=120) 
trigger3 = movehit
trigger4=(var(31)=152) 
trigger4 = animelemtime(7)>0
;===========================================================================


;===========================================================================
;-----------------------------------------------------------------------
[State -1, Falcon Overdrive AI]
type = ChangeState
value = 3060
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) && (p2statetype!=L)
triggerall = fvar(6) = [0,70]
triggerall = stateno !=[800,899]
triggerall = fvar(7) =[-60,0]
triggerall = movetype!=H
triggerall = var(21)=1||p2stateno!=[1025,1031]
triggerall = statetype!=A
triggerall = numenemy=1
triggerall= roundno>1
triggerall = enemynear,life <=var(9)
triggerall=power>=1000
trigger1 = ctrl &&(Random <=62*AIlevel)
;----------------------------------------------------------------------------
[State -1, Rapter DriveAI]
type = ChangeState
value = 3050
triggerall = power >=500
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = fvar(6) = [-10,100]
triggerall =( fvar(7)= [-55,-0])&& enemy,vel y >=0||(var(31)=43&& numexplod(221)=1)
Triggerall = (Random <=63*AIlevel)||var(31)>0
triggerall = p2statetype !=L
triggerall = movetype!=H
triggerall =((p2stateno=[1025,1030])&&(p2life <=175))||(p2statetype=A&&p2movetype=A)||var(31)>0
triggerall = p2stateno!=[120,150]
triggerall = var(31)=0||(var(31)=43&& numexplod(221)=1)
triggerall = var(21)!=2||(var(31)=43&& numexplod(221)=1)
trigger1 = ctrl && (var(31)=0||p2movetype=A)
trigger2 = stateno=200&&movecontact&&anim!=201&&var(31)=0
trigger3 = stateno=221&&movecontact&&var(31)=43&& numexplod(221)=1

;---------------------------------------------------------------------------
[State -1, PIYOSABURO KOREDETOJAAAAAI]
type = ChangeState
value = 3000
triggerall = power >=500
Triggerall = (RoundState = 2) && (AILevel>0)
triggerall = stateno != 810
Triggerall = fvar(6) = [0,100]
triggerall = fvar(7)= [-60,0]
Triggerall = (Random <=41*AIlevel)
triggerall = p2statetype !=L
triggerall =statetype!=A
triggerall = p2stateno!=[150,155]
triggerall = ( p2movetype=A)
triggerall = movetype!=H
triggerall = var(21)!=2
trigger1 = ctrl&&var(31)=0
 ;--------------------------------------------
[State -1, Guard]
type = ChangeState
value = 120
triggerall = movetype !=H || stateno=5210|| stateno=5040
triggerall = roundstate = 2
triggerall = stateno!=[120,155]
triggerall=AILevel>0
triggerall = (statetype!=A)||(statetype=A && fvar(6) >5)
triggerall =movetype=I || stateno=5210|| stateno=5040
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 = 20*AIlevel
triggerall = AILevel>0
triggerall =power>=350
triggerall =fvar(6) <60
trigger1 = ((stateno=[150,155])&&statetype!=A)
;------------------------------------------------------------------
;EXCounter
[State -1, EXCounter]
type = ChangeState
value = 1070
triggerall = roundstate=2
triggerall = random <30*AIlevel
triggerall = (AILevel > 2)
triggerall = statetype!=A
triggerall = p2movetype = A
triggerall = movetype!=H
triggerall = stateno !=[800,4999]
triggerall = p2statetype != L
triggerall = p2stateno!=[120,155]
triggerall = fvar(6) =[0,80]
trigger1 =  ctrl

;------------------------------------------------------------------------
[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 = fvar(6) < 30
triggerall = stateno!=56
triggerall = p2statetype!=L
triggerall = var(31)=0
triggerall = (((p2statetype != A) ) && statetype!=A)||(statetype=A&&p2statetype=A&&p2movetype!=H)
trigger1 = ctrl
trigger2 = stateno=200&&moveguarded
trigger3 = stateno=205&&movecontact&&var(31)=0
trigger4 = stateno=210&&movecontact&&var(31)=0
trigger5 = stateno=400&&moveguarded
trigger6 = stateno=405&&movecontact
trigger7 = stateno=410&&movecontact&&var(31)=0
trigger8=stateno=600&&movecontact&&var(31)=0
trigger9=stateno=605&&movecontact&&var(31)=0
trigger10=stateno=610&&movecontact&&var(31)=56 && random<99
trigger11=(p2stateno=[120,155])&& ctrl
trigger12= var(33)=1 && ctrl
;---------------------------------------------------------------------------
;Stand Light Punch
;立ち弱パンチ
[State -1, Stand Light Punch1]
type = ChangeState
value = 200
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall =(var(31)=[1,2])||(var(31)=44&&fvar(6) <= 65)|| fvar(6) = [-10,77]
triggerall = (fvar(7)= [-70,10]) && enemy,vel y >=0 ||(var(31)=[1,2])||var(31)=40||var(31)=44||var(31)=50
Triggerall = (Random <=63*AIlevel)||(var(31)=[1,2])
triggerall = p2statetype !=L
triggerall = enemy, statetype != C
triggerall = anim!=201
triggerall = var(31)=0||var(31)=40||var(31)=44||(var(31)=[1,2])||var(31)=50
trigger1 = ctrl&&(var(31)=0||var(31)=1||var(31)=40||var(31)=44||var(31)=50)
trigger2 = stateno = 200 && movecontact&&(var(31)=0||var(31)=2)
;trigger3= var(31)=32 && ctrl && var(32)=[0,1]


;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パンチ
[State -1, Stand strong Punch3]
type = ChangeState
value = 205
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=100*AIlevel)||var(31)>0
triggerall = p2statetype !=L
triggerall = ((fvar(7)=[-65,15])&& enemy,vel y >=0)
triggerall = var(30)=0||var(31)=41
triggerall = anim!=201
triggerall = p2movetype!=A || fvar(6)>80 || var(31)>0 && p2statetype!=A
triggerall = (fvar(6) = [-15,55])||((fvar(6)=[80,195])&&p2statetype=A&&p2movetype!=H);||(var(31)=5||var(31)=33||var(31)=41||var(31)=52||var(31)=58)
triggerall  =var(4)<12 ;|| var(21)=2||(var(31)=5||var(31)=32||var(31)=41||var(31)=52||var(31)=58)
trigger1 = ctrl&&var(31)=0
trigger2 = stateno=400&&movecontact&&var(31)=0
trigger3 = stateno=200&&movecontact&&(var(31)=0||var(31)=41||var(31)=51)
;trigger4=(var(31)=1)&&ctrl



;---------------------------------------------------------------------------
;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 <=100*AIlevel) ||(var(31)=46)||var(31)=42||(var(31)=82||var(31)=84||var(31)=103)
triggerall = var(15)=0
triggerall = (fvar(7)= [-100,0]) && enemy,vel y >=0||(fvar(7)= [-155,0]) && enemy,vel y >=-2||(var(31)=82||var(31)=84||var(31)=103)
triggerall =(fvar(6) = [55,85]) || ( (var(31)>0 || p2statetype=A&&p2movetype=H) && fvar(6) = [-20,85])
triggerall  =var(4)<14 || var(21)=2
trigger1 = ctrl&&(var(31)=0||(var(31)=46&&power>=250&&numexplod(221)<2)||(p2movetype!=H && p2statetype=A||p2stateno=1048)||var(31)=70||(var(31)=82||var(31)=84||var(31)=103))
trigger2 = stateno=205&&movecontact&&p2statetype=S&&(var(31)=0||var(31)=42)
trigger3= ctrl && p2statetype=C && fvar(6) >60
;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = 211
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=100*AIlevel)||var(31)=31 ||var(31)=71||var(31)=43
triggerall = (fvar(7)= [-45,0]) && enemy,vel y >=0;|| (var(31)=8||var(31)=23||var(31)=30||var(31)=48||var(31)=77)
triggerall = fvar(6) = [-15,65]
triggerall  =var(4)<14 || var(21)=2
trigger1 = ctrl&&(p2statetype=L&&p2stateno!=5120||(p2statetype=A&&p2movetype=H))&&var(31)=0&&var(30)=0
trigger2 = stateno=210&&movecontact&&(((p2statetype=A||p2statetype=L)&&var(31)=0)||(var(31)=71||var(31)=43))
trigger3 = ctrl && var(31)=31
trigger4= stateno=410&&movecontact&&p2statetype=L
trigger5= stateno=205&&movecontact&&p2statetype=L
;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = 212
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=65*AIlevel) ;|| (AILevel=8&&(var(31)=8||var(31)=23||var(31)=30||var(31)=48||var(31)=72||var(31)=77) )
triggerall = var(15)=0
triggerall =p2statetype=S;|| (var(31)=8||var(31)=23||var(31)=30||var(31)=48||var(31)=77)
triggerall = fvar(6) = [95,140]
triggerall  =var(4)<14 || var(21)=2
trigger1 = ctrl&&p2statetype=S&&var(31)=0 && enemy,vel x!=0
;------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = 220
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=100*AIlevel)||var(31)=52||(var(31)=80||var(31)=83)
triggerall = var(15)=0
triggerall = (fvar(7)= [-65,0]) && enemy,vel y >=0|| var(31)=83
triggerall = p2statetype!=L|| var(31)=83
triggerall = var(31)>0||movecontact||(fvar(6) = [55,160])||p2statetype=A&&fvar(6) = [35,160]
triggerall  =var(4)<14 || var(21)=2
triggerall = p2stateno!=[1025,1029]
trigger1 = ctrl&&(var(31)=80||var(31)=0)&&p2statetype!=C;&&(var(31)=0||var(31)=8||var(31)=23||var(31)=30||var(31)=42||var(31)=48||var(31)=72||var(31)=77)
trigger2 = stateno=210&&movecontact&&var(31)=0&&p2statetype!=A;&&var(31)=0
trigger3 = stateno=410&&movecontact&&(var(31)=0||var(31)=52)
trigger4= stateno=210 && movecontact&&(var(31)=83)
;----------------------------------------
[State -1, Stand strong Punch2]
type = ChangeState
value = 221
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=100*AIlevel)|| var(31)<80
triggerall = var(15)=0
triggerall = var(31)!=120 &&var(31)!=150
triggerall = p2statetype!=A || var(31)<80
triggerall = movecontact ||fvar(6) = [95,140]
triggerall  =var(4)<14 || var(21)=2
trigger1 = ctrl&&p2statetype=S&&var(31)=0;&&(var(31)=0||var(31)=8||var(31)=23||var(31)=30||var(31)=42||var(31)=48||var(31)=72||var(31)=77)
trigger2 = stateno=210&&movecontact&&p2statetype=S
trigger3 = movecontact&& anim=212&& animelemtime(3) >0;&&var(31)=0
trigger4 = stateno=410&&movecontact&& frontedgebodydist <500&& p2statetype!=L &&var(30)=0
trigger5= stateno=220 && movehit && (var(31)=10||var(31)=20&&var(21)=0&&(frontedgebodydist <350||fvar(6)<130))
trigger6= stateno=220 && moveguarded && p2statetype=S
;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, crouch strong Punch2]
type = ChangeState
value = 410
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=88*AIlevel)||Var(31)>0
triggerall = p2statetype !=L
triggerall = (fvar(7)=[-175,-35]) && enemy,vel y >=0||p2statetype!=A
triggerall = p2movetype!=A|| var(31)>0||(p2statetype=A||p2statetype=C)
triggerall = movecontact ||(fvar(6) = [-45,130])
triggerall  =var(4)<14 || var(21)=2||Var(31)>0
triggerall = p2stateno!=[1025,1028]
trigger1 = (ctrl||(stateno=20||stateno=100) &&var(31)>0)&&(var(31)=0||Var(31)=21||var(31)=32||(var(31)=46&&(power<250||numexplod(221)>=2)) ||var(31)=73||(var(31)=89 ||var(31)=93&&var(18)=1 ||var(31)=98||var(31)=101 ||var(31)=104 ))
trigger2 = stateno=405&&movecontact &&var(31)=0
trigger3 = stateno=205&&movehit &&(var(31)=0||var(31)=52)
trigger4= stateno=210 && movecontact&&(var(31)=85||var(21)=1&&p2statetype=A&&var(31)=0)

;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = 420
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=68*AIlevel); || (var(31)=27||var(31)=5||var(31)=70)
triggerall = p2statetype !=L
triggerall = p2statetype!=A;|| (fvar(7) >-115&&(var(31)=27||var(31)=5||var(31)=70))
triggerall = movecontact||fvar(6) = [90,130]
triggerall = p2stateno!=[1025,1028]
trigger1 = ctrl&&var(31)=0 && p2statetype=S
trigger2 = stateno=410&&moveguarded &&var(31)=0
trigger3 = stateno=210&&moveguarded &&var(31)=0

;---------------------------------------------------------------------------
;Stand Light Punch
;立ち弱パンチ
[State -1, Stand Light Punch6]
type = ChangeState
value = 400
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = fvar(6) = [0,55]
Triggerall = (Random <=63*AIlevel)
triggerall = p2statetype !=L
triggerall = enemy, statetype != A
triggerall  =var(4)<4
trigger1 = ctrl&&var(31)=0 && p2statetype=S
trigger2 = stateno = 400 && movecontact
trigger3 = stateno = 200 && movecontact&& p2statetype=S && AIlevel >4


;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パンチ
[State -1, Stand strong Punch8]
type = ChangeState
value = 405
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType !=A )
triggerall = stateno != [800,3999]
Triggerall = (Random <=100*AIlevel)
triggerall = p2statetype !=L
triggerall = p2statetype!=A
triggerall = p2movetype!=A|| var(31)>0
triggerall = var(15)=0
triggerall = movecontact ||(fvar(6) = [55,110])
triggerall  =var(4)<6
trigger1 = ctrl&&var(31)=0
trigger2 = stateno=400&&movecontact
trigger3 = stateno=200&&movecontact&&var(31)=0


;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パンチ
[State -1, Stand strong Punch9]
type = ChangeState
value = 605
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType =A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=75*AIlevel)|| (Var(31)=5)
triggerall = stateno!=56
triggerall = p2statetype !=L
triggerall = (fvar(7)=[-35,50])|| (Var(31)=5)
triggerall = (fvar(6) = [-15,45])|| (Var(31)=5)
trigger1 = ctrl&&var(31)=0
trigger2 = stateno=600&&movecontact
;---------------------------------------------------------------------------
;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)||(var(31)=[22,23])||(var(31)=[86,87])||(var(31)=[90,91])||(var(31)=[93,94])||(var(31)=[97,98])||(var(31)=105)
triggerall = p2statetype !=L
triggerall = stateno!=610
triggerall = p2movetype!=I || p2statetype!=A||var(31)>0
triggerall = (fvar(7)=[-45,105])||(var(31)=[22,23])||(var(31)=[86,87])||(var(31)=[90,91])||(var(31)=[93,94])||(var(31)=[97,98])||(var(31)=105)
triggerall = (fvar(6) = [-15,85])||(var(31)=[22,23])||(var(31)=[86,87])||(var(31)=[90,91])||(var(31)=[93,94])||(var(31)=[97,98])||(var(31)=105)
trigger1 = ctrl&&((var(31)=0||var(31)=[22,23])||(var(31)=[86,87])||(var(31)=[90,91])||(var(31)=[93,94])||(var(31)=[97,98])||(var(31)=105))

;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = 620
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=75*AIlevel)||(var(31)=24||var(31)=88||var(31)=92||var(31)=95||var(31)=99||var(31)=106)
triggerall = p2statetype !=L
triggerall = stateno!=56
triggerall = (fvar(7)>=-40)||(var(31)=24||var(31)=88||var(31)=92||var(31)=95||var(31)=99||var(31)=106)
triggerall = (fvar(6) = [-20,85])||(var(31)=24||var(31)=88||var(31)=92||var(31)=95||var(31)=99||var(31)=106)
trigger1 = ctrl&&(var(31)=0)
trigger2= stateno=610 && movecontact && (var(31)=24||var(31)=88||var(31)=92||var(31)=95||var(31)=99||var(31)=106)



;---------------------------------------------------------------------------
;Stand Light Punch
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 600
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = A)
triggerall = stateno != [800,3999]
triggerall = (Var(31)=[3,4])||fvar(7)=[-50,55]
triggerall = (Var(31)=[3,4])||fvar(6) = [-10,80]
Triggerall = (Random <=50*AIlevel) || (Var(31)=[3,4])
triggerall = p2statetype !=L
trigger1 = ctrl&&(var(31)=0||var(31)=3)
trigger2 = stateno = 600 && movecontact&&(var(31)=0||var(31)=4)




;-----------------------------------------------------------------------
[State -1, Cool AI]
type = ChangeState
value = 1000
triggerall = AILevel>0 && roundstate = 2
triggerall = ((fvar(6) = [75,350]))||var(31)>0
triggerall = stateno !=[800,899]
triggerall = movetype!=H
triggerall = (p2stateno!=[1025,1052])||var(31)>0
triggerall = statetype!=A 
triggerall = random <149 ||var(31)>0
trigger1 = stateno=220&&movehit&&(var(31)=81 || var(31)=0 && var(21)>0)
trigger2=stateno=1010 && animelemtime(7)>0 && (var(2)=1 && var(24)>0)&& power>=250 && var(31)<80 && (p2movetype=H && p2stateno!=[120,155])
;--------------------------------------------------------------------
[State -1, excuse you AI]
type = ChangeState
value = 1100
triggerall = AILevel>0 && roundstate = 2&& statetype!=A
triggerall = fvar(6) = [45,155]
triggerall = fvar(7) = [-95,0]
triggerall = stateno !=[800,899]
triggerall = stateno!=1010
triggerall = stateno!=1000
triggerall = movetype!=H
trigger1 = ctrl&&Random <=99 &&var(31)=0 && fvar(6)>60 && (p2movetype=A || p2stateno=5120|| var(33))
trigger2 = (stateno=[200,210])&&moveguarded&&(Random <=40*AIlevel)
trigger3 = (stateno=[400,410])&&moveguarded&&(Random <=40*AIlevel) && p2statetype!=C
;--------------------------------------------------------------------
[State -1, kiss the dirt AI]
type = ChangeState
value = 1010
triggerall = AILevel>0 && roundstate = 2&& statetype!=A
triggerall = (p2stateno!=[120,155]) 
triggerall = (fvar(6) = [-15,255])&&var(30)=0||var(31)=20||((var(31)=30||var(31)=45) && fvar(6)<70)||(var(31)=94&&power<500)
triggerall = stateno !=[800,899]
triggerall = stateno!=1010
triggerall = stateno!=1000
triggerall = (fvar(7) =[-75,0]) && enemy,vel y >=0||var(31)=20||var(31)=30||(var(31)=94&&power<500)
triggerall = movetype!=H
triggerall = p2movetype!=A||var(31)>0 || enemy,hitdefattr!=SCA,AA,AP
triggerall =p2stateno!=[1025,1027]
triggerall = p2stateno!=[1040,1045]
trigger1 = ctrl&&Random <=199 && (p2statetype!=A&& fvar(6)>120)&&var(31)=0
trigger2 = (stateno=220)&&movecontact&&((Random <=95*AIlevel)||var(31)=20) && frontedgedist > 480&&var(31)<80
trigger3= ctrl&&Random <=199 && frontedgedist > 360&& p2stateno=834&&var(31)<80
trigger4= ctrl && (var(31)=30||(var(31)=93 &&var(18)=0)) && AIlevel>=7
trigger5= stateno=200 && var(31)=45 && movecontact

;--------------------------------------------------------------------
[State -1, excuse you AI]
type = ChangeState
value = 1050
triggerall = AILevel>0 && roundstate = 2&& statetype!=A
triggerall = (p2stateno!=[120,155]) 
triggerall = fvar(6) = [-15,80]
triggerall = stateno !=[800,899]
triggerall = stateno!=1010
triggerall = power >=250
triggerall = stateno!=1000
triggerall = p2statetype=C
triggerall = movetype!=H
trigger1 = ctrl&&Random <=199 &&var(31)=0
trigger2 = (stateno=[400,405])&&moveguarded&&(Random <=40*AIlevel)&&p2statetype=C 
;--------------------------------------------------------------------
[State -1, milk AI]
type = ChangeState
value = 1060
triggerall = AILevel>0 && roundstate = 2&& statetype!=A
triggerall = (p2stateno!=[120,155]) 
triggerall = fvar(6) = [-15,80]
triggerall = stateno !=[800,899]
triggerall = stateno!=1010
triggerall = stateno!=1000
triggerall = p2statetype=C|| p2stateno=1032 && enemy,time >20
triggerall = movetype!=H
trigger1 = ctrl&&Random <=199 &&p2stateno=1032&&var(31)=0
;----------------------------------------------------------------------------
;[State -1, Falcon kickAI]
;type = ChangeState
;value = 1050
;triggerall = AILevel>0 && roundstate = 2
;triggerall = (p2stateno!=[120,155]) && (p2statetype!=L||(p2stateno=[833,834]))
;triggerall = ((fvar(6) = [120,165])&&statetype!=A||var(31)>0)||((fvar(6) = [-15,155])&&statetype=A&&(p2statetype=A||p2statetype=L))
;triggerall = stateno !=[800,899]
;triggerall = ((movehit||fvar(7) =[-25,0])&&statetype!=A)||((fvar(7)=[-25,300])&& statetype=A)|| (var(31)=6||var(31)=12||var(31)=28||(var(31)=47&&(power<250||(statetype=A&&ctrl)))||var(31)=61&&power<250)
;triggerall = movetype!=H
;triggerall= enemy,id!=999&& stateno!=1005
;triggerall = stateno!=[55,56]
;triggerall = stateno!=1050
;triggerall = pos y <-15  || ((p2stateno=[833,834])||(p2stateno=[1051,1052]))||statetype!=A|| (var(31)=6||var(31)=14||var(31)=28||(var(31)=47&&(power<250||(statetype=A&&ctrl)))||var(31)=61&&power<250)
;triggerall = p2stateno!=[1025,1029]
;triggerall = (var(31)=6||var(31)=12||var(31)=28||var(31)=64||(var(31)=47&&(power<250||(statetype=A&&ctrl)))||var(31)=61&&power<250) || var(31)=0
;trigger1 = ctrl &&Random <=199 && (p2statetype!=L||(statetype=A&&(p2stateno=[833,834])||(p2stateno=[1051,1052])))&&var(31)=0
;trigger2 = stateno=410&&movehit &&(Random <=62*AIlevel)&& var(31)=0
;trigger3 = stateno=605&&movecontact &&(Random <=62*AIlevel)&& var(31)=0
;trigger4 = stateno=610&&movecontact&&(Random <=62*AIlevel)  && var(31)=0
;trigger5 =(p2stateno=[833,834]) && ((statetype=A&& ctrl)||stateno=57)  && fvar(6) <140
;trigger6 =(p2stateno=[1051,1052]) && ((statetype=A&& ctrl)||stateno=57)  && fvar(6) <140
;trigger7 = (var(31)=6||var(31)=12||var(31)=28||var(31)=52||(var(31)=47&&(power<250||(statetype=A&&ctrl))||var(31)=71)||var(31)=61&&power<250)&& movecontact
;trigger8= var(31)=47 && ctrl && statetype=A 

;-------------------------------------------------
[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
trigger2= stateno=410 && movehit && p2statetype=A
trigger3= anim=201 && movehit && p2statetype=A
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=[600,610]) && movecontact&&(var(31)=23||(var(31)=87|| var(31)=91||var(31)=95||var(31)=99))
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
triggerall = pos y <-125
triggerall = (fvar(6)>120 && (p2movetype!=A || p2statetype!=A))||backedgebodydist <350
trigger1= ctrl
[State -1, AISuper Jump]
type = ChangeState
value = 59
triggerall = roundstate = 2
triggerall = AILevel>0
triggerall= var(8)=0
triggerall = statetype = A
triggerall = random < 33*AIlevel
triggerall = pos y <-125
triggerall = fvar(6)<90 && (p2movetype=A && p2statetype!=A&&backedgebodydist >350)
trigger1= ctrl
[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 = fvar(7) =[-180,15]
triggerall = p2stateno!=834 || fvar(6) >80 || var(31)=21|| var(31)=40||var(31)=73||Var(31)=121
trigger1= p2movetype!=A && (fvar(6)=[110,788])&& (Random <=25*AIlevel)&& ctrl && var(31)=0
trigger2= anim=1000 && movehit && time>52 && var(31)=0
trigger3= p2movetype=H && p2statetype=A && fvar(6)>35&& (Random <=50*AIlevel)&& ctrl && var(31)=0
trigger4= (p2stateno=[1029,1030]) && fvar(6) >30&& ctrl && var(31)=0
trigger5= var(15)=1 && fvar(6) >60 && ctrl && var(31)=0
trigger6= (var(31)=21||var(31)=70) && fvar(6) >120&& ctrl
trigger7= (var(31)=40||var(31)=140) && fvar(6) >45 && ctrl
trigger8= (var(31)=73||Var(31)=121) && fvar(6) >90&& ctrl
[State -1, AI run]
type=changestate
value=20
triggerall = roundstate = 2
triggerall = p2stateno!=834 || fvar(6) >80
triggerall=AILevel>0 && statetype=S && ctrl && (Random <=31*AIlevel)
triggerall = p2movetype!=H
triggerall=p2statetype!=L
trigger1= (stateno!=[20,105]) && p2movetype!=A && (fvar(6)=[20,109])

[State -1, AIRun Back]
type = ChangeState
value = 105
triggerall = AILevel>0
triggerall = stateno !=105
triggerall = statetype != A
triggerall = random < 149
triggerall = roundstate = 2
triggerall = ctrl&& var(31)=0
trigger1 = ( p2movetype = A) && (fvar(6)=[-99,15])
;===========================================================================
[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 = enemynear,life <=var(9)
trigger1 = ctrl ||stateno=40||stateno=52 ||stateno=55
trigger2= stateno=1000 && animelemtime(6)>2

;-----------------------------------------------------------------------------
[State -1, Renzokuken]
type = ChangeState
value = 3000
triggerall = command="FC"
triggerall = statetype !=A
triggerall = power >=500
triggerall = AILevel =0
triggerall = roundstate=2
trigger1 = ctrl||stateno=[100,101]
trigger2 = stateno=200&&movecontact&& anim!=201
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = stateno=410&&movecontact
trigger8 = (stateno=201||stateno=420)&&movecontact
trigger9 = stateno=211&&(moveguarded||movecontact&&anim=212&&var(21)>0||(movehit&&p2stateno=1035&&var(21)>0||movecontact&&var(21)=0))
trigger10 = stateno=220&&movecontact
trigger11=(stateno=212||stateno=221||anim=201) && movecontact
trigger11= stateno=1000 && animelemtime(6)>2
;---------------------------------------------------------------
[State -1, Renzokuken]
type = ChangeState
value = 3050
triggerall = command="FD"
triggerall = statetype !=A
triggerall = power >=500
triggerall = AILevel =0
triggerall = roundstate=2
trigger1 = ctrl||stateno=[100,101]
trigger2 = stateno=200&&movecontact&& anim!=201
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = stateno=410&&movecontact
trigger8 = (stateno=201||stateno=420)&&movecontact
trigger9 = stateno=211&&(moveguarded||movecontact&&anim=212&&var(21)>0||(movehit&&p2stateno=1035&&var(21)>0||movecontact&&var(21)=0))
trigger10 = stateno=220&&movecontact
trigger11=(stateno=212||stateno=221||anim=201) && movecontact
trigger11= stateno=1000 && animelemtime(6)>2
;------------------------------------------------------------
[State -1, DAT PUNCH]
type = ChangeState
value = 1100
triggerall = AILevel =0
triggerall = command="HCBF1" 
triggerall = statetype !=A
trigger1 = ctrl||stateno=[100,101]
trigger2 = stateno=200&&movecontact&& anim!=201
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = stateno=410&&movecontact
trigger8 = (stateno=201||stateno=420)&&movecontact
trigger9 = stateno=211&&(moveguarded||movecontact&&anim=212&&var(21)>0||(movehit&&p2stateno=1035&&var(21)>0||movecontact&&var(21)=0))
trigger10 = stateno=220&&movecontact
trigger11= stateno=1000 && animelemtime(6)>2
;------------------------------------------------------------
[State -1, EPIC STANCE]
type = ChangeState
value = 1070
triggerall = AILevel =0
triggerall = command="QCB3" 
triggerall = statetype !=A
trigger1 = ctrl||stateno=[100,101]
trigger2 = stateno=200&&movecontact&& anim!=201
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = stateno=410&&movecontact
trigger8 = (stateno=201||stateno=420)&&movecontact
trigger9 = stateno=211&&(moveguarded||movecontact&&anim=212&&var(21)>0||(movehit&&p2stateno=1035&&var(21)>0||movecontact&&var(21)=0))
trigger10 = stateno=220&&movecontact
trigger11= stateno=1000 && animelemtime(6)>2
;------------------------------------------------------------
[State -1, THIS MILK]
type = ChangeState
value = 1060
triggerall = AILevel =0
triggerall = command="QCB2" 
triggerall = statetype !=A
trigger1 = ctrl||stateno=[100,101]
trigger2 = stateno=200&&movecontact&& anim!=201
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = stateno=410&&movecontact
trigger8 = (stateno=201||stateno=420)&&movecontact
trigger9 = stateno=211&&(moveguarded||movecontact&&anim=212&&var(21)>0||(movehit&&p2stateno=1035&&var(21)>0||movecontact&&var(21)=0))
trigger10 = stateno=220&&movecontact
trigger11= stateno=1000 && animelemtime(6)>2
;------------------------------------------------------------
[State -1, POWER SAFE]
type = ChangeState
value = 1050
triggerall = AILevel =0
triggerall = command="QCB1" 
triggerall = statetype !=A
triggerall = power>=250
trigger1 = ctrl||stateno=[100,101]
trigger2 = stateno=200&&movecontact&& anim!=201
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = stateno=410&&movecontact
trigger8 = (stateno=201||stateno=420)&&movecontact
trigger9 = stateno=211&&(moveguarded||movecontact&&anim=212&&var(21)>0||(movehit&&p2stateno=1035&&var(21)>0||movecontact&&var(21)=0))
trigger10 = stateno=220&&movecontact
trigger11= stateno=1000 && animelemtime(6)>2
;------------------------------------------------------------
[State -1, STOMP YA]
type = ChangeState
value = 1010
triggerall = AILevel =0
triggerall = command="QCF2" || command="QCF3"||command="QCF4"&&power>=250
triggerall = statetype !=A
triggerall = numhelper(1001) =0
trigger1 = ctrl||stateno=[100,101]
trigger2 = stateno=200&&movecontact&& anim!=201
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = stateno=410&&movecontact
trigger8 = (stateno=201||stateno=420)&&movecontact
trigger9 = stateno=211&&(moveguarded||movecontact&&anim=212&&var(21)>0||(movehit&&p2stateno=1035&&var(21)>0||movecontact&&var(21)=0))
trigger10 = stateno=220&&movecontact
trigger11= stateno=1000 && animelemtime(6)>2

;------------------------------------------------------------
[State -1, DASH]
type = ChangeState
value = 1000
triggerall = AILevel =0
triggerall = command="QCF1"
triggerall = statetype !=A

trigger1 = ctrl ||stateno=[100,101]
trigger2 = stateno=200&&movecontact && anim!=201
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = stateno=410&&movecontact
trigger8 = (stateno=201||stateno=420)&&movecontact
trigger9 = stateno=211&&(moveguarded||movecontact&&anim=212&&var(21)>0||(movehit&&p2stateno=1035&&var(21)>0||movecontact&&var(21)=0))
trigger10 = stateno=220&&movecontact
trigger11= ((stateno=212&&(moveguarded||(movehit&&p2stateno=1035)))||stateno=221||anim=201||stateno=1060||stateno=1050||stateno=1100||stateno=[1070,1073]) && movecontact && power>=250
trigger12=stateno=1010 && animelemtime(7)>0 && (var(2)!=1 || var(24)>0)&& power>=250
trigger13= stateno=1060 && animelemtime(5)<0
;---------------------------------------------------------------------------
;Run Fwd
;ダッシュ
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = AILevel =0
triggerall = stateno!=1000
trigger1 = command = "FF"
trigger1 = StateType != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Run Back
;後退ダッシュ
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = stateno!=1000
triggerall = AILevel =0
trigger1 = command = "BB"
trigger1 = StateType != A
trigger1 = ctrl
[State -1, air dash]
type = ChangeState
value = 55
triggerall = AILevel =0
triggerall= var(8)=0
triggerall = pos y <-125
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 <-125
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=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
trigger2= (stateno=200) && movecontact 
trigger3= (stateno=410) && movecontact && enemy,hitshakeover
;---------------------------------------------------------------------------
;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 = fvar(6) < 35
triggerall = command="holdfwd"||command="holdback"
triggerall = (((p2StateType != A) || (p2statetype = C)) && statetype!=A)||(statetype=A&&p2statetype=A)
trigger1 = ctrl
trigger2 = stateno=200&&movecontact
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = stateno=410&&movecontact
trigger8=stateno=600&&movecontact
trigger9=stateno=605&&movecontact
trigger10=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
;立ち弱パンチ
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = AILevel =0
triggerall = command="x"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno=200&&movecontact&& anim!=201

;---------------------------------------------------------------------------
;Stand Light Kick
;立ち弱キック
[State -1, Stand Light Kick]
type = ChangeState
value = 205
triggerall = AILevel =0
triggerall = command="y"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno=200&&movecontact && anim!=201
trigger3 = stateno=400&&movecontact
;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = AILevel =0
triggerall = command="z"
triggerall = command != "holddown"
triggerall = command != "holdback" && command!="holdfwd"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno=400&&movecontact
trigger3 = stateno=405&&movecontact
trigger4 = stateno=200&&movecontact
trigger5 = stateno=205&&movecontact

;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value =211
triggerall = AILevel =0
triggerall = command="z"
triggerall = command != "holddown"
triggerall =  command="holdfwd"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno=400&&movecontact
trigger3 = stateno=405&&movecontact
trigger4 = stateno=410&&movecontact
trigger5 = stateno=200&&movecontact
trigger6 = stateno=205&&movecontact
trigger7= stateno=210&&movecontact

;---------------------------------------------------------------------------
;Stand Strong Punch
;立ち強パンチ
[State -1, Stand Strong Punch]
type = ChangeState
value = 212
triggerall = AILevel =0
triggerall = command="z"
triggerall = command != "holddown"
triggerall = command = "holdback" 
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno=400&&movecontact
trigger3 = stateno=405&&movecontact
trigger4 = stateno=200&&movecontact
trigger5 = stateno=205&&movecontact
trigger6= stateno=210&&movecontact
trigger7= stateno=211 && movecontact
trigger8 = stateno=410&&movecontact
;----------------------------------------
[State -1, Falcon kick]
type = ChangeState
value = 220
triggerall = AILevel =0
triggerall = command="a"
triggerall = statetype != A
triggerall = command != "holdfwd"
triggerall = command != "holddown"
trigger1 = ctrl
trigger2 = (stateno=200||stateno=205||stateno=210||stateno=211||stateno=400||stateno=405||stateno=410)&&movecontact
;----------------------------------------
[State -1, Falcon kick]
type = ChangeState
value = 221
triggerall = AILevel =0
triggerall = command="a"
triggerall = statetype != A
triggerall = command = "holdfwd"
triggerall = command != "holddown"
trigger1 = ctrl
trigger2 = (stateno=200||stateno=205||stateno=210||stateno=211||stateno=400||stateno=405||stateno=410||stateno=220)&&movecontact


;---------------------------------------------------------------------------
;Crouching Light Punch
;しゃがみ弱パンチ
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = AILevel =0
triggerall = command="x"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno=200&&movecontact && anim!=201
;---------------------------------------------------------------------------
;Crouching Light Kick
;しゃがみ弱キック
[State -1, Crouching Light Kick]
type = ChangeState
value = 405
triggerall =command="y"
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = AILevel =0
trigger1 = ctrl
trigger2 = stateno=400&&movecontact
trigger3 = stateno=205&&movecontact
trigger4= stateno=200&&movecontact&& anim!=201

;---------------------------------------------------------------------------
;Crouching Strong Punch
;しゃがみ強パンチ
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall =command="z"
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = AILevel =0
trigger1 = ctrl
trigger2 = stateno=400&&movecontact
trigger3 = stateno=405&&movecontact
trigger4 = stateno=200&&movecontact
trigger5 = stateno=205&&movecontact
trigger6 = stateno=210&&movecontact
;----------------------------------------
[State -1, Falcon kick]
type = ChangeState
value = 420
triggerall = AILevel =0
triggerall = command="a"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno=200||stateno=205||stateno=210||stateno=211||stateno=400||stateno=405||stateno=410)&&movecontact
;---------------------------------------------------------------------------
;Jump Light Punch
;空中弱パンチ
[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=600&&movecontact

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


