;===========================================================================
Marvel vs. Capcom - Eternity of Heroes - Commands Template
by REDHOT & Acey
;===========================================================================
;Note - Hobgoblin has moves edited by Susan.
;Susan's changes are open-source.  You want to copy-paste my code into your stuff... cool
;Just note that the whole character is NOT mine.  Nor are the sprites.
;For specific data on what I changed, check out the changelog text file
;I think I'll name it "What_susan_changed.txt"... or changelog.txt
;---------------------------------------------------------------------------
;Artificial Intelligence
;---------------------------------------------------------------------------

;-|-AI-|--------------------------------------------------------------------
[Command]
name = "AI_1"
command = a, x, F, D, a, a, D
time = 1

[Command]
name = "AI_2"
command = a, a, a, a, a, a, b
time = 1

[Command]
name = "AI_3"
command = a, a, b, D, F, b, x
time = 1

[Command]
name = "AI_4"
command = y, a, F, b, B, y, a
time = 1

[Command]
name = "AI_5"
command = a, b, x, y, y, b, b
time = 1

[Command]
name = "AI_6"
command = b, y, y, F, b, B, B
time = 1

[Command]
name = "AI_7"
command = a, y, F, a, x, a, F, b
time = 1

[Command]
name = "AI_8"
command = a, a, b, y, x, B, x
time = 1

[Command]
name = "AI_9"
command = x, x, a, F, F, b, D
time = 1

[Command]
name = "AI_10"
command = x, x, a, F, y, a, a, F
time = 1

[Command]
name = "AI_11"
command = a, b, a, x, a, y, a
time = 1

[Command]
name = "AI_12"
command = b, y, a, F, y, a, x
time = 1

[Command]
name = "AI_13"
command = x, a, y, y, x, B, B
time = 1

[Command]
name = "AI_14"
command = a, F, F, x, B, F, x
time = 1

[Command]
name = "AI_15"
command = y, x, b, b, a, x, y
time = 1


;--------------------------more ai--------------------

[Command]
name = "AI_16"
command = y, a, b, c, B, F, z
time = 1

[Command]
name = "AI_17"
command = y, a, b, c, B, F, y
time = 1

[Command]
name = "AI_18"
command = y, a, b, c, B, F, x
time = 1

[Command]
name = "AI_19"
command = y, a, b, c, B, F, a
time = 1

[Command]
name = "AI_20"
command = y, a, b, c, B, F, b
time = 1

[Command]
name = "AI_21"
command = y, a, b, c, B, F, c
time = 1


;TEMPORARY, REMEMBER TO REMOVE!!

[Command]
name = "AI_1"
command = D,D,D
time = 50



;---------------------------------------------------------------------------
;Commands
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
;Hyper1

[Command]
name = "Hyper2"
command = ~D, DF, F, x+y
time = 30

[Command]
name = "Hyper2"
command = ~D, DF, F, x+z
time = 30

[Command]
name = "Hyper2"
command = ~D, DF, F, y+z
time = 30
;---------------------------------------------------------------------------
;Hyper2

[Command]
name = "Hyper1"
command = ~D, DB, B, a+b
time = 30


[Command]
name = "Hyper1"
command = ~D, DB, B, a+c
time = 30

[Command]
name = "Hyper1"
command = ~D, DB, B, b+c
time = 30



;hyper3
[Command]
name = "Hyper3"
command = ~D, DB, B, y+z
time = 30

[Command]
name = "Hyper3"
command = ~B, DB, B, z+x
time = 30

[Command]
name = "Hyper3"
command = ~B, DB, B, y+x
time = 30

;--------get off glider hyper
[Command]
name = "Hyper4"
command = ~D, DF, F, a+b
time = 30

[Command]
name = "Hyper4"
command = ~D, DF, F, a+c
time = 30

[Command]
name = "Hyper4"
command = ~D, DF, F, b+c
time = 30


;
;-----------------------------
;pumpkin_patch_special

[Command]
name = "pumpkinpatch"
command = x+a

[Command]
name = "pumpkinpatch2"
command = y+b

[Command]
name = "pumpkinpatch3"
command = z+c

;--------------
;poison gas special

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

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

;------------------------
;velocity bomb special
[Command]
name = "velocity"
command = ~D,DF,F, c
time = 20



;---------------------------------------------------------------------------
;Specail1

[Command]
name = "SpecialX"
command = ~D,DF,F, x

[Command]
name = "SpecialY"
command = ~D,DF,F, y

[Command]
name = "SpecialZ"
command = ~D,DF,F, z

;---------------------------------------------------------------------------
;Specail1Air

[Command]
name = "ASpecialX"
command = ~D,DF,F, x

