;-| Button Remapping |-----------------------------------------------------
[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

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

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

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

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

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

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

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

[Command]
name = "charge"
command = /$c
time = 1
buffer.time = 1

[Command]
name = "up" ;Required (do not remove)
command = U
time = 1
buffer.time = 1

;-| Directional Sets |------------------------------------------------------

[Command]
name = "up" ;Required (do not remove)
command = U
time = 1
buffer.time = 1
[Command]
name = "down" ;Required (do not remove)
command = D
time = 1
buffer.time = 1
[Command]
name = "fwd" ;Required (do not remove)
command = F
time = 1
buffer.time = 1
[Command]
name = "back" ;Required (do not remove)
command = B
time = 1
buffer.time = 1

[Command]
name = "upfwd"
command = UF
time = 1
buffer.time = 1
[Command]
name = "upback"
command = UB
time = 1
buffer.time = 1
[Command]
name = "downback"
command = DB
time = 1
buffer.time = 1
[Command]
name = "downfwd"
command = DF
time = 1
buffer.time = 1

[Command]
name = "fwd2" 
command = $F
time = 1
buffer.time = 1
[Command]
name = "back2" 
command = $B
time = 1
buffer.time = 1
[Command]
name = "up2"
command = $U   
time = 1
buffer.time = 1
[Command]
name = "down2" 
command = $D
time = 1
buffer.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 = "hold_a"
command = /a
time = 1
buffer.time = 1
[Command]
name = "hold_b"
command = /b
time = 1
buffer.time = 1
[Command]
name = "hold_c"
command = /c
time = 1
buffer.time = 1

[Command]
name = "hold_x"
command = /x
time = 1
buffer.time = 1

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

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

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

;-| MAX2 Motions |--------------------------------------------------------------------
[Command]
name = "raijinten1"
command = ~F, DB, DF, B, $F
time = 37
[Command]
name = "raijinten2"
command = ~B, DF, DB, F, $B
time = 37

[Command]
name = "tigerkiller1"
command = ~B, F, D, DF
time = 37
[Command]
name = "tigerkiller2"
command = ~F, B, D, DB
time = 37
;-| Super Desperation Move Motions |--------------------------------------------------
;-| Desperation Move Motions |--------------------------------------------------------
[Command]
name = "2hcb"
command = ~F, $D, B, F, $D, B
time = 37
[Command]
name = "2hcf"
command = ~B, $D, F, B, $D, F
time = 37

[Command]
name = "qcfhcb"
command = ~D, F, $D, B
time = 24;33
[Command]
name = "qcbhcf"
command = ~D, B, $D, F
time = 24;33

[Command]
name = "2qcf"
command = ~D, DF, F, D, DF, F
time = 24;34
[Command]
name = "2qcb"
command = ~D, DB, B, D, DB, B
time = 24;34

[Command]
name = "bhcb"
command = ~B, F, $D, B
time = 24
[Command]
name = "fhcf"
command = ~F, B, $D, F
time = 24

;-| Special Motions |------------------------------------------------------
[command]
name = "360"
command = ~F, D, B, U
time = 15
[command]
name = "360"
command = ~F, D, B, U
time = 15
[command]
name = "360"
command = ~D, B, U, F
time = 15
[command]
name = "360"
command = ~D, B, U, F
time = 15
[command]
name = "360"
command = ~B, U, F, D
time = 15
[command]
name = "360"
command = ~B, U, F, D
time = 15
[command]
name = "360"
command = ~U, F, D, B
time = 15
[command]
name = "360"
command = ~U, F, D, B
time = 15
[command]
name = "360"
command = ~B, D, F, U
time = 15
[command]
name = "360"
command = ~B, D, F, U
time = 15
[command]
name = "360"
command = ~D, F, U, B
time = 15
[command]
name = "360"
command = ~D, F, U, B
time = 15
[command]
name = "360"
command = ~F, U, B, D
time = 15
[command]
name = "360"
command = ~F, U, B, D
time = 15
[command]
name = "360"
command = ~U, B, D, F
time = 15
[command]
name = "360"
command = ~U, B, D, F
time = 15

[Command]
name = "dp"
command = ~F, D, DF
time = 12;18
[Command]
name = "rdp"
command = ~B, D, DB
time = 12;18
[Command]
name = "relf"
command = ~$F
time = 1
buffer.time = 8
[Command]
name = "relb"
command = ~$B
time = 1
buffer.time = 8
[Command]
name = "reld"
command = ~D
time = 1
buffer.time = 8

[Command]
name = "qcf"
command = ~D, DF, F
time = 21
[Command]
name = "qcb"
command = ~D, DB, B
time = 21

[Command]
name = "hcf"
command = ~B, $D, F
time = 22
[Command]
name = "hcb"
command = ~F, $D, B
time = 22

[Command]
name = "hcfb"
command = ~B, $D, F, B
time = 24
[Command]
name = "hcbf"
command = ~F, $D, B, F
time = 24


[Command]
name = "fbf"
command = ~F, B, F, 
time = 24

[Command]
name = "bfb"
command = ~B, F, B,
time = 24

[Command]
name = "du"
command = ~D, U
time = 4;18

[Command]
name = "dd"
command = ~D,D
time = 20

;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF2"     ;Required (do not remove)
command = ~F, F
time = 5
buffer.time = 3
[Command]
name = "FF"     ;Required (do not remove)
command = ~F, >F
time = 5
buffer.time = 3

[Command]
name = "BB"     ;Required (do not remove)
command = ~B, >B
time = 5
buffer.time = 3

[Command]
name = "hop"
command = ~D,D
time = 10

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "charge";Required (do not remove)
command = x+y+a
time = 10

[Command]
name = "recovery";Required (do not remove)
command = x+a
time = 1

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

[Command]
name = "roll"
command = x+a
time = 3

[Command]
name = "knock"
command = y+b
time = 10

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "hijump"
command = ~$D, $U
time = 18

[Command]
name = "ChargedDU"
command = ~13$D, $U
time = 30

[Command]
name = "down_a"
command = /$D,a
time = 1

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

;-| CPU |--------------------------------------------------------------
; Note that if you make any changes to the basic one-button or recovery
; commands, you'll need to make the same changes to their matching commands here
; and/or in the XOR VarSet controller.  That includes things like, for example:
;  * changing the recovery command to use a different combination of buttons.
;  * renaming the b button command as "d", or the start button command as "s".
;  * switching the button names around, e.g. so button y triggers "a" and button a triggers "y".
;  * having more than one way to trigger the same command name.
; If you understand how the XOR method works, the proper changes should be obvious.
; If you don't understand it, then simply disable the lines in the XOR VarSet
; controller that correspond to the commands you've altered.

[Command]
name = "a2"
command = a
time = 1
buffer.time = 3

[Command]
name = "b2"
command = b
time = 1
buffer.time = 3

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

[Command]
name = "x2"
command = x
time = 1
buffer.time = 3

[Command]
name = "y2"
command = y
time = 1
buffer.time = 3

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

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

[Command]
name = "holdfwd2"
command = /$F
time = 1

[Command]
name = "holdback2"
command = /$B
time = 1

[Command]
name = "holdup2"
command = /$U
time = 1

[Command]
name = "holddown2"
command = /$D
time = 1

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

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

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

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

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

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

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

[Command]
name = "recovery2"
command = x+a
time = 1

[Command]
name = "recovery2";Required (do not remove)
command = c
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]

