; 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 -- defaults to 15 if omitted)
;
; - 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.
;   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
;   You can combine them:
;     eg. command = ~30$D, a+b     ;hold D, DB or DF for 30 ticks, release,
;                                  ;then press a and b together
;   It's recommended that for most "motion" commads, eg. quarter-circle-fwd,
;   you start off with a "release direction". This matches the way most
;   popular fighting games implement their command detection.
;
; - time (optional)
;   Time allowed to do the command, given in game-ticks. Defaults to 15
;   if omitted
;
; 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 = 30

; Default value for the "buffer.time" parameter of a Command. Minimum 1,
; maximum 30.
command.buffer.time = 1

;-| Super Motions |--------------------------------------------------------

[Command]
name = "Dragon hail flower - x"    ;Required (do not remove)
command = D,DB,B,x
time = 32

[Command]
name = "Dragon hail flower - y"    ;Required (do not remove)
command = D,DB,B,y
time = 32

[Command]
name = "Dragon hail flower"     ;Required (do not remove)
command = D,DB,B,z
time = 32

[Command]
name = "Bankai"     ;Required (do not remove)
command = D,B,F,x
time = 32

[Command]
name = "Bankai"     ;Required (do not remove)
command = D,B,F,y
time = 32

[Command]
name = "Bankai"     ;Required (do not remove)
command = D,B,F,z
time = 32

[Command]
name = "Bankai - Long Hyourinmaru"    ;Required (do not remove)
command = D,DF,F,x
time = 32

[Command]
name = "Bankai - Long Hyourinmaru"    ;Required (do not remove)
command = D,DF,F,y
time = 32

[Command]
name = "Bankai - Long Hyourinmaru"    ;Required (do not remove)
command = D,DF,F,z
time = 32

[Command]
name = "Hyper_Hyourinmaru_Start"     ;Required (do not remove)
command = D,DF,F,D,DF,F,x
time = 32

[Command]
name = "Hyper_Hyourinmaru_Start"     ;Required (do not remove)
command = D,DF,F,D,DF,F,y
time = 32

[Command]
name = "Hyper_Hyourinmaru_Start"     ;Required (do not remove)
command = D,DF,F,D,DF,F,z
time = 32

[Command]
name = "Heavens Ice Crystals"     ;Required (do not remove)
command = D,DB,B,D,DB,B,x
time = 32

[Command]
name = "Heavens Ice Crystals"     ;Required (do not remove)
command = D,DB,B,D,DB,B,y
time = 32

[Command]
name = "Heavens Ice Crystals"     ;Required (do not remove)
command = D,DB,B,D,DB,B,z
time = 32

[Command]
name = "AIR_Hyourinmaru_Dragon_Start"     ;Required (do not remove)
command = ~D,DF,F,x
time = 32

[Command]
name = "AIR_Hyourinmaru_Dragon_Start"     ;Required (do not remove)
command = ~D,DF,F,y
time = 32

[Command]
name = "AIR_Hyourinmaru_Dragon_Start"     ;Required (do not remove)
command = ~D,DF,F,z
time = 32

[Command]
name = "Sky_High_Ice"     ;Required (do not remove)
command = ~F,D,DF,F,x
time = 30

[Command]
name = "Sky_High_Ice"     ;Required (do not remove)
command = ~F,D,DF,F,y
time = 30

[Command]
name = "Sky_High_Ice"     ;Required (do not remove)
command = ~F,D,DF,F,z
time = 30

[Command]
name = "Hyorenmaru_SLASH"     ;Required (do not remove)
command = ~B,D,DB,B,x
time = 32

[Command]
name = "Hyorenmaru_SLASH"     ;Required (do not remove)
command = ~B,D,DB,B,y
time = 32

[Command]
name = "Hyorenmaru_SLASH"     ;Required (do not remove)
command = ~B,D,DB,B,z
time = 32

[Command]
name = "Hyorenmaru_TOWER"     ;Required (do not remove)
command = ~D,DB,B,x
time = 32

[Command]
name = "Hyorenmaru_TOWER"     ;Required (do not remove)
command = ~D,DB,B,y
time = 32

[Command]
name = "Hyorenmaru_TOWER"     ;Required (do not remove)
command = ~D,DB,B,z
time = 32

[Command]
name = "Standing_Hyorenmaru_Small_DOWN"     ;Required (do not remove)
command = ~D,DF,F,x
time = 32

[Command]
name = "Standing_Hyorenmaru_Small_FORWORD"     ;Required (do not remove)
command = ~D,DF,F,y
time = 32

[Command]
name = "Standing_Hyorenmaru_Small_UP"     ;Required (do not remove)
command = ~D,DF,F,z
time = 32

[Command]
name = "Soul Heat"     ;Required (do not remove)
command = ~D,F,B,x
time = 32

[Command]
name = "Soul Heat"      ;Required (do not remove)
command = ~D,F,B,y
time = 32

[Command]
name = "Soul Heat"      ;Required (do not remove)
command = ~D,F,B,z
time = 32


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

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

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

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

[Command]
name = "recovery"
command = y+z
time = 1

[Command]
name = "recovery"
command = x+z
time = 1

[Command]
name = "recovery"
command = a+b
time = 1

[Command]
name = "recovery"
command = b+c
time = 1

[Command]
name = "recovery"
command = a+c
time = 1

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "back_x"
command = /$B,x
time = 1

[Command]
name = "back_y"
command = /$B,y
time = 1

[Command]
name = "back_z"
command = /$B,z
time = 1

[Command]
name = "down_x"
command = /$D,x
time = 1

[Command]
name = "down_y"
command = /$D,y
time = 1

[Command]
name = "down_z"
command = /$D,z
time = 1

[Command]
name = "fwd_x"
command = /$F,x
time = 1

[Command]
name = "fwd_y"
command = /$F,y
time = 1

[Command]
name = "fwd_z"
command = /$F,z
time = 1

[Command]
name = "up_x"
command = /$U,x
time = 1

[Command]
name = "up_y"
command = /$U,y
time = 1

[Command]
name = "up_z"
command = /$U,z
time = 1

[Command]
name = "back_a"
command = /$B,a
time = 1

[Command]
name = "back_b"
command = /$B,b
time = 1

[Command]
name = "back_c"
command = /$B,c
time = 1

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

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

[Command]
name = "down_c"
command = /$D,c
time = 1

[Command]
name = "fwd_a"
command = /$F,a
time = 1

[Command]
name = "fwd_b"
command = /$F,b
time = 1

