;-----------------------------------------------------------------------
;-|Cmd |--------------------------------------------------------------------
;----------------------------------------------------------------------------

;-| 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


;===========================================================================
;2/3 Button Combination
;===========================================================================

[Command]
name = "charge";Required (do not remove)
command = x+y+a
time = 10

[Command]
name = "x+y";Required (do not remove)
command = x+y
time = 5

[Command]
name = "y+b";Required (do not remove)
command = y+b
time = 5

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




[Command]
name = "Power";Required (do not remove)
command = a+b
time = 5



;-| Super Motions |--------------------------------------------------------
;The following two have the same name, but different motion.
;Either one will be detected by a "command = TripleKFPalm" trigger.
;Time is set to 20 (instead of default of 15) to make the move
;easier to do.
;
[command]
name = "QCB,QCF_a"
command = ~D,DB, D, DF, F,a
time = 25

[command]
name = "QCB,QCF_x"
command = ~D,DB, D, DF, F,x
time = 25

[command]
name = "QCB,QCF_y"
command = ~D,DB, D, DF, F,y
time = 25



[command]
name = "2xQCF_a"
command = ~D,DF,F,D,DF,F,a
time = 20

[command]
name = "2xQCF_a"
command = ~D,DF,F,D,DF,F,~a
time = 20

  [Command]
name = "2xQCF_a"
command =~D,DF,D,DF,F,a
time = 20
  [Command]
name = "2xQCF_a"
command =~D,DF,D,DF,F,~a
time = 20

  [Command]
name = "2xQCF_a"
command =~D,DF,D,DF,F,a
time = 20

  [Command]
name = "2xQCF_a"
command =~DF,F,DF,F,~a
time = 20

  [Command]
name = "2xQCF_a"
command =~DF,F,DF,F,a
time = 20


[command]
name = "2xQCF_x"
command = ~D,DF,F,D,DF,F,x
time = 20

[command]
name = "2xQCF_x"
command = ~D,DF,F,D,DF,F,~x
time = 20

  [Command]
name = "2xQCF_x"
command =~D,DF,D,DF,F,x
time = 20
  [Command]
name = "2xQCF_x"
command =~D,DF,D,DF,F,~x
time = 20

  [Command]
name = "2xQCF_x"
command =~D,DF,D,DF,F,x
time = 20

  [Command]
name = "2xQCF_x"
command =~DF,F,DF,F,~x
time = 20

  [Command]
name = "2xQCF_a"
command =~DF,F,DF,F,a
time = 20



[command]
name = "2xQCF_y"
command = ~D,DF,F,D,DF,F,y
time = 20

[command]
name = "2xQCF_y"
command = ~D,DF,F,D,DF,F,~y
time = 20

  [Command]
name = "2xQCF_y"
command =~D,DF,D,DF,F,y
time = 20

  [Command]
name = "2xQCF_y"
command =~D,DF,D,DF,F,~y
time = 20

  [Command]
name = "2xQCF_y"
command =~D,DF,D,DF,F,y
time = 20

  [Command]
name = "2xQCF_y"
command =~DF,F,DF,F,~y
time = 20

  [Command]
name = "2xQCF_a"
command =~DF,F,DF,F,a
time = 20

[command]
name = "2xQCB_a"
command = ~D,DB,B,D,DB,B,a
time = 20

[command]
name = "2xQCB_x"
command = ~D,DB,B,D,DB,B,x
time = 20

[command]
name = "2xQCB_y"
command = ~D,DB,B,D,DB,B,y
time = 20


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

  [Command]
name = "DD_x"
command =~D,D,~x
time = 30

;-----------------------
;-|Foward,Back,Foward|
;-----------------------

  [Command]
name = "FBF_x"
command =~F,B,F,x
time = 20

  [Command]
name = "FBF_x"
command =~F,B,F,~x
time = 20




;-------------------------
;--|Charged Commands|
;-------------------------

[Command]
name = "DU_x"
command = ~30$D, U, x
time = 15

[Command]
name = "DU_y"
command = ~30$D, U, y
time = 15

[Command]
name = "DU_a"
command = ~30$D, U, z
time = 15

[Command]
name = "DU_x"
command = ~30$D, U,~x
time = 15

[Command]
name = "DU_y"
command = ~30$D, U,~y
time = 15

[Command]
name = "DU_a"
command = ~30$D, U,~a
time = 15

[Command]
name = "BF_x"
command = ~45$B, F, x
time = 30

[Command]
name = "BF_x"
command = ~45$B, F, ~x
time = 30

[Command]
name = "BF_y"
command = ~45$B, F, y
time = 30

[Command]
name = "BF_y"
command = ~45$B, F, ~y
time = 30


[Command]
name = "BF_z"
command = ~45$B, F, z
time = 30

[Command]
name = "BF_z"
command = ~45$B, F, ~z
time = 30

