

;-| 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 = ~D, $B, D, $B,y
time = 20
[Command]
name = "FC"   ;Same name as above
command = ~D, $B, D, $B,~y
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 = ~D, DF, F, y
[Command]
name = "QCF_y"
command = ~D, DF, F, ~y

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

[Command]
name = "QCF_a"
command = ~D, DF, F, a
[Command]
name = "QCF_a"
command = ~D, DF, F, ~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 = "QCF_a"
command = ~D, DF, F, a
[Command]
name = "QCF_a"
command = ~D, DF, F, ~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 = !helper(10003),var(37)
triggerall = movehit>=1 
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = var(31)=0
trigger1= (stateno=1006||stateno=1005) && var(21)=0
trigger1 =var(31):=2
trigger1 =var(34):=400
ignorehitpause=1
[State -1, Null]
type = Null
triggerall = !helper(10003),var(37)
triggerall = movehit>=1 
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = var(31)=0|| var(31)=30
trigger1= ((stateno=1050&& var(2)!=2)||stateno=1004&&p2statetype=A||stateno=1006||(stateno=1010&&var(2)=3)) && var(21)=1  
trigger1 =var(31):=30
trigger1 =var(34):=205
trigger2= stateno=205 && (var(31)=30)
trigger2 =var(31):=11
trigger2 =var(34):=605
ignorehitpause=1
[State -1, Null]
type = Null
triggerall = !helper(10003),var(37)
triggerall = movehit>=1 
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = var(31)=0|| var(31)=35
trigger1= (stateno=1006) && var(21)=1  
trigger1 =var(31):=35
trigger1 =var(34):=205
trigger2= stateno=205 && (var(31)=35)
trigger2 =var(31):=11
trigger2 =var(34):=605
ignorehitpause=1

[State -1, Null]
type = Null
triggerall = !helper(10003),var(37)
triggerall = movehit>=1 
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = var(31)=0|| var(31)=36
trigger1= (stateno=3051) && var(21)>=1  
trigger1 =var(31):=36
trigger1 =var(34):=205
trigger2= stateno=205 && (var(31)=36)
trigger2 =var(31):=11
trigger2 =var(34):=605
ignorehitpause=1

[State -1, Null]
type = Null
triggerall = !helper(10003),var(37)
triggerall = movehit>=1
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = var(31)=0 || var(31)=[40,59]
trigger1= anim=1101 && var(21)=2
trigger1 =var(31):=ifelse((var(31)=[46,47]),47,40)
trigger1 =var(34):=ifelse((var(31)=[46,47]),210,1001)
trigger2= stateno=1006 && var(31)=40
trigger2 =var(31):=41
trigger2 =var(34):=205
trigger3= stateno=400 && var(31)=54
trigger3 =var(31):=55
trigger3 =var(34):=405
trigger4= stateno=405 && var(31)=55
trigger4 =var(31):=56
trigger4 =var(34):=211
trigger5= stateno=211&& (var(31)=45||var(31)=56)
trigger5 =var(31):=ifelse((var(31)=[56,57]),57,45)
trigger5 =var(34):=ifelse((var(31)=[56,57]),ifelse((power<500||var(6)=0),1010,3000),1100)
trigger6= stateno=1010 && (var(31)=48||var(31)=57)
trigger6 =var(31):=ifelse((var(31)=[57,58]),58,49)
trigger6 =var(34):=ifelse((var(31)=[57,58]),1002,1001)
trigger7= stateno=1005 && (var(31)=49)
trigger7 =var(31):=50
trigger7 =var(34):=205
trigger8= stateno=205 && (var(31)=41||var(31)=50)
trigger8 =var(31):=ifelse((var(31)=[50,51]),51,42)
trigger8 =var(34):=605
trigger9= stateno=605 && (var(31)=42||var(31)=51)
trigger9 =var(31):=ifelse((var(31)=[51,52]),52,43)
trigger9 =var(34):=610
trigger10= stateno=610 &&(var(31)=43||var(31)=52)
trigger10 =var(31):=ifelse((var(31)=[52,53]),53,44)
trigger10 =var(34):=1004
trigger10= stateno=1004 &&(var(31)=44||var(31)=53)
trigger10 =var(31):=ifelse((var(31)=[53,54]),54,45)
trigger10 =var(34):=ifelse((var(31)=[53,54]),400,211)
trigger10= stateno=210 && var(31)=47
trigger10 =var(31):=48
trigger10 =var(34):=1010
trigger11= stateno=3000 && var(31)=57
trigger11 =var(31):=0
trigger11 =var(34):=0
ignorehitpause=1