;=========================== Tiny Buffering Type X!
;Command list:
;var(20)  = QCF
;var(21)  = QCB
;var(22)  = DP
;var(23)  = HCB
;var(24)  = 
;var(25)  = 
;var(27)  = 
;var(29)  = 
;var(40)  = QCFx2
;var(41)  = QCBx2
;var(42)  = FHCF
;var(43)  = 
;var(44)  = 
;var(49)  =

;----------------------------[CHARGE BUFFER]-----------------------------------;
;------------------- SUPERS -------------------------------------------------;
;(0&15) | ((0&15)*2**4) | ((0&15)*2**8) | ((0&15)*2**12)

[State 10371, SGS Timer 4 Init]
type = VarSet
triggerall = (var(43)/2**8)&15
trigger1 = var(0) = 3
var(43) = var(43) | ((15&15)*2**12)
[State 10371, SGS Timer 3 Init]
type = VarSet
triggerall = (var(43)/2**4)&15
trigger1 = !root,AILevel
trigger1 = p2dist X >= 0 && command = "back"
trigger2 = !root,AILevel
trigger2 = p2dist X < 0 && command = "fwd"
trigger3 = root,AILevel && fvar(2)
trigger3 = p2dist X >= 0 && partner,command = "back"
trigger4 = root,AILevel && fvar(2)
trigger4 = p2dist X < 0 && partner,command = "fwd"
var(43) = var(43) | ((15&15)*2**8)
[State 10371, SGS Timer 2 Init]
type = VarSet
trigger1 = var(43)&15
trigger1 = var(3) = 3
var(43) = var(43) | ((15&15)*2**4)
[State 10371, SGS Timer 1 Init]
type = VarSet
trigger1 = ((var(43)/2**4)&15) = 0
trigger1 = var(1) = 3
var(43) = 15
;================== Super moves
[State 10371,FHCFx2]
type = Null
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),cond(p2dist X >= 0,command="fhcf",command="bhcb")
trigger1 = Helper(10371),cond(1,var(42):=10,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && var(42) ;Checks if tag is active.
trigger2 = cond((Helper(10371),p2dist X >= 0),partner,command="fhcf",partner,command="bhcb")
trigger2 = Helper(10371),cond(1,var(42):=10,1)

[State 10371, QCBx2]
type = Null
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),cond(p2dist X >= 0,command="2qcb",command="2qcf")
trigger1 = Helper(10371),cond(1,var(41):=10,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && var(42) ;Checks if tag is active.
trigger2 = cond((Helper(10371),p2dist X >= 0),partner,command="2qcb",partner,command="2qcf")
trigger2 = Helper(10371),cond(1,var(41):=10,1)

[State 10371, QCFx2]
type = Null
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),cond(p2dist X >= 0,command="2qcf",command="2qcb")
trigger1 = Helper(10371),cond(1,var(40):=10,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && var(42) ;Checks if tag is active.
trigger2 = cond((Helper(10371),p2dist X >= 0),partner,command="2qcf",partner,command="2qcb")
trigger2 = Helper(10371),cond(1,var(40):=10,1)

;================== Special moves
[State 10371, 360]
type = Null
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),cond(p2dist X>=0,command="360",command="360")
trigger1 = Helper(10371),cond(1,var(24):=13,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && var(42) ;Checks if tag is active.
trigger2 = cond((Helper(10371),p2dist X >= 0),partner,command="360",partner,command="360")
trigger2 = Helper(10371),cond(1,var(24):=13,1)

[State 10371, HCB]
type = Null
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),cond(p2dist X>=0,command="hcb",command="hcf")
trigger1 = Helper(10371),cond(1,var(23):=13,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && var(42) ;Checks if tag is active.
trigger2 = cond((Helper(10371),p2dist X >= 0),partner,command="hcb",partner,command="hcf")
trigger2 = Helper(10371),cond(1,var(23):=13,1)

[State 10371, QCF]
type = Null
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),cond(p2dist X>=0,command="qcf",command="qcb")
trigger1 = Helper(10371),cond(1,var(20):=13,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && var(42) ;Checks if tag is active.
trigger2 = cond((Helper(10371),p2dist X >= 0),partner,command="qcf",partner,command="qcb")
trigger2 = Helper(10371),cond(1,var(20):=13,1)

[State 10371, QCB]
type = Null
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),cond(p2dist X>=0,command="qcb",command="qcf")
trigger1 = Helper(10371),cond(1,var(21):=13,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && var(42) ;Checks if tag is active.
trigger2 = cond((Helper(10371),p2dist X >= 0),partner,command="qcb",partner,command="qcf")
trigger2 = Helper(10371),cond(1,var(21):=13,1)

[State 10371, DP]
type = Null
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),cond(p2dist X>=0,command="dp",command="rdp")
trigger1 = Helper(10371),cond(1,var(22):=13,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && var(42) ;Checks if tag is active.
trigger2 = cond((Helper(10371),p2dist X >= 0),partner,command="dp",partner,command="rdp")
trigger2 = Helper(10371),cond(1,var(22):=13,1)
;----------------------------[BUTTON BUFFER]-----------------------------------;
;We recommend to leave the button buffer alone for compatibility, but it is possible
;  to utilize this as quick-way of remapping certain buttons.
;NON-NEGATIVE EDGE:
;var(0)  = LP (A)
;var(1)  = MP (C)
;var(2)  = HP (E)
;var(3)  = LK (B)
;var(4)  = MK (D)
;var(5)  = HK (SHORTCUT)
;var(6)  = Start
;NEGATIVE EDGE (RESERVED):
;var(7)  = LP
;var(8)  = MP
;var(9)  = HP
;var(10) = LK
;var(11) = MK
;var(12) = HK
;var(13) = Start
;DOUBLE BUTTON:
;var(14) = LP+LK (A+B)
;var(15) = LK+MP (B+D)
;var(16) = MP+MK (C+D)
;var(17) = LP+MP (A+C)

[State 10371, X/LP Init]
type = Null
triggerall = !IsHelper
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),command="x"
trigger1 = Helper(10371),cond(1,var(0):=3,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && fvar(2)
trigger2 = partner,command = "x"
trigger2 = Helper(10371),cond(1,var(0):=3,1)
ignorehitpause = 1

[State 10371, Y/MP Init]
type = Null
triggerall = !IsHelper
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),command="y"
trigger1 = Helper(10371),cond(1,var(1):=3,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && fvar(2)
trigger2 = partner,command = "y"
trigger2 = Helper(10371),cond(1,var(1):=3,1)
ignorehitpause = 1

[State 10371, Z/HP Init]
type = Null
triggerall = !IsHelper
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),command="z"
trigger1 = Helper(10371),cond(1,var(2):=3,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && fvar(2)
trigger2 = partner,command = "y"
trigger2 = Helper(10371),cond(1,var(2):=3,1)
ignorehitpause = 1

[State 10371, A/LK Init]
type = Null
triggerall = !IsHelper
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),command="a"
trigger1 = Helper(10371),cond(1,var(3):=3,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && fvar(2)
trigger2 = partner,command = "a"
trigger2 = Helper(10371),cond(1,var(3):=3,1)
ignorehitpause = 1

[State 10371, B/MK Init]
type = Null
triggerall = !IsHelper
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),command="b"
trigger1 = Helper(10371),cond(1,var(4):=3,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && fvar(2)
trigger2 = partner,command = "b"
trigger2 = Helper(10371),cond(1,var(4):=3,1)
ignorehitpause = 1

[State 10371, C/HK Init]
type = Null
triggerall = !IsHelper
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),command="c"
trigger1 = Helper(10371),cond(1,var(5):=3,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && fvar(2)
trigger2 = partner,command = "c"
trigger2 = Helper(10371),cond(1,var(5):=3,1)
ignorehitpause = 1

[State 10371, START Init]
type = Null
triggerall = !IsHelper
triggerall = NumHelper(10371)
trigger1 = !AILevel && Helper(10371),command="start"
trigger1 = Helper(10371),cond(1,var(6):=3,1)
;================= The following lines only apply to tag-compatible characters.
trigger2 = AILevel && fvar(2)
trigger2 = partner,command = "start"
trigger2 = Helper(10371),cond(1,var(6):=3,1)
ignorehitpause = 1

;-Add Tiny Buffering to all characters
;----------------[DOUBLE BUTTON CHECKS]----------------
;var(14) = LP+MP (A+B)
;var(15) = LK+MP (B+C)
;var(16) = MP+MK (C+D)
;var(17) = LP+HP (A+C) 
;var(18) = LK+MK (B+D)
;var(19) = LP+MK (A+D)
[State 10371, LP + LK]
type = null
trigger1 = Helper(10371),cond(1,var(14) := (((var(0) = [1,3]) && (var(3) = [1,3]))),1)
[State 10371, HP + LK]
type = null
trigger1 = Helper(10371),cond(1,var(15) := (((var(1) = [1,3]) && (var(3) = [1,3]))),1)
[State 10371, HP + HK]
type = null
trigger1 = Helper(10371),cond(1,var(16) := (((var(1) = [1,3]) && (var(4) = [1,3]))),1)
[State 10371, LP + HP]
type = null
trigger1 = Helper(10371),cond(1,var(17) := (((var(0) = [1,3]) && (var(1) = [1,3]))),1)
[State 10371, LK + HK]
type = null
trigger1 = Helper(10371),cond(1,var(18) := (((var(3) = [1,3]) && (var(4) = [1,3]))),1)
[State 10371, LP + HK]
type = null
trigger1 = Helper(10371),cond(1,var(19) := (((var(0) = [1,3]) && (var(4) = [1,3]))),1)
;====================================================

;[State dfdsfdsf, SuperPause]
;type = SuperPause
;trigger1 = Helper(10371),var(0)=3
;time = 99999999999999999
;anim = 200000
;sound = S10,0
;pos = 0,0
;darken = 1
;p2defmul = 0
;poweradd = 0
;unhittable = 1

[State -1, AI Helper Check]
type = ChangeState
trigger1 = IsHelper(9741)
value = 9741

[State -1, AI Helper Check 2]
type = ChangeState
trigger1 = IsHelper(9742)
value = 9742

;MAX Into: Ryuuga, Hien Ryuujin Kyaku
;MAX out of: C.Uraken, Koukyaku Geri, Ryuuga (1), Gen'ei Kyaku (Final), Renbu Kyaku (1~3)

[State -3, MAX CANCEL PALFX]
type = VarAdd
trigger1 = var(50)
var(50) = -1
ignorehitpause = 1
[State -3, MAX CANCELS]
type = VarSet
trigger1 = 1
var(53) = 0
[State -3, MAX CANCELS]
type = VarSet
triggerall = var(51) ;MAX On
trigger1 = stateno = [200,599] ;Non aerial basic moves
trigger2 = stateno = [600,749] ;Aerial basic moves
trigger2 = movecontact = 1
trigger3 = stateno = [800,899] ;Command moves
trigger3 = movecontact = 1
trigger4 = stateno = 980 ;CD Attack
trigger5 = stateno = 990 ;Air CD Attack
trigger5 = movecontact = 1
;MAX out of moves:
trigger6 = stateno = 1000
trigger6 = movecontact = 1
trigger7 = stateno = 1200
trigger7 = movecontact = 1
var(53) = 1
ignorehitpause = 1
;===========================================================================
;Computer Controlled Behavior
;---------------------------------------------------------------------------
;J.Hard Kick
[State -1, J.Hard Kick]
type = ChangeState
value = 630
triggerall = AILevel
triggerall = RoundState < 3
trigger1 = Statetype = A
triggerall = ctrl
trigger1 = P2bodydist X = [-7,78]
trigger1 = ((p2bodydist y=[45,75])&&stateno=50)|| ((p2bodydist y=[26,50])&&stateno=41)
trigger1 = Vel Y > 0
trigger1 = (random%200 < AILevel)
trigger2 = P2bodydist X = [-7,78]
trigger2 = p2bodydist y = [0,90]
trigger2 = Vel Y > 0
trigger2 = Pos Y < -60
trigger2 = random%30 < AILevel

;J.Light Kick
[State -1, J.Light Kick]
type = ChangeState
value = 620
triggerall = AILevel
triggerall = RoundState < 3
trigger1 = Statetype = A
triggerall = ctrl
trigger1 = P2bodydist X = [-7,78]
trigger1 = ((p2bodydist y=[45,75])&&stateno=50)|| ((p2bodydist y=[26,50])&&stateno=41)
trigger1 = Vel Y > 0
trigger1 = (random%100 < AILevel)
trigger2 = P2bodydist X = [-7,78]
trigger2 = p2bodydist y = [0,90]
trigger2 = Vel Y > 0
trigger2 = Pos Y < -60
trigger2 = random%30 < AILevel

;J.Hard Punch
[State -1, J.Hard Punch]
type = ChangeState
value = 610
triggerall = AILevel
triggerall = RoundState < 3
trigger1 = Statetype = A
triggerall = ctrl
trigger1 = P2bodydist X = [-7,78]
trigger1 = ((p2bodydist y=[45,75])&&stateno=50)|| ((p2bodydist y=[26,50])&&stateno=41)
trigger1 = Vel Y > 0
trigger1 = (random%200 < AILevel)
trigger2 = P2bodydist X = [-7,78]
trigger2 = p2bodydist y = [0,90]
trigger2 = Vel Y > 0
trigger2 = Pos Y < -60
trigger2 = random%30 < AILevel

;J.Light Punch
[State -1, J.Light Punch]
type = ChangeState
value = 600
triggerall = AILevel
triggerall = RoundState < 3
trigger1 = Statetype = A
triggerall = ctrl
trigger1 = P2bodydist X = [-7,78]
trigger1 = ((p2bodydist y=[45,75])&&stateno=50)|| ((p2bodydist y=[26,50])&&stateno=41)
trigger1 = Vel Y > 0
trigger1 = (random%100 < AILevel)
trigger2 = P2bodydist X = [-7,78]
trigger2 = p2bodydist y = [0,90]
trigger2 = Vel Y > 0
trigger2 = Pos Y < -60
trigger2 = random%30 < AILevel

;Hard Punch (CPU)
[State -1, Hard Punch]
type = ChangeState
value = 410
triggerall = AILevel
triggerall = RoundState < 3
triggerall = Statetype != A
triggerall = p2statetype != L || (p2stateno != [5100,5599]) 
triggerall = (p2stateno != [10060,10999])
trigger1 = ctrl || stateno = 101
;As an anti-air
trigger1 = p2statetype = A
trigger1 = p2bodydist X = [-3,29]
trigger1 = p2bodydist Y = [-50,0]
trigger1 = p2movetype = I || (p2movetype = A && p2stateno = [0,999])
trigger1 = numenemy && enemynear, vel Y > -2
trigger1 = random%14 < AILevel

;Hard Kick
[State -1, Hard Kick]
type = ChangeState
value = ifelse((p2dist x <= 60),230,235)
triggerall = AILevel
triggerall = RoundState < 3
triggerall = Statetype != A
triggerall = p2statetype != L || (p2stateno != [5100,5599]) 
triggerall = (p2stateno != [10060,10999])
trigger1 = ctrl || stateno = 101
trigger1 = (random%300 < AILevel)

;Light Kick
[State -1, Light Kick]
type = ChangeState
value = ifelse((p2dist x <= 52),220,225)
triggerall = AILevel
triggerall = RoundState < 3
triggerall = Statetype != A
triggerall = p2statetype != L || (p2stateno != [5100,5599]) 
triggerall = (p2stateno != [10060,10999])
trigger1 = ctrl || stateno = 101
trigger1 = (random%200 < AILevel)
;Basic cancels
trigger2 = stateno = 220 && time > 5 && (random%20 < AILevel)
trigger2 = movecontact
trigger3 = stateno = 225 && time > 5 && (random%20 < AILevel)
trigger3 = movecontact


;Hard Punch
[State -1, Hard Punch]
type = ChangeState
value = ifelse((p2dist x <= 60),210,215)
triggerall = AILevel
triggerall = RoundState < 3
triggerall = Statetype != A
triggerall = p2statetype != L || (p2stateno != [5100,5599]) 
triggerall = (p2stateno != [10060,10999])
trigger1 = ctrl || stateno = 101
trigger1 = (random%200 < AILevel)
;===========================================================================
;Player Controlled Behavior
;---------------------------------------------------------------------------
[State -1, Gigas Cross Breaker]
type = ChangeState
value = 3300
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(40)
triggerall = helper(10371), fvar(1)<=4
triggerall = (helper(10371), var(17))
triggerall = (power >= 3000 || var(51) && power>=1000)
triggerall = statetype != A
trigger1 = ctrl || stateno = 101
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 220 && animelemtime(3) > 1 && animelemtime(4) < 0
trigger5 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger6 = stateno = 420 && animelemtime(2) > 1 && animelemtime(3) < 0

[State -1, Gigas Breaker]
type = ChangeState
value = 3199
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(24)
triggerall = helper(10371), fvar(1)<=4
triggerall = (helper(10371), var(17))
triggerall = (power >= 3000 || var(51) && power>=1000)
triggerall = statetype != A
trigger1 = ctrl || stateno = 101 || stateno = 40 || stateno = 52
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 220 && animelemtime(3) > 1 && animelemtime(4) < 0
trigger5 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger6 = stateno = 420 && animelemtime(2) > 1 && animelemtime(3) < 0
trigger7 = var(53) 

[State -1, Megaton Press]
type = ChangeState
value = 3100
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(40)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(3) = [1,3]) || (helper(10371), var(4) = [1,3]) 
triggerall = (power >= 1000 || var(51))
triggerall = statetype != A
trigger1 = ctrl || stateno = 101
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 220 && animelemtime(3) > 1 && animelemtime(4) < 0
trigger5 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger6 = stateno = 420 && animelemtime(2) > 1 && animelemtime(3) < 0
trigger7 = var(53) 