;----------------------------------
;-|Quarter Circle Commands|
;-----------------------------------

  [Command]
name = "QCF_x"
command =~D,DF,F,x
time = 20

  [Command]
name = "QCF_x"
command =~D,DF,F,~x
time = 20

  [Command]
name = "QCF_x"
command =~DF,F,x
time = 20

  [Command]
name = "QCF_x"
command =~DF,F,~x
time = 20

  [Command]
name = "QCF_y"
command =~D,DF,F,y
time = 20

  [Command]
name = "QCF_y"
command =~D,DF,F,~y
time = 20

  [Command]
name = "QCF_y"
command =~DF,F,y
time = 20

  [Command]
name = "QCF_y"
command =~DF,F,~y
time = 20


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

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

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

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


  [Command]
name = "QCF_a"
command =~D,DF,F,a
time = 20

  [Command]
name = "QCF_a"
command =~D,DF,F,~a
time = 20

  [Command]
name = "QCF_a"
command =~DF,F,a
time = 20

  [Command]
name = "QCF_a"
command =~DF,F,~a
time = 20

  [Command]
name = "QCF_b"
command =~D,DF,F,b
time = 20

  [Command]
name = "QCF_b"
command =~D,DF,F,~b
time = 20

  [Command]
name = "QCF_b"
command =~DF,F,b
time = 20

  [Command]
name = "QCF_b"
command =~DF,F,~b
time = 20

  [Command]
name = "QCF_c"
command =~D,DF,F,c
time = 20

  [Command]
name = "QCF_c"
command =~D,DF,F,~c
time = 20

  [Command]
name = "QCF_c"
command =~DF,F,c
time = 20

  [Command]
name = "QCF_c"
command =~DF,F,~c
time = 20


  [Command]
name = "QCB_a"
command =~D,DB,B,a
time = 20

  [Command]
name = "QCB_a"
command =~DB,B,~a
time = 20

  [Command]
name = "QCB_b"
command =~D,DB,B,b
time = 20

  [Command]
name = "QCB_b"
command =~DB,B,~b
time = 20

  [Command]
name = "QCB_c"
command =~D,DB,B,c
time = 20

  [Command]
name = "QCB_c"
command =~DB,B,~c
time = 20

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

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

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

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

  [Command]
name = "QCB_z"
command =~D,DB,B,z
time = 20

  [Command]
name = "QCB_z"
command =~DB,B,~z
time = 20

  [Command]
name = "QCB_a"
command =~D,DB,B,~a
time = 20

  [Command]
name = "QCB_a"
command =~DB,B,~a
time = 20

  [Command]
name = "QCB_b"
command =~D,DB,B,~b
time = 20

  [Command]
name = "QCB_b"
command =~DB,B,~b
time = 20

  [Command]
name = "QCB_c"
command =~D,DB,B,~c
time = 20

  [Command]
name = "QCB_c"
command =~DB,B,~c
time = 20

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

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

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

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

  [Command]
name = "QCB_z"
command =~D,DB,B,~z
time = 20

  [Command]
name = "QCB_z"
command =~DB,B,~z
time = 20

  [Command]
name = "buster"
command =~a


;----------------------------------
;-|Dragon punch commands|
;-----------------------------------

 [Command]
name = "RDP_x"
command =~B,D,DB,x
time = 20

 [Command]
name = "RDP_y"
command =~B,D,DB,y
time = 20


 [Command]
name = "RDP_x"
command =~B,D,DB,~x
time = 20

 [Command]
name = "RDP_y"
command =~B,D,DB,~y
time = 20

 [Command]
name = "RDP_z"
command =~B,D,DB,z
time = 20


 [Command]
name = "RDP_z"
command =~B,D,DB,~z
time = 20


 [Command]
name = "DP_x"
command =~F,D,DF,x
time = 20

 [Command]
name = "DP_y"
command =~F,D,DF,y
time = 20

 [Command]
name = "DP_x"
command =~F,D,DF,~x
time = 20

 [Command]
name = "DP_y"
command =~F,D,DF,~y
time = 20


[Command]
name = "DP_z"
command =~F,D,DF,z
time = 20

[Command]
name = "DP_z"
command =~F,D,DF,~z
time = 20


 [Command]
name = "DP_a"
command =~F,D,DF,a
time = 20

 [Command]
name = "DP_b"
command =~F,D,DF,b
time = 20


 [Command]
name = "DP_a"
command =~F,D,DF,~a
time = 20

 [Command]
name = "DP_b"
command =~F,D,DF,~b
time = 20


