; The CMD file.
;
; Two parts: 1. Command definition and  2. State entry
; (state entry is after the commands def section)
;
; 1. Command definition
; ---------------------
; Note: The commands are CASE-SENSITIVE, and so are the command names.
; The eight directions are:
;   B, DB, D, DF, F, UF, U, UB     (all CAPS)
;   corresponding to back, down-back, down, downforward, etc.
; The six buttons are:
;   a, b, c, x, y, z               (all lower case)
;   In default key config, abc are are the bottom, and xyz are on the
;   top row. For 2 button characters, we recommend you use a and b.
;   For 6 button characters, use abc for kicks and xyz for punches.
;
; Each [Command] section defines a command that you can use for
; state entry, as well as in the CNS file.
; The command section should look like:
;
;   [Command]
;   name = some_name
;   command = the_command
;   time = time (optional)
;   buffer.time = time (optional)
;
; - some_name
;   A name to give that command. You'll use this name to refer to
;   that command in the state entry, as well as the CNS. It is case-
;   sensitive (QCB_a is NOT the same as Qcb_a or QCB_A).
;
; - command
;   list of buttons or directions, separated by commas. Each of these
;   buttons or directions is referred to as a "symbol".
;   Directions and buttons can be preceded by special characters:
;   slash (/) - means the key must be held down
;          egs. command = /D       ;hold the down direction
;               command = /DB, a   ;hold down-back while you press a
;   tilde (~) - to detect key releases
;          egs. command = ~a       ;release the a button
;               command = ~D, F, a ;release down, press fwd, then a
;          If you want to detect "charge moves", you can specify
;          the time the key must be held down for (in game-ticks)
;          egs. command = ~30a     ;hold a for at least 30 ticks, then release
;   dollar ($) - Direction-only: detect as 4-way
;          egs. command = $D       ;will detect if D, DB or DF is held
;               command = $B       ;will detect if B, DB or UB is held
;   plus (+) - Buttons only: simultaneous press
;          egs. command = a+b      ;press a and b at the same time
;               command = x+y+z    ;press x, y and z at the same time
;   greater-than (>) - means there must be no other keys pressed or released
;                      between the previous and the current symbol.
;          egs. command = a, >~a   ;press a and release it without having hit
;                                  ;or released any other keys in between
;   You can combine the symbols:
;     eg. command = ~30$D, a+b     ;hold D, DB or DF for 30 ticks, release,
;                                  ;then press a and b together
;
;   Note: Successive direction symbols are always expanded in a manner similar
;         to this example:
;           command = F, F
;         is expanded when MUGEN reads it, to become equivalent to:
;           command = F, >~F, >F
;
;   It is recommended that for most "motion" commads, eg. quarter-circle-fwd,
;   you start off with a "release direction". This makes the command easier
;   to do.
;
; - time (optional)
;   Time allowed to do the command, given in game-ticks. The default
;   value for this is set in the [Defaults] section below. A typical
;   value is 15.
;
; - buffer.time (optional)
;   Time that the command will be buffered for. If the command is done
;   successfully, then it will be valid for this time. The simplest
;   case is to set this to 1. That means that the command is valid
;   only in the same tick it is performed. With a higher value, such
;   as 3 or 4, you can get a "looser" feel to the command. The result
;   is that combos can become easier to do because you can perform
;   the command early. Attacks just as you regain control (eg. from
;   getting up) also become easier to do. The side effect of this is
;   that the command is continuously asserted, so it will seem as if
;   you had performed the move rapidly in succession during the valid
;   time. To understand this, try setting buffer.time to 30 and hit
;   a fast attack, such as KFM's light punch.
;   The default value for this is set in the [Defaults] section below. 
;   This parameter does not affect hold-only commands (eg. /F). It
;   will be assumed to be 1 for those commands.
;
; If you have two or more commands with the same name, all of them will
; work. You can use it to allow multiple motions for the same move.
;
; Some common commands examples are given below.
;
; [Command] ;Quarter circle forward + x
; name = "QCF_x"
; command = ~D, DF, F, x
;
; [Command] ;Half circle back + a
; name = "HCB_a"
; command = ~F, DF, D, DB, B, a
;
; [Command] ;Two quarter circles forward + y
; name = "2QCF_y"
; command = ~D, DF, F, D, DF, F, y
;
; [Command] ;Tap b rapidly
; name = "5b"
; command = b, b, b, b, b
; time = 30
;
; [Command] ;Charge back, then forward + z
; name = "charge_B_F_z"
; command = ~60$B, F, z
; time = 10
;
; [Command] ;Charge down, then up + c
; name = "charge_D_U_c"
; command = ~60$D, U, c
; time = 10


;-| 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.
[Remap]
x = x
y = y
z = z
a = a
b = 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

[Command]
name = "???"
command = D,D,D,F
buffer.time=3
time=125
[Command]
name = "???2"
command = B,B,B,U
buffer.time=3
time=125
[Command]
name = "???3"
command = U,F,F,F,D,D
buffer.time=3
time=125

[Command]
name = "???4"
command = D,B,D,U,D
buffer.time=3
time=125
[Command]
name = "???5"
command = F,B,F,U
buffer.time=3
time=125
;-| 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.
;