[State -1, Hammer Mountain]
type = ChangeState
value = 3000
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(40)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(0) = [1,3]) || (helper(10371), var(1) = [1,3]) 
triggerall = (power >= 1000 || var(51))
triggerall = statetype != A
trigger1 = ctrl || stateno = 101
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 220 && animelemtime(3) > 1 && animelemtime(4) < 0
trigger5 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger6 = stateno = 420 && animelemtime(2) > 1 && animelemtime(3) < 0
trigger7 = var(53) 

[State -1, Meat Squasher]
type = ChangeState
value = 1500 
triggerall = stateno != 1500
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(24)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(3) = [1,3]) || (helper(10371), var(4) = [1,3])
triggerall = statetype != A
trigger1 = ctrl || stateno = 101 || stateno = 40 || stateno = 52
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 220 && animelemtime(3) > 1 && animelemtime(4) < 0
trigger5 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger6 = stateno = 420 && animelemtime(2) > 1 && animelemtime(3) < 0

[State -1, Moonsault Press]
type = ChangeState
value = 1400
triggerall = stateno != 1400
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(24)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(0) = [1,3]) || (helper(10371), var(1) = [1,3])
triggerall = statetype != A
trigger1 = ctrl || stateno = 101 || stateno = 40 || stateno = 52
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 220 && animelemtime(3) > 1 && animelemtime(4) < 0
trigger5 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger6 = stateno = 420 && animelemtime(2) > 1 && animelemtime(3) < 0