;-------------------------------------
;--|Half Circle Commands| (foward
;-------------------------------------
 

  [Command]
name = "HCF_x"
command =~B,DB,D,DF,F,x
time = 30

  [Command]
name = "HCF_x"
command =~B,DB,D,DF,F,~x
time = 30

  [Command]
name = "HCF_x"
command =~B,D,F,x
time = 30

  [Command]
name = "HCF_x"
command =~B,D,F,~x
time = 30

  [Command]
name = "HCF_y"
command =~B,DB,D,DF,F,y
time = 30

  [Command]
name = "HCF_y"
command =~B,DB,D,DF,F,~y
time = 30

  [Command]
name = "HCF_y"
command =~B,D,F,y
time = 30

  [Command]
name = "HCF_y"
command =~B,D,F,~y
time = 30


 [Command]
name = "HCF_z"
command =~B,DB,D,DF,F,z
time = 30

  [Command]
name = "HCF_z"
command =~B,DB,D,DF,F,~z
time = 30

  [Command]
name = "HCF_z"
command =~B,D,F,z
time = 30

  [Command]
name = "HCF_z"
command =~B,D,F,~z
time = 30


  [Command]
name = "HCF_a"
command =~B,DB,D,DF,F,a
time = 30

  [Command]
name = "HCF_a"
command =~B,DB,D,DF,F,~a
time = 30
  [Command]
name = "HCF_a"
command =~B,D,F,a
time = 30

  [Command]
name = "HCF_a"
command =~B,D,F,~a
time = 30

 [Command]
name = "HCF_b"
command =~B,DB,D,DF,F,b
time = 30

  [Command]
name = "HCF_b"
command =~B,DB,D,DF,F,~b
time = 30
  [Command]
name = "HCF_b"
command =~B,D,F,b
time = 30

  [Command]
name = "HCF_b"
command =~B,D,F,~b
time = 30

[Command]
name = "HCF_c"
command =~B,DB,D,DF,F,c
time = 30

  [Command]
name = "HCF_c"
command =~B,DB,D,DF,F,~c
time = 30
  [Command]
name = "HCF_c"
command =~B,D,F,c
time = 30

  [Command]
name = "HCF_c"
command =~B,D,F,~c
time = 30

;-------------------------------------
;--|Half Circle Commands| (backward)
;-------------------------------------
 

  [Command]
name = "HCB_x"
command =~F,DF,D,DB,B,x
time = 30

  [Command]
name = "HCB_x"
command =~F,DF,D,DB,B,~x
time = 30

  [Command]
name = "HCB_x"
command =~F,D,B,x
time = 30

  [Command]
name = "HCB_x"
command =~F,D,B,~x
time = 30

  [Command]
name = "HCB_y"
command =~F,DF,D,DB,B,y
time = 30

  [Command]
name = "HCB_y"
command =~F,DF,D,DB,B,~y
time = 30

  [Command]
name = "HCB_y"
command =~F,D,B,y
time = 30

  [Command]
name = "HCB_y"
command =~F,D,B,~y
time = 30


 [Command]
name = "HCB_z"
command =~F,DF,D,DB,B,z
time = 30

  [Command]
name = "HCB_z"
command =~F,DF,D,DB,B,~z
time = 30

  [Command]
name = "HCB_z"
command =~F,D,B,z
time = 30

  [Command]
name = "HCB_z"
command =~F,D,B,~z
time = 30


  [Command]
name = "HCB_a"
command =~F,DF,D,DB,B,a
time = 30

  [Command]
name = "HCB_a"
command =~F,DF,D,DB,B,~a
time = 30
  [Command]
name = "HCB_a"
command =~F,D,B,a
time = 30

  [Command]
name = "HCB_a"
command =~F,D,B,~a
time = 30

 [Command]
name = "HCB_b"
command =~F,DF,D,DB,B,b
time = 30

  [Command]
name = "HCB_b"
command =~F,DF,D,DB,B,~b
time = 30
  [Command]
name = "HCB_b"
command =~F,D,B,b
time = 30

  [Command]
name = "HCB_b"
command =~F,D,B,~b
time = 30

[Command]
name = "HCB_c"
command =~F,DF,D,DB,B,c
time = 30

  [Command]
name = "HCB_c"
command =~F,DF,D,DB,B,~c
time = 30
  [Command]
name = "HCB_c"
command =~F,D,B,c
time = 30

  [Command]
name = "HCB_c"
command =~F,D,B,~c
time = 30

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

[Command]
name = "downfwd"
command = $DF
time = 1

[Command]
name = "down" ;Required (do not remove)
command = $D
time = 1

[Command]
name = "downback"
command = $DB
time = 1

[Command]
name = "back" ;Required (do not remove)
command = $B
time = 1

[Command]
name = "upback"
command = $UB
time = 1

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

[Command]
name = "upfwd"
command = $UF
time = 1
;-| Hold Button |--------------------------------------------------------------
[Command]
name = "holdx"
command = /x
time = 1

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

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

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

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

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

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

;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10

[Command]
name = "DD"
command = D, D
time = 10

[Command]
name = "UU"
command = U, U
time = 10

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

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

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

[Command]
name = "highjump"
command = ~$D, $U
time = 5

[Command]
name = "highjump"
command = ~$D, U
time = 5

[Command]
name = "hijump"
command = $D, ~U
time = 5

[Command]
name = "hijump"
command = ~10$D, U
time = 5

[Command]
name = "hijump"
command = ~10$D, $U
time = 5

[Command]
name = "hijump"
command = ~10$D, ~U
time = 5
;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

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

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

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

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

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

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

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

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1

[Command]
name = "holdup" ;Required (do not remove)
command = /$U
time = 1

[Command]
name = "holddown";Required (do not remove)
command = /$D
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]