[Command]
name = "ASpecialY"
command = ~D,DF,F, y

[Command]
name = "ASpecialZ"
command = ~D,DF,F, z

;-------------------------------------------------------------------------
;Special2

[Command]
name = "SpecialA"
command = ~D,DB,B, a

[Command]
name = "SpecialB"
command = ~D,DB,B,b

[Command]
name = "SpecialC"
command = ~D,DB,B,c





;-------------------------------------------------------------------------
;3D fly-at-screen

[Command]
name = "3d"
command = ~B,F, a
time = 15

[Command]
name = "3d"
command = ~B,F, b
time = 15

[Command]
name = "3d"
command = ~B,F, c
time = 15

;-------------------------------------------------------------------------
;Counter

[Command]
name = "Counter"
command = ~F, x+a

[Command]
name = "Counter"
command = ~F, y+b

[Command]
name = "Counter"
command = ~F, z+c

[Command]
name = "236Z"
command = z+y+x

;---------------------------------------------------------------------------
; Roll

[Command]
name = "roll_n"
command = ~B, D, DB, x

[Command]
name = "roll_m"
command = ~B, D, DB,  y

[Command]
name = "roll_f"
command = ~B, D, DB, z

;---------------------------------------------------------------------------
; Forward Recovery Roll or Alpha Counter1

[Command]
name = "ac_sonic_f_roll_n"
command = ~B, DB, D, x

[Command]
name = "ac_sonic_f_roll_m"
command = ~B, DB, D, y

[Command]
name = "ac_sonic_f_roll_f"
command = ~B, DB, D, z

;---------------------------------------------------------------------------
; Backward Recovery Roll or Alpha Counter2

[Command]
name = "ac_sweep_b_roll_n"
command = ~B, DB, D, a

[Command]
name = "ac_sweep_b_roll_m"
command = ~B, DB, D, b

[Command]
name = "ac_sweep_b_roll_f"
command = ~B, DB, D, c

;---------------------------------------------------------------------------------------------
;Super Jump

[Command]
name = "Super_Jump"
command = ~D, U

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

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

[Command]
name = "guardpush"
command = x+y
time = 5

[Command]
name = "guardpush"
command = x+z
time = 5

[Command]
name = "guardpush"
command = y+z
time = 5

[Command]
name = "throw_p"
command = x+y
time = 5

[Command]
name = "throw_p"
command = y+z
time = 5

[Command]
name = "throw_p"
command = x+z
time = 5

[Command]
name = "throw_k"
command = a+b
time = 5

[Command]
name = "throw_k"
command = b+c
time = 5

[Command]
name = "throw_k"
command = a+c
time = 5

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

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

[Command]
name = "fwd_z"
command = /$F,z
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 = "back_b"        ;Alternative button command
command = /$B,b
time = 1

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

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

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

[Command]
name = "pc1"
command = b+y

[Command]
name = "ki"
command = /b+y

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

[Command]
name = "SJ"
command = $D, $U

;---------------------------------------------------------------------------
;Artificial Intelligence
;---------------------------------------------------------------------------

[Statedef -1]
;-|-AI-|--------------------------------------------------------------------
[State -1, AI]
type = VarSet
trigger1 = command = "AI_1"
trigger2 = command = "AI_2"
trigger3 = command = "AI_3"
trigger4 = command = "AI_4"
trigger5 = command = "AI_5"
trigger6 = command = "AI_6"
trigger7 = command = "AI_7"
trigger8 = command = "AI_8"
trigger9 = command = "AI_9"
trigger10 = command = "AI_10"
trigger11 = command = "AI_11"
trigger12 = command = "AI_12"
trigger13 = command = "AI_13"
trigger14 = command = "AI_14"
trigger15 = command = "AI_15"
v = 59
value = 1
;-----------------------------


[State -1, changestate]
type = ChangeState
triggerall = var(59) != 0
trigger1 = pos  y <= -380
value = 1201    ;new code to fix stuck-in-air-after-move bug

[State -1, changestate]
type = posset
triggerall = var(59) != 0
trigger1 = pos  y > 30
y = -5   ;new code to fix stuck-in-air-after-move bug


[State -1]
type = ChangeState
triggerall = pos y < 20
triggerall = pos y > -300
triggerall = var(59) != 0  && (ctrl)
trigger1 = (p2bodydist X >= 140) && (random <= 1)
value = 100



[State -1]
type = ChangeState
triggerall = pos y < 20
triggerall = pos y > -300
triggerall = var(59) != 0  && (ctrl)
trigger1 = (p2bodydist X >= 100) && (random <= 4)
value = 1000

[State -1]
type = ChangeState
triggerall = pos y < 20
triggerall = pos y > -300
triggerall = var(59) != 0        && (ctrl)
triggerall = ctrl
trigger1 = (p2bodydist X <= 150) && (random <= 1)
value = 1100