[State -1, Ultra Throw]
type = ChangeState
value = 1300 
triggerall = stateno != 1300
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(23)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(3) = [1,3]) || (helper(10371), var(4) = [1,3])
triggerall = statetype != A
trigger1 = ctrl || stateno = 101
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 220 && animelemtime(3) > 1 && animelemtime(4) < 0
trigger5 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger6 = stateno = 420 && animelemtime(2) > 1 && animelemtime(3) < 0

[State -1, Giant Palm Bomber]
type = ChangeState
value = 1200 
triggerall = stateno != 1200
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(21)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(0) = [1,3]) || (helper(10371), var(1) = [1,3])
triggerall = statetype != A
trigger1 = ctrl || stateno = 101
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 220 && animelemtime(3) > 1 && animelemtime(4) < 0
trigger5 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger6 = stateno = 420 && animelemtime(2) > 1 && animelemtime(3) < 0
trigger7 = var(53) 
trigger7 = var(50) := 7 && var(51) := var(51)-128

[State -1, Shootdown Backbreaker]
type = ChangeState
value = 1100 
triggerall = stateno != 1100
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(22)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(3) = [1,3]) || (helper(10371), var(4) = [1,3])
triggerall = statetype != A
trigger1 = ctrl || stateno = 101
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 220 && animelemtime(3) > 1 && animelemtime(4) < 0
trigger5 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger6 = stateno = 420 && animelemtime(2) > 1 && animelemtime(3) < 0
trigger7 = stateno = 3000 && animelemtime(29) > 0 && movehit

