

;-| 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 = "FD"   ;Same name as above
command = ~D, $F, D, $F,y
time = 20
[Command]
name = "FD"   ;Same name as above
command = ~D, $F, D, $F,~y
time = 20
buffer.time=8

[Command]
name = "FC"
command = ~F, D, B,$F, z
time =25

[Command]
name = "FC"
command =~F, D, B,$F, ~z
time = 25
buffer.time=12

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

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

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


[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 = "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 = "down_a"
command = /$D,a
time = 1

[Command]
name = "down_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
;roman cancel rapter


;-----fatal 3
[State -1, Null]
type = Null
triggerall = movehit=1 || p2statetype=A && p2movetype=A
triggerall = stateno!=3049
triggerall = fvar(4)>0
triggerall = power>=200 || var(31)=[137,139]
triggerall = p2stateno!=5120	
triggerall = var(21)<2&&AIlevel >6
triggerall = (var(31)=[130,139]) ||var(31)=0
trigger1=stateno=1050 && (var(31)=136)
trigger1=var(31):=137
trigger2=stateno=1021  && var(31)=137
trigger2=var(31):= 138
trigger3=stateno=210  && (var(31)=130) 
trigger3=var(31):= 131
trigger4=stateno=211  && (var(31)=131) 
trigger4=var(31):= 132
trigger5=stateno=1100 && (var(31)=138) 
trigger5=var(31):=139
trigger8= anim=610 && (var(31)=133) &&var(15)=1
trigger8 =var(31):= 134
trigger9= stateno=610&&(var(31)=134)&&var(15)=2
trigger9 =var(31):= 135 
trigger7= stateno=605&&(var(31)=132)
trigger7=var(31):=133
;-----into install
[State -1, Null]
type = Null
triggerall = movehit=1 || p2statetype=A && p2movetype=A
triggerall = stateno!=3049
triggerall = fvar(4)>0
triggerall = roundno>1 || life<(lifemax/3)
triggerall = power>=750 || var(31)>=160
triggerall = p2stateno!=5120	
triggerall = var(21)<2&&AIlevel >6
triggerall = var(31)>=160 ||var(31)=7
trigger1=stateno=1050 && (var(31)=160)
trigger1=var(31):=161
trigger2=stateno=1021  && var(31)=163
trigger2=var(31):= 164
trigger3=stateno=210  && (var(31)=164||var(31)=162) 
trigger3=var(31):= ifelse((var(31)=[164,165]),165,163)
trigger4=stateno=1100 && (var(31)=165) 
trigger4=var(31):=166
trigger5=stateno=610 && (var(31)=161) 
trigger5=var(31):=162
;fatal 1
[State -1, Null]
type = Null
triggerall = movehit=1 || p2statetype=A && p2movetype=A
triggerall = stateno!=3049
triggerall = fvar(4)=0
triggerall = p2stateno!=5120	
triggerall = AIlevel >6&&var(21)=2 || var(31)>80
triggerall = (var(31)=[70,89]) ||var(31)=0
trigger1=stateno=1010
trigger1=var(31):= 70
trigger2=stateno=205 && var(31)=70
trigger2=var(31):= 71
trigger3=(stateno=210)&& (var(31)=77||var(31)=80||var(31)=83) 
trigger3=var(31):=ifelse((var(31)=[83,84]),84,ifelse((var(31)=[80,81]),81,78))
trigger4=stateno=212  && (var(31)=71) 
trigger4=var(31):=72
trigger5=stateno=211  && (var(31)=72) 
trigger5=var(31):=73
trigger6=(stateno=1100) &&(var(31)=84)
trigger6 =var(31):=85
trigger7= stateno=605&&(var(31)=73||var(31)=79||var(31)=82)
trigger7=var(31):=ifelse((var(31)=[82,83]),83,ifelse((var(31)=[79,80]),80,74))
trigger8= anim=610 && (var(31)=74) &&var(15)=1
trigger8 =var(31):= ifelse((var(31)=[82,83]),83,75)
trigger9= stateno=610&&(var(31)=75)&&var(15)=2
trigger9 =var(31):= 76 
trigger10=stateno=200  && (var(31)=76) 
trigger10=var(31):=77
trigger11=stateno=1020 && (var(31)=78||var(31)=81) 
trigger11=var(31):= ifelse((var(31)=[81,82]),82,79)
trigger12=(stateno=3000 || stateno=1010) &&(var(31)=85)
trigger12 =var(31):=86
ignorehitpause=1

;fatal 2
[State -1, Null]
type = Null
triggerall = movehit=1 || p2statetype=A && p2movetype=A
triggerall = stateno!=3049
triggerall = fvar(4)>0
triggerall = p2stateno!=5120	
triggerall = AIlevel >6&&var(21)=2 ;|| var(31)>80
triggerall = (var(31)=[90,110]) ||var(31)=0
trigger1=stateno=1011
trigger1=var(31):= 90
trigger2=stateno=205 && var(31)=70
trigger2=var(31):= 71
trigger3=(stateno=210)&& (var(31)=90||var(31)=97||var(31)=103) 
trigger3=var(31):=ifelse((var(31)=[103,104]),104,ifelse((var(31)=[96,97]),97,90))
trigger4=stateno=600  && (var(31)=99) 
trigger4=var(31):=100
trigger5=stateno=211  && (var(31)=91 || var(31)=98) 
trigger5=var(31):=ifelse((var(31)=[98,99]),99,92)
trigger6=(stateno=1100) &&(var(31)=105)
trigger6 =var(31):=106
trigger7= stateno=605&&(var(31)=93||var(31)=100)
trigger7=var(31):=ifelse((var(31)=[100,101]),101,94)
trigger8= anim=610 && (var(31)=94) &&var(15)=1
trigger8 =var(31):= 95
trigger9= stateno=610&&(var(31)=95)&&var(15)=2
trigger9 =var(31):= 96
trigger10=stateno=200  && (var(31)=76) 
trigger10=var(31):=77
trigger11=stateno=1021 && (var(31)=102||var(31)=104) 
trigger11=var(31):= ifelse((var(31)=[104,105]),105,103)
trigger12=(stateno=3000 || stateno=1010) &&(var(31)=85)
trigger12 =var(31):=86
ignorehitpause=1

;---from none mine bolt
[State -1, Null]
type = Null
triggerall = var(31)=0 || var(31)=[31,33]
triggerall = movehit=1 || p2statetype=A && p2movetype=A || p2statetype=L
triggerall = stateno!=3049
triggerall = fvar(4)=0
triggerall = p2stateno!=5120	
triggerall = var(21)<2&&AIlevel >6
trigger1=(stateno=1010)  && var(31)=31
trigger1=var(31):= 32
trigger2=stateno=1020 && var(21)=1&&var(31)=0
trigger2=var(31):=5
trigger3=(stateno=200)  && var(31)=32
trigger3=var(31):=6

;-----they got hit by mine
[State -1, Null]
type = Null
triggerall = var(31)=0 || var(31)=[40,53]
triggerall = movehit=1 || p2statetype=A && p2movetype=A
triggerall = stateno!=3049
triggerall = fvar(4)=0
triggerall = p2stateno!=5120	
trigger1=stateno=210 && (var(31)=40 || var(31)=46)
trigger1=var(31):= ifelse((var(31)=[46,47]),47,41)
trigger2=stateno=1020  && (var(31)=41||var(31)=0 && var(2)=3)
trigger2=var(31):= 42
trigger3=stateno=605  && (var(31)=48||var(31)=42) 
trigger3=var(31):= ifelse((var(31)=[48,49]),49,43)
trigger4=stateno=211  && (var(31)=47) 
trigger4=var(31):=48
trigger5= anim=610 && (var(31)=49||var(31)=43) &&var(15)=1
trigger5 =var(31):= ifelse((var(31)=[49,50]),50,44)
trigger6= stateno=610&&(var(31)=50||var(31)=44)&&var(15)=2
trigger6 =var(31):= ifelse((var(31)=[50,51]),51,45)
trigger7=stateno=200  && var(31)=45
trigger7=var(31):= 46




;---from counter hit j.2C
[State -1, Null]
type = Null
triggerall = var(31)=0 || var(31)=[60,62]
triggerall = movehit=1 || p2statetype=A && p2movetype=A 
triggerall = stateno!=3049
triggerall = p2stateno!=5120	
triggerall = var(21)=1&&AIlevel >6 || var(31)=60
trigger1=(stateno=611)  && var(31)=0
trigger1=var(31):=60
trigger2=(stateno=210)  && var(31)=60
trigger2=var(31):=ifelse(fvar(4)>0,110,41)

;--overead or something into ex
[State -1, Null]
type = Null
triggerall =stateno=606|| var(31)=0 && power>250 || var(31)=[20,30]
triggerall = movehit=1 || p2statetype=A && p2movetype=A
triggerall = stateno!=3049
triggerall = fvar(4)=0
triggerall = p2stateno!=5120	
triggerall = var(21)<2&&AIlevel >6 
trigger1=(stateno=206||anim=210||stateno=211)  && var(31)=0 &&p2statetype!=A
trigger1=var(31):= 20
trigger2=stateno=1020  && (var(31)=20||var(31)=0&&var(2)=3) 
trigger2=var(31):=21
trigger3=stateno=210  && (var(31)=21||var(31)=27) 
trigger3=var(31):=ifelse((var(31)=[27,28]),28,22)
trigger4=stateno=211  && (var(31)=22) 
trigger4=var(31):=23
trigger5=stateno=605  && (var(31)=23) 
trigger5=var(31):=24
trigger6= anim=610 && var(31)=24&&var(15)=1
trigger6 =var(31):=25
trigger7= (stateno=610||stateno=606)&& (var(31)=25&&var(15)=2||var(21)=1 && var(31)=0)
trigger7 =var(31):=26
trigger8=stateno=200  && var(31)=26
trigger8=var(31):= 27
trigger9=stateno=1100  && var(31)=28
trigger9=var(31):= 29
trigger10=stateno=1010 && var(31)=29
trigger10=var(31):= 30

;The basic bnb
[State -1, Null]
type = Null
triggerall = movehit=1 || p2statetype=A && p2movetype=A
triggerall = stateno!=3049
triggerall = fvar(4)=0
triggerall = p2stateno!=5120	
triggerall = var(21)<2&&AIlevel >6
triggerall = var(31)<=15 ||var(31)=0
trigger1=stateno=212  && var(31)=0 && p2bodydist x <50
trigger1=var(31):= 1
trigger2=stateno=211  && (var(31)=110&&fvar(4)=0 ||var(31)=1 || var(31)=0) && p2statetype=A&& p2bodydist x <60
trigger2=var(31):=2
trigger3=stateno=605  && ((var(31)=111&&fvar(4)=0 ||var(31)=2||var(31)=0)||var(31)=8&&var(16)=1)
trigger3= var(31):=cond((var(31)=8),9,3)
trigger4=stateno=605  && (var(31)=9&&var(16)=2)
trigger4= var(31):=10
trigger5= anim=610 && (var(31)=112&&fvar(4)=0 ||var(31)=3)&&var(15)=1
trigger5 =var(31):=4
trigger6= stateno=610&& var(31)=4&&var(15)=2
trigger6 =var(31):=5
trigger7=stateno=200  && (var(31)=114&&fvar(4)=0 ||var(31)=5)
trigger7=var(31):= 6
trigger8=stateno=210 && (var(31)=115&&fvar(4)=0 ||var(31)=6)
trigger8=var(31):= 7
trigger9=stateno=1020  && var(31)=7
trigger9=var(31):= 8
trigger10=(stateno=611||stateno=610)  && var(31)=10
trigger10=var(31):= 11
trigger11=(stateno=1000||stateno=1015) && var(31)=11 
trigger11=var(31):= 12
ignorehitpause=1

;The basic bnb install
[State -1, Null]
type = Null
triggerall = movehit=1 || p2statetype=A && p2movetype=A
triggerall = stateno!=3049
triggerall = fvar(4)>0
triggerall = p2stateno!=5120	
triggerall = var(21)<2&&AIlevel >6
triggerall =  var(31)=0||var(31)=[110,123]
trigger1=stateno=212  && var(31)=0 && p2bodydist x <50
trigger1=var(31):= 110
trigger2=stateno=211  && (var(31)=118||var(31)=110|| var(31)=0) && p2statetype=A
trigger2=var(31):=ifelse((var(31)=[118,119]),119,111)
trigger3=stateno=605  && ((var(31)=111||var(31)=0)||var(31)=120)
trigger3= var(31):=ifelse((var(31)=[120,121]),121,112)
trigger4=stateno=605  && (var(31)=9&&var(16)=121)
trigger4= var(31):=122
trigger5=stateno=610 && var(31)=112&&var(15)=1
trigger5 =var(31):=113
trigger6= stateno=610&& var(31)=113&&var(15)=2
trigger6 =var(31):=114
trigger7=stateno=200  && var(31)=114
trigger7=var(31):= 115
trigger8=stateno=210 && (var(31)=115||var(31)=117)
trigger8=var(31):=ifelse((var(31)=[117,118]),118,116)
trigger9=stateno=1021  && var(31)=116
trigger9=var(31):= 117
trigger10=(stateno=611||stateno=610)  && var(31)=121
trigger10=var(31):= 122
trigger11=(stateno=1000||stateno=1015) && var(31)=122
trigger11=var(31):= 123
trigger12=stateno=600  && var(31)=119
trigger12=var(31):= 120
ignorehitpause=1

;---from air throw installed
[State -1, Null]
type = Null
triggerall = var(31)=0 || var(31)=[170,173]
triggerall = movehit=1 || p2statetype=A && p2movetype=A || p2statetype=L
triggerall = stateno!=3049
triggerall = fvar(4)>0
triggerall = power >100 || var(31)>170
triggerall = p2stateno!=5120	
triggerall = var(21)<2&&AIlevel >6
trigger1=(stateno=1021)  && var(31)=170
trigger1=var(31):= 171
trigger2=stateno=1021 &&var(31)=171
trigger2=var(31):=172
trigger3=(stateno=1100)  && var(31)=172
trigger3=var(31):=173

;---from regular throw
[State -1, Null]
type = Null
triggerall = var(31)=0 || var(31)=180
triggerall = movehit=1 || p2statetype=A && p2movetype=A || p2statetype=L
triggerall = stateno!=3049
triggerall = p2stateno!=5120	
triggerall = var(21)<2&&AIlevel >6
trigger1=(anim=210 && animelemtime(11)>0 || anim=211)  && var(31)=180
trigger1=var(31):= 181

;===========================================================================
;-----------------------------------------------------------------------
[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 = stateno !=[800,899]
triggerall = p2bodydist y =0
triggerall = movetype!=H
triggerall = p2stateno!=[1025,1029]
triggerall = statetype!=A
triggerall = p2statetype!=A
triggerall = numenemy=1
triggerall= roundno>1
triggerall = enemynear,life <=var(9)
triggerall=power>=1000
trigger1 = ctrl &&(Random <=62*AIlevel)
trigger2=(var(31)=85||(var(31)=29&&(helper(10003),var(13)=0)))&& ctrl
trigger4= var(19)=1 && ctrl
trigger3= (p2stateno=[120,150]) && ctrl&&(Random <=62*AIlevel)
;----------------------------------------------------------------------------
[State -1, Bolt ReleaseAI]
type = ChangeState
value = 3050
triggerall = power >=500
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType != A)
triggerall = stateno != [800,3999]
triggerall = fvar(4)=0
Triggerall = (Random <=25*AIlevel)||(var(31)>0&&random<59)
triggerall = movetype!=H
triggerall = var(19)=0
triggerall = p2bodydist x >85 || var(31)>0
triggerall = life <400 || var(31)>0
triggerall = stateno!=[3000,3055]
triggerall = p2stateno!=[120,150]
trigger1 = ctrl && (var(31)=0)
trigger2 = stateno=210&&movecontact&& var(31)=7 && power>=750

;---------------------------------------------------------------------------
[State -1, Falcon DiveAI]
type = ChangeState
value = ifelse(fvar(4)>0,3051,3000)
triggerall = power >=500
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) 
triggerall = movetype!=H
triggerall = statetype!=A
triggerall = (Random <=35*AIlevel) || var(31)>0
triggerall = (p2bodydist x =[0,100])|| var(31)>0 ||(helper(10003),var(13)=1) || fvar(4)>0
triggerall = numhelper(3010)=0|| fvar(4)>0
trigger2 = movehit && ((var(31)=7&&p2life<200||var(31)=39||var(31)=87)|| p2life<200 &&((stateno=[400,405])|| stateno=[205,211]))
trigger1 = ctrl &&p2statetype=A && (p2movetype=A) && ((helper(10003),var(13)=1)||numhelper(1001)=0)
trigger3 = enemy,vel x >0 && ( ctrl && var(31)=0 && (p2stateno!=5210||enemy,time>15)) && p2stateno!=20
trigger4 = stateno=211&&movecontact&& var(31)=0
trigger5 = (var(31)=85||(var(31)=29&&(helper(10003),var(13)=0)))&& ctrl
 ;--------------------------------------------