[State -1, Null]
type = Null
triggerall = !helper(10003),var(37)
triggerall = movehit>=1 || (stateno=810||stateno=831)
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = var(31)=0 || var(31)=[1,10]
trigger1= (stateno=810||stateno=831) && var(19)=0 
trigger1 =var(31):=1
trigger1 =var(34):=1004
trigger2= stateno=1004 && var(31)=1
trigger2 =var(31):=2
trigger2 =var(34):=400
trigger3= stateno=400 && var(31)=2
trigger3 =var(31):=3
trigger3 =var(34):=405
trigger4= stateno=405 && var(31)=3
trigger4 =var(31):=4
trigger4 =var(34):=211
trigger5= stateno=211&& (var(31)=4||var(31)=0)
trigger5 =var(31):=5
trigger5 =var(34):=ifelse(p2life<220 && var(6)>0&&power>=500,3000,1010)
trigger6= stateno=1010 && var(31)=5
trigger6 =var(31):=ifelse((frontedgebodydist >50&&var(6)>0),10,6)
trigger6 =var(34):=ifelse((frontedgebodydist >50&&var(6)>0),1001,1002)
trigger7= stateno=1005 && (var(31)=6||var(31)=10)
trigger7 =var(31):=7
trigger7 =var(34):=ifelse(p2life<220 && var(6)=2&&power>=500,3000,205)
trigger8= stateno=205 && var(31)=7
trigger8 =var(31):=8
trigger8 =var(34):=605
trigger9= stateno=605 && var(31)=8
trigger9 =var(31):=9
trigger9 =var(34):=610
trigger10= stateno=610 && var(31)=9
trigger10 =var(31):=0
trigger10 =var(34):=1004
ignorehitpause=1

[State -1, Null]
type = Null
triggerall = !helper(10003),var(37)
triggerall = movehit>=1 || (stateno=810||stateno=831)
triggerall = p2stateno!=5120	
triggerall = AILevel >6
triggerall = var(31)=0|| var(31)=[10,29]
trigger1= (stateno=810||stateno=831) && var(19)=1 
trigger1 =var(31):=10
trigger1 =var(34):=1004
trigger2= stateno=1004 && (var(31)=10||var(31)=14||var(31)=26)
trigger2 =var(31):=ifelse((var(31)=[26,27]),27,ifelse((var(31)=[14,15]),15,11))
trigger2 =var(34):=ifelse((var(31)=[10,11]),205,400)
trigger3= stateno=400 && var(31)=15
trigger3 =var(31):=16
trigger3 =var(34):=405
trigger4= stateno=405 && var(31)=16
trigger4 =var(31):=17
trigger4 =var(34):=211
trigger5= stateno=1050 && var(31)=28
trigger5 =var(31):=23
trigger5 =var(34):=205
trigger6= stateno=211&& (var(31)=17||var(31)=27)
trigger6 =var(31):=ifelse((var(31)=[27,28]),28,18)
trigger6 =var(34):=ifelse(p2life<220 && var(6)>0&&power>=500,3000,ifelse((var(31)=[27,28])&&var(6)>0&&random<499,1050,1010))
trigger7= stateno=1010 && var(31)=18
trigger7 =var(31):=ifelse((frontedgebodydist >50&&var(6)>0),23,21)
trigger7 =var(34):=ifelse((frontedgebodydist >50&&var(6)>0),1001,1002)
trigger8= stateno=1005 && (var(31)=21||var(31)=23)
trigger8 =var(31):=ifelse((var(31)=27||var(31)=[21,22]),ifelse(power>500&&var(6)>0,27,22),22)
trigger8=var(34):=ifelse(p2life<220 && var(6)=2&&power>=500,3000,205)
trigger9= stateno=205 && (var(31)=11||var(31)=23)
trigger9 =var(31):=ifelse((var(31)=[23,24]),24,12)
trigger9 =var(34):=605
trigger10= stateno=605 && (var(31)=12||var(31)=24)
trigger10 =var(31):=ifelse((var(31)=[24,25]),25,13)
trigger10 =var(34):=610
trigger11= stateno=610 && (var(31)=13||var(31)=25)
trigger11 =var(31):=ifelse((var(31)=[25,26]),26,14)
trigger11 =var(34):=1004
trigger12= stateno=3000 && (var(31)=28)
trigger12 =var(31):=ifelse(var(6)=2&& frontedgebodydist >50,0,29)
trigger12 =var(34):=ifelse(var(6)=2&& frontedgebodydist >50,0,1050)
ignorehitpause=1