[State -1, Monster Lariat]
type = ChangeState
value = 1000 
triggerall = stateno != 1000
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(20)
triggerall = helper(10371), fvar(1)<=2
triggerall = (helper(10371), var(3) = [1,3]) || (helper(10371), var(4) = [1,3])
triggerall = statetype != A
trigger1 = ctrl || stateno = 101
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 220 && animelemtime(3) > 1 && animelemtime(4) < 0
trigger5 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger6 = stateno = 420 && animelemtime(2) > 1 && animelemtime(3) < 0
trigger7 = var(53) 
trigger7 = var(50) := 7 && var(51) := var(51)-128
;---------------------------------------------------------------------------
;Kung Fu Throw
;??
[State -1, Kung Fu Throw]
type = ChangeState
value = 910
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = (helper(10371),var(4)=[1,3]) 
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
triggerall = command = "holdfwd" || command = "holdback"
triggerall = var(19) = 0 ; Opponent isn't in guarding state
triggerall = p2stateno != 40 && p2stateno !=52 ; Cannot grab during jump start / jump land
trigger1 = p2bodydist X < 14
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
;---------------------------------------------------------------------------
;Kung Fu Throw
;??
[State -1, Kung Fu Throw]
type = ChangeState
value = 900
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = (helper(10371),var(1)=[1,3])
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
triggerall = command = "holdfwd" || command = "holdback"
triggerall = var(19) = 0 ; Opponent isn't in guarding state
triggerall = p2stateno != 40 && p2stateno !=52 ; Cannot grab during jump start / jump land
trigger1 = p2bodydist X < 14
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
;---------------------------------------------------------------------------
;Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100;ifelse(P2Dist x < 0,105,100)
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), command != "holddown"
trigger1 = cond((helper(10371),p2dist x >= 0),(helper(10371), command = "FF"),(helper(10371), command = "BB"))
trigger1 = statetype = S
trigger1 = ctrl
;---------------------------------------------------------------------------
;Run Back
[State -1, Run Back]
type = ChangeState
value = 105;ifelse(P2Dist x < 0,100,105)
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = helper(10371), command != "holddown"
trigger1 = cond((helper(10371),p2dist x >= 0),(helper(10371), command = "BB"),(helper(10371), command = "FF"))
trigger1 = statetype = S
trigger1 = ctrl
;---------------------------------------------------------------------------
;Taunt
;??
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = command = "start"
triggerall = stateno != 195
trigger1 = statetype != A && statetype != C
trigger1 = ctrl
trigger2 = stateno = 101 
;--------------------------------------------------------------------------
;MAX
[State -1, MAX]
type = ChangeState
value = 780
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = stateno != [900,979]
triggerall = !numhelper(70001) && !numhelper(70002)
triggerall = power >= 1000
triggerall = numhelper(10371) 
triggerall = helper(10371), var(15) ||helper(10371), var(5) = [2,3]
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = [200,980]
trigger2 = movecontact = 1 && power >= 2000
;---------------------------------------------------------------------------
;Roll cancel
[State -1, Roll cancel]
type = ChangeState
value = 751
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(14) 
triggerall = Statetype != A || var(40) = 1 && stateno = 820
triggerall = power >= 1000
trigger1 = stateno = [200,599] ;Non aerial basic moves
trigger1 = movecontact = 1
trigger2 = stateno = [600,749] ;Aerial basic moves
trigger2 = movecontact = 1
trigger3 = stateno = [800,899] ;Command moves
trigger3 = movecontact = 1
trigger4 = stateno = 980 ;CD Attack
trigger4 = movecontact = 1
;---------------------------------------------------------------------------
;Air CD Attack
[State -1, Air CD Attack]
type = ChangeState
value = 990
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(16) || helper(10371), var(2) = [2,3]
triggerall = Statetype != C
trigger1 = Statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;CD Attack Counter
[State -1, CD Attack Counter]
type = ChangeState
value = 985
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(16) ||helper(10371), var(2) = [2,3]
triggerall = helper(10371), command != "holddown"
triggerall = Statetype != A
trigger1 = stateno = 150 && power >= 1000
trigger2 = stateno = 151 && power >= 1000
;---------------------------------------------------------------------------
;CD Attack
[State -1, CD Attack]
type = ChangeState
value = 980
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(16) || helper(10371), var(2) = [2,3]
triggerall = helper(10371), command != "holddown"
triggerall = Statetype != A
trigger1 = Statetype = S
trigger1 = ctrl
trigger2 = stateno = 101 
;---------------------------------------------------------------------------