;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10
buffer.time=3
[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10
buffer.time=3
;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery";Required (do not remove)
command = x+y
time = 1

;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

[Command]
name = "b"
command = b
time = 1

[Command]
name = "c"
command = c
time = 1

[Command]
name = "x"
command = x
time = 1

[Command]
name = "y"
command = y
time = 1

[Command]
name = "z"
command = z
time = 1

[Command]
name = "start"
command = s
time = 1

[Command]
name = "back"     ; REQUIRED for command buffering
command = B
time = 1

[Command]
name = "fwd"      ; REQUIRED for command buffering
command = F
time = 1

[Command]
name = "up"       ; REQUIRED for command buffering
command = U
time = 1

[Command]
name = "down"     ; REQUIRED for command buffering
command = D
time = 1

[Command]
name = "downback" ; REQUIRED for command buffering
command = DB
time = 1

[Command]
name = "downfwd"  ; REQUIRED for command buffering
command = DF
time = 1

[Command]
name = "fwd2"     ; REQUIRED for command buffering
command = $F
time = 1

[Command]
name = "back2"    ; REQUIRED for command buffering
command = $B
time = 1

[Command]
name = "up2"
command = $U      ; REQUIRED for command buffering
time = 1

[Command]
name = "down2"    ; REQUIRED for command buffering
command = $D
time = 1

;-| Hold Button |--------------------------------------------------------------
[Command]
name = "hold_x"
command = /x
time = 1

[Command]
name = "hold_y"
command = /y
time = 1

[Command]
name = "hold_z"
command = /z
time = 1

[Command]
name = "hold_a"
command = /a
time = 1

[Command]
name = "hold_b"
command = /b
time = 1

[Command]
name = "hold_c"
command = /c
time = 1

[Command]
name = "hold_start"
command = /s
time = 1

;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd" ;Required (do not remove)
command = /$F
time = 1

[Command]
name = "holddown" ;Required (do not remove)
command = /$D
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 = "holdfwd_r" ; Raw hold forward (REQUIRED for command buffering)
command = /F
time = 1
[Command]
name = "holddown_r" ; Raw hold forward (REQUIRED for command buffering)
command = /D
time = 1
[Command]
name = "holdback_r" ; Raw hold forward (REQUIRED for command buffering)
command = /B
time = 1
[Command]
name = "holdup_r" ; Raw hold forward (REQUIRED for command buffering)
command = /U
time = 1

;-| Release Dir |-----------------------------------------------------------
[Command]
name = "release_fwd"
command = ~F
time = 1

[Command]
name = "release_down"
command = ~D
time = 1

[Command]
name = "release_back"
command = ~B
time = 1

[Command]
name = "release_up"
command = ~U
time = 1

[Command]
name = "release_fwd_g"    ; REQUIRED for command buffering
command = ~$F
time = 1

[Command]
name = "release_down_g"   ; REQUIRED for command buffering
command = ~$D
time = 1

[Command]
name = "release_back_g"   ; REQUIRED for command buffering
command = ~$B
time = 1

[Command]
name = "release_up_g"     ; REQUIRED for command buffering
command = ~$U
time = 1

[Command]
name = "release_downback" ; REQUIRED for command buffering
command = ~DB
time = 1

[Command]
name = "release_downfwd"  ; REQUIRED for command buffering
command = ~DF
time = 1

;-| Release Button |---------------------------------------------------------
[Command]
name = "release_a"
command = ~a
time = 1

[Command]
name = "release_b"
command = ~b
time = 1

[Command]
name = "release_c"
command = ~c
time = 1

[Command]
name = "release_x"
command = ~x
time = 1

[Command]
name = "release_y"
command = ~y
time = 1

[Command]
name = "release_z"
command = ~z
time = 1

[Command]
name = "release_start"
command = ~s
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]
;---------------------------------------------------------------------------
; ES Commands
[State -1, ES Command Reset]
type = Null
triggerall = Time
trigger1 = e||(var(45) := 0)
trigger1 = e||(var(46) := 0)
[State -1, ES Command Reset]
type = Null
triggerall = !ishelper
triggerall = time=2 && var(2)=2 && stateno!=[1000,3999]
trigger1 = e||(var(2) := 0)

[State -1, KK]
type = VarSet
triggerall = numHelper(10006)
triggerall = !AILevel
triggerall=  cond(numhelper(8083),helper(8083),var(0)!=78,1) && cond(numhelper(8084),helper(8084),var(0)!=78,1) && helper(7000),var(2)>0
triggerall = movecontact&&(stateno!=[1000,1999]) || ctrl||stateno=40
trigger1 = (helper(10006), var(0)&6144) > 0
trigger1 = (helper(10006), var(0)&6144) != 2048 && (helper(10006), var(0)&6144) != 4096 ;&& (helper(10006), var(0)&14336) != 8192

trigger2 = (helper(10006), var(0)&112) > 0
trigger2 = (helper(10006), var(0)&112) != 16 && (helper(10006), var(0)&112) != 32 && (helper(10006), var(0)&112) != 64

var(46) = 1
ignorehitpause = 1

[State -1, PP]
type = VarSet
triggerall = numHelper(10006)
triggerall = !AILevel
triggerall=  cond(numhelper(8083),helper(8083),var(0)!=78,1) && cond(numhelper(8084),helper(8084),var(0)!=78,1) && helper(7000),var(2)>0
triggerall = movecontact&&(stateno!=[1000,1999]) || ctrl
trigger1 = (helper(10006), var(0)&384) > 0
trigger1 = (helper(10006), var(0)&384) != 128 && (helper(10006), var(0)&384) != 256; && (helper(10006), var(0)&896) != 512

trigger2 = (helper(10006), var(0)&7) > 0
trigger2 = (helper(10006), var(0)&7) != 1 && (helper(10006), var(0)&7) != 2 && (helper(10006), var(0)&7) != 4

var(45) = 1
ignorehitpause = 1 