[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,90]) || (p2bodydist x=[0,55]) || var(31)>0
triggerall = stateno !=[800,4999]
triggerall = p2statetype != L && p2stateno!=5201
triggerall = movetype != H
triggerall = statetype!=A
triggerall = p2stateno!=[1029,1032]
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
trigger2= ctrl && (var(31)=160)
trigger3=movehit&&(var(31)=136)
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=410&&movecontact&&var(31)=0
trigger6=stateno=600&&movecontact&&var(31)=0
trigger7=stateno=605&&movecontact&&var(31)=0
trigger8=stateno=610&&movecontact&&var(31)=56 && random<99
trigger9=(p2stateno=[120,155])&& ctrl
trigger10 = (stateno=205||stateno=405||stateno=200||stateno=400)&&movehit &&p2stateno!=[5000,5020]
trigger11= var(33)=1 && ctrl
;---------------------------------------------------------------------------
;Stand Light Punch
;—§‚¿Žãƒpƒ“ƒ`
[State -1, Stand Light Punch]
type = ChangeState
value = 200
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType = S)
triggerall = stateno != [800,3999]
triggerall = helper(10003),var(8)=0
Triggerall = (P2BodyDist X = [-25,50])
triggerall = ((p2bodydist y= [-105,5])&& (p2movetype=H))||var(31)=32&&var(32)<=0;||((p2bodydist y= [-125,5])&& (p2movetype=H)&&p2stateno=[300,303])
Triggerall = (Random <=63*AIlevel)||var(31)>0
triggerall = p2statetype !=L
triggerall = enemy, statetype != C
trigger1 =(ctrl||stateno=20||stateno=100)&& helper(10003),var(10)>0&& p2bodydist x <45 && var(31)=0
trigger2 = stateno = 200 && movecontact&& p2bodydist x <30&& var(31)=0
trigger3= (var(31)=114||var(31)=5||var(31)=32||var(31)=26||var(31)=45||var(31)=76||var(31)=135||var(31)=115)&& ctrl
trigger4 = ctrl&& p2statetype=A&&random <199 &&var(31)=0 &&p2movetype=H
;---------------------------------------------------------------------------
;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 <=70*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
triggerall = p2statetype=C
triggerall = (p2bodydist x = [25,75])
trigger1 = ctrl&& (p2bodydist x=[40,75]) && p2statetype=C&&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)&&var(31)=0
trigger2 = (stateno=200 || stateno=400) && moveguarded

;---------------------------------------------------------------------------
;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 <=100*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
triggerall = helper(10003),var(8)=0
triggerall = p2statetype!=A|| var(31)>0
triggerall = (p2bodydist x = [-15,75])||((p2bodydist x=[-15,95])&&p2statetype=A)||(var(31)=5||var(31)=33||var(31)=41||var(31)=52||var(31)=58||var(31)=1||var(31)=95)
triggerall  =var(4)<12; || var(21)=2||(var(31)=5||var(31)=32||var(31)=41||var(31)=52||var(31)=58||var(31)=1||var(31)=95)
trigger1 = ctrl&& (p2bodydist x=[55,75]) && p2statetype=S&&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)&&var(31)=0
trigger2 =ctrl&& helper(10003),var(11)>0&& p2bodydist x <35&&var(31)=0
trigger3 = stateno=400&&movehit&&var(31)=0
trigger4 = stateno=200&&movehit&&var(31)=0
trigger5 = ctrl && (var(31)=70||var(31)=143||var(31)=146) && p2bodydist x <35
trigger6= movehit && var(31)=140
;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,95]) && (p2bodydist y = [-55,0]) &&enemy,vel y >=-3&&var(31)=0 || ( var(31)>0 && (p2bodydist x =[0,65]) && p2bodydist y >-75)||movehit
Triggerall =Random <= 65*AILevel || (AIlevel >6 && movehit)||var(31)>0
triggerall = p2statetype != L
triggerall = enemynear,anim!=5120
triggerall = movetype != H
triggerall = p2movetype!=A|| p2statetype=A||var(31)>0
triggerall = helper(10003),var(8)=0
trigger1 = (ctrl||stateno=20||stateno=100)&& (p2bodydist x=[25,90]) && p2statetype=A&&p2movetype=I&&(helper(10003),var(10)=0&& helper(10003),var(11)=0)&&var(31)=0
trigger2 = stateno = 212 && movecontact
trigger3 = stateno=210 && movehit && p2statetype=A&&var(31)=0
trigger4 = movehit&&(var(31)=1 || var(31)=72||var(31)=22||var(31)=118||var(31)=110||var(31)=131)
;trigger5 = (ctrl||stateno=20||stateno=100) && 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 <=70*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
triggerall = (p2bodydist y= [-70,0]) && (enemy,vel y >=-1||var(31)>0) || movehit && var(31)>0 
triggerall = enemy, statetype != C|| (var(31)>0)
triggerall = (p2bodydist x = [-20,70])|| movehit && var(31)>0
trigger1 = ctrl&& (p2bodydist x=[55,80]) && p2statetype=A&&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)&&var(31)=0
trigger2 =( stateno=200 && p2statetype=A) && movehit && var(31)=0
trigger3 =movehit && (var(31)=6||var(31)=46||var(31)=77||var(31)=86||var(31)=27||var(31)=115||var(31)=141||var(31)=144||var(31)=130)
trigger4 = ctrl && (var(31)=40||var(31)=21||var(31)=60||var(31)=80 ||var(31)=83||var(31)=117||var(31)=97||var(31)=90||var(31)=103||var(31)=150||var(31)=162||var(31)=164||var(31)=180)
trigger5 = stateno=400&&movecontact&&var(31)=0&& AIlevel <7
trigger6 = stateno=405&&movecontact&&var(31)=0&& AIlevel <7
trigger7 = stateno=200&&movecontact&&var(31)=0 && p2statetype=A&& AIlevel <7
trigger8 = stateno=205&&movecontact&&var(31)=0&& AIlevel <7
trigger9 = ctrl&& (p2bodydist x=[0,80]) && p2statetype=A&&random <199 &&(var(19)=1 || fvar(4)>0) && var(31)=0 &&p2movetype=H && 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
Triggerall = (P2BodyDist X = [0,43])
Triggerall = Random <= 65*AILevel || (AIlevel >6 && movehit)
triggerall = movetype != H
triggerall = helper(10003),var(8)=0
triggerall= p2statetype= S
trigger1= ctrl && (p2bodydist x=[0,43]) && p2statetype=S&&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)=0) && var(31)=0
trigger2 = stateno=400&&movecontact && var(31)=0 && p2statetype=S
trigger3 = stateno=200&&movecontact && var(31)=0 && p2statetype=S

;----------------------------------------------------------------------------------------
[State -1, Stand strong Punch2]
type = ChangeState
value = 212
Triggerall = (RoundState = 2) && (AILevel >0)
Triggerall = StateType !=A
triggerall = helper(10003),var(8)=0
triggerall = stateno != [800,3999]
Triggerall = (P2BodyDist X = [-5,57])
Triggerall =Random <= 95*AILevel || (AIlevel >6 && movehit)||var(31)>0
triggerall = p2statetype != L
triggerall = enemynear,anim!=5120
triggerall = movetype != H
triggerall = p2statetype!=A
triggerall = p2statetype=S || p2movetype=H
trigger1 = (ctrl||stateno=20||stateno=100)&& (p2bodydist x=[20,70]) &&random <199 &&(helper(10003),var(10)=0&& helper(10003),var(11)=0)&&var(31)=0
trigger2 = (stateno=205 || stateno=405) && movecontact&&var(31)=0
trigger3= movehit&&(var(31)=71)
;---------------------------------------------------------------------------
;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,30]
Triggerall = (Random <=63*AIlevel)
triggerall = p2statetype !=L
triggerall = helper(10003),var(8)=0
triggerall = enemy, statetype != A
triggerall  =var(4)<4
trigger1 = ctrl&&var(31)=0
trigger2 =ctrl&& helper(10003),var(10)>0&& p2bodydist x <30 && var(31)=0
;trigger2 = stateno = 400 && movecontact




;---------------------------------------------------------------------------
;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
triggerall = helper(10003),var(8)=0
triggerall = p2statetype=S ;|| p2statetype=A 
;triggerall = (p2bodydist y=[-65,0]) && enemy,vel y >=0|| (p2bodydist y >-115&&(var(31)=27||var(31)=5||var(31)=70))
triggerall =p2statetype!=A&&p2bodydist x = [-10,55]
trigger1 = ctrl && (p2bodydist x=[35,60]) && p2statetype=S && (enemy,vel x >0 ||p2movetype=I)&&random <199 && var(31)=0
trigger2 = anim=206 && moveguarded && p2statetype=S
trigger3 = stateno=400&&movecontact&&var(31)=0 && AIlevel <7
trigger4 = stateno=405&&movecontact&&var(31)=0 && AIlevel <7
trigger5 = stateno=200&&movecontact&&var(31)=0  && AIlevel <7
trigger6 = stateno=205&&movecontact&&var(31)=0 && 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(33)=0
triggerall =p2statetype=A||var(31)>0||vel y>-2& p2bodydist y=[-25,45]
triggerall = (p2bodydist x = [-30,85])
trigger1 = ctrl  && (var(31)=0||var(31)=4||var(31)=25||var(31)=44||var(31)=50||var(31)=75||var(31)=94||var(31)=161||var(31)=113||var(31)=134)
trigger2 = movehit &&(var(31)=3||var(31)=24||var(31)=43||var(31)=49||var(31)=74||var(31)=83||var(31)=95||var(31)=112||var(31)=133)
trigger3 = movehit &&(var(31)=10) && frontedgebodydist <50
trigger4 = stateno=605&&movecontact&& AIlevel <7;trigger2=((var(31)=4||Var(31)=11||Var(31)=22||Var(31)=26||Var(31)=33||Var(31)=45||Var(31)=51||Var(31)=75||Var(31)=80)||var(31)=0||Var(31)=94||Var(31)=97)&&movecontact



;---------------------------------------------------------------------------
;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) ||(Random <=95*AIlevel &&(stateno=[55,59]) ) || var(31)>0;(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(33)=0
triggerall =((p2bodydist y=[-53,50])&& (p2movetype=H)&&p2stateno!=[300,303])||((p2bodydist y= [-80,80])&& (p2movetype=H)&&p2stateno=[300,303])
triggerall = (p2bodydist x = [-40,65])
triggerall =p2statetype=A||var(31)>0||vel y>-2||(stateno=[55,56])
trigger1 = ctrl &&(var(31)=2 && var(32)=0||var(31)=8||var(31)=9 ||var(31)=23||var(31)=42||var(31)=48 ||var(31)=73||var(31)=79||var(31)=82||var(31)=111||var(31)=120||var(31)=121||var(31)=132);( ((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)=0||Var(31)=93||Var(31)=96))
trigger2 = stateno=600&&movecontact&& AIlevel <7
trigger3 = movehit &&(var(31)=93||var(31)=100)
;---------------------------------------------------------------------------
;Stand Strong Punch
;—§‚¿‹­ƒpƒ“ƒ`
[State -1, Stand strong Punch]
type = ChangeState
value = 606
Triggerall = (RoundState = 2) && (AILevel>0)
Triggerall = (StateType =A)
triggerall = stateno != [800,3999]
Triggerall = (Random <=75*AIlevel) ||(Random <=95*AIlevel &&(stateno=[55,59]) ) ;(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(33)=0
triggerall = p2bodydist y=[-70,15]
triggerall = (p2bodydist x = [-15,65])
triggerall =p2statetype=A||vel y>-2||(stateno=[55,56])
trigger1 = ctrl &&var(31)=0
trigger2 = stateno=600&&movecontact&& AIlevel <7
;---------------------------------------------------------------------------
;Stand Strong Punch  2
[State -1, Stand strong Punch2]
type = ChangeState
value = 611
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(33)=0
triggerall = p2statetype=A||var(31)>0||vel y>-2&& p2bodydist y=[-45,55]
triggerall = (p2bodydist x = [-10,70])
triggerall = pos y <-32 ||(stateno=[55,59]) 
trigger1 = ctrl  &&(var(31)=0 ||var(31)=76)
trigger2 = movehit &&(var(31)=10||var(31)=122) && enemy,backedgebodydist >25
trigger3= 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 = (var(31)>0)||p2bodydist y=[-50,45]
triggerall = (var(31)>0)||p2bodydist x = [0,45]
Triggerall = (Random <=50*AIlevel)||(var(31)>0)
triggerall = stateno!=56
triggerall = var(32)<=0
triggerall = var(33)=0
triggerall = p2statetype !=L
triggerall = var(4)<=2||var(31)>0
trigger1 = ctrl&&(var(31)=0||var(31)=119||var(31)=92||var(31)=99)
;trigger2 = stateno = 600 && movecontact
;------------------------------------------------------------------------------
[State -1, airthingAI]
type = ChangeState
value = 1015
triggerall = AILevel >0
triggerall = roundstate = 2
triggerall =p2bodydist y=[-30,45]
triggerall = (p2bodydist x= [-35,55])
triggerall = stateno !=[800,4999]
triggerall = p2statetype != L
triggerall = movetype != H
triggerall = statetype=A
triggerall = p2stateno!=[1029,1031]
triggerall = random < 55*AILevel||var(31)>0
trigger1= ctrl && ((p2movetype=A)) && var(31)=0 && power >=250
trigger2 = movehit && (var(31)=51||var(31)=11&&enemy,backedgebodydist<=25)
triggerall =p2statetype=A

;-----------------------------------------------------------------------
[State -1, PillarAI]
type = ChangeState
value = 1100
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) 
triggerall = movetype!=H
triggerall = statetype!=A
triggerall = (Random <=45*AIlevel) || var(31)>0
triggerall = p2bodydist x >70|| var(31)>0 || p2movetype=H || p2statetype=A
triggerall = helper(10003),var(8)=0
triggerall = numhelper(1003)=0
triggerall =p2stateno!=5120&& p2stateno!=5210 && p2stateno!=5201||helper(10003),var(9)=1
triggerall = p2stateno!=[1031,1034]
trigger1 = var(31)=0&&ctrl &&(helper(10003),var(13)=1) && p2stateno!=[120,155]
trigger2 = movehit && ((var(31)=28&&(helper(10003),var(13)=0))||var(31)=39||var(31)=47||var(31)=84||var(31)=165||var(31)=181)
trigger3 = ctrl &&p2statetype=A && (helper(10003),var(13)=1 || ((p2movetype=A|| var(33)=1) &&(helper(10003),var(13)=0&&p2bodydist x =[30,65])))
trigger4 = ctrl && p2stateno=1030  && var(31)=0 && var(19)=1
trigger5 = enemy,vel x >0 && (p2bodydist x =[45,70]) && ctrl && var(31)=0 && (p2stateno!=5210||enemy,time>10) && !helper(10003),var(13)
trigger6= helper(10003),var(9)=1 && ctrl && var(31)!=180
trigger7 = movehit &&(var(31)=7 &&numhelper(1001)=1) 
trigger8 = (p2bodydist x >70||enemy,backedgebodydist <40) && (var(31)=117||var(31)=105||var(31)=152||var(31)=138) && ctrl