[Command]
name = "fwd_c"
command = /$F,c
time = 1

[Command]
name = "up_a"
command = /$U,a
time = 1

[Command]
name = "up_b"
command = /$U,b
time = 1

[Command]
name = "up_c"
command = /$U,c
time = 1

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

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

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

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

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

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

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

;-| 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 = "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_s"
command = /s
time = 1

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

[Command]
name = "holddownfwd"
command = /$DF
time = 1

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

[Command]
name = "holddownback"
command = /$DB
time = 1

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

[Command]
name = "holdupback"
command = /$UB
time = 1

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

[Command]
name = "holdupfwd"
command = /$UF
time = 1

;---|AI Commands|-----------------------------------------------------------
[Command]
name = "AI1"
command = D,D,D,B,F,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI2"
command = D,D,D,B,F,U,a+b+c+x+y+z
time = 1

[Command]
name = "AI3"
command = D,D,D,B,F,UF,a+b+c+x+y+z
time = 1

[Command]
name = "AI4"
command = D,D,D,B,F,D,a+b+c+x+y+z
time = 1

[Command]
name = "AI5"
command = D,D,D,B,F,DF,a+b+c+x+y+z
time = 1

[Command]
name = "AI6"
command = D,D,D,B,F,B,a+b+c+x+y+z
time = 1

[Command]
name = "AI7"
command = D,D,D,B,F,DB,a+b+c+x+y+z
time = 1

[Command]
name = "AI8"
command = D,D,D,F,F,UB,a+b+c+x+y+z
time = 1

[Command]
name = "AI9"
command = D,D,D,F,U,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI10"
command = D,D,D,F,UF,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI11"
command = D,D,D,F,DF,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI12"
command = D,D,D,F,D,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI13"
command = D,D,D,F,DB,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI14"
command = D,D,D,F,B,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI15"
command = D,D,D,F,UB,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI16"
command = D,D,D,F,F,F,a+b+c+x+y,z
time = 1

[Command]
name = "AI17"
command = D,D,D,F,F,F,a+b+c+x,y,z
time = 1

[Command]
name = "AI18"
command = D,D,D,F,F,F,a+b+c,x,y,z
time = 1

[Command]
name = "AI19"
command = D,D,D,F,F,F,a+b,c,x,y,z
time = 1

[Command]
name = "AI20"
command = D,D,D,F,F,F,a,b,c,x,y,z
time = 1

[Command]
name = "AI21"
command = D,D,D,F,F,F,a+b+c,x+y+z
time = 1

[Command]
name = "AI22"
command = D,D,D,F,F,U,a+b,c+x+y+z
time = 1

[Command]
name = "AI23"
command = D,D,D,F,F,UF,a,b+c+x+y+z
time = 1

[Command]
name = "AI24"
command = D,D,D,F,F,U,a+b,c+x+y+z
time = 1

[Command]
name = "AI25"
command = D,D,D,F,F,DF,a,b,c+x+y+z
time = 1

[Command]
name = "AI26"
command = D,D,D,F,F,B,a+b,c+x,y+z
time = 1

[Command]
name = "AI27"
command = D,D,D,F,F,DB,a,b+c+x,y+z
time = 1

[Command]
name = "AI28"
command = D,D,D,F,F,UB,a,b+c+x+y,z
time = 1

[Command]
name = "AI29"
command = DF,D,D,F,U,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI30"
command = B,D,D,F,UF,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI31"
command = B,B,BD,F,DF,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI32"
command = D,F,F,F,D,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI33"
command = DF,D,DF,UF,DB,F,a+b+c+x+y+z
time = 1

[Command]
name = "AI34"
command = D,D,D,F,DB,DF,a+b+c+x+y+z
time = 1

[Command]
name = "AI35"
command = D,D,UF,DF,UB,UF,a+b+c+x+y+z
time = 1

[Command]
name = "AI36"
command = D,DF,DF,DF,DF,F,a+b+c+x+y,z
time = 1

[Command]
name = "AI37"
command = D,D,DB,UF,DF,UF,a+b+c+x,y,z
time = 1

[Command]
name = "AI38"
command = F,U,F,F,F,F,a,b+c,x,y,z
time = 1

[Command]
name = "AI39"
command = DF,UF,D,DF,U,F,a+b,c+x,y,z
time = 1

[Command]
name = "AI40"
command = D,D,D,D,F,D,a+b,c,x,y+z
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]

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

;----|AI|-------------------------------------------------------------------
[State -1, Activate AI]
type = VarSet
triggerall = var(20) != 1
trigger1 = command = "AI1"
trigger2 = command = "AI2"
trigger3 = command = "AI3"
trigger4 = command = "AI4"
trigger5 = command = "AI5"
trigger6 = command = "AI6"
trigger7 = command = "AI7"
trigger8 = command = "AI8"
trigger9 = command = "AI9"
trigger10 = command = "AI10"
trigger11 = command = "AI11"
trigger12 = command = "AI12"
trigger13 = command = "AI13"
trigger14 = command = "AI14"
trigger15 = command = "AI15"
trigger16 = command = "AI16"
trigger17 = command = "AI17"
trigger18 = command = "AI18"
trigger19 = command = "AI19"
trigger20 = command = "AI20"
trigger21 = command = "AI21"
trigger22 = command = "AI22"
trigger23 = command = "AI23"
trigger24 = command = "AI24"
trigger25 = command = "AI25"
trigger26 = command = "AI26"
trigger27 = command = "AI27"
trigger28 = command = "AI28"
trigger29 = command = "AI29"
trigger30 = command = "AI30"
trigger31 = command = "AI31"
trigger32 = command = "AI32"
trigger33 = command = "AI33"
trigger34 = command = "AI34"
trigger35 = command = "AI35"
trigger36 = command = "AI36"
trigger37 = command = "AI37"
trigger38 = command = "AI38"
trigger39 = command = "AI39"
trigger40 = command = "AI40"
var(20) = 1
;----------------------------------------------------------------------------
[State -1, Kill AI]
type = VarSet
triggerall = var(20) = 1
trigger1 = p2life < 0
trigger2 = life < 0
value = 0

;---------------------------------------------------------------------------
[State -1, AI Jump]
type = changestate
value = 40
trigger1= var(20)
trigger1= roundstate=2 && statetype!=A && ctrl
trigger1= enemynear,movetype=A && p2bodydist x<120 && enemynear,hitdefattr=SC,AT