;---------------------------------------------------------------------------
;Stand Light Punch
;������p���`
[State -1, Stand Light Punch AI]
type = ChangeState
value = 3000
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2 && helper(7000),var(34)=0
triggerall = AIlevel>0
triggerall = helper(10003),var(3)=0
triggerall = statetype != A
triggerall = var(4)!=1 && var(4)<4
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = Random <= (496 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall = power=1000 && p2stateno!=5050
triggerall=(fvar(15) =[15,200])|| p2statetype=A && fvar(15) =[-25,105]
triggerall = p2stateno!=441
triggerall = p2stateno!=[120,155]
triggerall = p2statetype!=L
triggerall = var(8)=0 || p2statetype=S
triggerall = p2statetype!=A || p2bodydist y <-15
trigger1 = ctrl&& ((p2movetype=A ||helper(7000),var(2)>1||helper(7000),var(3) && life=lifemax)|| p2stateno=5901|| enemy,hitfall && var(4)<4)
trigger2= stateno=410 &&  movehit
trigger3= stateno=210 &&  movehit
trigger4= stateno=240 &&  movehit 
trigger5= stateno=200 &&  movehit && enemy,hitfall
trigger6= stateno=230 &&  movehit && enemy,hitfall
;---------------------------------------------------------
[State -1, Stand Light Punch AI]
type = ChangeState
value = 1000
triggerall = var(16)>=40
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel>0 
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = p2stateno!=824
triggerall = AIlevel <6||p2stateno!=[120,155]
triggerall = statetype != A && p2statetype!=L
triggerall = helper(10003),var(10)=0 && p2stateno!=5901
triggerall = (p2stateno!=10612||var(4)<4) && p2stateno!=10613 
triggerall = random < (520 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall= p2movetype=A || enemy,numproj>0
triggerall=fvar(15) >-10 
triggerall =p2statetype!=A || (p2movetype!=H&& p2bodydist y = [-75,-5])
trigger1 = (ctrl||(stateno=[10,20])) && ((p2movetype=A|| enemy,numproj>0) && fvar(15)<65)
 ;--------------------------------------------
[State -1, Guard]
type = ChangeState
value = 120
triggerall = movetype !=H || stateno=5210
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = stateno!=[120,155]
triggerall=AILevel>0
triggerall = p2bodydist x >-20
triggerall = p2movetype!=H||((EnemyNear, movetype=A&& enemynear,hitdefattr!=SCA,AA)||( enemynear,hitdefattr=SCA,NP,SP,HP || enemynear,hitdefattr = SCA,AA))|| enemy,numproj >0
;triggerall = (statetype!=A)||(statetype=A && p2bodydist x >5)
triggerall =movetype=I || stateno=5210 || (helper(10003),var(7)=1)
Triggerall =  Random < ((904 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0)))
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=[10,12]

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

[State -1, Throw2]
type = ChangeState
value = 830
triggerall = AILevel > 0
triggerall = random <=  (264 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall = statetype != A
triggerall = p2statetype != A|| p2stateno=5901
triggerall = ctrl || stateno=20 || prevstateno=5120
triggerall = stateno != [200,9999]
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = p2statetype!=L
triggerall = movetype!=H
triggerall = p2movetype!=H||(p2stateno=[120,133]) || p2stateno=5901
trigger1 = fvar(15) < 32
trigger2 = (p2stateno =[120,150]) &&(fvar(15) < 32)
;-----------------------------------------------------------

[State -1, Throw2]
type = ChangeState
value = 800
triggerall = AILevel > 0
triggerall = random <=  (264 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall = statetype != A
triggerall = p2statetype != A|| p2stateno=5901
triggerall = ctrl || stateno=20 || prevstateno=5120
triggerall = stateno != [200,9999]
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = movetype!=H
triggerall = p2statetype!=L
triggerall = p2movetype!=H||(p2stateno=[120,133]) || p2stateno=5901
trigger1 = fvar(15) < 32
trigger2 = (p2stateno =[120,150]) &&(fvar(15) < 32)
;--------------------------------------------------------
;Stand Light Punch
;������p���`
[State -1, Stand Light Punch AI]
type = ChangeState
value = 200
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AIlevel>0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = statetype != A
triggerall = p2statetype!=L
triggerall =  !helper(10003),var(8)
triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall = p2stateno!=5901 
triggerall = fvar(15) =[-15,50]
triggerall = p2bodydist y =[-45,0]
trigger1 = (ctrl||(stateno=[10,20]))&& (helper(10003),var(10)>0)&& fvar(15) <45
trigger2= (ctrl||stateno=[0,20])   && p2statetype=A && enemy,hitfall
trigger3= stateno=400 && animelemtime(2)>0 &&movecontact
trigger4= (anim=201 && animelemtime(2)>0||anim=200 && animelemtime(3)>0)  &&movecontact
trigger5= stateno=230 && animelemtime(2)>0 &&movecontact
trigger6= stateno=430 && animelemtime(2)>0 &&movecontact
trigger7= p2movetype=H && ctrl && fvar(15) <40
;---------------------------------------------------------------------------
;Stand Strong Punch
;�������p���`
[State -1, Stand Strong Punch AI]
type = ChangeState
value = 210
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AIlevel>0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = statetype != A
triggerall = p2statetype!=L
triggerall =  !helper(10003),var(8)
triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall = p2stateno!=5901 
triggerall = (p2statetype=A &&fvar(15) =[-15,105])|| fvar(15) =[-0,95]
triggerall = enemy,hitfall  &&(p2bodydist y= [-65,-15])||p2bodydist y =[-45,0]
trigger1 = (ctrl||(stateno=[10,20]))&& (helper(10003),var(11)>0 )&& fvar(15) <90
trigger2= (ctrl||(stateno=[10,20])) && (fvar(15)=[45,90]) && p2statetype!=A && p2movetype=I&&random <199
trigger3 = (stateno=200||stateno=400) && animelemtime(1)<4
trigger3 = prevstateno=200 || prevstateno=400
trigger4 = p2stateno=10612  && (ctrl||(stateno=[10,20])) && enemy,vel y >0
;trigger1 = ((anim=400||anim=200)&&moveguarded)&& (p2bodydist x=[-99,50]) || (p2movetype = A && enemynear,hitdefattr=SCA,NP,SP,HP && enemynear,ishelper) || (p2bodydist x <25 &&p2movetype=A)
;---------------------------------------------------------------------------
;Stand Light Kick
;������L�b�N
[State -1, Stand Light Kick AI]
type = ChangeState
value = 230
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AIlevel>0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall =  !helper(10003),var(8)
triggerall = statetype != A
triggerall = p2statetype!=A|| p2bodydist y =[-45,-10]
triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall = p2statetype!=L
triggerall= fvar(15) =[-5,45]
trigger1 = (ctrl||(stateno=[10,20]))&& (helper(10003),var(10)>0 )&& fvar(15) <40
trigger2= (ctrl||stateno=[0,20])   && p2statetype=A && enemy,hitfall
trigger3= stateno=400 && animelemtime(2)>0 &&movecontact
trigger4= stateno=200 && animelemtime(2)>0  &&movecontact
trigger5= stateno=230 && animelemtime(3)>0 &&movecontact
trigger6= stateno=430 && animelemtime(3)>0 &&movecontact
trigger5= (ctrl||(stateno=[10,20])) && (fvar(15)=[5,40]) && p2movetype=I&&random <199
;---------------------------------------------------------------------------
;Standing Strong Kick
;�������L�b�N
[State -1, Standing Strong Kick AI]
type = ChangeState
value = 240
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AIlevel>0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = statetype != A
triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall =  !helper(10003),var(8)
triggerall = (p2statetype=A &&fvar(15) =[-28,100])||fvar(15) =[-15,90]
triggerall = p2statetype!=L
triggerall = enemy,vel x >=0 || movecontact
triggerall =p2statetype!=A|| enemy,vel y >0&&p2bodydist y =[-cond(fvar(15)<45,105,65),-15]
triggerall =  helper(10003),var(10)=0
trigger1 = (ctrl||(stateno=[10,20]))&& (helper(10003),var(11)>0 )&& fvar(15) <85
trigger2= (ctrl||(stateno=[10,20])) && (fvar(15)=[15,90]) &&random <199
trigger3 = (stateno=230||stateno=430) && animelemtime(1)<4
trigger3 = prevstateno=230 || prevstateno=430
trigger4 = p2stateno=10612  && (ctrl||(stateno=[10,20])) && enemy,vel y >0


;---------------------------------------------------------------------------
;Crouching Light Punch
;���Ⴊ�ݎ�p���`
[State -1, Crouching Light Punch AI]
type = ChangeState
value = 400
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AIlevel>0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = statetype != A
triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall =  !helper(10003),var(8)
triggerall = p2statetype!=A
triggerall = p2statetype!=L
triggerall = fvar(15) =[-8,65]
triggerall =  p2statetype!=A || p2bodydist y =[-45,-5]
trigger1 = (ctrl||(stateno=[10,20]))&& (helper(10003),var(10)>0)&& fvar(15) <60
trigger2= (ctrl||stateno=[0,20])   && p2statetype=A && enemy,hitfall
trigger3= stateno=400 && animelemtime(2)>0 &&movecontact
trigger4= stateno=200 && animelemtime(2)>0  &&movecontact
trigger5= stateno=230 && animelemtime(3)>0 &&movecontact
trigger6= stateno=430 && animelemtime(3)>0 &&movecontact
trigger7= (ctrl||(stateno=[10,20])) && (fvar(15)=[5,60]) &&  p2movetype=I&&random <199
trigger8 = p2movetype=H && ctrl && fvar(15) <25 