;Roll 2
[State -1, Roll 2]
type = ChangeState
value = 711
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(14)
triggerall = cond((helper(10371),p2dist x >= 0),(helper(10371), command = "holdback"),(helper(10371), command = "holdfwd"))
triggerall = helper(10371), command != "holddown"
triggerall = Statetype != A
trigger1 = Statetype = S
trigger1 = ctrl
trigger2 = stateno = 150 && power >= 1000
trigger3 = stateno = 151 && power >= 1000
trigger4 = stateno = 101
;---------------------------------------------------------------------------
;Roll 1
[State -1, Roll 1]
type = ChangeState
value = 710
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(14) 
triggerall = helper(10371), command != "holddown"
triggerall = Statetype != A
trigger1 = Statetype = S
trigger1 = ctrl
trigger2 = stateno = 150 && power >= 1000
trigger3 = stateno = 151 && power >= 1000
trigger4 = stateno = 101
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
[State -1, Gedan Blocking]
type = ChangeState
value = 831
triggerall = stateno != [800,899]
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = command = "holdback" 
triggerall = helper(10371), command != "holddown"
triggerall = (helper(10371), var(17))
triggerall = Statetype != A
trigger1 = ctrl || stateno = 101 
[State -1, Joudan Blocking]
type = ChangeState
value = 830
triggerall = stateno != [800,899]
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = command = "holdfwd" 
triggerall = helper(10371), command != "holddown"
triggerall = (helper(10371), var(17))
triggerall = Statetype != A
trigger1 = ctrl || stateno = 101 