;===========================================================================
;---------------------------------------------------------------------------





;===========================================================================
;This is not a move, but it sets up var(1) to be 1 if conditions are right
;for a combo into a special move (used below).
;Since a lot of special moves rely on the same conditions, this reduces
;redundant logic.
[State -1, Combo condition Reset]
type = VarSet
trigger1 = 1
var(1) = 0

[State -1, Combo condition Check]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
trigger3 = stateno = 1310 || stateno = 1330 ;From blocking
var(1) = 1

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


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


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


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


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


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


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


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


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


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


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


;---------------------------------------------------------------------------
;===========================================================================
;Supers
;===========================================================================

[State -1,Galickgun]
type =  ChangeState
value = 3003
triggerall = (command = "2xQCF_a") && (Power >= 1000)
trigger1 = (ctrl) && (statetype = A)
trigger2 = (stateno = [600,630]) && (movecontact)
trigger3 = (stateno = [400,420]) && (movecontact)
trigger4 = numhelper(70313)
trigger4 = (stateno = 1050) && (helper(70313), numtarget = 1)
trigger5 = (stateno = 1241) 
;---------------------------------------------------------------------------
[State -1,Galickgun]
type =  ChangeState
value = 3015
triggerall = (command = "2xQCB_y") && (Power >= 1000)
trigger1 = (ctrl) && (statetype != A)
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = (stateno = [400,420]) && (movecontact)
trigger4 = numhelper(70313)
trigger4 = (stateno = 1050) && (helper(70313), numtarget = 1)
;---------------------------------------------------------------------------

[State -1,Galickgun]
type =  ChangeState
value = 3010
triggerall = (command = "2xQCB_y") && (Power >= 1000)
trigger1 = (ctrl) && (statetype != A)
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = (stateno = [400,420]) && (movecontact)
trigger4 = numhelper(70313)
trigger4 = (stateno = 1050) && (helper(70313), numtarget = 1)
;---------------------------------------------------------------------------
[State -1,Putty Punch]
type = ChangeState
value = 3000
triggerall = (command = "2xQCF_x") && (Power >= 1000)
trigger1 = (ctrl) && (statetype != A)
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = (stateno = [400,420]) && (movecontact)
trigger4 = numhelper(70313)
trigger4 = (stateno = 1050) && (helper(70313), numtarget = 1)
;---------------------------------------------------------------------------

[State -1,Putty Punch]
type = ChangeState
value = 3100
triggerall = (command = "2xQCF_a") && (Power >= 1000)
trigger1 = (ctrl) && (statetype != A)
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = (stateno = [400,420]) && (movecontact)
trigger4 = numhelper(70313)
trigger4 = (stateno = 1050) && (helper(70313), numtarget = 1)
;---------------------------------------------------------------------------
;===========================================================================
;Ex
;===========================================================================


[State -1, Zanzoken Attack]
type = ChangeState
value = 2110
triggerall = (command = "QCF_b" ) ||(command = "QCB_b" ) && (power >= 500) && (var(3) < 3) 
trigger1 = (ctrl) && (Statetype = S || Statetype = A) || Anim = 47 && ctrl = 1 || (stateno = [100,101])
trigger2 = (stateno =  2112) && (AnimElemtime(2) >=5) && (movehit)
trigger3 = (stateno =  2113) && (AnimElemtime(3)>= 5) && (movehit)
trigger4 = (StateNo = [200,620]) && MoveContact || stateno = 1060 && Movecontact
trigger5 = numhelper(70313)
trigger5 = (stateno = 1050) && (helper(70313), numtarget = 1)
trigger6 = numhelper(1315)
trigger6 = (stateno = 1052) && (helper(1315), numtarget = 1)
trigger7 = numhelper(1330)
trigger7 = (stateno = 1055) && (helper(1330), numtarget = 1)
trigger8 = stateno = [100,105]
trigger9 = (stateno = [120,150]) 
trigger10 = stateno = [130,151] 