;---------------------------------------------------------------------------
; Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = IfElse(statetype = A,45,100)
triggerall = prevstateno != 100
triggerall = var(20)
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall = prevstateno != 45
trigger1 = command = "FF"
trigger1 = statetype != C
trigger1 = ctrl
;---------------------------------------------------------------------------
; Run Back
[State -1, Run Back]
type = ChangeState
value = IfElse(statetype = A,46,105)
triggerall = prevstateno != 105
triggerall = var(20)
triggerall = VAR(0) != 75
triggerall = VAR(0) != 95
triggerall = prevstateno != 46
trigger1 = command = "BB"
trigger1 = statetype != C
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1,AI Standing Guard]
type = ChangeState
triggerall = var(20)
triggerall = Statetype != A
triggerall = P2statetype != C
triggerall = Statetype = S
triggerall = P2Movetype = A
triggerall = Pos Y != [-1,-999]
triggerall = ctrl = 1
trigger1 = random <= 500
value = 130

; =============================
; AI Stand to Crouch Guard Transition
; =============================
[State -1,AI Stand to Crouch Guard Transition]
type = ChangeState
triggerall = var(20)
triggerall = StateType != A
triggerall = P2statetype = C
triggerall = P2Movetype = A
triggerall = Pos Y != [-1,-999]
trigger1 = stateno = 150
trigger1 = 1
value = 152

; =============================
; AI Crouching Guard
; =============================
[State -1, AI Crouching Guard]
type = ChangeState
triggerall = var(20)
triggerall = StateType != A
triggerall = P2statetype = C
triggerall = P2Movetype = A
triggerall = Pos Y != [-1,-999]
triggerall = ctrl = 1
trigger1 = random <= 500
value = 131

; =============================
; AI Crouch to Stand Guard Transition
; =============================
[State -1,AI Crouch to Stand Guard Transition]
type = ChangeState
triggerall = var(20)
triggerall = Statetype != A
triggerall = P2statetype != C
triggerall = P2Movetype = A
trigger1 = 1
trigger1 = stateno = 152
value = 150
; =============================
; AI Aerial Guard
; =============================
[State -1,AI Aerial Guard]
type = ChangeState
triggerall = var(20)
triggerall = Statetype = A
triggerall = P2Movetype = A
triggerall = ctrl = 1
trigger1 = random <= 600
value = 132
;---------------------------------------------------------------------------

; Stand Light Punch
[State -1, AI, Stand Light Punch]
type = ChangeState
value = 200
triggerall = prevstateno != 200
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 100

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

; Stand Medium Punch
[State -1, AI, Stand Medium Punch]
type = ChangeState
value = 210
triggerall = prevstateno != 210
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 100
trigger3 = stateno = 205 && animelemtime(2)>0 && movehit

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

; Stand Strong Punch
[State -1, AI, Stand Strong Punch]
type = ChangeState
value = 220
triggerall = prevstateno != 220
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 100
trigger2 = stateno = 210 && animelemtime(5)>0 && movehit
trigger3 = stateno = 1120 && animelemtime(5)>0 && movehit
trigger4 = stateno = 700 && animelemtime(5)>0 && movehit
trigger5 = stateno = 1020 && animelemtime(5)>0 && movehit

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

; Crouching light Punch
[State -1, AI, Crouching Strong Punch]
type = ChangeState
value = 400
triggerall = prevstateno != 400
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 100

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