;---------------------------------------------------------------------------
;Crouching Strong Punch
;���Ⴊ�݋��p���`
[State -1, Crouching Strong Punch AI]
type = ChangeState
value = 410
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AIlevel>0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = statetype != A
triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall = p2statetype!=C && p2statetype!=L
triggerall =  !helper(10003),var(8)
triggerall = fvar(15) =[0,65]
triggerall =  p2statetype!=A || p2bodydist y =[-40,-1]
triggerall =  helper(10003),var(10)=0
triggerall = p2stateno!=5040
trigger1 = (ctrl||(stateno=[10,20]))&& (helper(10003),var(11)>0)&& fvar(15) <60
trigger2= (ctrl||(stateno=[10,20])) && (fvar(15)=[35,65]) && p2statetype!=A 
trigger3 = (stateno=200||stateno=400) && animelemtime(1)<4
trigger3 = prevstateno=200 || prevstateno=400
trigger4 = p2stateno=10612  && (ctrl||(stateno=[10,20])) && enemy,vel y >0



;---------------------------------------------------------------------------
;Crouching Light Kick 
;���Ⴊ�ݎ�L�b�N
[State -1, Crouching Light Kick AI]
type = ChangeState
value = 430
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AIlevel>0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = statetype != A
triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall = p2statetype!=A && (p2statetype!=L) || p2stateno=5120
triggerall = p2statetype=S || movehit
triggerall =  !helper(10003),var(8)
triggerall =  fvar(15) =[-3,35]
triggerall =(p2statetype=S) ||  helper(10003),var(10)>0
trigger1 = (ctrl||(stateno=[10,20]))&& (helper(10003),var(10)>0)&& fvar(15) <30
trigger2= (ctrl||(stateno=[10,20])) && (fvar(15)=[-5,30]) && p2statetype=S &&random <199
trigger3= stateno=400 && animelemtime(2)>0 &&movecontact
trigger4= stateno=200 && animelemtime(2)>0  &&movecontact
trigger5= stateno=230 && animelemtime(3)>0 &&movecontact
trigger6= stateno=430 && animelemtime(3)>0 &&movecontact
trigger7 = p2movetype=H && ctrl && fvar(15) <30
;\ ---------------------------------------------------------------------------
;Crouching Strong Kick
;���Ⴊ�݋��L�b�N
[State -1, Crouching Strong Kick AI]
type = ChangeState
value = 440
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AIlevel>0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = statetype != A
triggerall = Random <= (256 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall = p2statetype!=A 
triggerall = p2stateno!=5901 || AIlevel <6
triggerall = p2statetype!=L || p2stateno=5120
triggerall = fvar(15) =[0,35]
triggerall = enemy,vel x >=0 || movecontact
triggerall = p2bodydist y =[-15,0]
triggerall =  !helper(10003),var(8)
triggerall =  !helper(10003),var(3)
trigger1 = (ctrl||(stateno=[10,20]))&&  p2statetype=S && fvar(15)=[15,30]
trigger2 = (stateno=230||stateno=430) && animelemtime(1)<4
trigger2 = prevstateno=230 || prevstateno=430
;---------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 600
triggerall = AILevel >0
triggerall = statetype = A
Triggerall = (P2BodyDist X = [-15,60])
Triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = vel y >=0 || p2statetype=A
triggerall = p2bodydist y =[-5,90]
triggerall = (movetype !=H)
trigger1 = ctrl
;---------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = AILevel >0
triggerall = statetype = A
Triggerall = (P2BodyDist X = [-20,75])
Triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = vel y >0
triggerall = p2bodydist y =[-5,105]
triggerall = (movetype !=H)
trigger1 = ctrl

;---------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 631
triggerall = AILevel >0
triggerall = statetype = A
Triggerall = (P2BodyDist X = [-40,20])
Triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = vel y >0 || p2statetype=A
triggerall = p2bodydist y =[-20,90]
triggerall = (movetype !=H)
trigger1 = ctrl
;---------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 630
triggerall = AILevel >0
triggerall = statetype = A
Triggerall = (P2BodyDist X = [10,60])
Triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = vel y >0 || p2statetype=A&&vel x!=0
triggerall = p2bodydist y =[-5,90]
triggerall = (movetype !=H)
trigger1 = ctrl
;---------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 640
triggerall = AILevel >0
triggerall = statetype = A
Triggerall = (P2BodyDist X = [0,65])
Triggerall = Random <= (600 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = vel y >0 
triggerall = p2bodydist y =[-5,90]
triggerall = (movetype !=H)
trigger1 = ctrl


;------------------------------
[State -1, Stand Light Punch AI]
type = ChangeState
value = 1000
triggerall = var(16)>=40
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel>0 
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = p2stateno!=824
triggerall = helper(10003),var(3)=0 
triggerall = AIlevel <6||p2stateno!=[120,155]
triggerall = statetype != A && p2statetype!=L
triggerall = helper(10003),var(10)=0 && p2stateno!=5901
triggerall = (p2stateno!=10612||var(4)<4) && p2stateno!=10613 
triggerall = random < (520 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall= fvar(15) < 85 && movecontact||p2movetype=A|| (p2statetype=A&&fvar(15) =[60,135])
triggerall= movecontact || fvar(15) >20 
triggerall =p2statetype!=A || (p2movetype!=H&& p2bodydist y = [-75,-5])|| enemy,hitfall&& p2bodydist y = [-55,-5]
trigger1 = (ctrl||(stateno=[10,20])) && (p2movetype=A && fvar(15)<65||p2statetype=A &&fvar(15) = [60,135])
trigger2 = (stateno=210||stateno=410||stateno=240)  &&(movehit|| movecontact && AIlevel <6) 
 
;---------------------------------------
[State -1, Stand Light Punch AI]
type = ChangeState
value = 1050
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel>0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = statetype != A&& var(18)>=40
triggerall = helper(10003),var(3)=0 && p2stateno!=5901
triggerall = (p2stateno!=10612||var(4)<4) && p2stateno!=10613 
triggerall = random < (520 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall= movecontact || fvar(15) >70 || p2statetype=A && movecontact  || p2movetype=A && random < (200 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0)) 
trigger1 = (stateno=40||((prevstateno=[200,3000])||prevstateno=52)&&stateno=0||stateno=[10,12]) && ( enemy,numproj>0||p2movetype=A && fvar(15)>45) && random <35*AIlevel
trigger2 = (stateno=210||stateno=410||stateno=240)  &&(moveguarded || movecontact && AIlevel <6) 
trigger3 = (stateno =230 ) && movecontact&& (moveguarded || movecontact && AIlevel <6) 

;---------------------------------------
[State -1, Stand Light Punch AI]
type = ChangeState
value = 1100
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel>0 
triggerall = AIlevel <6||p2statetype=C||p2stateno!=[120,155]
triggerall = statetype != A && p2statetype!=L
triggerall = helper(10003),var(3)=0 
triggerall = (p2stateno!=10612||var(4)<4||helper(7000),var(2)>0) && p2stateno!=10613 
triggerall = random < (520 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall = var(4)!=1
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = enemy,numproj =0 || movecontact || AIlevel <6
triggerall = !enemy,hitfall || fvar(15)<60 || movecontact
triggerall= fvar(15) < 100 && movecontact|| (p2stateno=824 || p2stateno=5120 ||fvar(15) =[40,160])|| fvar(15)<15
triggerall= movecontact || (fvar(15) >40|| fvar(15)<15) &&(p2statetype=A||p2movetype=A)|| p2statetype=A && movecontact && var(0)=2
triggerall =movecontact || p2statetype!=A || enemy,vel y >0&& p2bodydist y = [-85,-20]
trigger1 = (ctrl||(stateno=[10,20])) && (p2movetype=H ||(p2statetype=A && fvar(15) = [25,110])||fvar(15) = [45,100])
trigger2 = (stateno=210||stateno=410||stateno=240)  &&(movecontact && helper(7000),var(2)>0||movehit || movecontact && AIlevel <6) 

;-------------------------------------------------
[state -1, AI jump]
type = changestate
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AILevel >0
triggerall = statetype != A
triggerall = movetype!=H
triggerall = stateno!=40
triggerall =random < (999 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
trigger1 = helper(10003),var(30) && ctrl
value = 40


[State -1, AI run]
type=changestate
value=20
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall =random < (999 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
triggerall=AILevel >0 && statetype=S && ctrl && random < 249
trigger1= (stateno!=[10,105]) && p2movetype!=A && (p2bodydist x=[20,149])


[State -1, AI run]
type=changestate
value=10
triggerall=(stateno!=[10,12])
triggerall=AILevel >0 && statetype=S 
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = p2stateno!=5901
triggerall= p2stateno!=5120 || var(16)>35
triggerall = p2bodydist y =0 || p2bodydist y <-25
triggerall=ctrl 
trigger1=p2statetype=A && random <  (120 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0)) && (enemy,vel x >0|| p2movetype=A)
trigger2 = p2bodydist x <75 && random <  (120 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
trigger3 = p2stateno=821 && random <  (80 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
;---------------------------------------------------------------------------
;�ΰ����� �޸��
[State -1, AI_Run Fwd]
type = ChangeState
value = 100
triggerall = movetype != H
triggerall = P2Life > 0
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AIlevel >0
triggerall = stateno != 100 
triggerall = statetype = S 
triggerall = fvar(15) > 0
trigger1 = fvar(15) >= 210 && p2statetype!=L&& p2movetype!=A &&random <=  (496 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
trigger1 = ctrl
trigger2 = fvar(15) >= 140 && (p2stateno=5901)&&random <=  (496 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
trigger2 = ctrl
;---------------------------------------------------------------------------
;�ΰ����� ����
[State -1, AI_Run Back]
type = ChangeState
value = 105
triggerall = movetype != H
triggerall = P2Life > 0
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AIlevel >0
triggerall = statetype != a
triggerall = BackEdgeBodyDist > 50
triggerall = ctrl
triggerall = p2movetype!=H || p2stateno=824
triggerall = fvar(15) > 0
trigger1 = random <=  (56 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
trigger1 = fvar(15) < 40 && (p2movetype!=H);|| p2stateno=824
trigger2 = random <=  (200 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
trigger2 = fvar(15) < 40 && p2statetype=L
trigger3 = random <=  (200 * (cond((AIlevel + helper(7000),var(1))>0,(AIlevel + helper(7000),var(1)),1) ** 2 / 64.0))
trigger3 = fvar(15) < 40 && p2statetype=A &&p2movetype=A && backedgebodydist >50
;===========================================================================

;---------------------------------------------------------------------------
;Triple Kung Fu Palm (uses one super bar)
;�O��J���t�[�˂���i�Q�[�W���x���P�j
[State -1, Triple Kung Fu Palm]
type = ChangeState
value = 3000
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = ((helper(10006), var(0)&8192) =[517,8192]) || (helper(10006), var(0)&516) =[1,516]  
triggerall = power = 1000
triggerall = cond(numhelper(8083),helper(8083),var(0)!=77,1) && cond(numhelper(8084),helper(8084),var(0)!=77,1) 
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = statetype != A
trigger1 = ctrl||(stateno<1000&&movetype!=H&&stateno=[600,699])&&time=0
trigger2= stateno=200 &&  ( movecontact)
trigger3= stateno=400 &&  ( movecontact)
trigger4= stateno=440 &&  (movecontact)
trigger5= stateno=430 &&   ( movecontact)
trigger6= stateno=410 && ( movecontact)
trigger7 = stateno=210 &&movecontact
trigger8= stateno=240 &&  (movecontact)
trigger9 = StateNo = 5120 && AnimTime = 0 && !enemy,var(8) && !numexplod(59010)
trigger10 = cond(numhelper(8083),helper(8083),var(0)=87,0) || cond(numhelper(8084),helper(8084),var(0)=87,0)
trigger10 = stateno=1000 && movecontact|| anim=1052 && movecontact|| anim=1102 && movecontact

;---------------------------------------------------------------------------
;Kung Fu Throw
;����
[State -1, cmdg]
type = ChangeState
value = 830
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = (helper(10006), Var(59)&(2**5)) > 0
triggerall = (helper(10006), var(0)&2064) > 0||(helper(10006), var(0)&4128) > 0
triggerall = statetype = S
trigger1 = ctrl
trigger2 = StateNo = 5120 && AnimTime = 0 && !enemy,var(8) && !numexplod(59010)
trigger3 = stateno=[200,440]
trigger3= time<3

;---------------------------------------------------------------------------
;Fast Kung Fu Upper (1/3 super bar)
;�����J���t�[�E�E�b�p�[
[State -1, Fast Kung Fu Upper]
type = ChangeState
value = 1100
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = (helper(10006), Var(59)&(2**2)) > 0
triggerall =  (helper(10006), var(0)&129) > 0 ||  (helper(10006), var(0)&258) > 0
trigger1=ctrl && statetype!=A
trigger2= stateno=200 &&  ( movecontact)
trigger3= stateno=400 &&  ( movecontact)
trigger4= stateno=440 &&  (movecontact)
trigger5= stateno=430 &&   ( movecontact)
trigger6= stateno=410 && ( movecontact)
trigger7 = stateno=210 &&movecontact
trigger8= stateno=240 &&  (movecontact)
trigger9 = StateNo = 5120 && AnimTime = 0 && !enemy,var(8) && !numexplod(59010)
trigger10 = stateno=[200,440]
trigger10 = time<3

;---------------------------------------------------------------------------
;Light Kung Fu Upper
;�J���t�[�E�E�b�p�[�i��j
[State -1, Light Kung Fu Upper]
type = ChangeState
value = 1050
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = var(18)>=40
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = (helper(10006), Var(59)&(2**16)) > 0
triggerall= (helper(10006), var(0)&2064) > 0||(helper(10006), var(0)&4128) > 0|| helper(10006),var(33)>0
trigger1=ctrl && statetype!=A || stateno=40||stateno=50&&time<2
trigger2= stateno=200 &&  ( movecontact)
trigger3= stateno=400 &&  ( movecontact)
trigger4= stateno=440 &&  (movecontact)
trigger5= stateno=430 &&   ( movecontact)
trigger6= stateno=410 && ( movecontact)
trigger7 = stateno=210 &&movecontact
trigger8= stateno=240 &&  (movecontact)
trigger9 = StateNo = 5120 && AnimTime = 0 && !enemy,var(8) && !numexplod(59010)
trigger10 = stateno=[200,440]
trigger10= time<3

;---------------------------------------------------------------------------
;Light Kung Fu Palm
;�J���t�[�˂���i��j
[State -1, Light Kung Fu Palm]
type = ChangeState
value = 1000
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = var(16)>=40
triggerall = numhelper(1001)=0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = (helper(10006), Var(59)&(2**6)) > 0||(helper(10006), Var(59)&(2**4)) > 0
triggerall =  (helper(10006), var(0)&129) > 0 ||  (helper(10006), var(0)&258) > 0|| helper(10006),var(30)>0
trigger1=ctrl&& statetype!=A
trigger2= stateno=200 &&  ( movecontact)
trigger3= stateno=400 &&  ( movecontact)
trigger4= stateno=440 &&  (movecontact)
trigger5= stateno=430 &&   ( movecontact)
trigger6= stateno=410 && ( movecontact)
trigger7 = stateno=210 &&movecontact
trigger8= stateno=240 &&  (movecontact)
trigger9= StateNo = 5120 && AnimTime = 0 && !enemy,var(8) && !numexplod(59010)
trigger10 = stateno=[200,440]
trigger10 = time<3

;===========================================================================
;---------------------------------------------------------------------------
;Run Fwd
;�_�b�V��
;---------------------------------------------------------------------------
;Run Fwd
;�_�b�V��
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = !ishelper && numhelper(10006)
triggerall=AILevel <=2
trigger1 = (helper(10006), Var(59)&(2**30)) > 0
trigger1 = statetype = S
trigger1 = ctrl
;---------------------------------------------------------------------------
;Run Back
;��ރ_�b�V��
[State -1, Run Back]
type = ChangeState
value = 105
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2
triggerall = AIlevel =0
triggerall = (helper(10006), Var(59)&-2147483648) = -2147483648
triggerall = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
;Kung Fu Throw
;����
[State -1, Kung Fu Throw]
type = ChangeState
value = 800
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34) 
triggerall = AIlevel =0
triggerall = (helper(10006), var(0)&258) > 0 || (helper(10006), var(0)&4128) > 0
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"||command = "holdback"
trigger1 = p2bodydist X <29
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H || p2stateno=5901

;===========================================================================
;---------------------------------------------------------------------------
;Stand Light Punch
;������p���`
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = (helper(10006), var(0)&129) > 0
triggerall = helper(10006), command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2= stateno=430 && animelemtime(2)>0 ;
trigger3= stateno=230 && animelemtime(2)>0 &&animelemtime(4)<0
trigger4= stateno=200 && animelemtime(2)>0 ;
trigger5= stateno=400 && animelemtime(2)>0 ;
trigger6 = stateno=[1000,1250]
trigger6 = movecontact 
trigger6 = !enemy,gethitvar(isbound)
trigger6= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 
trigger7 = stateno=210||stateno=240||stateno=410||stateno=440
trigger7 = movecontact 
trigger7= cond(numhelper(8083),helper(8083),var(0)=65,0) || cond(numhelper(8084),helper(8084),var(0)=65,0) 
;---------------------------------------------------------------------------
;Stand Strong Punch
;�������p���`
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = (helper(10006), var(0)&258) > 0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = helper(10006), command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno=200||stateno=400) && animelemtime(1)<4
trigger2 = prevstateno=200 || prevstateno=400
trigger3 = stateno=[1000,1250]
trigger3 = movecontact 
trigger3 = !enemy,gethitvar(isbound)
trigger3= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 
trigger4 = stateno=200||stateno=230||stateno=400||stateno=430
trigger4 = movecontact 
trigger4= cond(numhelper(8083),helper(8083),var(0)=87,0) || cond(numhelper(8084),helper(8084),var(0)=87,0) 
;---------------------------------------------------------------------------
;Stand Light Kick
;������L�b�N
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall =(helper(10006), var(0)&2064) > 0
triggerall =helper(10006),  command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2= stateno=430 && animelemtime(2)>0 ;
trigger3= stateno=230 && animelemtime(2)>0 ;&&animelemtime(4)<0
trigger4= stateno=200 && animelemtime(2)>0 ;
trigger5= stateno=400 && animelemtime(2)>0 ;
trigger6 = stateno=[1000,1250]
trigger6 = movecontact 
trigger6 = !enemy,gethitvar(isbound)
trigger6= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 
trigger7 = stateno=210||stateno=240||stateno=410||stateno=440
trigger7 = movecontact 
trigger7= cond(numhelper(8083),helper(8083),var(0)=65,0) || cond(numhelper(8084),helper(8084),var(0)=65,0) 
;---------------------------------------------------------------------------
;Standing Strong Kick
;�������L�b�N
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = (helper(10006), var(0)&4128) > 0
triggerall = helper(10006), command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno=230||stateno=430) && animelemtime(1)<4
trigger2 = prevstateno=230 || prevstateno=430
trigger3 = stateno=[1000,1250]
trigger3 = movecontact 
trigger3 = !enemy,gethitvar(isbound)
trigger3= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 
trigger4 = stateno=200||stateno=230||stateno=400||stateno=430
trigger4 = movecontact 
trigger4= cond(numhelper(8083),helper(8083),var(0)=87,0) || cond(numhelper(8084),helper(8084),var(0)=87,0) 
;---------------------------------------------------------------------------
;Crouching Light Punch
;���Ⴊ�ݎ�p���`
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = (helper(10006), var(0)&129) > 0
triggerall = helper(10006), command = "holddown"
triggerall= statetype != A
trigger1 = ctrl
trigger2= stateno=430 && animelemtime(2)>0 ;
trigger3= stateno=230 && animelemtime(2)>0 &&animelemtime(4)<0;
trigger4= anim=200 && animelemtime(3)>0 || anim=201 && animelemtime(2)>0;
trigger5= stateno=400 && animelemtime(2)>0 ;
trigger6 = stateno=[1000,1250]
trigger6 = movecontact 
trigger6 = !enemy,gethitvar(isbound)
trigger6= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 
trigger7 = stateno=210||stateno=240||stateno=410||stateno=440
trigger7 = movecontact 
trigger7= cond(numhelper(8083),helper(8083),var(0)=65,0) || cond(numhelper(8084),helper(8084),var(0)=65,0) 
;---------------------------------------------------------------------------
;Crouching Strong Punch
;���Ⴊ�݋��p���`
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = (helper(10006), var(0)&258) > 0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = helper(10006), command = "holddown"
triggerall= statetype != A
trigger1 = ctrl
trigger2 = (stateno=200||stateno=400) && animelemtime(1)<4
trigger2 = prevstateno=200 || prevstateno=400
trigger3 = stateno=[1000,1250]
trigger3 = movecontact 
trigger3 = !enemy,gethitvar(isbound)
trigger3= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 
trigger4 = stateno=200||stateno=230||stateno=400||stateno=430
trigger4 = movecontact 
trigger4= cond(numhelper(8083),helper(8083),var(0)=87,0) || cond(numhelper(8084),helper(8084),var(0)=87,0) 
;---------------------------------------------------------------------------
;Crouching Light Kick
;���Ⴊ�ݎ�L�b�N
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall =(helper(10006), var(0)&2064) > 0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = helper(10006), command = "holddown"
triggerall= statetype != A
trigger1 = ctrl
trigger2= stateno=430 && animelemtime(2)>0 ;
trigger3= stateno=230 && animelemtime(2)>0 ;&&animelemtime(4)<0
trigger4= anim=200 && animelemtime(3)>0 || anim=201 && animelemtime(2)>0;
trigger5= stateno=400 && animelemtime(2)>0 ;
trigger6 = stateno=[1000,1250]
trigger6 = movecontact 
trigger6 = !enemy,gethitvar(isbound)
trigger6= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 
trigger7 = stateno=210||stateno=240||stateno=410||stateno=440
trigger7 = movecontact 
trigger7= cond(numhelper(8083),helper(8083),var(0)=65,0) || cond(numhelper(8084),helper(8084),var(0)=65,0) 
;\ ---------------------------------------------------------------------------
;Crouching Strong Kick
;���Ⴊ�݋��L�b�N
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = (helper(10006), var(0)&4128) > 0
triggerall = helper(7000),sysvar(2)>0 || !movecontact
triggerall = helper(10006), command = "holddown"
triggerall= statetype != A
trigger1 = ctrl
trigger2 = (stateno=230||stateno=430) && animelemtime(1)<4
trigger2 = prevstateno=230 || prevstateno=430
trigger3 = stateno=[1000,1250]
trigger3 = movecontact 
trigger3 = !enemy,gethitvar(isbound)
trigger3= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 
trigger4 = stateno=200||stateno=230||stateno=400||stateno=430
trigger4 = movecontact 
trigger4= cond(numhelper(8083),helper(8083),var(0)=87,0) || cond(numhelper(8084),helper(8084),var(0)=87,0) 
;---------------------------------------------------------------------------
;Jump Light Punch
;�󒆎�p���`
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = (helper(10006), var(0)&129) > 0
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno=[1000,1250]
trigger2 = movecontact 
trigger2 = !enemy,gethitvar(isbound)
trigger2= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 