;---------------------------------------------------
[State -1, Zanzoken]
type = ChangeState
value = 2100
triggerall = (command = "b") && (power >= 250) && (var(3) < 2)
trigger1 = (ctrl) && (!Statetype = C)
trigger2 = (stateno =  2112) && (AnimElem = 2,> 5) && (movehit)
trigger3 = (stateno =  2113) && (AnimElem = 3,> 5) && (movehit)
trigger4 = numhelper(70313)
trigger4 = (stateno = 1050) && (helper(70313), numtarget = 1)
trigger5 = numhelper(1315)
trigger5 = (stateno = 1052) && (helper(1315), numtarget = 1)
trigger6 = numhelper(1330)
trigger6 = (stateno = 1055) && (helper(1330), numtarget = 1)
trigger7        = stateno = [100,105] 
trigger8 =  (Stateno = 630) && animelemtime(3) >= 5 && movecontact
;-------------------------------------------------------------------


[State -1, air dash]
type =NULL; ChangeState
value = 54
triggerall = AILevel =0
trigger1 = command = "holdup"
trigger1 = stateno=300 && movehit

[State -1, Meteor Attack 2]
type = null; ChangeState
value = 304
triggerall = (command = "c") && (power >= 250) 
trigger1 = (stateno = 303) && (Movehit) && numtarget
;---------------------------------------------------------------------------
[State -1, Meteor Attack 2]
type = null; ChangeState
value = 302
triggerall = (command = "c") && (power >= 250) 
trigger1 = (stateno = 301) && (Movehit) && numtarget
;---------------------------------------------------------------------------
[State -1, Meteor Attack 1]
type = null; ChangeState
value = 300
triggerall = (command = "QCF_b") && (power >= 250) 
trigger1 = (stateno = 430) && (Movecontact) && statetype !=A

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

[State -1, speed rush]
type = ChangeState
value = 60
triggerall = AILevel =0
triggerall =  (var(18) < 3) && command = "c"
;triggerall = roundstate=2
trigger1= ctrl 
trigger2=(movecontact && stateno!=[1200,1500])
trigger3= stateno=60 && anim=60 && time >15 
trigger4= stateno=40|| anim=100 
trigger5 = numhelper(70313)
trigger5 = (stateno = 1050) && (helper(70313), numtarget = 1)
;trigger5 = animelemtime(3)>3 && stateno=[1000,1010]
;trigger6= animelemtime(6)>3 && stateno=3000
;------------------------------------------------------

[State -1,Sayajin Buster]
type =  ChangeState
value = 1250
triggerall = (command ="QCB_z") 
trigger1 = (ctrl) && (statetype != A)
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = numhelper(70313)
trigger3 = (stateno = 1050) && (helper(70313), numtarget = 1)
trigger4 = (stateno = [400,420]) && (movecontact)
trigger5 = stateno = [100,105]
trigger6 = stateno = 1060 && (Movecontact)
trigger7 = stateno = 1220 && numhelper(1221) = 1
trigger7 = helper(1221), movecontact
;-------------------------------------------------------------------------
;sonic meteor
[state -1]
type =  changestate
value = 1240
triggerall = command = "QCF_z"
trigger1 = statetype = A && (ctrl)
trigger2 = (stateno = [600,630]) && (movecontact)
trigger3        = (stateno = 60) && Time > 2

;------------------------------------------------------------------
[State -1,Tassle Toss]
type =  ChangeState
value = 1234
triggerall = (command ="QCF_x") 
trigger1 = stateno = 1230 && movehit
trigger1 = animelemtime(6) < 0 && animelemtime(4) > 0
;-------------------------------------------------------------------------
[State -1,Tassle Toss]
type =  ChangeState
value = 1233
triggerall = (command ="QCB_x") 
trigger1 = stateno = 1230 && movehit
trigger1 = animelemtime(6) < 0 && animelemtime(4) > 0
;-------------------------------------------------------------------------
[State -1,Tassle Whip]
type =  ChangeState
value = 1230
triggerall = (command ="HCF_x") 
trigger1 = (ctrl) && (statetype != A)
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = numhelper(70313)
trigger3 = (stateno = 1050) && (helper(70313), numtarget = 1)
trigger4 = (stateno = [400,420]) && (movecontact)
trigger5 = stateno = [100,105]
trigger6 = stateno = 1060 && (Movecontact)
trigger7 = stateno = 1220 && numhelper(1221) = 1
trigger7 = helper(1221), movecontact

;-------------------------------------------------------------------------
[State -1,Leg Shot (Short)]
type =  ChangeState
value = 1220
triggerall = (command ="QCB_y") 
trigger1 = (ctrl) && (statetype != A)
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = numhelper(70313)
trigger3 = (stateno = 1050) && (helper(70313), numtarget = 1)
trigger4 = (stateno = [400,420]) && (movecontact)
trigger5 = stateno = [100,105]
trigger6 = stateno = 1060 && (Movecontact)

;--------------------------------------------------------------------------
[State -1,Leg Shot (Long)]
type =  ChangeState
value = 1225
triggerall = (command ="QCF_y") 
trigger1 = (ctrl) && (statetype != A)
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = numhelper(70313)
trigger3 = (stateno = 1050) && (helper(70313), numtarget = 1)
trigger4 = (stateno = [400,420]) && (movecontact)
trigger5 = stateno = [100,105]
trigger6 = stateno = 1060 && (Movecontact)