[State -1, AIgh4]
type = ChangeState
value = var(34)
triggerall = !helper(10003),var(37)
triggerall = var(34)>0
triggerall = var(34)!=var(35) || stateno=211 ||stateno=1001
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||var(31)=54) && p2bodydist x <25 && var(34)!=[1004,1005]
trigger1=var(31)=2||var(31)=15||var(31)=11||var(31)=35||var(31)=10||var(31)=7
trigger2 = (ctrl&& statetype!=A||stateno=20 || stateno=100 && time >=10)
trigger2=var(31)=10||var(31)=24
trigger3 = stateno=1010 && animelemtime(4)>=15&&animelemtime(4)<=20 
trigger3=(var(31)=6||var(31)=21||var(31)=58) 
trigger4 =stateno=1002 && animelemtime(4)>=0&&animelemtime(4)<=2 ||stateno=1001 && animelemtime(6)>=1&&animelemtime(7)<=1
trigger4=(var(31)=10||var(31)=6||var(31)=21||var(31)=49)
trigger5 = (ctrl&& statetype!=A||stateno=20||stateno=[100,105]) && p2bodydist x<65&& var(34)!=[1004,1005]
trigger5 = ((var(40)=117||var(40)=110||var(40)=72||(var(40)=[16,18])) )
trigger6 = (var(31)=8||var(31)=9||var(31)=3||var(31)=4||var(31)=19||var(31)=16||var(31)=17||var(31)=25||var(31)=13||var(31)=14||var(31)=26||var(31)=43||var(31)=44||var(31)=48||var(31)=52||var(31)=53||var(31)=55||var(31)=56) 
trigger6 = movehit
trigger7 = (var(31)=5||var(31)=18||(var(31)=27)&& power<500||var(31)=46||var(31)=55||var(31)=57) &&anim=212
trigger7 = movehit
trigger8 = (var(31)=27) &&anim=213 && power>=500
trigger8 = movehit
trigger9 = (var(31)=1||var(31)=10) 
trigger9 =  anim=810 && animelemtime(7)>1 || anim=851 && animelemtime(3)>1 
trigger10=(var(31)=8||var(31)=23||var(31)=12||var(31)=42||var(31)=51) && ctrl &&statetype=A
trigger10 = (p2bodydist x = [0,60])
trigger11=(var(31)=30||var(31)=41||var(31)=50) && ctrl &&p2statetype=A && statetype!=A
trigger11 = (p2bodydist y = [-55,0])&& p2bodydist x <35
trigger12=(var(31)=29) && ctrl &&p2statetype=A && statetype!=A
trigger13=stateno=1100 && animelemtime(9)>=0 && animelemtime(10)<0&& var(21)>0
trigger13=var(31)=40
trigger14=(var(31)=45||var(31)=47) && ctrl &&p2statetype=A && statetype!=A
trigger14 = (p2bodydist y = [-60,0])&& p2bodydist x <45
trigger15=(var(31)=36) && ctrl &&p2statetype=A && statetype!=A
trigger15 = (p2bodydist y = [-90,-50])&& p2bodydist x <45