[State -1]
type = ChangeState
triggerall = pos y < 20
triggerall = pos y > -300
triggerall = var(59) != 0  && (ctrl)
triggerall = ctrl
trigger1 = (p2bodydist X <= 150) && (random <= 1)
value = 1110

[State -1]
type = ChangeState
triggerall = pos y < 20
triggerall = pos y > -300
triggerall = var(59) != 0     && (ctrl)
triggerall = ctrl
trigger1 = (p2bodydist X >= 150) && (random <= 2)
value = 10631


[State -1]
type = ChangeState
triggerall = pos y < 20
triggerall = pos y > -300
triggerall = var(59) != 0      && (ctrl)
trigger1 = (p2bodydist X <= 150) && (random <= 2)
value = 10821



[State -1, More AI]
type = ChangeState
triggerall = ctrl
triggerall = pos y < 20
triggerall = pos y > -300
trigger1 = command = "AI_16"
trigger2 = command = "AI_17"
trigger3 = command = "AI_15"
trigger4 = command = "AI_14"
value = 1000

[State -1, More AI]
type = ChangeState
triggerall = pos y < 20
triggerall = pos y > -300
triggerall = ctrl
trigger1 = command = "AI_13"
value = 10100

[state -1, moreaipumpkins]
type = changestate
triggerall = ctrl
triggerall = pos y < 20
triggerall = pos y > -300
trigger1 = command = "AI_18"
trigger1 = (p2bodydist X >= 250) && (random <= 900)   && (ctrl)
trigger2 = command = "AI_19"
trigger2 = (p2bodydist X >= 150) && (random <= 900)   && (ctrl)
trigger3 = command = "AI_20"
trigger3 = (p2bodydist X >= 150) && (random <= 900)   && (ctrl)
trigger4 = command = "AI_12"    && (ctrl)
trigger5 = command = "AI_11"    && (ctrl)
value = 10631


[state -1 AI demogobolin]
type = VarSet
triggerall = pos y < 20
triggerall = pos y > -300
trigger1 = command = "AI_21"         && (ctrl)
trigger1 = power >= 2950
trigger1 = random < 800
v = 27
value = 1




;-----------------             ---
;--|-AI Defense-|------------------------------------------------------------
[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = S)
trigger1 = (p2bodydist X <= 150) && (random <= 800)   && (ctrl)
value = 130

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = C)
trigger1 = (p2bodydist X <= 150) && (random <= 800)       && (ctrl)
value = 131

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = A)
trigger1 = (p2bodydist X <= 150) && (random <= 800)     && (ctrl)
value = 132

;-|-AI Combo Attempt-|----------------------------------------------
[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = S)
trigger1 = (p2bodydist X <= 150) && (random <= 550)        && (ctrl)
value = 200

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = S)
trigger1 = (p2bodydist X <= 150) && (random <= 550)         && (ctrl)
value = 210

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = S)
trigger1 = (p2bodydist X <= 150) && (random <= 400)       && (ctrl)
value = 230

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = S)
trigger1 = (p2bodydist X <= 25) && (random <= 400)       && (ctrl)
value = 240

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = C)
trigger1 = (p2bodydist X <= 25) && (random <= 600)        && (ctrl)
value = 400

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = C)
trigger1 = (p2bodydist X <= 25) && (random <= 5)        && (ctrl)
value = 410

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = C)
trigger1 = (p2bodydist X <= 25) && (random <= 500)     && (ctrl)
value = 430

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = C)
trigger1 = (p2bodydist X > 225) && (random <= 990)    && (ctrl)
value = 450

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = A)
trigger1 = (p2bodydist X <= 25) && (random <= 400)    && (ctrl)
value = 600

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = A)
trigger1 = (p2bodydist X <= 25) && (random <= 400)  && (ctrl)
value = 610

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = A)
trigger1 = (p2bodydist X >= 250) && (random <= 895)   && (ctrl)
value = 1000

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -300
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (p2movetype = A) && (statetype = A)
trigger1 = (p2bodydist X <= 25) && (random <= 500)   && (ctrl)
value = 640

;-|-AI Attempt Hyper-|---------------------------------------------

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -100
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (Statetype = S) && (p2statetype != L)
triggerall = random < 100
triggerall = power >= 2000
trigger1 = (p2bodydist x >= 100) && (prevstateno != 5120) && (numproj = 0) && (statetype != A)
trigger1 = (power >= 2000) && (numproj = 0) && (random = [0,300])
value = 3400