; Crouching mid Punch
[State -1, AI, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = prevstateno != 410
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 100
trigger2 = stateno = 400 && animelemtime(5)>0

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

; Crouching Strong Punch
[State -1, AI, Crouching Strong Punch]
type = ChangeState
value = 225
triggerall = prevstateno != 225
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 100
trigger2 = stateno = 700 && animelemtime(5)>0
trigger3 = stateno = 410 && animelemtime(3)>0

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

; jumping light Punch
[State -1, AI, Crouching Strong Punch]
type = ChangeState
value = 600
triggerall = prevstateno != 600
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != S
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = A
trigger1 = CTRL
trigger1 = RANDOM <= 100

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

; jumping mid Punch
[State -1, AI, Crouching Strong Punch]
type = ChangeState
value = 610
triggerall = prevstateno != 610
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != S
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = A
trigger1 = CTRL
trigger1 = RANDOM <= 100
trigger2 = stateno = 600 && animelemtime(2)>0

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

; jumping Strong Punch
[State -1, AI, Crouching Strong Punch]
type = ChangeState
value = 620
triggerall = prevstateno != 620
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != S
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = A
trigger1 = CTRL
trigger1 = RANDOM <= 100
trigger2 = stateno = 610 && animelemtime(5)>0

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

; jumping Strong Punch
[State -1, AI, Crouching Strong Punch]
type = ChangeState
value = 625
triggerall = prevstateno != 625
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != S
triggerall = P2BODYDIST X <=33
triggerall = STATETYPE = A
trigger1 = CTRL
trigger1 = RANDOM <= 100
trigger2 = stateno = 620 && animelemtime(4)>0

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

; Steel upper
[State -1, AI, Steel upper]
type = ChangeState
value = 950
triggerall = prevstateno != 950
triggerall = var(0) != 90
triggerall = VAR(20)
triggerall = RANDOM <= 16
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=40
triggerall = STATETYPE = S
trigger1 = CTRL
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

;---------------------------------------------------------------------------
[State -1, AI,  Stand Jump Attack]
type = ChangeState
value = 230
triggerall =  stateno != [200,210]
triggerall =  stateno != [220,225]
triggerall = var(0) != 75
triggerall = VAR(20)
triggerall = RANDOM <= 70
triggerall = P2BODYDIST X <= 115
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
trigger1 = p2statetype != C
trigger1 = RoundState = 2
trigger1 = CTRL
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact
;---------------------------------------------------------------------------

;[State -1, AI, Hyourinmarou]
;type=changestate
;value = 701
;triggerall = var(20)>=1 && numenemy
;triggerall = roundstate=2 && statetype!=A
;triggerall = !var(0) = 75
;triggerall = p2bodydist x>=76 && p2dist y>=-120 && enemynear,vel y>=0
;triggerall = p2statetype = S || enemynear,vel x<0
;triggerall = p2statetype!= A || enemynear,vel x<0
;triggerall = p2statetype!= C || enemynear,vel x<0
;trigger1 = (ctrl || stateno=52 || (stateno=[100,101])) && random<5
;trigger2 = (ctrl || stateno=52 || (stateno=[100,101]))
;trigger3 = enemynear,stateno=195 && random<500
;trigger4 = stateno = 200 && animelemtime(2)>0 && MOVEContact
;trigger5 = stateno = 210 && animelemtime(4)>0 && MOVEContact
;trigger6 = stateno = 220 && animelemtime(4)>0 && MOVEContact
;trigger7 = stateno = 225 && animelemtime(4)>0 && MOVEContact
;trigger8 = RANDOM <= 20

[State -1, AI, Hyorinmarou F]
type = ChangeState
value = 701
triggerall =  stateno != [200,210]
triggerall =  stateno != [220,225]
triggerall = var(0) != 90
triggerall = VAR(20)
triggerall = RANDOM <= 27
triggerall = P2BODYDIST X <= 115
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
trigger1 = p2statetype != C
trigger1 = RoundState = 2
trigger1 = CTRL
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

[State -1, AI, Hyorinmarou D]
type = ChangeState
value = 700
triggerall =  stateno != [200,210]
triggerall =  stateno != [220,225]
triggerall = var(0) != 90
triggerall = VAR(20)
triggerall = RANDOM <= 27
triggerall = P2BODYDIST X <= 115
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
trigger1 = p2statetype = C
trigger1 = RoundState = 2
trigger1 = CTRL
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

[State -1, AI, Hyorinmarou U]
type = ChangeState
value = 702
triggerall =  stateno != [200,210]
triggerall =  stateno != [220,225]
triggerall = var(0) != 90
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = P2BODYDIST X <= 115
triggerall = RANDOM <= 27
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
trigger1 = p2statetype = A
trigger1 = RoundState = 2
trigger1 = CTRL
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

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

; AIR_Hyourinmaru_Dragon_Start
[State -1, AI, AIR_Hyourinmaru_Dragon_Start]
type = ChangeState
value = 770
triggerall= roundstate=2 && statetype=A && (var(20)!=[1,2])
triggerall = prevstateno != 770
triggerall = VAR(20) && numenemy
triggerall = VAR(0) != 75
triggerall = var(0) != 90
triggerall = !WIN
triggerall = STATETYPE != S
triggerall= p2bodydist x>=80 && p2dist y>=80
triggerall = STATETYPE = A
trigger1 = CTRL && random<75
trigger2 = stateno = 2800 && animelemtime(400)>0 && movecontact
trigger3 = stateno = 600 && animelemtime(2)>0 && MOVEContact
trigger4 = stateno = 610 && animelemtime(3)>0 && MOVEContact
trigger5 = stateno = 620 && animelemtime(4)>0 && MOVEContact

;---------------------------------------------------------------------------
; Flash Step
[State -1, AI, Flash Step]
type = ChangeState
value = 960
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X >=80
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 200

;---------------------------------------------------------------------------
; Flash Step
[State -1, AI, Flash Step]
type = ChangeState
value = 304
triggerall = VAR(20)
triggerall = VAR(0) = 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X >=80
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 60

;---------------------------------------------------------------------------
[State -1, AI, Hyorinmarou Ice tower]
type = ChangeState
value = 900
triggerall =  stateno != [200,210]
triggerall =  stateno != [220,225]
triggerall = var(0) != 90
triggerall = VAR(20)
triggerall = RANDOM <= 60
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
trigger1 = p2statetype = A
trigger1 = RoundState = 2
trigger1 = CTRL
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

;---------------------------------------------------------------------------
[State -1, AI, Hyorinmarou Ice tower]
type = ChangeState
value = 930
triggerall =  stateno != [200,210]
triggerall =  stateno != [220,225]
triggerall = var(0) != 90
triggerall = VAR(20)
triggerall = RANDOM <= 60
triggerall = VAR(0) != 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
trigger1 = p2statetype = C
trigger1 = RoundState = 2
trigger1 = CTRL
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

;---------------------------------------------------------------------------
;BANKAI ^J^
[State -1,AI, BANKAI]
Type = ChangeState
triggerall = prevstateno != 1190
triggerall = var(0) != 75
triggerall = VAR(20)
triggerall = power >= 3000
;triggerall = LIFE < 200
triggerall = STATETYPE = S
triggerall = STATETYPE != A
;trigger1 = RANDOM <= 900
Trigger1 = ctrl
Value = 1190

;---------------------------------------------------------------------------
; Soul Heat
[State -1,AI, Soul Heat]
Type = ChangeState
triggerall = prevstateno != 20000
triggerall = var(0) != 90
triggerall = var(0) != 75
triggerall = VAR(20)
triggerall = power >= 1000
triggerall = LIFE < 200
triggerall = STATETYPE = S
triggerall = STATETYPE != A
trigger1 = RANDOM <= 50
Trigger1 = ctrl
Value = 20000

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

;Dragon hail flower charge
[State -1, AI, Dragon hail flower charge]
type = ChangeState
value = 31500
triggerall = VAR(20)
triggerall = VAR(0) = 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
trigger1 = p2statetype != C
trigger1 = P2BODYDIST X <=90
trigger1 = RoundState = 2
trigger1 = CTRL
trigger1 = Random <= 10
trigger2 = stateno = 12000 && animelemtime(3)
trigger3 = stateno = 13000 && animelemtime(4)
trigger3 = stateno = 14000 && animelemtime(5)

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

;Wild_Hyourinmarou_Ice_Shot
[State -1, AI, Wild_Hyourinmarou_Ice_Shot]
type = ChangeState
value = 32555
triggerall = VAR(20)
triggerall = p2life >= 500
triggerall = power >= 1000
triggerall = VAR(0) = 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
triggerall = STATETYPE != A
triggerall = P2BODYDIST X >=80
trigger1 = p2statetype != C
trigger1 = RoundState = 2
trigger1 = CTRL
trigger1 = Random <= 45
trigger2 = stateno = 12000 && animelemtime(3)
trigger3 = stateno = 13000 && animelemtime(4)
trigger4 = stateno = 14000 && animelemtime(5)

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

;Wild_Hyourinmarou_Ice_Shot
[State -1, AI, Ice_crystals]
type = ChangeState
value = 32550
triggerall = VAR(20)
triggerall = p2life <= 500
triggerall = power >= 2000
triggerall = VAR(0) = 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
triggerall = STATETYPE != A
triggerall = P2BODYDIST X >=80
trigger1 = p2statetype != C
trigger1 = RoundState = 2
trigger1 = CTRL
trigger1 = Random <= 45
trigger2 = stateno = 12000 && animelemtime(3)
trigger3 = stateno = 13000 && animelemtime(4)
trigger4 = stateno = 14000 && animelemtime(5)

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

;Hyper_Hyourinmaru_Dragon
[State -1, AI, Hyper_Hyourinmaru_Dragon]
type = ChangeState
value = 3000
triggerall = prevstateno != 3000
triggerall = power >= 2600
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = var(0) != 90
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
trigger1 = p2statetype != C
trigger1 = P2BODYDIST X >=80
trigger1 = RoundState = 2
trigger1 = CTRL
trigger1 = Random <= 55

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

; Hyourinmarou_Hail Flower
[State -1, AI, Hyourinmarou_Hail Flower]
type = ChangeState
value = 1735
triggerall =  stateno != [1735,1736]
triggerall =  stateno != [1740,1745]
triggerall =  stateno != [1750,1755]
triggerall = life >= 250
triggerall = power >= 2000
triggerall = VAR(20)
triggerall = VAR(0) != 75
triggerall = var(0) = 90
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=70
triggerall = STATETYPE = S
trigger1 = Random % 85 = 0
trigger2 = P2movetype = H
trigger3 = p2bodydist X = [10,60]
trigger4 = p2bodydist Y = [-5, 0]
trigger5 = movehit = 1
trigger6 = CTRL
trigger7 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger8 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger9 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger10= stateno = 225 && animelemtime(4)>0 && MOVEContact

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

; Power Charge
[State -1, AI, power charge]
type = ChangeState
value = 630
triggerall = prevstateno != 630
triggerall = power <= 1000
triggerall = life <= 1500
triggerall = VAR(20)
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X >= 100
triggerall = STATETYPE = S
trigger1 = p2statetype = A
trigger1 = CTRL
trigger1 = RANDOM >= 15
trigger1= ctrl || (stateno=[100,101])

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

; Stand Light Punch
[State -1, AI, Stand Light Punch]
type = ChangeState
value = 12000
triggerall = prevstateno != 12000
triggerall = VAR(20)
triggerall = VAR(0) = 75
triggerall = VAR(0) != 95
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 100

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

; Stand Medium Punch
[State -1, AI, Stand Medium Punch]
type = ChangeState
value = 13000
triggerall = prevstateno != 13000
triggerall = VAR(20)
triggerall = VAR(0) = 75
triggerall = VAR(0) != 95
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 100
trigger3 = stateno = 12000 && animelemtime(3)>0 && movehit

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

; Stand Strong Punch
[State -1, AI, Stand Strong Punch]
type = ChangeState
value = 14000
triggerall = prevstateno != 14000
triggerall = VAR(20)
triggerall = VAR(0) = 75
triggerall = VAR(0) != 95
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 100
trigger2 = stateno = 12000 && animelemtime(3)>0 && movehit
trigger3 = stateno = 13000 && animelemtime(4)>0 && movehit

;---------------------------------------------------------------------------
; Dash_Charge
[State -1, AI, Dash_Charge]
type = ChangeState
value = 31500
triggerall = prevstateno != 31500
triggerall = VAR(20)
triggerall = VAR(0) = 75
triggerall = VAR(0) != 95
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X >=230
triggerall = STATETYPE = S
trigger1 = CTRL
trigger1 = RANDOM <= 80
trigger2 = stateno = 12000 && animelemtime(3)>0 && movehit
trigger3 = stateno = 13000 && animelemtime(4)>0 && movehit

;---------------------------------------------------------------------------
; Air_Bankai_Long_Hyourinmarou
[State -1, AI, Air_Bankai_Long_Hyourinmarou]
type = ChangeState
value = 32540
triggerall = prevstateno != 32540
triggerall = VAR(20)
triggerall = VAR(0) = 75
triggerall = VAR(0) != 95
triggerall = !WIN
triggerall = STATETYPE != S
triggerall = P2STATETYPE = A
triggerall = P2STATETYPE != S
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = A
trigger1 = CTRL
trigger1 = RANDOM <= 55
trigger2 = stateno = 15000 && animelemtime(2)>0 && movehit
trigger3 = stateno = 15010 && animelemtime(2)>0 && movehit

;---------------------------------------------------------------------------
; Air_Bankai_Mist
[State -1, AI, Air_Bankai_Mist]
type = ChangeState
value = 32545
triggerall = prevstateno != 32545
triggerall = VAR(20)
triggerall = VAR(0) = 75
triggerall = VAR(0) != 95
triggerall = !WIN
triggerall = STATETYPE != S
triggerall = P2STATETYPE != A
triggerall = P2STATETYPE = S
triggerall = P2BODYDIST X <=45
triggerall = STATETYPE = A
trigger1 = CTRL
trigger1 = RANDOM <= 100
trigger2 = stateno = 15000 && animelemtime(2)>0 && movehit
trigger3 = stateno = 15010 && animelemtime(2)>0 && movehit

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

; Sennen Hyoro
[State -1, AI, Hyourinmarou_Hail Flower]
type = ChangeState
value = 32570
triggerall =  stateno != [32570,32571]
triggerall =  stateno != [32572,32574]
triggerall = p2life <= 500
triggerall = power >= 3000
triggerall = VAR(20)
triggerall = VAR(0) = 75
triggerall = var(0) != 90
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = P2BODYDIST X <=70
triggerall = STATETYPE = S
trigger1 = Random % 85 = 0
trigger2 = P2movetype = H
trigger3 = p2bodydist X = [10,60]
trigger4 = p2bodydist Y = [-5, 0]
trigger5 = movehit = 1
trigger6 = CTRL
trigger7 = stateno = 15000 && animelemtime(2)>0 && movehit
trigger8 = stateno = 15010 && animelemtime(2)>0 && movehit

;---------------------------------------------------------------------------
[State -1, AI, Hyourinmarou_Sky_Slash]
type = ChangeState
value = 32525
triggerall =  stateno != [32545,32540]
triggerall =  stateno != [32545,32540]
triggerall = var(0) != 90
triggerall = VAR(20)
triggerall = RANDOM <= 60
triggerall = VAR(0) = 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
trigger1 = p2statetype = C
trigger1 = RoundState = 2
trigger1 = CTRL
trigger7 = stateno = 15000 && animelemtime(2)>0 && movehit
trigger8 = stateno = 15010 && animelemtime(2)>0 && movehit

[State -1, AI, Hyorinmarou F]
type = ChangeState
value = 31000
triggerall =  stateno != [15010,15000]
triggerall = var(0) != 90
triggerall = VAR(20)
triggerall = RANDOM <= 27
triggerall = P2BODYDIST X <= 115
triggerall = VAR(0) = 75
triggerall = !WIN
triggerall = STATETYPE != A
triggerall = STATETYPE = S
trigger1 = RoundState = 2
trigger1 = CTRL
trigger7 = stateno = 15000 && animelemtime(2)>0 && movehit
trigger8 = stateno = 15010 && animelemtime(2)>0 && movehit





















;---------------------------------------------------------------------------
; Bankai_Rising Storm
[State -1, Bankai_Rising Storm]
type = ChangeState
value = 3340
triggerall = VAR(20) != 1
triggerall = VAR(0) != 90
triggerall = VAR(0) = 75
triggerall = power >= 2000
triggerall = command = "Soul Heat"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact
 ---------------------------------------------------------------------------
; Falling sword
[State -1, Falling sword]
type = ChangeState
value = 625
triggerall = command = "Hyorenmaru_TOWER"
triggerall = VAR(0) != 75
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = (stateno = 600 || stateno = 610 ||stateno = 620)  && movecontact
 ;---------------------------------------------------------------------------
; Hyourinmarou_Hail Flower
[State -1, Hyourinmarou_Hail Flower]
type = ChangeState
value = 2300
triggerall = VAR(20) != 1
triggerall = VAR(0) = 90
triggerall = VAR(0) != 75
triggerall = power >= 2000
triggerall = command = "Soul Heat"
triggerall = command != "c" && NumHelper(2190) = 0
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact
 ;---------------------------------------------------------------------------
; Hyourinmarou_Hail Flower
[State -1, Hyourinmarou_Hail Flower]
type = ChangeState
value = 1760
triggerall = VAR(20) != 1
triggerall = VAR(0) = 90
triggerall = VAR(0) != 75
triggerall = power >= 1000
triggerall = command = "Hyper_Hyourinmaru_Start"
trigger1 = statetype = A
trigger1 = ctrl

 ;---------------------------------------------------------------------------
; Hyourinmarou_Hail Flower
[State -1, Hyourinmarou_Hail Flower]
type = ChangeState
value = 1735
triggerall = VAR(20) != 1
triggerall = VAR(0) = 90
triggerall = VAR(0) != 75
triggerall = power >= 2000
triggerall = command = "Heavens Ice Crystals"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact
 ;---------------------------------------------------------------------------
; Hyourinmarou_Spike_Start
[State -1, Hyourinmarou_Spike_Start]
type = ChangeState
value = 1190
triggerall = VAR(20) != 1
triggerall = VAR(0) = 90
triggerall = VAR(0) != 75
triggerall = power >= 1000
triggerall = command = "Bankai"
trigger1 = statetype = S
trigger1 = ctrl
 ;---------------------------------------------------------------------------
; Hyourinmarou_Spike_Start
[State -1, Hyourinmarou_Spike_Start]
type = ChangeState
value = 1720
triggerall = VAR(20) != 1
triggerall = VAR(0) = 90
triggerall = VAR(0) != 75
triggerall = power >= 2000
triggerall = command = "Hyper_Hyourinmaru_Start"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact
 ;---------------------------------------------------------------------------
; Hyourinmarou_Spike_Start
[State -1, Hyourinmarou_Spike_Start]
type = ChangeState
value = 1700
triggerall = VAR(20) != 1
triggerall = VAR(0) = 90
triggerall = VAR(0) != 75
triggerall = command = "Sky_High_Ice"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact
 ;---------------------------------------------------------------------------
; Bakudo 63. Sajo Sabaku
[State -1, Bakudo 63. Sajo Sabaku]
type = ChangeState
value = 1600
triggerall = VAR(20) != 1
triggerall = VAR(0) = 90
triggerall = VAR(0) != 75
triggerall = command = "Hyorenmaru_SLASH"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact
 ;---------------------------------------------------------------------------
; Hado_Shakkaho_Start
[State -1, Hado_Shakkaho_Start]
type = ChangeState
value = 1500
triggerall = VAR(20) != 1
triggerall = VAR(0) = 90
triggerall = VAR(0) != 75
triggerall = command = "Hyorenmaru_TOWER"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact
 ;---------------------------------------------------------------------------
; Sennen Hyoro
[State -1, Sennen Hyoro]
type = ChangeState
value = 32570
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = power >= 3000
triggerall = command = "Bankai"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 12000 && animelemtime(3)>0 && MOVEContact
trigger3 = stateno = 13000 && animelemtime(3)>0 && MOVEContact
trigger4 = stateno = 14000 && animelemtime(5)>0 && MOVEContact
 ;---------------------------------------------------------------------------
; AIR_ Bankai_Hyourinmaru_Dragon_Start
[State -1, AIR_ Bankai_Hyourinmaru_Dragon_Start]
type = ChangeState
value = 32560
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = power >= 1000
triggerall = command = "Hyper_Hyourinmaru_Start"
trigger1 = statetype = A
trigger1 = ctrl
 ;---------------------------------------------------------------------------
; Hyourinmarou_Ice_Shots
[State -1, Hyourinmarou_Ice_Shots]
type = ChangeState
value = 32555
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = power >= 1000
triggerall = command = "Hyper_Hyourinmaru_Start"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 12000 && animelemtime(3)>0 && MOVEContact
trigger3 = stateno = 13000 && animelemtime(3)>0 && MOVEContact
trigger4 = stateno = 14000 && animelemtime(5)>0 && MOVEContact
 ;---------------------------------------------------------------------------
; Hyourinmarou_Ice_Shots
[State -1, Hyourinmarou_Ice_Shots]
type = ChangeState
value = 775
triggerall = VAR(20) != 1
triggerall = VAR(0) = 90
triggerall = VAR(0) != 75
triggerall = command = "AIR_Hyourinmaru_Dragon_Start"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 620 && animelemtime(4)>0 && MOVEContact
trigger3 = stateno = 610 && animelemtime(3)>0 && MOVEContact
trigger4 = stateno = 620 && animelemtime(4)>0 && MOVEContact
;---------------------------------------------------------------------------
; Hyourinmarou_Sky_Slash
[State -1, Hyourinmarou_Sky_Slash]
type = ChangeState
value = 32525
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "z"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 12000 && animelemtime(3)>0 && MOVEContact
trigger3 = stateno = 13000 && animelemtime(3)>0 && MOVEContact
trigger4 = stateno = 14000 && animelemtime(5)>0 && MOVEContact
trigger5 = stateno = 14020 && animelemtime(3)>0 && MOVEContact
 ;---------------------------------------------------------------------------
; Crystal_Freeze_Hyper
[State -1, Crystal_Freeze_Hyper]
type = ChangeState
value = 32550
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = power >= 2000
triggerall = command = "Heavens Ice Crystals"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 12000 && animelemtime(3)>0 && MOVEContact
trigger3 = stateno = 13000 && animelemtime(3)>0 && MOVEContact
trigger4 = stateno = 14000 && animelemtime(5)>0 && MOVEContact
 ;---------------------------------------------------------------------------
; Air_Bankai_Mist
[State -1, Air_Bankai_Mist]
type = ChangeState
value = 32545
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "Hyorenmaru_TOWER"
trigger1 = statetype = A
trigger1 = ctrl
 ;---------------------------------------------------------------------------
; Air_Bankai_Long_Hyourinmarou
[State -1, Air_Bankai_Long_Hyourinmarou]
type = ChangeState
value = 32540
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "AIR_Hyourinmaru_Dragon_Start"
trigger1 = statetype = A
trigger1 = ctrl

 ;---------------------------------------------------------------------------
; Hyourinmaru_Slash
[State -1, Hyourinmaru_Slash]
type = ChangeState
value = 32520
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "Sky_High_Ice"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 12000 && animelemtime(3)>0 && MOVEContact
trigger3 = stateno = 13000 && animelemtime(3)>0 && MOVEContact
trigger4 = stateno = 14000 && animelemtime(5)>0 && MOVEContact
;---------------------------------------------------------------------------
; Fly Down
[State -1, Fly Up]
type = ChangeState
value = 303
triggerall =  stateno != [303,304]
triggerall = var(0) = 75
trigger1 = command = "FF" || command = "b"
trigger1 = statetype = A
trigger1 = ctrl

; Fly Up
[State -1, Fly Up]
type = ChangeState
value = 304
triggerall = var(0) = 75
trigger1 = command = "FF" || command = "b"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Getsuga Charge Style 1
[State -1, Getsuga Charge Style 1]
type = ChangeState
value = 31500
triggerall = command = "Dragon hail flower" && Command = "hold_z"
triggerall = var(0) = 75
trigger1 = (statetype = s) && ctrl

;Getsuga Charge Style 1
[State -1, Getsuga Charge Style 1]
type = ChangeState
value = 41500
triggerall = command = "Dragon hail flower - y" && Command = "hold_y"
triggerall = var(0) = 75
trigger1 = (statetype = s) && ctrl

;Getsuga Charge Style 1
[State -1, Getsuga Charge Style 1]
type = ChangeState
value = 41510
triggerall = command = "Dragon hail flower - x" && Command = "hold_x"
triggerall = var(0) = 75
trigger1 = (statetype = s) && ctrl

;---------------------------------------------------------------------------
; Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
trigger1 = command = "FF"
triggerall = var(0) != 75
trigger1 = statetype = S
trigger1 = ctrl

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

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

;===========================================================================

;---------------------------------------------------------------------------
; Hyper_Hyourinmaru_Dragon_Air
[State -1, Hyper_Hyourinmaru_Dragon_Air]
type = ChangeState
value = 20000
triggerall = power >= 1000
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall = command = "Soul Heat"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Hyper_Hyourinmaru_Dragon_Air
[State -1, Hyper_Hyourinmaru_Dragon_Air]
type = ChangeState
value = 3100
triggerall = power >= 1000
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall = command = "Hyper_Hyourinmaru_Start"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Hyourinmaru_Gruond_Crystals
[State -1, Hyourinmaru_Gruond_Crystals]
type = ChangeState
value = 840
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) = 90
triggerall = command = "AIR_Hyourinmaru_Dragon_Start"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