;--------------------------------------------------------------------
[State -1, slashAI]
type = ChangeState
value = 1020+(fvar(4)>0)
triggerall = AILevel>0 && roundstate = 2&& statetype!=A
triggerall =  (p2statetype!=L) || var(31)>0
triggerall = stateno !=[800,899]
triggerall = stateno!=1010
triggerall = stateno!=[3000,3065]
triggerall = stateno!=1000&&(Random <=45*AIlevel) || var(31)>0
triggerall = (p2bodydist y =[-60,0]) && enemy,vel y>-1 &&fvar(4)=0  || fvar(4)>0 &&(p2bodydist y =[-55,0]) ||movecontact
triggerall = movetype!=H
triggerall = helper(10003),var(8)=0
triggerall =( var(31)=0&&p2movetype=A && (p2statetype=A) && p2bodydist x =[40,145]) || var(31)>0||var(31)=0&&movecontact || (var(31)=0&&fvar(4)>0 && p2bodydist x=[15,85])
triggerall = p2stateno!=[1025,1028]
triggerall = p2stateno!=[1040,1045]
trigger1 = (ctrl||stateno=20||stateno=100)&& var(31)=0
trigger2 = movehit && ((var(31)=7 &&(helper(10003),var(13)=0)) ||var(31)=41||var(31)=20||var(31)=81||var(31)=78||var(31)=84||var(31)=81) && fvar(4)=0 &&numhelper(1001)=0
trigger3 = movehit && (var(31)=163||var(31)=104||var(31)=142||var(31)=145||var(31)=151||var(31)=116) && fvar(4)>0
trigger4 = (stateno=211||anim=206||stateno=210) &&moveguarded
trigger5 = (ctrl||stateno=20||stateno=100) && (var(31)=102 ||var(31)=137||var(31)=170)
;--------------------------------------------------------------------
[State -1, sokoAI]
type = ChangeState
value = 1010+(fvar(4)>0)
triggerall = AILevel>0 && roundstate = 2&& statetype!=A
triggerall = ((p2stateno!=[120,155]) && (p2statetype!=L))||var(31)>0 ||helper(10003),var(21)=1 && fvar(4)=0
triggerall = p2bodydist x = [-15,190]
triggerall = stateno !=[800,899]
triggerall = stateno!=1010
triggerall = stateno!=[3000,3065]
triggerall = stateno!=1000&&(Random <=55*AIlevel)
triggerall = (p2bodydist y =[-10,0])||helper(10003),var(21)=1 && fvar(4)=0
triggerall = movetype!=H
triggerall = helper(10003),var(8)=0
triggerall = p2stateno!=[1025,1028]
triggerall = p2stateno!=[1040,1045]
trigger1 =(ctrl||stateno=20||stateno=100) && (p2bodydist x=[90,180]) && (enemy,vel x >0 ||p2movetype!=H)&&random <199 && var(31)=0 && fvar(4)=0
trigger2 = (stateno=405||stateno=205||stateno=206)&&movecontact&&(Random <=400/AIlevel) &&(var(31)=0)
trigger3 = stateno=210&&movehit &&var(31)=0
trigger4=(ctrl||stateno=20||stateno=100) && (var(31)=28|| var(31)=31 || var(31)=29||var(31)=85 && power <500)
trigger5 = stateno=211 && power<220 && movehit
trigger6=(ctrl||stateno=20||stateno=100) &&helper(10003),var(21)=1
trigger7 =(ctrl||stateno=20||stateno=100) && (p2bodydist x=[40,170]) && (p2movetype!=H)&&random <199 && var(31)=0 && fvar(4)>0
;-----------------------------------------------------------------------
[State -1, OrbAI]
type = ChangeState
value = 1000
triggerall = AILevel>0 && roundstate = 2
triggerall = (p2stateno!=[120,155]) 
triggerall = movetype!=H
triggerall = p2stateno!=[5110,5120]
triggerall =  helper(10003),var(12)=1||p2stateno!=[5201,5210]
triggerall = p2bodydist x >75|| var(31)>0 || p2movetype=H ||movecontact
triggerall = helper(10003),var(8)=0&&(Random <=75*AIlevel)
triggerall = numhelper(1002)=0 && numhelper(1003)=0
trigger1 = ctrl &&(helper(10003),var(13)=1 || helper(10003),var(12)=1) && var(31)=0
trigger2 = movehit && var(31)=11 &&(helper(10003),var(13)=0)&&frontedgebodydist>50
trigger3= movecontact && stateno=410
trigger4 = p2statetype=A && stateno=211 && movehit && p2bodydist x >55