[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -100
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (Statetype = S) && (p2statetype != L)
triggerall = random < 100
triggerall = power >= 1000
trigger1 = (p2bodydist x >= 200) && (prevstateno != 5120) && (numproj = 0) && (statetype != A)
trigger1 = (power >= 1000) && (numproj = 0) && (random = [0,300])
value = 3100

[State -1]
type = ChangeState
triggerall = pos y < 10
triggerall = pos y > -100
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = (Ctrl) && (Statetype = S) && (p2statetype != L)
triggerall = random < 100
triggerall = power >= 2000
trigger1 = (p2bodydist x <= 50) && (prevstateno != 5120) && (numproj = 0) && (statetype != A)
trigger1 = (power >= 3000) && (numproj = 0) && (random = [0,300])
value = 3000





;-----------------------more AI---------------




;---------------------------------------------------------------------------
;Commands
;---------------------------------------------------------------------------

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

[State -1, Dash Forward]
type = ChangeState
value = 100
triggerall = StateType = S
triggerall = (Ctrl) && (StateNo != 100)
triggerall = (Ctrl) && (StateNo != 101)
trigger1 = Command = "FF"

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

[State -1, Dash Forward in air]
type = ChangeState
value = 101
triggerall = StateType = A
triggerall = (Ctrl) && (StateNo != 100)
triggerall = (Ctrl) && (StateNo != 101)
trigger1 = Command = "FF"

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

[State -1, Jump Back]
type = ChangeState
value = 105
triggerall = StateType = S        && (ctrl)
triggerall = (Ctrl) && (StateNo != 100)
trigger1 = Command = "BB"

;-----------------------------
[State -1, Hyper3]
type = ChangeState
value = 10700
triggerall = command = "Hyper4"     && (ctrl)
triggerall = power >= 1000
trigger1 = (Statetype !=A) && ctrl
trigger2 = (StateType != A) && (HitdefAttr = SC, NA) && (MoveContact)
;get off of the glider hyper
;---------
[State -1, Hyper3]
type = ChangeState
value = 3400
triggerall = command = "Hyper3"           && (ctrl)
triggerall = power >= 1000
trigger1 = (Statetype !=A) && ctrl
trigger2 = (StateType != A) && (HitdefAttr = SC, NA) && (MoveContact)
trigger2 = ctrl
;this hyper should be possible to perform in air
;hyper 3 is when you zoom in, kick butt, then attack with glider
;as of 4/22/08 No longer performable in air
;-----------------------------
[State -1, Hyper2]
type = ChangeState
value = 3100
triggerall = command = "Hyper2"         && (ctrl)
triggerall = power >= 1000
trigger1 = Statetype != A && ctrl
trigger2 = (StateType != A) && (HitdefAttr = SC, NA) && (MoveContact)
trigger2 = ctrl
;This is now also performable in the air.
;hyper 2 is when you toss a bunch of pumpkins at the enemy.
;as of 4/22/08 No longer performable in air

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

[State -1, Hyper1]
type = ChangeState
value = 3000
triggerall = command = "Hyper1"
triggerall = power >= 1000
trigger1 = Statetype != A && ctrl
trigger2 = (StateType != A) && (HitdefAttr = SC, NA) && (MoveContact)
trigger2 = ctrl
;trigger1 = stateno = 3100
;this hyper is now performable in the air
;hyper 3 is the glider alone with kick buttons
;as of 4/22/08 No longer performable in air
;-------------

[State -1, pumpkinpatch]
type = ChangeState
value = 10601
triggerall = command = "pumpkinpatch"
triggerall = NumHelper(10600) < 4
trigger1 = ctrl

[State -1, pumpkinpatch2]
type = ChangeState
value = 10621
triggerall = command = "pumpkinpatch2"
triggerall = NumHelper(10600) < 4
trigger1 =  ctrl


[State -1, pumpkinpatch3]
type = ChangeState
value = 10631
triggerall = command = "pumpkinpatch3"
triggerall = NumHelper(10600) < 4
trigger1 = ctrl

;----------------------------------------
;end of pumpkin patch.  Start of poison gas
;----------------------------------------
[State -1, poison]
type = ChangeState
value = 10721
triggerall = command = "poison"
triggerall = NumHelper(10700) < 1
trigger1 =  ctrl
trigger2 =  (HitdefAttr = SC, NA) && (MoveContact)


[State -1, alreadyPoisoned]
type = ChangeState
value = 10621
triggerall = command = "poison"
triggerall = NumHelper(10700) >= 1
trigger1 =  ctrl
trigger2 =  (HitdefAttr = SC, NA) && (MoveContact)

;----------------------------------------
;end of poison pumpkin patch.  Start of poison gas
;----------------------------------------

[State -1, poison]
type = ChangeState
value = 10921
triggerall = command = "poisona"
trigger1 =  ctrl
trigger2 =  (HitdefAttr = SC, NA) && (MoveContact)





;----------------------------------------
;end of poison gas.  Start of velocity bomb
;----------------------------------------

[State -1, Velocity]
type = ChangeState
value = 10821
triggerall = command = "velocity"
triggerall = NumHelper(10700) < 1
trigger1 = ctrl
trigger2 = (HitdefAttr = SC, NA) && (MoveContact)


[State -1, ToomuchVelocity]
type = ChangeState
value = 10621
triggerall = command = "velocity"
triggerall = NumHelper(10700) >= 1
trigger1 = ctrl
trigger2 = (HitdefAttr = SC, NA) && (MoveContact)




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


[State -1, Special1]
type = ChangeState
value = 1000
triggerall = command = "SpecialX"
triggerall = NumHelper(1050) = 0
triggerall = NumHelper(1060) = 0
triggerall = NumHelper(1070) = 0
trigger1 = Statetype != A && ctrl
trigger2 = (StateType != A) && (HitdefAttr = SC, NA) && (MoveContact)

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

[State -1, Special1]
type = ChangeState
value = 1001
triggerall = command = "SpecialY"
triggerall = NumHelper(1050) = 0
triggerall = NumHelper(1060) = 0
triggerall = NumHelper(1070) = 0
trigger1 = Statetype != A && ctrl
trigger2 = (StateType != A) && (HitdefAttr = SC, NA) && (MoveContact)

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

[State -1, Special1]
type = ChangeState
value = 1002
triggerall = command = "SpecialZ"
triggerall = NumHelper(1050) = 0
triggerall = NumHelper(1060) = 0
triggerall = NumHelper(1070) = 0
trigger1 = Statetype != A && ctrl
trigger2 = (StateType != A) && (HitdefAttr = SC, NA) && (MoveContact)

;---------------------------------------------------------------------------
; Flying Throw Bomb X
[State -1, Standing Throw Bomb]
type = ChangeState
value = 1003
triggerall = command = "ASpecialX"
triggerall = command != "holddown"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Flying Throw Bomb Y
[State -1, Standing Throw Bomb]
type = ChangeState
value = 1004
triggerall = command = "ASpecialY"
triggerall = command != "holddown"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Flying Throw Bomb Z
[State -1, Standing Throw Bomb]
type = ChangeState
value = 1005
triggerall = command = "ASpecialZ"
triggerall = command != "holddown"
trigger1 = statetype = A
trigger1 = ctrl

;-----------------------------I decided to make this command a hyper-move
;[State -1, Special2]
;type = ChangeState
;value = 1200
;triggerall = stateno < 3000
;triggerall = command = "3d"
;trigger1 = Statetype != A && ctrl
;trigger2 = (StateType != A) && (HitdefAttr = SC, NA) && (MoveContact)
;------------------------------



[State -1, Special2]
type = ChangeState
value = 1100
triggerall = stateno < 3000
triggerall = command = "SpecialA"
trigger1 = Statetype != A && ctrl
trigger2 = (StateType != A) && (HitdefAttr = SC, NA) && (MoveContact)

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

[State -1, Special2]
type = ChangeState
value = 1110
triggerall = stateno < 3000
triggerall = command = "SpecialB"
trigger1 = Statetype != A && ctrl
trigger2 = (StateType != A) && (HitdefAttr = SC, NA) && (MoveContact)

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

[State -1, Special2]
type = ChangeState
value = 1120
triggerall = stateno < 3000
triggerall = command = "SpecialC"
trigger1 = Statetype != A && ctrl
trigger2 = (StateType != A) && (HitdefAttr = SC, NA) && (MoveContact)

;-----------------------------
[State -1]
type = ChangeState
value = 7500
triggerall = Power < 3000 && (command = "pc1")
trigger1 = statetype = S
trigger1 = ctrl

;-----------------------------
[State -1, X]
type = ChangeState
value = 600
triggerall = command = "x"
trigger1 = Statetype = A && ctrl
trigger2 = stateno = 105 && time > 4

;-----------------------------
[State -1, Y]
type = ChangeState
value = 610
triggerall = command = "y"
trigger1 = Statetype = A && ctrl
trigger2 = (StateNo = 600) && (Movecontact) && time > 2
trigger3 = (StateNo = 630) && (Movecontact) && time > 2
trigger4 = stateno = 105 && time > 4

;-----------------------------
[State -1, Z]
type = ChangeState
value = 620
triggerall = command = "z"
trigger1 = Statetype = A && ctrl
trigger2 = (StateNo = 600) && (Movecontact) && time > 2
trigger3 = (StateNo = 630) && (Movecontact) && time > 2
trigger4 = (StateNo = 610) && (Movecontact) && time > 2
trigger5 = (StateNo = 640) && (Movecontact) && time > 2
trigger6 = stateno = 105 && time > 4

;-----------------------------
[State -1, B]
type = ChangeState
value = 640
triggerall = command = "b"
trigger1 = Statetype = A && ctrl
trigger2 = (StateNo = 600) && (Movecontact)
trigger3 = (StateNo = 610) && (Movecontact)
trigger4 = (StateNo = 620) && (Movecontact)
trigger5 = (StateNo = 630) && (Movecontact)
trigger6 = stateno = 105 && time > 4

;-----------------------------
[State -1, C]
type = ChangeState
;value = 650
value = 450
triggerall = command = "c"
trigger1 = Statetype = A && ctrl
trigger2 = (StateNo = 600) && (Movecontact)
trigger3 = (StateNo = 610) && (Movecontact)
trigger4 = (StateNo = 620) && (Movecontact)
trigger5 = (StateNo = 630) && (Movecontact)
trigger6 = (StateNo = 640) && (Movecontact)
trigger7 = stateno = 105 && time > 4

;-----------------------------
[State -1, A]
type = ChangeState
value = 630
triggerall = command = "a"
trigger1 = Statetype = A && ctrl
trigger2 = (StateNo = 600) && (Movecontact)
trigger3 = stateno = 105 && time > 4

;-----------------------------
[State -1, X agachado]
type = ChangeState
value = 400
triggerall = Command = "x"
triggerall = Command = "holddown"
trigger1 = (StateType != A) && (Ctrl)
trigger2 = (StateNo = 200) && (Movecontact)
trigger3 = (StateNo = 230) && (Movecontact)

;-----------------------------
[State -1, X]
type = ChangeState
value = 200
triggerall = Command = "x"
triggerall = Command != "holddown"
trigger1 = (StateType = S) && (Ctrl)

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

[State -1, Y agachado]
type = ChangeState
value = 410
triggerall = Command = "y"
triggerall = Command = "holddown"
trigger1 = (StateType != A) && (Ctrl)
trigger2 = (StateNo = 200) && (Movecontact)
trigger3 = (StateNo = 230) && (Movecontact)
trigger4 = (StateNo = 400) && (Movecontact)
trigger5 = (StateNo = 430) && (Movecontact)
trigger6 = (StateNo = 210) && (Movecontact)
trigger7 = (StateNo = 211) && (Movecontact)

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

[State -1, Y]
type = ChangeState
value = 210
triggerall = Command = "y"
triggerall = Command != "holddown"
trigger1 = (StateType = S) && (Ctrl)
trigger2 = (StateNo = 200) && (Movecontact) && time > 3
trigger3 = (StateNo = 230) && (Movecontact) && time > 3

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

[State -1, Z]
type = ChangeState
value = 220
triggerall = Command = "z"
triggerall = Command != "holddown"
trigger1 = (StateType = S) && (Ctrl)
trigger2 = (StateNo = 200) && (Movecontact) && time > 3
trigger3 = (StateNo = 230) && (Movecontact) && time > 3
trigger4 = (StateNo = 210) && (Movecontact) && time > 3
trigger5 = (StateNo = 211) && (Movecontact) && time > 3
trigger6 = (StateNo = 240) && (Movecontact) && time > 3
trigger7 = (StateNo = 241) && (Movecontact) && time > 3

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

[State -1, C]
type = ChangeState
value = 250
triggerall = Command = "c"
triggerall = Command != "holddown"
trigger1 = (StateType = S) && (Ctrl)
trigger2 = (StateNo = 200) && (Movecontact)
trigger3 = (StateNo = 230) && (Movecontact)
trigger4 = (StateNo = 210) && (Movecontact)
trigger5 = (StateNo = 211) && (Movecontact)
trigger6 = (StateNo = 240) && (Movecontact)
trigger7 = (StateNo = 241) && (Movecontact)
trigger8 = (StateNo = 221) && (Movecontact)
trigger9 = (StateNo = 220) && (Movecontact)

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

[State -1, Z agachado]
type = ChangeState
value = 420
triggerall = Command = "z"
triggerall = Command = "holddown"
trigger1 = (StateType != A) && (Ctrl)
trigger2 = (StateNo = 200) && (Movecontact)
trigger3 = (StateNo = 230) && (Movecontact)
trigger4 = (StateNo = 400) && (Movecontact)
trigger5 = (StateNo = 430) && (Movecontact)
trigger6 = (StateNo = 210) && (Movecontact)
trigger7 = (StateNo = 211) && (Movecontact)
trigger8 = (StateNo = 240) && (Movecontact)
trigger9 = (StateNo = 241) && (Movecontact)
trigger10 = (StateNo = 220) && (Movecontact)
trigger11 = (StateNo = 221) && (Movecontact)
trigger12 = (StateNo = 410) && (Movecontact)
trigger13 = (StateNo = 440) && (Movecontact)

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

[State -1, A agachado]
type = ChangeState
value = 430
triggerall = Command = "a"
triggerall = Command = "holddown"
trigger1 = (StateType != A) && (Ctrl)
trigger2 = (Stateno = 200) && (Movecontact)
trigger3 = (Stateno = 230) && (Movecontact)
trigger4 = (Stateno = 400) && (Movecontact)

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

[State -1, s]
type = ChangeState
value = 195
triggerall = Command = "s"
triggerall = Command != "holddown"
triggerall = stateno != 100
trigger1 = (StateType = S) && (Ctrl)

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

[State -1, A]
type = ChangeState
value = 230
triggerall = Command = "a"
triggerall = Command != "holddown"
triggerall = stateno != 100
trigger1 = (StateType = S) && (Ctrl)
trigger2 = (Stateno = 200) && (Movecontact)

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

[State -1, B]
type = ChangeState
value = 240
triggerall = Command = "b"
triggerall = Command != "holddown"
trigger1 = (StateType = S) && (Ctrl)
trigger2 = (StateNo = 200) && (Movecontact)
trigger3 = (StateNo = 230) && (Movecontact)
trigger4 = (StateNo = 210) && (Movecontact)
trigger5 = (StateNo = 211) && (Movecontact)

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

[State -1, B agachado]
type = ChangeState
value = 440
triggerall = Command = "b"
triggerall = Command = "holddown"
trigger1 = (StateType != A) && (Ctrl)
trigger2 = (StateNo = 200) && (Movecontact)
trigger3 = (StateNo = 230) && (Movecontact)
trigger4 = (StateNo = 400) && (Movecontact)
trigger5 = (StateNo = 430) && (Movecontact)
trigger6 = (StateNo = 210) && (Movecontact)
trigger7 = (StateNo = 211) && (Movecontact)
trigger8 = (StateNo = 240) && (Movecontact)
trigger9 = (StateNo = 241) && (Movecontact)
trigger10 = (StateNo = 220) && (Movecontact)
trigger11 = (StateNo = 221) && (Movecontact)

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

[State -1, C agachado]
type = ChangeState
value = 450
triggerall = Command = "c"
triggerall = Command = "holddown"
trigger1 = (Ctrl)
trigger2 = (StateNo = 200) && (Movecontact)
trigger3 = (StateNo = 230) && (Movecontact)
trigger4 = (StateNo = 400) && (Movecontact)
trigger5 = (StateNo = 430) && (Movecontact)
trigger6 = (StateNo = 210) && (Movecontact)
trigger7 = (StateNo = 211) && (Movecontact)
trigger8 = (StateNo = 250) && (Movecontact)
trigger9 = (StateNo = 251) && (Movecontact)
trigger10 = (StateNo = 420) && (Movecontact)
trigger11 = (StateNo = 421) && (Movecontact)
trigger12 = (StateNo = 410) && (Movecontact)
trigger13 = (StateNo = 440) && (Movecontact)

;------------------------------------------------------------------------
[State snapback]
type = varset
trigger1 = command = "236Z"
var(50) = 0
ignorehitpause = 1

[State snapback]
type = ChangeState
value = var(50)
triggerall = var(50) = 4440
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,460]) && (stateno%10 = 0)
trigger3 = (stateno = [200,451]) && (stateno%10 = 1)