;---------------------------------------------------------------------------
;BANKAI ^J^
[State -1,BANKAI]
Type = ChangeState
Triggerall = Command = "Bankai"
triggerall = var(0) != 75
triggerall = VAR(20) != 1
Triggerall = Command != "holddown"
triggerall = power >= 3000
;triggerall = life > 250
Trigger1 = ctrl = 1
Trigger1 = StateType = S
Value = 1190

;===========================================================================
;Standing Parry
[State -1, Parry Stand]
type = HitOverride
triggerall = var(0) != 75
triggerall = command = "fwd" && command!= "back" && command != "up" && command != "down"
trigger1 = Ctrl
attr = SA,AA,AP
stateno = 980
slot = 0
time = 8

;===========================================================================
;Parry Crouch
[State -1, Crouching Parry]
type = HitOverride
triggerall = var(0) != 75
triggerall = (statetype = S && command = "down")|| (statetype = C && command = "fwd") && command != "back" && command != "up"
trigger1 = Ctrl
attr = C,AA,AP
stateno = 985
slot = 0
time = 10

;===========================================================================
;Parry Air
[State -1, Aerial Parry]
type= HitOverride
triggerall = var(0) != 75
triggerall = (statetype= A && command = "fwd") && command != "back" && command != "up" && command != "down"
trigger1 = Ctrl
attr = SA,AA,AP
stateno = 990
forceair = 1
slot = 0
time = 15