;-------------------------------------------------
[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=211 && p2statetype=A && movehit
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, AISuper Jump]
type = ChangeState
value = 59
triggerall = roundstate = 2
triggerall = AILevel>0
triggerall= var(8)=0 &&  var(31)=0
triggerall = statetype = A
triggerall = helper(10003),var(15)
triggerall = random < 33*AIlevel
triggerall = pos y <-41
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 = p2bodydist y =[-180,15]
triggerall = p2stateno!=834 || p2bodydist x >80 || var(31)>0
trigger1= p2movetype!=A && (p2bodydist x=[110,788])&& (Random <=25*AIlevel)&& (ctrl || stateno=20) && var(31)=0
trigger2= anim=1000 && movehit && time>52 && var(31)=0
trigger3= p2movetype=H && p2statetype=A && p2bodydist x>35&& (Random <=50*AIlevel)&& (ctrl || stateno=20) && var(31)=0
trigger4= (p2stateno=[1029,1030]) && p2bodydist x >30&& ctrl && var(31)=0
trigger5= var(15)=1 && p2bodydist x >60 && ctrl && var(31)=0
trigger6= (var(31)=21||var(31)=70) && p2bodydist x >120&& ctrl
trigger7= (var(31)=40||var(31)=60||var(31)=164||var(31)=115) && p2bodydist x >45 && ctrl
trigger8= (var(31)=73) && p2bodydist x >90&& ctrl
[State -1, AI run]
type=changestate
value=20
triggerall = roundstate = 2
triggerall = p2stateno!=834 || p2bodydist x >80|| var(31)>0
triggerall=AILevel>0 && statetype=S && ctrl && (Random <=31*AIlevel) || var(31)>0
triggerall = p2movetype!=H
triggerall=p2statetype!=L
trigger1= (stateno!=[20,105]) && p2movetype!=A && (p2bodydist x=[20,109]) && var(31)=0
trigger2 = var(31)=21 && (p2bodydist x <25 || p2bodydist x >45) && ctrl
trigger3 = p2bodydist x<20 && p2statetype=L && var(31)=0 
[State -1, AIRun Back]
type = ChangeState
value = 105
triggerall = AILevel>0
triggerall = stateno !=105
triggerall = statetype != A
triggerall = random < 149
triggerall = backedgebodydist >30
triggerall = roundstate = 2
triggerall =var(31)=0
trigger1 = ( p2movetype = A) && (p2bodydist x=[-99,100])&& (ctrl || stateno=20)
trigger2 = p2movetype=A && prevstateno=140 && (ctrl || stateno=20)

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