trigger7 = stateno = 1220 && numhelper(1221) = 1
trigger7 = helper(1221), movecontact
;--------------------------------------------------------------------------
[State -1,Sayajin Beatdown]
type = ChangeState
value = 1215
triggerall = (command ="QCB_x") 
trigger1 = (ctrl) && (statetype = A)
trigger2 = (stateno = [600,630]) && (movecontact)
trigger3 = stateno = 1210 && (Movecontact) && animelemtime(5)>=5
trigger4 = (stateno = 1241) 
 
;-------------------------------------------------------------------------
[State -1,buu booster]
type = ChangeState
value = 1210
triggerall =  (command = "QCB_x") 
trigger1 = (ctrl) && (statetype != A)
trigger2 = (stateno = [200,210]) && (movecontact)
trigger3 = numhelper(70313)
trigger3 = (stateno = 1050) && (helper(70313), numtarget = 1)
trigger4 = (stateno = [400,420]) && (movecontact)
trigger5 = stateno = [100,105]
trigger6 = stateno = 1060 && (Movecontact)
trigger7 = stateno = 1220 && numhelper(1221) = 1
trigger7 = helper(1221), movecontact

;-------------------------------------------------------------------------
[State -1,Uber Buu Punch]
type =  ChangeState
value = 1200
triggerall = (command ="QCF_x") 
trigger1 = (ctrl) && (statetype != A)
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = numhelper(70313)
trigger3 = (stateno = 1050) && (helper(70313), numtarget = 1)
trigger4 = (stateno = [400,420]) && (movecontact)
trigger5 = stateno = [100,105]
trigger6 = stateno = 1060 && (Movecontact)
trigger7 = stateno = 1220 && numhelper(1221) = 1
trigger7 = helper(1221), movecontact

;--------------------------------------------------------------------------
[State -1,Zanzoken attack counter]
type = ChangeState
value = 2110
triggerall = command="x"&& command="y"|| command="z"
triggerall = AILevel=0
triggerall =var(0)>=var(1)*100
trigger1 = ((stateno=[150,155])&&statetype!=A)

;----------------------------------------------------------
;Throw Attempt
[State -1:      Throw Attempt]
type            = null; ChangeState
value      = 825
triggerall      = ((command = "z") && (Command = "holdback" || Command = "holdfwd")) &&(command != "holddown")  && (P2BodyDist X < 15)
trigger1        = (statetype = S) && (ctrl)
trigger1        = (stateno != 100) && (p2movetype != H)
trigger1        = (p2statetype != A)
;-------------------------------------------------------------------------
[State -1, Buu Bomb]
type = ChangeState
value = 1080
triggerall = (command ="QCF_a") && (power >= 50)
trigger1 = (ctrl) && (statetype != A) || Anim = 47 && ctrl = 1 || (stateno = [100,101])
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = numhelper(70313)
trigger3 = (stateno = 1050) && (helper(70313), numtarget = 1)
trigger4 = (stateno = [400,420]) && (movecontact)
;---------------------------------------------------------------------------
[State -1, Evil Orb]
type = ChangeState
value = 1090
triggerall = (command != "holddown") && (command = "a") &&  (power >= 50)
trigger1 = (ctrl) && (statetype != A) || Anim = 47 && ctrl = 1 || (stateno = [100,101])
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = numhelper(70313)
trigger3 = (stateno = 1050) && (helper(70313), numtarget = 1)
trigger4 = (stateno = [400,420]) && (movecontact)
;---------------------------------------------------------------------------

[State -1, Ki blast weak]
type = ChangeState
value = 1050
triggerall = (command = "QCF_z") && (var(13) < 3)
trigger1 = (ctrl) && (statetype != A) || Anim = 47 && ctrl = 1 || (stateno = [100,101])
trigger2 = (stateno = [200,205]) && (movecontact)
trigger3 = (stateno = [400,420]) && (movecontact)
;---------------------------------------------------------------------------

[State -1, buu buster lvl 1]
type = null; ChangeState
value = 1055
triggerall = (command = "buster") && Var(45)>= 15 
triggerall = stateno != [170,199] 
trigger1 = stateno != [320,5210]
trigger1 =  stateno != 250
trigger2   =  ctrl 

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

[State -1, Powerup]
type = ChangeState
value = 2000
triggerall = (command = "x") && (command = "y")
trigger1 = (ctrl) && (statetype != A)
;---------------------------------------------------------------------------
; Throw Attempt
[State -1:      Throw Attempt]
type            = null; ChangeState
value      = 800
triggerall      = ((command = "y") && (Command = "holdback" || Command = "holdfwd")) &&(command != "holddown")  && (P2BodyDist X < 15)
trigger1        = (statetype = S) && (ctrl)
trigger1        = (stateno != 100) && (p2movetype != H)
trigger1        = (p2statetype != A)

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