;-----------------------------
[State -1, Super Jump]
type = ChangeState
value = 7000
triggerall = Command = "SJ"
trigger1 = StateType = S
trigger1 = ctrl

;-----------------------------
[State -1, Super Jump]
type = ChangeState
value = 7000
triggerall = Command != "holddown"
trigger1 = stateno = 220 && movehit

[State -1, Guard Push stand]
type = ChangeState
value = 6300
triggerall = command = "guardpush" && statetype = S
trigger1 = stateno = [150,153]

[State -1, Guard Push crouch]
type = ChangeState
value = 6310
triggerall = command = "guardpush" && statetype = C
trigger1 = stateno = [150,153]

[State -1, Guard Push aerial]
type = ChangeState
value = 6320
triggerall = command = "guardpush" && statetype = A
trigger1 = stateno = [154,155]

;------------------------------------
;AI Guard Push (Standing)
;------------------------------------
[State -1, AI Guard Push]
type = ChangeState
value = 6300
triggerall = Var(59) = 1
triggerall = (StateType = S) && (StateType != L)
triggerall = P2life != 0
trigger1 = StateNo = [150,153]
trigger1 = P2BodyDist X >= 71
trigger1 = Time >= 5

;---------------------------------------------------------------------------
;----------------------------- Recovery Roll -------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Near Foward Recovery Roll