;===========================================================================
;-----------------------------------------------------------------------
[State -1, Falcon Overdrive AI]
type = ChangeState
value = 3060
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) && (p2statetype!=L)
triggerall = p2bodydist x = [0,160]
triggerall = p2bodydist y = [-45,0]
triggerall = stateno !=[800,899]
triggerall = movetype!=H
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= stateno=1001 && animelemtime(5)>=0&&animelemtime(7)<=1
trigger2= stateno=1003 && animelemtime(4)>=10&&animelemtime(4)<=40
trigger3= stateno=1002 && animelemtime(3)>=0&&animelemtime(8)<=2 
trigger4= stateno=1000 && animelemtime(5)>=0&&animelemtime(7)<=1

;----------------------------------------------------------------------------
[State -1, Rising SunAI]
type = ChangeState
value = 3000
triggerall = power >=500
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=45*AIlevel)
triggerall = movetype!=H&&var(31)=0
triggerall = p2stateno!=[833,834]
triggerall = p2bodydist x =[0,65]
triggerall = p2bodydist y =[-65,0]
triggerall = stateno!=[3000,3055]
triggerall = p2stateno!=[120,150]
trigger1 = ctrl && p2statetype=A &&var(6)>0 && var(33)=0 && (p2stateno!=5120 &&p2stateno!=5210&&p2stateno!=5201) && var(31)=0
trigger2 = (anim=[212,213])&&movehit && var(6)>0
trigger3 = stateno=210 && p2statetype=A && movehit


;-----------------------------------------------------------------------
[State -1, TMAI]
type = ChangeState
value = 3050
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) 
triggerall = movetype!=H
triggerall = p2stateno!=5120
triggerall = p2stateno!=[5201,5210]
triggerall =(Random <=75*AIlevel)
triggerall =  power >=500
triggerall = StateType != A && var(31)=0
triggerall = p2movetype=A && enemy,vel x =[-2,2]
triggerall =p2statetype=S||p2statetype=C
triggerall = roundstate = 2&& p2bodydist x <179
triggerall = stateno !=[3000,9999]
trigger1 =(ctrl||stateno=20) &&(EnemyNear, HitDefAttr = SCA,AA|| enemy,numproj>0) 

;-----------------------------------------------------------------------
[State -1, TMAI]
type = ChangeState
value = 1000
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 = roundstate = 2&& var(31)=0
triggerall = stateno !=[3000,9999]
trigger1 =(ctrl||stateno=20 ||  stateno=105 && time >10) &&(EnemyNear, HitDefAttr = SCA,AA) && p2bodydist x <99
trigger2= helper(10003),var(8)>0 &&ctrl && backedgebodydist >85&& p2movetype=A
trigger3 = stateno=105 && time >10 && backedgebodydist >85&& 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
triggerall = enemy,vel y >=0
triggerall = roundstate = 2&& var(31)=0
triggerall = stateno !=[3000,9999]
trigger1 =(ctrl||stateno=20 ||  stateno=105 && time >10) &&(EnemyNear, HitDefAttr = SCA,AA) && p2bodydist x <60&& p2movetype=A
trigger2= helper(10003),var(8)>0 &&ctrl && p2movetype=A

 ;--------------------------------------------