;===========================================================================
;-|Specials|-----------------
;=========================================================================

[State -1, air dash back]
type = ChangeState
value = 59
triggerall = AILevel =0
triggerall= var(8)=0
triggerall = pos y <-35
trigger1 = command = "BB"
trigger1 = statetype = A
trigger1 = ctrl

;-------------------------------------------------------------------------
;Dash Fwd
[State -1, air dash Fwd]
type = ChangeState
value = 55
triggerall = AILevel =0
triggerall= var(8)=0
triggerall = pos y <-35
trigger1 = command = "FF"
trigger1 = statetype = A
trigger1 = ctrl


;-------------------------------------------------------------------------
;Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Run Back
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Kung Fu Throw
;[State -1, Kung Fu Throw]
;type = ChangeState
;value = 800
;triggerall = command = "y"
;triggerall = statetype = S
;triggerall = ctrl
;triggerall = stateno != 100
;trigger1 = command = "holdfwd"
;trigger1 = p2bodydist X < 3
;trigger1 = (p2statetype = S) || (p2statetype = C)
;trigger1 = p2movetype != H
;trigger2 = command = "holdback"
;trigger2 = p2bodydist X < 5
;trigger2 = (p2statetype = S) || (p2statetype = C)
;trigger2 = p2movetype != H

;===========================================================================
;---------------------------------------------------------------------------
;Stand Left Jab
[State -1, Stand Left Jab]
type            = ChangeState
value      = 200
triggerall      = (command = "x") 
triggerall      = command != "holddown"
triggerall      = (statetype != A)
trigger1        = (ctrl) 
trigger2        = (stateno = 60) && Time > 4 
;---------------------------------------------------------------------------
;Stand Left Jab
[State -1, Stand Right Jab]
type            = ChangeState
value      = 201
triggerall      = (command = "x") && command != "holddown" 
trigger1        = (statetype != A) && (ctrl) 
trigger2		= (StateNo = 200)  && Movecontact
;---------------------------------------------------------------------------
;Stand Left Jab
[State -1, Stand Right Jab]
type            = ChangeState
value      = 202
triggerall      = (command = "x") && command != "holddown" 
trigger1        = (statetype != A) && (ctrl) 
trigger2		= (StateNo = 201)  && Movecontact
trigger3		= (StateNo = 204)  && Movecontact
;---------------------------------------------------------------------------
;Stand Left Jab
[State -1, Stand Right Jab]
type            = ChangeState
value      = 203
triggerall      = (command = "x") && command != "holddown" 
trigger1        = (statetype != A) && (ctrl) 
trigger2		= (StateNo = 202)  && Movecontact
trigger3		= (StateNo = 205)  && Movecontact
;---------------------------------------------------------------------------

;Stand Low Roundhouse
[State -1, Stand,Low roundhouse]
type            = ChangeState
value      = 204
triggerall      = (command = "y") && command != "holddown" 
trigger1        = (statetype != A) && (ctrl) 
trigger2	      = (StateNo = [200,201])  && Movecontact
;---------------------------------------------------------------------------
;Stand Low Roundhouse
[State -1, Stand,Low roundhouse]
type            = ChangeState
value      = 205
triggerall      = (command = "y") && command != "holddown" 
trigger1        = (statetype != A) && (ctrl) 
trigger2	      = (StateNo = 204)  && Movecontact
trigger3	      = (StateNo = 202)  && Movecontact

;---------------------------------------------------------------------------
;Stand Leaping roundhouse
[State -1, Stand Left Jab]
type            = ChangeState
value      = 215
triggerall      = (command = "y") 
triggerall      = command != "holddown"
triggerall      = (statetype != A)
trigger1        = (ctrl) 
trigger2	      = (StateNo = 205)  && Movecontact
;---------------------------------------------------------------------------


;Stand Hard Attack
[State -1, Standing Hard attack]
type            = ChangeState
value      = 220
triggerall      = (command = "z") && command != "holddown" 
trigger1        = (statetype = S) && (ctrl) || Anim = 47 && ctrl = 1 || (stateno = [100,101])
trigger2        = (StateNo = [200,210])  && Movecontact
Trigger3        = (StateNo = [400,410])  && Movecontact


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


;Standing Strong Knee
;[State -1, Standing Strong Knee]
;type = ChangeState
;value = 209
;triggerall      = (command = "a") && command != "holddown" && (p2bodydist X < 10)
;trigger1        = (statetype = S) && (ctrl) || Anim = 47 && ctrl = 1 || (stateno = [100,101])
;trigger2		= (StateNo = [200,201]) && MoveContact && animelemtime(3) >=0
;Trigger3        = (StateNo = 400) && animelemtime(2)>=4 && MoveContact