[State -1]
type = VarSet
triggerall = Var(59) != 2
triggerall = command = "ac_sonic_f_roll_n"
triggerall = alive = 1
trigger1 = stateno = 5050 || stateno = 5071
v = 30
value = 1

[State -1]
type = ChangeState
value = 831
triggerall = Var(59) != 2
triggerall = Var(30) = 1
trigger1 = (Pos Y >= 0) && (Vel Y > 0)

;---------------------------------------------------------------------------
; Medium Foward Recovery Roll

[State -1]
type = VarSet
triggerall = Var(59) != 2
triggerall = command = "ac_sonic_f_roll_m"
triggerall = alive = 1
trigger1 = stateno = 5050 || stateno = 5071
v = 30
value = 2

[State -1]
type = ChangeState
value = 832
triggerall = Var(59) != 2
triggerall = Var(30) = 2
trigger1 = (Pos Y >= 0) && (Vel Y > 0)

;---------------------------------------------------------------------------
; Far Foward Recovery Roll

[State -1]
type = VarSet
triggerall = Var(59) != 2
triggerall = command = "ac_sonic_f_roll_f"
triggerall = alive = 1
trigger1 = stateno = 5050 || stateno = 5071
v = 30
value = 3

[State -1]
type = ChangeState
value = 840
triggerall = Var(59) != 2
triggerall = Var(30) = 3
trigger1 = (Pos Y >= 0) && (Vel Y > 0)