;-----------------------------------------------------------------------------
[State -1, Rapter Drive]
type = ChangeState
value = 3050
triggerall = command="FD"
triggerall = statetype !=A
triggerall = power >=500
triggerall = AILevel=0
triggerall = fvar(4)=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

;---------------------------------------------------------------------------
[State -1, Falcon Dive]
type = ChangeState
value = ifelse(fvar(4)>0,3051,3000)
triggerall =command="FC"
triggerall = power >=500
triggerall = AILevel=0
triggerall = numhelper(3010)=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>=ifelse(fvar(4)>0,100,250))
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, Rapter Boost]
type = ChangeState
value = 1020+(fvar(4)>0)
triggerall = command="QCF_y"||command="QCF_z"||(command="QCF_a"&&power>=ifelse(fvar(4)>0,100,250))
triggerall = statetype !=A
triggerall = AILevel=0
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, Rapter Boost]
type = ChangeState
value = ifelse(statetype=A,1015,1010+(fvar(4)>0))
triggerall = command="QCB_y"||command="QCB_z"||(command="QCB_a"&&power>=ifelse(fvar(4)>0,100,250))
triggerall = AILevel=0
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
trigger8 = stateno=600&&movecontact
trigger9 = stateno=605&&movecontact
trigger10 = stateno=610&&movecontact
trigger11= stateno=206&&movecontact
;---------------------------------------------------------------------------