;---------------------------------------------------------------------------
; Flash_Step_Ground
[State -1, Flash_Step_Ground]
type = ChangeState
value = 960
triggerall = power >= 75
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = command = "b"
trigger1 = statetype = S
trigger1 = ctrl

; Flash_Step_Air
[State -1, FLASH AIR]
type = ChangeState
value = 965
triggerall = var(0) != 75
triggerall = power >= 75
triggerall = command = "FF" && command != "BB"
trigger1 = (statetype = A) && ctrl
trigger2 = stateno = 600 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 610 && animelemtime(3)>0 && MOVEContact
trigger4 = stateno = 620 && animelemtime(4)>0 && MOVEContact

;--------------------------------------------------------------------------
; Power Charge
[State -1, Power Charge]
type=changestate
value=630
triggerall = VAR(20) != 1
triggerall = power < 3000
trigger1= command="hold_a"
trigger1= roundstate=2 && statetype!=A
trigger1= ctrl || (stateno=[100,101])

;--------------------------------------------------------------------------
; Heavens Ice Crystals
[State -1, Heavens Ice Crystals]
type = ChangeState
value = 2200
triggerall = command = "Heavens Ice Crystals"
triggerall = command != "holddown"
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall =  power >= 1000
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

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

; Hyper_Hyourinmaru_Start
[State -1, Hyper_Hyourinmaru_Start]
type = ChangeState
value = 3000
triggerall = command = "Hyper_Hyourinmaru_Start"
triggerall = command != "holddown"
triggerall =  power >= 2000
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