;---------------------------------------------------------------------------
; Near Backward Recovery Roll

[State -1]
type = VarSet
triggerall = Var(59) != 2
triggerall = command = "ac_sweep_b_roll_n"
triggerall = alive = 1
trigger1 = stateno = 5050 || stateno = 5071
v = 30
value = 4

[State -1]
type = ChangeState
value = 850
triggerall = Var(59) != 2
triggerall = Var(30) = 4
trigger1 = (Pos Y >= 0) && (Vel Y > 0)

;---------------------------------------------------------------------------
; Medium Backward Recovery Roll

[State -1]
type = VarSet
triggerall = Var(59) != 2
triggerall = command = "ac_sweep_b_roll_m"
triggerall = alive = 1
trigger1 = stateno = 5050 || stateno = 5071
v = 30
value = 5

[State -1]
type = ChangeState
value = 855
triggerall = Var(59) != 2
triggerall = Var(30) = 5
trigger1 = (Pos Y >= 0) && (Vel Y > 0)

;---------------------------------------------------------------------------
; Far Backward Recovery Roll

[State -1]
type = VarSet
triggerall = Var(59) != 2
triggerall = command = "ac_sweep_b_roll_f"
triggerall = alive = 1
trigger1 = stateno = 5050 || stateno = 5071
v = 30
value = 6