;Body Press
[State -1, Body Press]
type = ChangeState
value = 820
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), command = "holddown"
triggerall = helper(10371), var(1) = [2,3]
triggerall = Statetype != C
trigger1 = Statetype = A
trigger1 = ctrl

[State -1, Fwd+A Max Cancel]
type = ChangeState
value = 810
triggerall = stateno != [800,899]
triggerall = movecontact = 1
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = command = "holdfwd" 
triggerall = helper(10371), command != "holddown"
triggerall = helper(10371), var(3) = [2,3]
triggerall = Statetype != A
trigger1 = stateno = [200,599] ;Non aerial basic moves
trigger1 = var(53) 
trigger1 = var(50) := 7 && var(51) := var(51)-128

[State -1, Fwd+A]
type = ChangeState
value = 810
triggerall = stateno != [800,899]
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = command = "holdfwd" 
triggerall = helper(10371), command != "holddown"
triggerall = helper(10371), var(3) = [2,3]
triggerall = Statetype != A
trigger1 = ctrl || stateno = 101 

[State -1, Fwd+X Max Cancel]
type = ChangeState
value = 800
triggerall = stateno != [800,899]
triggerall = movecontact = 1
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = command = "holdfwd" 
triggerall = helper(10371), command != "holddown"
triggerall = helper(10371), var(0) = [2,3]
triggerall = Statetype != A 
trigger1 = stateno = [200,599] ;Non aerial basic moves
trigger1 = var(53) 
trigger1 = var(50) := 7 && var(51) := var(51)-128