[State -1, Rapter Boost]
type = ChangeState
value = 1100
triggerall = command="DD_z"||(command="DD_a"&&power>=ifelse(fvar(4)>0,0,250));||command="DD_x"||command="DD_y"
triggerall = statetype !=A
triggerall = numhelper(1003)=0
triggerall = AILevel=0
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
;---------------------------------------------------------------------------
;Run Fwd
;ƒ_ƒbƒVƒ…
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = AILevel=0
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl
trigger2= anim=1000 && movehit && time>52&&command="holdfwd"
trigger3= anim=1005 && movehit && time>5&&command="holdfwd"

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


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

[State -1, air dash]
type = ChangeState
value = 59
triggerall = AILevel =0
triggerall= var(8)=0
triggerall = pos y <-35
trigger1 = command = "BB"
trigger1 = statetype = A
trigger1 = ctrl
[State -1, SUPAH JAWMP]
type = ChangeState
value = 45
triggerall = AILevel =0
triggerall = stateno!=45
triggerall= var(6)=0
triggerall = (time >9 && stateno=50)|| (stateno=600 ||stateno=610||stateno=606||stateno=605)
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=211) && movecontact 
trigger3= (stateno=1020) && movehit && var(2)!=3
;---------------------------------------------------------------------------
;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 = 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=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
;—§‚¿Žãƒ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=200&&movecontact
trigger3 = stateno=400&&movecontact
;---------------------------------------------------------------------------
;Stand Light Kick
;—§‚¿ŽãƒLƒbƒN
[State -1, Stand Light Kick]
type = ChangeState
value = ifelse(command="holdfwd",206,205)
triggerall = AILevel=0
triggerall = command="y"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno=200&&movecontact
trigger3 = stateno=400&&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 = stateno=200&&movecontact
trigger5 = stateno=205&&movecontact
trigger6 = stateno=212&&movecontact
trigger7 = stateno=210&&movecontact
trigger8 = stateno=410&&movecontact && fvar(4)>0
;---------------------------------------------------------------------------
;Stand Strong Punch
;—§‚¿‹­ƒpƒ“ƒ`
[State -1, Stand Strong Punch]
type = ChangeState
value = ifelse(command="holdback",212,210)
triggerall = AILevel=0
triggerall = command="z"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno=400&&movecontact
trigger3 = stateno=405&&movecontact
trigger4 = stateno=200&&movecontact
trigger5 = 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, Bulbs]
type = ChangeState
value = 1000
triggerall = AILevel=0
triggerall = numhelper(1002)=0
triggerall = numhelper(1003)=0
triggerall = command="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=606&&movecontact
trigger11 = stateno=610&&movecontact
trigger12 = stateno=611&&((movehit && (p2stateno=833 || p2stateno=1029))||moveguarded || p2statetype!=A && movecontact)
trigger13 = stateno=211&&movecontact
;---------------------------------------------------------------------------
;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 = ifelse(command="holdfwd",606,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 = ifelse(command="holddown",611,610)
triggerall = command="z"
triggerall = statetype = A
triggerall = AILevel=0
trigger1 = ctrl
trigger2 = stateno=600&&movecontact
trigger3 = stateno=605&&movecontact