;---------------------------------------------------------------------------
; AIR_Hyourinmaru_Dragon_Start
[State -1, AIR_Hyourinmaru_Dragon_Start]
type = ChangeState
value = 770
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall = command = "AIR_Hyourinmaru_Dragon_Start"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 620 && animelemtime(4)>0 && MOVEContact

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

; Sky_High_Ice
[State -1, Sky_High_Ice]
type = ChangeState
value = 950
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall = command = "Sky_High_Ice"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

;---------------------------------------------------------------------------
; Taunt
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = command = "s"
trigger1 = statetype != A
trigger1 = ctrl

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

; Hyorenmaru_SLASH
[State -1, Hyorenmaru_SLASH]
type = ChangeState
value = 930
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall = command = "Hyorenmaru_SLASH"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

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

; Hyorenmaru_TOWER
[State -1, Hyorenmaru_TOWER]
type = ChangeState
value = 900
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall = command = "Hyorenmaru_TOWER"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

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

; Standing_Hyorenmaru_Small_Down
[State -1, Standing_Hyorenmaru_Small_DOWN]
type = ChangeState
value = 700
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall = command = "Standing_Hyorenmaru_Small_DOWN"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

; Standing_Hyorenmaru_Small_FORWORD
[State -1, Standing_Hyorenmaru_Small_FORWORD]
type = ChangeState
value = 701
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall = command = "Standing_Hyorenmaru_Small_FORWORD"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