[State -1, Fwd+X]
type = ChangeState
value = 800
triggerall = stateno != [800,899]
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = command = "holdfwd" 
triggerall = helper(10371), command != "holddown"
triggerall = helper(10371), var(0) = [2,3]
triggerall = Statetype != A
trigger1 = ctrl || stateno = 101 
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
;J.Light Punch
[State -1, J.Light Punch]
type = ChangeState
value = 600
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(0) = [1,3]
triggerall = Statetype != C
trigger1 = Statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;J.Light Kick
[State -1, J.Light Kick]
type = ChangeState
value = 620
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(3) = [1,3]
triggerall = Statetype != C
trigger1 = Statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;J.Hard Punch
[State -1, J.Hard Punch]
type = ChangeState
value = 610
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(1) = [1,3]
triggerall = Statetype != C
trigger1 = Statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;J.Hard Kick
[State -1, J.Hard Kick]
type = ChangeState
value = 630
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(4) = [1,3]
triggerall = Statetype != C
trigger1 = Statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;C.Light Punch
[State -1, C.Light Punch]
type = ChangeState
value = 400
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), command = "holddown"
triggerall = helper(10371), command != "holdup"
triggerall = helper(10371), var(0) = [1,3]
triggerall = Statetype != A
trigger1 = ctrl || stateno = 101
;Basic cancels 
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
;---------------------------------------------------------------------------
;C.Light Kick
[State -1, C.Light Kick]
type = ChangeState
value = 420
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), command = "holddown"
triggerall = helper(10371), command != "holdup"
triggerall = helper(10371), var(3) = [1,3]
triggerall = Statetype != A
trigger1 = ctrl || stateno = 101
;Basic cancels 
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
;---------------------------------------------------------------------------
;C.Hard Punch
[State -1, C.Hard Punch]
type = ChangeState
value = 410
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), command = "holddown"
triggerall = helper(10371), command != "holdup"
triggerall = helper(10371), var(1) = [1,3]
triggerall = Statetype != A
trigger1 = ctrl
trigger2 = stateno = 101  
;---------------------------------------------------------------------------
;C.Hard Kick
[State -1, C.Hard Kick]
type = ChangeState
value = 430
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), command = "holddown"
triggerall = helper(10371), command != "holdup"
triggerall = helper(10371), var(4) = [1,3]
triggerall = Statetype != A
trigger1 = ctrl
trigger2 = stateno = 101  
;---------------------------------------------------------------------------
;Light Punch
[State -1, Light Punch]
type = ChangeState
value = ifelse((p2dist x <= 40),200,205)
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(0) = [1,3]
triggerall = helper(10371), command != "holddown"
triggerall = Statetype != A
trigger1 = ctrl || stateno = 101
;Basic cancels 
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
;---------------------------------------------------------------------------
;Light Kick
[State -1, Light Kick]
type = ChangeState
value = ifelse((p2dist x <= 52),220,225)
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = numhelper(10371)
triggerall = helper(10371), var(3) = [1,3]
triggerall = helper(10371), command != "holddown"
triggerall = Statetype != A
trigger1 = ctrl || stateno = 101
;Basic cancels 
trigger2 = stateno = 200 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger3 = stateno = 205 && animelemtime(3) > 1 && animelemtime(5) < 0
trigger4 = stateno = 400 && animelemtime(3) > 1 && animelemtime(5) < 0
;---------------------------------------------------------------------------
;Hard Punch
[State -1, Hard Punch]
type = ChangeState
value = ifelse((p2dist x <= 60),210,215)
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = helper(10371), var(1) = [1,3]
triggerall = helper(10371), command != "holddown"
triggerall = Statetype != A
trigger1 = ctrl
trigger2 = stateno = 101  
;---------------------------------------------------------------------------
;Hard Kick
[State -1, Hard Kick]
type = ChangeState
value = ifelse((p2dist x <= 60),230,235)
triggerall = !AILevel
triggerall = RoundState < 3
triggerall = helper(10371), var(4) = [1,3]
triggerall = helper(10371), command != "holddown"
triggerall = Statetype != A
trigger1 = ctrl
trigger2 = stateno = 101  

[statedef 999999]
anim = 1
ctrl=0

[State 10371, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
pos = root,Const(size.head.pos.x),root,Const(size.head.pos.y)
ignorehitpause = 1

[State esp]
Type = null
Trigger1 = 0
;-------------------
;MEE Template Files
;   provided by
;  Kitsune Sniper
;       ***
; Thanks, Kitsune!
;-------------------