[State -1]
type = ChangeState
value = 860
triggerall = Var(59) != 2
triggerall = Var(30) = 6
trigger1 = (Pos Y >= 0) && (Vel Y > 0)

;---------------------------------------------------------------------------
;------------------------ Lie Down Recovery Roll ---------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Lie Down Forward Recovery Roll

[State -1]
type = ChangeState
value = 832
triggerall = Var(59) != 2
triggerall = command = "holdfwd"
triggerall = time = 1
triggerall = life > 0
trigger1 = stateno = 5120
trigger1 = alive = 1

;---------------------------------------------------------------------------
; Lie Down Backward Recovery Roll

[State -1]
type = ChangeState
value = 855
triggerall = Var(59) != 2
triggerall = command = "holdback"
triggerall = time = 1
triggerall = life > 0
trigger1 = stateno = 5120
trigger1 = alive = 1

;---------------------------------------------------------------------------
;----------------------------- Alpha Counter -------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Alpha Counter - Super Sonic Boom

[State -1]
type = ChangeState
value = 880
triggerall = Var(59) != 2
triggerall = command = "ac_sonic_f_roll_n" || command = "ac_sonic_f_roll_m" || command = "ac_sonic_f_roll_f"
triggerall = power >= 1000
triggerall = (StateType != A) && (StateType != L)
trigger1 = stateno = [150,152]

;---------------------------------------------------------------------------
; Alpha Counter - Sweep

[State -1]
type = ChangeState
value = 886
triggerall = Var(59) != 2
triggerall = command = "ac_sweep_b_roll_n" || command = "ac_sweep_b_roll_m" || command = "ac_sweep_b_roll_f"
triggerall = power >= 1000
triggerall = (StateType != A) && (StateType != L)
trigger1 = stateno = [150,152]