; Standing_Hyorenmaru_Small_UP
[State -1, Standing_Hyorenmaru_Small_UP]
type = ChangeState
value = 702
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall = command = "Standing_Hyorenmaru_Small_UP"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 210 && animelemtime(4)>0 && MOVEContact
trigger4 = stateno = 220 && animelemtime(4)>0 && MOVEContact
trigger5 = stateno = 225 && animelemtime(4)>0 && MOVEContact

; Standing_Hyorenmaru_Small_Down
[State -1, Standing_Hyorenmaru_Small_DOWN]
type = ChangeState
value = 31000
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = VAR(0) != 90
triggerall = command = "Bankai - Long Hyourinmaru"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 12000 && animelemtime(3)>0 && MOVEContact
trigger3 = stateno = 13000 && animelemtime(3)>0 && MOVEContact
trigger4 = stateno = 14000 && animelemtime(5)>0 && MOVEContact

;---------------------------------------------------------------------------
;Stand Weak Slice
[State -1: Stand Weak Slice]
type = ChangeState
value = 200
triggerall = VAR(0) != 75
triggerall = command="x"
triggerall = (statetype = S) && stateno != [100,105]
trigger1 = ctrl

;---------------------------------------------------------------------------
;Stand Medium Slice
[State -1: Stand Medium Slice]
type = ChangeState
value = 210
triggerall = VAR(0) != 75
triggerall = command="y"
triggerall = (statetype = S) && stateno != [100,105]
trigger1 = ctrl
trigger2 = (stateno = 200) && movecontact

;---------------------------------------------------------------------------
;Stand Strong Slice
[State -1: Stand Strong Slice]
type = ChangeState
value = 220
triggerall = VAR(0) != 75
triggerall = command="z"
triggerall = (statetype = S) && stateno != [100,105]
trigger1 = ctrl
trigger2 = (stateno = 210) && movecontact

;---------------------------------------------------------------------------
; Standing Strong Slice_Bankai
[State -1, Standing Strong Punch_Bankai]
type = ChangeState
value = 12000
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Stand Medium Slice
[State -1, Stand Medium Punch]
type = ChangeState
value = 13000
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 12000 && animelemtime(3)>0 && MOVEContact

;---------------------------------------------------------------------------
; Stand Medium Slice
[State -1, Stand Medium Punch]
type = ChangeState
value = 14000
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 13000 && animelemtime(4)>0 && MOVEContact

;---------------------------------------------------------------------------
; Stand Stong Slice #2
[state -1, Stand Strong Punch #2]
type = ChangeState
value = 225
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = stateno = 220
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = time >= 14 && movecontact

;---------------------------------------------------------------------------
;Running Slice
[State -1: Running Slice]
type = ChangeState
value = 230
triggerall = VAR(0) != 75
triggerall = VAR(0) != 90
triggerall = stateno = [100,101]
trigger1 = command="x"
trigger2 = command="z"
trigger3 = command="y"

;---------------------------------------------------------------------------
;Running Slice
[State -1: Running Slice]
type = ChangeState
value = 270
triggerall = VAR(0) = 90
triggerall = stateno = [100,101]
trigger1 = command="x"
trigger2 = command="z"
trigger3 = command="y"

;---------------------------------------------------------------------------
; Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 200 && animelemtime(3)>0 && MOVEContact

;---------------------------------------------------------------------------
; Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 14010
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;---------------------------------------------------------------------------
; Crouching Medium Punch
[State -1, Crouching Medium Punch]
type = ChangeState
value = 410
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 400 && animelemtime(3)>0 && MOVEContact

;---------------------------------------------------------------------------
; Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 14020
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 14010 && animelemtime(3)>0 && MOVEContact

;---------------------------------------------------------------------------
; Crouching Strong Punch
[State -1, Crouching Strong Punch]
type = ChangeState
value = 225;420
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = command = "z"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = stateno = 410 && animelemtime(2)>0 && MOVEContact
trigger3 = stateno = 220 && animelemtime(5)>0 && MOVEContact

;---------------------------------------------------------------------------
; Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
value = 15000
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
value = 15010
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 15000 && animelemtime(2)>0 && MOVEContact

;---------------------------------------------------------------------------
; Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
value = 15020
triggerall = VAR(20) != 1
triggerall = VAR(0) = 75
triggerall = command = "z"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 15010 && animelemtime(4)>0 && MOVEContact

;---------------------------------------------------------------------------
; Jump Medium Punch
[State -1, Jump Medium Punch]
type = ChangeState
value = 610
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && animelemtime(2)>0 && MOVEContact

;---------------------------------------------------------------------------
; Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 620;620
triggerall = VAR(20) != 1
triggerall = VAR(0) != 75
triggerall = command = "z"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 610 && animelemtime(3)>0 && MOVEContact