;---------------------------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = (helper(10006), var(0)&258) > 0
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno=[1000,1250]
trigger2 = movecontact 
trigger2 = !enemy,gethitvar(isbound)
trigger2= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 
trigger3 = stateno=600||stateno=630
trigger3 = movecontact 
trigger3= cond(numhelper(8083),helper(8083),var(0)=64,0) || cond(numhelper(8084),helper(8084),var(0)=64,0) 



;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = cond(helper(10006),command="holddown",631,630)
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall =(helper(10006), var(0)&2064) > 0
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno=[1000,1250]
trigger2 = movecontact 
trigger2 = !enemy,gethitvar(isbound)
trigger2= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 


;---------------------------------------------------------------------------
;Jump Strong Kick
;�󒆋��L�b�N
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
triggerall = !ishelper && numhelper(10006)
triggerall = roundstate=2&& !helper(7000),var(34)
triggerall = AIlevel =0
triggerall = (helper(10006), var(0)&4128) > 0
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno=[1000,1250]
trigger2 = movecontact 
trigger2 = !enemy,gethitvar(isbound)
trigger2= cond(numhelper(8083),helper(8083),var(0)=74,0) || cond(numhelper(8084),helper(8084),var(0)=74,0) 
trigger3 = stateno=600||stateno=630
trigger3 = movecontact 
trigger3= cond(numhelper(8083),helper(8083),var(0)=64,0) || cond(numhelper(8084),helper(8084),var(0)=64,0) 

;[State -1, Guard]
;type = ChangeState
;value = 120
;triggerall = movetype !=H || animtime=0&&stateno=5120 && enemy,var(8)=0
;triggerall =cond(numhelper(7000),!helper(7000),var(34),0)
;triggerall = !ishelper && numhelper(10006)
;triggerall = roundstate=2
;triggerall = statetype!=A
;triggerall=AILevel=0 
;triggerall = command="holdback"|| command = "holdback" && command = "holddown" 
;triggerall = inguarddist || enemy,numproj>0 
;trigger1 = ctrl ||(stateno=[10,20])