;---------------------------------------------------------------------------
;Stand Thrust Kick
[State -1, Stand Thrust Kick]
type =null; ChangeState
value = 210
triggerall      = (command = "z") && command != "holddown" 
trigger1        = (statetype = S) && (ctrl) || Anim = 47 && ctrl = 1 || (stateno = [100,101])
trigger2		= (StateNo = [200,201])  && Movecontact
Trigger3        = (StateNo = 202)  && Movecontact
trigger4		= (StateNo = 203)  && Movecontact
Trigger5        = (StateNo = 400)  && Movecontact

;---------------------------------------------------------------------------
;Stand Medium Slash
[State -1, Stand Medium Slash]
type = null; ChangeState
value = 220
triggerall      = (command = "y") && command != "holddown"  && command = "holdback"
trigger1        = (statetype = S) && (ctrl) || Anim = 47 && ctrl = 1 || (stateno = [100,101])
trigger2		= (StateNo = 200)  && Movecontact
trigger3		= (StateNo = 202)  && Movecontact
trigger4		= (StateNo = 203)  && Movecontact
Trigger5        = (StateNo = 400)  && Movecontact

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




;Stand Hard Slash
;[State -1, Stand Hard Slash]
;type = ChangeState
;value = 235
;triggerall = command = "a"
;triggerall = command != "holddown"
;trigger1        = (statetype = S) && (ctrl) || Anim = 47 && ctrl = 1 || (stateno = [100,101])
;trigger2		= (StateNo = 230) && animelemtime(4) >=2 && MoveContact
;Trigger3        = (StateNo = 400) && animelemtime(2) >=2 && MoveContact
;Trigger4        = (StateNo = 410) && animelemtime(2) >=1 && MoveContact

;---------------------------------------------------------------------------
;Crouching Light Attack
[State -1:      ]
type            = ChangeState
value      = 400
triggerall = (command = "holddown") && (command = "x")
trigger1 = (ctrl) && (statetype = C) || Anim = 47 && ctrl = 1 || (stateno = [100,101])
trigger2	      = (StateNo = 200)  && Movecontact

;---------------------------------------------------------------------------
;Crouching Medium Slash
[State -1, Crouching Med Attack]
type = ChangeState
value = 405
triggerall      = (command = "y")  
triggerall      = command = "holddown"
trigger1        = (statetype = C) && (ctrl) || Anim = 47 && ctrl = 1 || (stateno = [100,101])
trigger2		= (StateNo = [200,203]) && Movecontact
Trigger3        = (StateNo = [400,401]) && Movecontact
;---------------------------------------------------------------------------
;Crouching Medium Slash
[State -1, Crouching Med Attack]
type = ChangeState
value = 410
triggerall      = (command = "y")  
triggerall      = command = "holddown"
trigger1        = (statetype = C) && (ctrl) 
trigger2		= (StateNo = [200,203]) && Movecontact
Trigger3        = StateNo = 405 && Movecontact
;---------------------------------------------------------------------------
;Overhead
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall      = (command = "z")  && command = "holddown"
trigger1        = (statetype = C) && (ctrl)|| Anim = 47 && ctrl = 1 || (stateno = [100,101])
;trigger2		= (StateNo = [200,202]) && Movecontact
;trigger3		= (StateNo = 210)  && Movecontact
;Trigger4        = (StateNo = 400)  && Movecontact
;Trigger5        = (StateNo = 410)  && Movecontact
;Trigger6        = (StateNo = 203)  && Movecontact
;Trigger7        = (StateNo = 1060)  && Movecontact

;---------------------------------------------------------------------------
;Jump Light Punch
[State -1, Jump Light Attack]
type = ChangeState
value = 600
triggerall      = (command = "x")
trigger1        = (statetype = A) && (ctrl)
trigger2        = (stateno = 60) && Time > 4  
Trigger3        = (StateNo = 110) && animelemtime(3) >=0
;---------------------------------------------------------------------------
;Jump Medium Attack
[State -1, Jump Med Attack]
type = ChangeState
value = 610
triggerall      = (command = "y")
trigger1        = (statetype = A) && (ctrl)
trigger2        = (stateno = 60) && Time > 4 
trigger3		= (StateNo = 600)&& Movecontact
Trigger4        = (StateNo = 110) && animelemtime(3) >=0
;---------------------------------------------------------------------------
;Jump Strong Slash
[State -1, Jump Strong Slash]
type = ChangeState
value = 630
triggerall      = (command = "z")
trigger1        = (statetype = A) && (ctrl)
trigger2        = (stateno = 60) && Time > 4 
trigger3		= (StateNo = 600) && animelemtime(2)>=0 && MoveContact
trigger4		= (StateNo = 610) && (Movecontact)
Trigger5        = (StateNo = 110) && animelemtime(3) >=0
;---------------------------------------------------------------------------
[State -1, Taunt]
type = ChangeState
value = 198
triggerall = (command = "start") 
trigger1 = (ctrl) && (statetype != A)