[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, DPAI]
type = ChangeState
value = 1050
triggerall = AILevel >0
triggerall = roundstate = 2
triggerall =p2bodydist y=[-80,0]
triggerall = (p2statetype=A && p2bodydist x= [0,70]) || (p2bodydist x=[0,40]) ;|| 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 = !numtarget(206) &&!numtarget(997)&&!numtarget(800)&&!numtarget(202)
triggerall = p2stateno!=[833,834]
triggerall = random < 45*AILevel||helper(10003),var(8)>0 ;|| var(31)>0
triggerall = p2movetype!=I
trigger1= ctrl && ((p2movetype=I)||(helper(10003),var(8)>0 &&p2movetype=A)||p2statetype=A) && var(31)=0
triggerall =(p2movetype=A||p2statetype=A)&&p2stateno !=[120,150]
;-----------------------------------------------------------------------------
[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 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 = (p2statetype!=A&&p2bodydist x = [-15,40])||((p2bodydist y=[-45,0])&&(p2bodydist x=[-15,25])&&p2statetype=A && enemy,vel y >=0)||((p2bodydist y=[-130,-90])&&(p2bodydist x=[-15,35])&&var(11) && enemy,vel y >=0)
trigger1 = ctrl && p2statetype!=C&&(helper(10003),var(10)>0|| helper(10003),var(11)>0)&&var(31)=0
trigger2 = ctrl&& (p2stateno=1030||(p2stateno=[301,303]))
;---------------------------------------------------------------------------
;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 = [-25,28])&&(p2movetype!=H||p2stateno=[120,155])
triggerall = ((p2bodydist y= [-105,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 <45 && var(31)=0
trigger2 = ctrl&& (p2bodydist x=[0,27]) &&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 = 206
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = helper(10003),var(8)=0
triggerall = stateno != [800,3999]
Triggerall = (Random <=45*AIlevel);||(var(31)=5||var(31)=32||var(31)=41||var(31)=52||var(31)=58||var(31)=1||var(31)=95)
triggerall = p2statetype !=L&&var(31)=0
triggerall = (p2bodydist x = [45,70]) || movehit
trigger1 = ctrl&& (p2bodydist x=[50,70]) &&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)&&var(31)=0
trigger2 = anim=201 && movehit
trigger3 = stateno=205 && (movecontact && AIlevel <3 ||movehit && AIlevel>=3) && p2statetype!=A


;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 = [-12,50]) && (p2bodydist y = [-30,0]) &&(enemy,vel y >=-1)&&var(31)=0 
Triggerall =Random <= 65*AILevel || (AIlevel >6 && movehit)
triggerall = p2statetype != L
triggerall = enemynear,anim!=5120
triggerall = movetype != H&&var(31)=0
triggerall = p2movetype!=A
triggerall = helper(10003),var(8)=0
trigger1 = (ctrl||stateno=20)&& enemy,hitfall
trigger2 = stateno = 405 && movehit && p2bodydist x <32
trigger3 = stateno=210 && movehit&& p2bodydist x <30

;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 = (p2bodydist y= [-60,0]) && (enemy,vel y >=-1) && (enemy,hitfall||p2statetype!=A) ; || movehit && var(31)>0 
triggerall = enemy, statetype != C
triggerall = (p2bodydist x = [-20,55])
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=405&&movecontact&&var(31)=0;;&& AIlevel <7
trigger3 = stateno=205&&movecontact&&var(31)=0;;&& AIlevel <7


;---------------------------------------------------------------------------
;Stand Strong Punch
;—§‚¿‹­ƒpƒ“ƒ`
[State -1, Stand strong Punch]
type = ChangeState
value = 405
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = StateType !=A
triggerall = stateno != [800,3999]
triggerall = p2statetype != L || movehit
Triggerall = (P2BodyDist X = [0,45])
Triggerall = Random <= 65*AILevel || (AIlevel >6 && movehit)
triggerall = movetype != H
triggerall = helper(10003),var(8)=0
trigger1 = stateno=400&&movehit && var(31)=0
trigger2= ctrl && p2statetype=C&&(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,45]
Triggerall = (Random <=63*AIlevel)
triggerall = var(31)=0
triggerall = helper(10003),var(8)=0
triggerall = enemy, statetype != A
triggerall  =var(4)<4
trigger1 = ctrl && (p2bodydist x=[0,40]) && (p2statetype=S||p2movetype=H) && (enemy,vel x >0 ||p2movetype=I)&&random <199 && var(31)=0
trigger2 = stateno = 400 && moveguarded
trigger3 = p2stateno = 834 && ctrl




;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = 410
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=88*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
trigger3 = stateno=400&&movecontact&& var(6)=0
trigger4 = stateno=405&&movehit&& var(6)=0 
[State -1, SUPAH JAWMP]
type = ChangeState
value =1004
Triggerall = (Random <=75*AIlevel)&&var(31)=0
Triggerall = (RoundState = 2) && (AILevel>0) &&(p2bodydist y= [-45,40]) || stateno=[800,899]
trigger1 = ctrl &&((stateno=50)||statetype = A&&stateno!=50) && p2movetype=A
trigger2= stateno=610 && movecontact && movehit && p2statetype=A
;trigger3= stateno=1001 && animelemtime(6)>=1&&animelemtime(7)<=1&&p2statetype=A && p2movetype=
trigger3= stateno=1002 && animelemtime(4)>=10&&animelemtime(4)<=20&&p2statetype=C && p2bodydist x <60
trigger4= anim=810 && animelemtime(7)>1 
trigger5= anim=851 && animelemtime(3)>1 
trigger6= stateno=100&&p2statetype=C && p2bodydist x <60
;---------------------------------------------------------------------------
;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=[-43,70])&& (p2movetype=H)&&p2stateno!=[300,303])||((p2bodydist y= [-80,80])&& (p2movetype=H)&&p2stateno=[300,303])||(p2movetype!=H&&p2bodydist y= [-25,70])
triggerall = (p2bodydist x = [-20,75])
triggerall =vel y>=0 || p2statetype=A
trigger1 = ctrl 
;trigger2 = stateno=600&&movecontact;&& AIlevel <7
;---------------------------------------------------------------------------
;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)||(Random <=95*AIlevel &&(stateno=[55,59]) ) || var(31)>0
triggerall = p2statetype !=L
triggerall = var(32)<=0
triggerall =var(31)=0
triggerall =p2statetype=A|| p2bodydist y=[-25,80]
triggerall = (p2bodydist x = [-5,85])
triggerall =vel y>=0 || p2statetype=A
trigger1 = ctrl  
trigger2 = stateno=605&&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=[-50,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, PillarAI]
type = ChangeState
value = 1100
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) 
triggerall = movetype!=H
triggerall = statetype!=A
triggerall = (Random <=35*AIlevel)
triggerall = p2bodydist x <130 && p2stateno!=[833,834]
triggerall = movecontact ||p2statetype!=A|| enemy,vel y >=0 &&p2bodydist y =[-65,-20]
triggerall = helper(10003),var(8)=0
triggerall = p2stateno!=5210 && p2stateno!=5201
triggerall = p2statetype!=L||p2stateno=5120
triggerall = p2stateno!=[1029,1034]
trigger1 = var(31)=0&&ctrl &&p2statetype=C && (p2movetype!=H ||p2stateno=[120,155])
trigger2 = movehit && anim=212 && var(21)>1
;trigger3 = ctrl &&((p2statetype=A && enemy,hitfall)||p2stateno=5120)
trigger3= stateno=1001 && animelemtime(6)>=1&&animelemtime(7)<=1&&helper(10003),var(20)=2
trigger4= stateno=1003 && animelemtime(4)>=10&&animelemtime(4)<=20&&helper(10003),var(20)=2
;-----------------------------------------------------------------------
[State -1, TMAI]
type = ChangeState
value = 1005
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 && var(31)=0
triggerall = roundstate = 2&& (p2bodydist x <70)
triggerall = stateno !=[3000,9999]
trigger1 = stateno=1001 && animelemtime(6)>=1&&animelemtime(7)<=1&&helper(10003),var(20)=1
trigger2= stateno=1003 && animelemtime(4)>=20&&animelemtime(4)<=25&&helper(10003),var(20)=1
trigger3= stateno=1002 && animelemtime(3)>=0&&animelemtime(4)<=2&&helper(10003),var(20)=1
;--------------------------------------------------------------------
[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 && fvar(4)=0
trigger2 = (stateno=400&&p2statetype!=A||stateno=206||stateno=210&& p2bodydist x >35)&&movehit &&(var(31)=0)
trigger3 = anim=212&&movehit &&var(31)=0
trigger4= stateno=1001 && animelemtime(6)>=1&&animelemtime(7)<=1&&helper(10003),var(20)=3
trigger5= stateno=1003 && animelemtime(4)>=10&&animelemtime(4)<=20&&helper(10003),var(20)=3

;-----------------------------------------------------------------------
[State -1, TMAI]
type = ChangeState
value = 1001
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) 
triggerall = movetype!=H
triggerall = p2stateno!=5120
triggerall = p2stateno!=[5201,5210]
triggerall =(Random <=75*AIlevel)
triggerall = (helper(10003),var(10)=0&& helper(10003),var(11)=0)
triggerall = StateType != A && var(31)=0
triggerall = (!numtarget(210)||stateno=1100)&&!numtarget(998)&&!numtarget(997)
triggerall = enemy,vel y >=0&&p2bodydist y =[-95,0]
triggerall = roundstate = 2&& p2bodydist x <179
triggerall = stateno !=[3000,9999]
trigger1 =(ctrl||stateno=20 ||  stateno=100 && time >10) &&(EnemyNear, HitDefAttr = SCA,AA|| enemy,numproj>0) && (p2bodydist x <199 &&p2statetype!=L)
trigger2= stateno=1100 && animelemtime(9)>=0 && animelemtime(10)<0 && p2movetype=H && var(21)>0
trigger3 = stateno=100 && time >10 && frontedgebodydist >65&& p2movetype=A
trigger4 = (p2statetype=L && var(21)>0 || var(6)=2)&&ctrl && (p2bodydist x > 150 || enemy,backedgebodydist <50)
;-----------------------------------------------------------------------
[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 = !numtarget(998)
triggerall =(Random <=75*AIlevel)
triggerall = StateType != A && var(31)=0
triggerall = p2statetype=L || p2stateno=[833,834]
triggerall = roundstate = 2&& (p2bodydist x <70||p2stateno=1032||stateno=1010&& var(6)=0)
triggerall = stateno !=[3000,9999]
trigger1 =(ctrl||stateno=20) && p2stateno=834 && stateno=1010 && (var(6)=0 || var(6)=2&&p2bodydist x <60)
trigger2=  stateno=1010 && animelemtime(4)>=15&&animelemtime(4)<=20 && movehit && ( var(6)=0 || enemy,backedgebodydist <30 && numexplod(400)>0)
trigger3 = ctrl && p2stateno=1032

;-------------------------------------------------
[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)>0 && var(30)=1 && movehit
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)=9||(var(31)=87|| var(31)=91||var(31)=95||var(31)=99))
;trigger2 = p2movetype= A && 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>35&& (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 &&var(31)!=1

[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

[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= stateno=1001 && animelemtime(5)>=0&&animelemtime(7)<=1
trigger2= stateno=1003 && animelemtime(4)>=10&&animelemtime(4)<=40
trigger3= stateno=1002 && animelemtime(3)>=0&&animelemtime(8)<=2
trigger4= stateno=1000 && animelemtime(5)>=0&&animelemtime(7)<=1

;-----------------------------------------------------------------------------
[State -1, Rapter Drive]
type = ChangeState
value = 3050
triggerall = command="FD"
triggerall = statetype !=A
triggerall = power >=500
triggerall = AILevel=0
triggerall = roundstate=2
trigger1 = ctrl
trigger2 = stateno=200&&movecontact
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = stateno=211&&movecontact
trigger8 = stateno=206&&movecontact
trigger9= stateno=1001 && animelemtime(6)>=1&&animelemtime(7)<=1
trigger10= stateno=1003 && animelemtime(4)>=10&&animelemtime(4)<=20
;---------------------------------------------------------------------------
[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=200&&movecontact
trigger3 = stateno=205&&movecontact
trigger4 = stateno=210&&movecontact
trigger5 = stateno=400&&movecontact
trigger6 = stateno=405&&movecontact
trigger7 = stateno=211&&movecontact
trigger8 = stateno=206&&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 = 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
;---------------------------------------------------------------------------

[State -1, Rapter Boost]
type = ChangeState
value = 1010
triggerall = command="QCF_y"||command="QCF_z"||(command!="holddown"&&command!="holdup"&&(command="holdfwd"|| command="fwd")&&command="a"&&stateno=[1001,1009])
triggerall = statetype !=A
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



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

[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 =1004
triggerall = AILevel =0
triggerall = stateno!=45
;triggerall= var(6)=0
trigger1 = command = "a"
trigger1 = ctrl &&((stateno=50)||statetype = A&&stateno!=50)
trigger2= (stateno=[600,610]) && movecontact &&command = "a"
trigger3= stateno=1001 && animelemtime(6)>=1&&animelemtime(7)<=1&&command = "a"&&command="holdup"
trigger4= stateno=1003 && animelemtime(4)>=10&&animelemtime(4)<=20&&command = "a"&&command="holdup"
trigger5= anim=810 && animelemtime(7)>1 &&command = "a"
trigger6= anim=851 && animelemtime(3)>1 &&command = "a"
trigger7= stateno=100&&command = "a"&&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=205) && movecontact 

;---------------------------------------------------------------------------
;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
trigger2 = stateno=400 && 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"&& command!="holdfwd"
triggerall = statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------
;Stand Light Kick
;—§‚¿ŽãƒLƒbƒN
[State -1, Stand Light Kick]
type = ChangeState
value = 206
triggerall = AILevel=0
triggerall = command="y"
triggerall = command != "holddown" && command="holdfwd"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno=205&&movecontact
trigger3 = anim=201&&movecontact
trigger4 = stateno=400 && movecontact
trigger5 = stateno=405 && 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
trigger2 = stateno=400&&movecontact
trigger3 = stateno=405&&movecontact
trigger4 = anim=201&&movecontact
trigger5 = 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
trigger2 = stateno=405&&movecontact
trigger3 = 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
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
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
trigger2 = stateno=400&&movecontact
trigger3 = stateno=405&&movecontact
trigger4 = stateno=200&&movecontact
trigger5 = stateno=205&&movecontact
;----------------------------------------------------------------------
[State -1, low]
type = ChangeState
value = 1005
triggerall = AILevel=0
triggerall = command!="holdback"
triggerall = command="holdfwd" || command="fwd"
triggerall = command="holddown"|| command="dwn"
triggerall = command="a"
triggerall=statetype!=A
trigger1= stateno=1001 && animelemtime(6)>=1&&animelemtime(7)<=1
trigger2= stateno=1003 && animelemtime(4)>=10&&animelemtime(4)<=20
trigger3= stateno=1002 && animelemtime(3)>=0&&animelemtime(4)<=2
;----------------------------------------------------------------------
[State -1, Backroll]
type = ChangeState
value = 1000
triggerall = AILevel=0
triggerall = command!="holdback"
triggerall = command!="holdfwd"
triggerall = command!="holddown"
triggerall = command="a"
triggerall=statetype!=A
trigger1 = ctrl || stateno=100
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= anim=1054 && animelemtime(2)>=0 && animelemtime(4)<0
trigger10= stateno=105 && time >10

;----------------------------------------------------------------------
[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
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= anim=1054 && animelemtime(2)>=0 && animelemtime(4)<0
trigger10= stateno=1100 && animelemtime(9)>=0 && animelemtime(10)<0
;----------------------------------------------------------------------
[State -1, Taunt]
type = ChangeState
value = 1002
triggerall = AILevel=0

triggerall = command!="holdback"
triggerall = command!="holdfwd"
triggerall = command="holddown"|| command="dwn"
triggerall = command="a"
triggerall=statetype!=A
trigger1 = ctrl
trigger2= animelemtime(6)>=0&&animelemtime(7)<0 && anim=1011
;----------------------------------------------------------------------
[State -1, dodge]
type = ChangeState
value = 1003
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=600&&movecontact
trigger3 = stateno=605&&movecontact

