; Amy_Rose's constants.
; Format (case insensitive):
; Var(1) = Variável de ativação do Chain Move!!!!
; Var(2) = Variável de Qtde de Provocações
; Var(5) = Variável de Cansaço!!!
; Var(8) = Variável de Jump!!!
; Var(9) = Variável de Intro!!!!
; Var(10) = Variável de Pose Win!!!!
;  [groupname]        
;  constname = value  

[Data]
life = 900          ;Amount of life to start with
attack = 80         ;100% attack power (more is stronger)
defence = 100        ;100% defensive power (more is stronger)
fall.defence_up = 50 ;Def goes up by 50% everytime player is hit on ground
liedown.time = 60    ;Time player takes before getting up from HIT_LIEDOWN
airjuggle = 15       ;Can do 15 points of juggling
sparkno = 2          ;Default spark number
guard.sparkno = 40   ;Default guard spark number
KO.echo = 1          ;1 to enable echo on KO
volume = 0           ;Volume offset (negative for softer)

[Size]
xscale = 1           ;Horizontal scaling factor.
yscale = 1           ;Vertical scaling factor.
ground.back = 11     ;Player width (back, ground)
ground.front = 10    ;Player width (front, ground)
air.back = 10        ;Player width (back, air)
air.front = 9       ;Player width (front, air)
z.width = 3          ;Player width (into and out)
attack.width = 4,4   ;Default attack width: back, front
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too   
head.pos = 0, -56
mid.pos = 0, -27

[Velocity]
walk.fwd  = 3.1
walk.back = -3.0
run.fwd = 5,0
run.back = -4.5, -2
runjump.fwd = 7
jump.neu = 0,-9.1
jump.back = -2.5
jump.fwd = 2.6
airjump.neu = 0,-7      ;.
airjump.back = -2.55,-7 ;Air jump speeds (opt)
airjump.fwd = 2.5,-7   ;.

[Movement]
airjump.num = 0
yaccel = .5
stand.friction = .8
crouch.friction = .8

;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...

;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1a]
type = ChangeAnim
triggerall = Var(5) = 0
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 1b]
type = ChangeAnim
triggerall = Var(5) = 1
trigger1 = Anim != 1 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 1

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0

[State 40, 0.0]
type = VarSet
trigger1 = Time = 0
var(8) = 0

[State 40, 0.1]
type = VarSet
trigger1 = command = "holdfwd"
trigger1 = var(8) != 2
var(8) = 1

[State 40, 0.2]
type = VarSet
trigger1 = command = "holdback"
trigger1 = var(8) != -2
var(8) = -1

[State 40, 0.1b]
type = VarSet
triggerall = Time = 0
triggerall = command = "holdfwd"
trigger1 = command = "longjump"
trigger2 = prevstateno = 100 ;RUN_FWD
var(8) = 2

[State 40, 0.2b]
type = VarSet
trigger1 = Time = 0
trigger1 = command = "holdback"
trigger1 = command = "longjump"
var(8) = -2

[State 40, 4]
type = ChangeState
triggerall = AnimTime = 0
trigger1 = var(8) != 0
trigger1 = var(8) != 1
trigger1 = var(8) != -1
trigger1 = command = "holdup"
trigger2 = command != "holdup"
value = 2041

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(var(8)=0, const(velocity.jump.neu.x), ifelse(var(8)>0, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1


;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A

[State 50, 0]
type = PlaySnd
trigger1 = Time = 0
value = 40,0

[State 50, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

;---------------------------------------------------------------------------
; Jump Start(short)
[Statedef 2041]
type    = A
physics = A
velset = 0, -6.4
ctrl = 1

[State 2041, 1a] ; Play sound when jumping (normal)
type = PlaySnd
trigger1 = Time = 0
trigger1 = var(8) != -2
trigger1 = var(8) != 2
value = 40,0

[State 2041, 1b] ; Play sound when jumping (long)
type = PlaySnd
triggerall = Time = 0
trigger1 = var(8) = -2
trigger2 = var(8) = 2
value = 40,1

[State 2041, -0.1] ;Holding up?
type = VelSet
trigger1 = Time = 0
trigger1 = command = "holdup"
y = -9.1

[State 2041, 0.1]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = 1
x = 2.5

[State 2041, 0.1b]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = 2
x = 4.2

[State 2041, 0.2]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = -1
x = -2.5

[State 2041, 0.2b]
type = VelSet
trigger1 = Time = 0
trigger1 = Var(8) = -2
x = -3.5

[State 2041, 1.1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Vel X = 0
trigger1 = command = "holdup"
value = 41

[State 2041, 1.2] ;Short
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Vel X = 0
trigger1 = command != "holdup"
value = 41

[State 2041, 2.1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Vel X > 0
trigger1 = command = "holdup"
value = 42

[State 2041, 2.2] ;Short
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Vel X > 0
trigger1 = command != "holdup"
value = 42

[State 2041, 3.1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Vel X < 0
value = 43


;---------------------------------------------------------------
; Run Forward
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1

[State 100, 1a]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
value = 99,0
volume = 0

[State 100, 1b]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = ChangeState
trigger1 = command != "holdfwd"
value = 0

;---------------------------------------------------------------------------
; Backdash (launch)
[Statedef 105]
type = S
movetype = I
physics = S
anim = 105
velset = 0
ctrl = 0

[State 105, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 106
;---------------------------------------------------------------------------
; Backdash (in the air)
[Statedef 106]
type = A
movetype = I
physics = N
anim = 106
velset = -6.5, -2

[State 106, 1]
type = PlaySnd
trigger1 = Time = 0
value = 105,0

[State 106, 2]
type = VelAdd
trigger1 = Time > 0
y = .4

[State 106, 3]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 107
;---------------------------------------------------------------------------
; Backdash (landing)
[Statedef 107]
type = S
movetype = I
physics = S
anim = 107
velset = 0,0

[State 107, 1]
type = PosSet
trigger1 = Time = 0
y = 0

[State 107, 2]
type = PlaySnd
trigger1 = Time = 0
value = 52,0

[State 107, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0,0

[State 170, 1]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

;---------------------------------------------------------------------------
; WIN
[Statedef 180]
type = S
ctrl = 0

[State 180, 1]
type = VarRandom
trigger1 = Time = 0
v = 10
range = 0,100

[State 180, 2]
type = ChangeState
trigger1 = Var(10) = [ 0, 50]
value = 181

[State 180, 3]
type = ChangeState
trigger1 = Var(10) = [ 51, 100]
value = 182

;---------------------------------------------------------------------------
; WIN1
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0,0

[State 181, win]
type = PlaySnd
trigger1 = AnimElem = 2
volume = 0
value = 181,0

[State 181, 1]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

;---------------------------------------------------------------------------
; WIN2
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0,0

[State 182, Win]
type = PlaySnd
trigger1 = AnimElem = 3
volume = 0
value = 1,0

[State 182, 1]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1
;---------------------------------------------------------------------------
; INTRO
[Statedef 191]
type = S
ctrl = 0

[State 180, 1]
type = VarRandom
trigger1 = Time = 0
v = 9
range = 0,100

[State 180, 2]
type = ChangeState
triggerall = P2name != "Mercedes Benz"
triggerall = P2name != "SS1 Bonus"
trigger1 = Var(9) = [ 0, 50]
value = 192

[State 180, 3]
type = ChangeState
triggerall = P2name != "Mercedes Benz"
triggerall = P2name != "SS1 Bonus"
trigger1 = Var(9) = [ 51, 100]
value = 192

[State 180, 3]
type = ChangeState
trigger1 = P2name = "Mercedes Benz"
trigger2 = P2name = "SS1 Bonus"
value = 199

;---------------------------------------------------------------------------
; INTRO COMUM
[Statedef 192]
type = S
ctrl = 0
anim = 191
velset = 0,0,0

[State 191, Fala]
type = PlaySnd
trigger1 = AnimElem = 4
volume = 0
value = 191,0

[State 191, Intro]
type = AssertSpecial
trigger1 = Time = [0, 85]
flag = intro

[State 191, Final]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; INTRO (Mercedes Benz)
[Statedef 199]
type = S
ctrl = 0
anim = 0
velset = 0,0,0

[State 199, Final]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; PROVOCATE
[Statedef 390]
type = S
movetype = I
ctrl = 0

[State 390, 0]
type = PlaYSnd
trigger1 = AnimElem = 3
volume = 0
value = 1,0

[State 390, 1]
type = ChangeAnim
trigger1 = Var(2)!= 1
trigger1 = Time = 0
value = 390

[State 390, 2]
type = VarSet
trigger1 = Anim = 390
trigger1 = Var(2)!= 1
v = 2
value = 1

[State 390, Acres1]
type = PowerAdd
trigger1 = Time = 0
value = 600

[State 390, 3]
type = ChangeState
trigger1 = Anim = 390
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; STAND_LIGHT_PUNCH
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 6
poweradd = 5
velset = 0,0
ctrl = 0
anim = 200

[State 200, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,0

[State 200, 2]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 500
value = 1,0
volume = 0

[State 200, 3]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
damage    = 10,1
animtype = Light
getpower = 10,5
givepower = 5, 2
guardflag = M
hitflag = MAF
priority = 6
pausetime = 6,8
numhits = 1
sparkno = 0
sparkxy = -27,-36
hitsound = s2,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -3.2
airguard.velocity = -2.4,-.8
air.velocity = -1.7

[State 220, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; STAND_HARD_PUNCH
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 7
ctrl = 0
velset = 0,0,0
anim = 210
poweradd = 30

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,1

[State 210, 2]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = Random < 500
value = 1,1
volume = 0

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Hard
damage    = 20, 2
priority = 4
hitflag = MA
guardflag = MA
getpower = 32, 16
givepower = 16, 8
pausetime = 9,9
sparkno = 2
sparkxy = -30,-31
hitsound   = S2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -4
air.velocity = -2,-3

[State 210, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; STAND_LIGHT_KICK
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 6
poweradd = 20
velset = 0,0
ctrl = 0
anim = 220

[State 220, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,0

[State 220, 2]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = Random < 500
value = 1,0
volume = 0

[State 220, 3]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
damage    = 10, 1
animtype = Light
getpower = 20,10
givepower = 10,5
guardflag = M
hitflag = MAF
priority = 6
pausetime = 6,8
numhits = 1
sparkno = 0
sparkxy = -25,-38
hitsound = s2,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -3.2
airguard.velocity = -2.4,-.8
air.velocity = -1.7

[State 220, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; STAND_HARD_KNEE
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 2
velset = 0,0
ctrl = 0
anim = 230
poweradd = 30

[State 230, 0a]
type = PosAdd
trigger1 = AnimElem = 2
x = 8

[State 230, 0b]
type = PosAdd
trigger1 = AnimElem = 3
x = 16

[State 230, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0,1

[State 230, 2]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = Random < 500
value = 1,1
volume = 0

[State 230, 3]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
damage    = 15,2
animtype = Medium 
getpower = 25, 12
givepower = 12, 6
guardflag = MA
hitflag = MAF
priority = 5
pausetime = 6,8 
numhits = 1
sparkno = 1
sparkxy = -28,-28
hitsound = s2,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 11
ground.velocity = -4.3
airguard.velocity = -2.4,-.8
air.velocity = -1.9,-3

[State 230, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; KNOCKDOWN_ATTACK
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd = 40
ctrl = 0
velset = 0,0
anim = 240

[State 240, Vel]
type = VelSet
trigger1 = AnimElem = 4
x = 2.5
y = 0

[State 240, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0, 2

[State 240, 2]
type = PlaySnd
trigger1 = Random < 200
trigger1 = AnimElem = 2
value = 1,2

[State 240, 4]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype = DiagUp
damage = 30, 3
getpower = 25, 12
givepower = 12, 6
guardflag = M
pausetime = 12,12
sparkno = 2
sparkxy = -37,-24
hitsound = S1000,2
guardsound = 6,0
ground.type = High
ground.slidetime = 20
ground.hittime = 23
ground.velocity = -5,-3
air.velocity = -3.5,-3
fall = ifelse(p2name = "Mercedes Benz",0, 1)

[State 241, Change]
type = Changestate
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Stand Dodge
[Statedef 254]
type = S
physics = S
ctrl = 0
velset = 0,0
anim = 254

[State 254, ImageA]
type = AfterImage
trigger1 = Time = 0
time = 2
palcolor = 256
palinvertall = 0
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = 0,0,0

[State 254, ImageB]
type = AfterImageTime
trigger1 = Time = [1,21]
time = 2

[State 254, 2]
type = PlaySnd
trigger1 = Time = 1
value = 1,0

[State 254, 3]
type = SprPriority
trigger1 = Time = 0
value = -1

[State 254, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Forward Dodge
[Statedef 255]
type = S
physics = N
ctrl = 0
velset = 0,0
anim = 255

[State 255, ImageA]
type = AfterImage
trigger1 = Time = 0
time = 2
length = 10
palcolor = 256
palinvertall = 0
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = 0,0,0

[State 255, ImageB]
type = AfterImageTime
trigger1 = Time = [1,25]
time = 2

[State 255, 1]
type = HitBy
trigger1 = Time >= 0
trigger1 = AnimElem = 3, < 0
value = SCA, AT

[State 255, 2]
type = PlaySnd
trigger1 = Time = 1
value = 1,0

[State 255, 4]
type = VelSet
trigger1 = AnimElem = 2
x = 4.5

[State 255, 4b]
type = VelSet
trigger1 = AnimElem = 3
x = 0

[State 255, 1]
type = PosAdd
trigger1 = AnimElem = 2
x = 7

[State 255, 3]
type = SprPriority
trigger1 = Time = 0
value = -1

[State 255, 4]
type = PlayerPush
trigger1 = Time >= 0
trigger1 = AnimElem = 3, < 0
value = 0

[State 255, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Backward Dodge
[Statedef 256]
type = S
physics = N
ctrl = 0
velset = 0,0
anim = 256

[State 256, ImageA]
type = AfterImage
trigger1 = Time = 0
time = 2
length = 10
palcolor = 256
palinvertall = 0
palbright = 0,0,0
palcontrast = 255,255,255
palpostbright = 0,0,0

[State 256, ImageB]
type = AfterImageTime
trigger1 = Time = [1,25]
time = 2

[State 255, 1]
type = HitBy
trigger1 = Time >= 0
trigger1 = AnimElem = 3, < 0
value = SCA, AT

[State 255, 2]
type = PlaySnd
trigger1 = Time = 1
value = 1,0

[State 255, 4]
type = VelSet
trigger1 = AnimElem = 2
x = -3

[State 255, 4]
type = VelSet
trigger1 = AnimElem = 3
x = 0

[State 255, 1]
type = PosAdd
trigger1 = AnimElem = 2
x = -6

[State 255, 3]
type = SprPriority
trigger1 = Time = 0
value = -1

[State 255, 4]
type = PlayerPush
trigger1 = Time >= 0
trigger1 = AnimElem = 3, < 0
value = 0

[State 255, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH_LIGHT_PUNCH
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 5
ctrl = 0
anim = 400

[State 400, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,0

[State 400, 2]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 500
value = 1,0
volume = 0

[State 400, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 10,1
animtype = Light
getpower = 10,5
givepower = 5, 2
guardflag = HL
hitflag = MAF
priority = 6
pausetime = 6,8
numhits = 1
sparkno = 0
sparkxy = -24,-27
hitsound = s2,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -3.2
airguard.velocity = -2.4,-.8
air.velocity = -1.7

[State 400, 3b]
type = CtrlSet
trigger1 = Time = 12
value = 1

[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; CROUCH_HARD_PUNCH
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 10
poweradd= 30
ctrl = 0
anim = 410

[State 410, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,1

[State 410, 2]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = Random < 500
value = 1,1
volume = 0

[State 410, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
animtype  = Hard
damage    = 20, 2
priority = 4
hitflag = MA
guardflag = HL
getpower = 32, 16
givepower = 16, 8
pausetime = 9,9
sparkno = 2
sparkxy = -24,-20
hitsound   = S2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -4
air.velocity = -2,-3

[State 410, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
;CROUCH_LIGHT_KICK
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd = 20
ctrl = 0
anim = 420

[State 410, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,0

[State 410, 2]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 500
value = 1,0
volume = 0

[State 410, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 10, 1
animtype = Light
getpower = 20,10
givepower = 10,5
guardflag = HL
hitflag = MAF
priority = 6
pausetime = 6,8
numhits = 1
sparkno = 0
sparkxy = -23,0
hitsound = s2,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -3.2
airguard.velocity = -2.4,-.8
air.velocity = -1.7

[State 420, 3]
type = CtrlSet
trigger1 = Time = 9
value = 1

[State 420, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
;CROUCH_HARD_KICK
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 15
poweradd= 30
ctrl = 0
anim = 430

[State 430, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,1

[State 430, 2]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = Random < 500
value = 1,1
volume = 0

[State 430, 3]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 20,2
animtype = Medium 
getpower = 25, 12
givepower = 12, 6
guardflag = HL
hitflag = MAF
priority = 5
pausetime = 6,8 
numhits = 1
sparkno = 1
sparkxy = -26,-18
hitsound = s2,1
guardsound = 6,0
ground.type = Trip
ground.slidetime = 5
ground.hittime  = 11
ground.velocity = -3
airguard.velocity = -2.4,-.8
air.velocity = -1.9,-3

[State 430, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;JUMP_LIGHT_PUNCH
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 5
poweradd = 20
ctrl = 0
anim = 600

[State 600, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,0

[State 600, 2]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 500
value = 1,0
volume = 0

[State 600, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 10,1
animtype = Light
getpower = 10,5
givepower = 5, 2
guardflag = HA
hitflag = MAF
priority = 6
pausetime = 6,8
numhits = 1
sparkno = 0
sparkxy = -23,-45
hitsound = s2,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -3.2
airguard.velocity = -2.4,-.8
air.velocity = -1.7

[State 600, 3b]
type = CtrlSet
trigger1 = Time = 12
value = 1

[State 600, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 50
;---------------------------------------------------------------------------
;JUMP_HARD_PUNCH
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 9
poweradd = 30
ctrl = 0
anim = 610

[State 610, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,1

[State 610, 2]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = Random < 500
value = 1,1
volume = 0

[State 610, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = A, NA
animtype  = Hard
damage    = 20, 2
priority = 4
hitflag = MA
guardflag = HA
getpower = 32, 16
givepower = 16, 8
pausetime = 9,9
sparkno = 2
sparkxy = -25,-39
hitsound   = S2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -4
air.velocity = -2,-3

[State 610, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 50
ctrl = 1
;---------------------------------------------------------------------------
;JUMP_LIGHT_KICK
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 6
poweradd = 20
ctrl = 0
anim = 620

[State 620, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0,0

[State 620, 2]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Random < 500
value = 1,0
volume = 0

[State 620, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 10, 1
animtype = Light
getpower = 20,10
givepower = 10,5
guardflag = HA
hitflag = MAF
priority = 6
pausetime = 6,8
numhits = 1
sparkno = 0
sparkxy = -24,-16
hitsound = s2,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 10
ground.velocity = -3.2
airguard.velocity = -2.4,-.8
air.velocity = -1.7

[State 620, 3b]
type = CtrlSet
trigger1 = Time = 9
value = 1

[State 620, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;JUMP_HEAVY_KICK
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 10
poweradd = 30
ctrl = 0
anim = 630

[State 630, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0,1

[State 630, 2]
type = PlaySnd
trigger1 = AnimElem = 3
trigger1 = Random < 500
value = 1,1
volume = 0

[State 630, 3]
type = HitDef
trigger1 = AnimElem = 3
attr = A, NA
damage    = 15,2
animtype = Medium 
getpower = 25, 12
givepower = 12, 6
guardflag = HA
hitflag = MAF
priority = 5
pausetime = 6,11 
numhits = 1
sparkno = 1
sparkxy = -24,-29
hitsound = s2,1
guardsound = 6,0
ground.type = High
ground.slidetime = 11
ground.hittime  = 14
ground.velocity = -3
airguard.velocity = -2.4,-.8
air.velocity = -1.9,-3

[State 630, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; THROW_FWD+Y
[Statedef 800]
type = S
movetype = A
physics = S
ctrl = 0
anim = 800

[State 800, NotHitBy]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 3

[State 800, 1]
type = HitDef
trigger1 = Time = 1
attr = S, NT
hitflag = M
priority = 1
getpower = 40,20
givepower = 20,10
snap = 26, 0, 0, 1
sparkno = -1
p2facing = -1
p1stateno = 810
p2stateno = 805
p2getp1state = 1
fall.damage = 0

[State 800, 2]
type = ChangeState
trigger1 = MoveContact = 1
value = 810

[State 800, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 800, 4]
type = ChangeState
trigger1 = MoveContact = 0
trigger1 = AnimTime = 2
value = 230

; THROWN_BY_THROW_Y
[Statedef 805]
type = A
movetype = H
physics = N
ctrl = 0
velset = 0
sprpriority = 2

[State 805, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = ifelse(var(6),806,805)

[State 805, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 806

; THROWN_BY_THROW_Y (Effects)
[Statedef 806]
type    = A
movetype= H; Está apanhando!!!
physics = N
velset = 5,-.05
anim = ifelse(var(6),10050,5050)

[State 806, Turn]
type = Turn
trigger1 = Time = 0

[State 806, 1] ;Gravity
type = VelAdd
Trigger1 = Time >= 5
y = .5

[State 806, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 806, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 806, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

; THROW_Y (Sucess)
[Statedef 810]
type = S
movetype = A
physics = S
anim = 810
poweradd =10
sprpriority = 4

[State 810, Grab]
type = PlaySnd
trigger1 = Time = 0
value = 800,0
channel = 0

[State 810, Voice]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,2
channel = 1

[State 810, 1]
type = TargetLifeAdd
trigger1 = AnimElem = 4
value = -60

[State 810, 2a]
type = TargetBind
trigger1 = AnimElem = 1
pos = -1,-41

[State 810, 2b]
type = TargetBind
trigger1 = AnimElem = 2
pos = 27,-28

[State 810, 2c]
type = TargetBind
trigger1 = AnimElem = 3
pos = 43,-27

[State 810, Width Char]
type = Width
trigger1 = AnimElem = 1 || AnimElem = 2 || AnimElem = 3 || AnimElem = 4
value = 30,0

[State 810, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; RUBBER HAMMER WEAK
[Statedef 1000]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1000
poweradd = 50

[State 1000, Sound1]
type = PlaySnd
trigger1 = AnimElem = 7
volume = 0
value = 1,2

[State 1000, Sound2]
type = PlaySnd
trigger1 = AnimElem = 7
volume = 0
value = 1000,0

[State 1000, Sound3]
type = PlaySnd
trigger1 = AnimElem = 9
volume = 0
value = 1000,1

[State 1000, Sound4]
type = PlaySnd
trigger1 = AnimElem = 6
volume = 0
value = 1000,3

[State 1000, Explod1]
type = Explod
trigger1 = Time = 27
anim = 1001
pos = 17,-52
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1000, Explod2]
type = Explod
trigger1 = Time = 31
anim = 1001
pos = 28,-44
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1000, Explod3]
type = Explod
trigger1 = Time = 35
anim = 1001
pos = 36,-35
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1000, Explod4]
type = Explod
trigger1 = Time = 39
anim = 1001
pos = 42,-17
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1000, 3a]
type = HitDef
trigger1 = AnimElem = 9
trigger1 = Var(1) = 1
attr = S, SA
damage    = 30, 10
animtype = Medium 
getpower = 25, 12
givepower = 12, 6
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 5, 17
sparkno = 1
sparkxy = -40,-17
hitsound = s1000,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 21
ground.hittime  = 42
guard.velocity = -2
ground.velocity = -3.5
airguard.velocity = -2.5,-2
air.velocity = -3.2,-2.3

[State 1000, 3b]
type = HitDef
trigger1 = AnimElem = 9
trigger1 = Var(1) = 0
attr = S, SA
damage    = 30, 10
animtype = Medium 
getpower = 25, 12
givepower = 12, 6
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 5, 7
sparkno = 1
sparkxy = -40,-17
hitsound = s1000,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 12
guard.velocity = -2
ground.velocity = -3.5
airguard.velocity = -2.5,-2
air.velocity = -3.2,-2.3

[State 1000, Fix]
type = VarSet
trigger1 = Var(1) != 1
trigger1 = AnimElem = 9, 1
v = 1
value = 0

[State 1000, Command]
type = ChangeState
trigger1 = Var(1) = 1
trigger1 = AnimElem = 11, = 1
value = 1005

[State 1000, end!!]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; RUBBER HAMMER WEAK (sequence hammer)
[Statedef 1005]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1005
poweradd = 50

[State 1005, Sound1]
type = PlaySnd
trigger1 = AnimElem = 4
volume = 0
value = 1,2

[State 1005, Sound2]
type = PlaySnd
trigger1 = AnimElem = 6
volume = 0
value = 1000,0

[State 1005, Sound3]
type = PlaySnd
trigger1 = AnimElem = 7
volume = 0
value = 1000,1

[State 1005, Sound4]
type = PlaySnd
trigger1 = AnimElem = 4
volume = 0
value = 1000,3

[State 1005, Explod1]
type = Explod
trigger1 = Time = 20
anim = 1001
pos = 0, -65
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1005, Explod2]
type = Explod
trigger1 = Time = 22
anim = 1001
pos = 21,-59
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1005, Explod3]
type = Explod
trigger1 = Time = 24
anim = 1001
pos = 34,-46
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1005, Explod4]
type = Explod
trigger1 = Time = 26
anim = 1001
pos = 41,-30
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1005, Pos1]
type = PosAdd
trigger1 = AnimElem = 2
x = 18

[State 1005, Pos2]
type = PosAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
x = 5

[State 1005, Pos3]
type = PosAdd
trigger1 = AnimElem = 6
x = 3

[State 1005, Pos4]
type = PosAdd
trigger1 = AnimElem = 10
x = 8

[State 1005, 3]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
damage    = 40, 20
animtype = Hard
getpower = 30, 15
givepower = 15,7
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 15, 10
sparkno = 1
sparkxy = -46,-15
hitsound = s1000,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 16
guard.velocity = -4
ground.velocity = -5
airguard.velocity = -3.5,-3.3
air.velocity = -4.2,-3.1
fall = ifelse(p2name = "Mercedes Benz",0, 1)
air.fall = 1
fall.recover = 1

[State 1005, Var1]
type = VarSet
trigger1 = AnimElem = 7
v = 1
value = 0

[State 1005, end!!]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; RUBBER HAMMER STRONG
[Statedef 1010]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1010
poweradd = 100

[State 1010, Pos1]
type = PosAdd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 8
x = 5

[State 1010, Sound1]
type = PlaySnd
trigger1 = AnimElem = 7
volume = 0
value = 1,2

[State 1010, Sound2]
type = PlaySnd
trigger1 = AnimElem = 7
volume = 0
value = 1000,0

[State 1010, Sound3]
type = PlaySnd
trigger1 = AnimElem = 9
volume = 0
value = 1000,1

[State 1010, Sound4]
type = PlaySnd
trigger1 = AnimElem = 6
volume = 0
value = 1000,3

[State 1010, Explod1]
type = Explod
trigger1 = Time = 27
anim = 1001
pos = 17,-52
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1010, Explod2]
type = Explod
trigger1 = Time = 31
anim = 1001
pos = 28,-44
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1010, Explod3]
type = Explod
trigger1 = Time = 35
anim = 1001
pos = 36,-35
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1010, Explod4]
type = Explod
trigger1 = Time = 39
anim = 1001
pos = 42,-17
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1010, 3]
type = HitDef
trigger1 = AnimElem = 8
attr = S, SA
damage    = 20, 7
animtype = Light
getpower = 20, 10
givepower = 10,5
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 5, 2
sparkno = 1
sparkxy = -40,-17
hitsound = s1000,2
guardsound = 6,0
ground.type = High
ground.slidetime = 2
ground.hittime  = 7
guard.velocity = -2
ground.velocity = -3.5
airguard.velocity = -2.5,-2
air.velocity = -3.2,-2.3

[State 1010, 3a]
type = HitDef
trigger1 = AnimElem = 9
trigger1 = Var(1) = 1
attr = S, SA
damage    = 25, 10
animtype = Medium 
getpower = 25, 12
givepower = 12, 6
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 5, 15
sparkno = 1
sparkxy = -40,-17
hitsound = s1000,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 19
ground.hittime  = 40
guard.velocity = -2
ground.velocity = -3.5
airguard.velocity = -2.5,-2
air.velocity = -3.2,-2.3

[State 1010, 3b]
type = HitDef
trigger1 = AnimElem = 9
trigger1 = Var(1) = 0
attr = S, SA
damage    = 25, 10
animtype = Medium 
getpower = 25, 12
givepower = 12, 6
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 5, 7
sparkno = 1
sparkxy = -40,-17
hitsound = s1000,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 12
guard.velocity = -2
ground.velocity = -3.5
airguard.velocity = -2.5,-2
air.velocity = -3.2,-2.3

[State 1000, Fix]
type = VarSet
trigger1 = Var(1) != 1
trigger1 = AnimElem = 9, 1
v = 1
value = 0

[State 1000, Command]
type = ChangeState
trigger1 = Var(1) = 1
trigger1 = AnimElem = 11, = 1
value = 1015

[State 1000, end!!]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; RUBBER HAMMER STRONG (sequence hammer)
[Statedef 1015]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1015
poweradd = 100

[State 1015, Sound1]
type = PlaySnd
trigger1 = AnimElem = 4
volume = 0
value = 1,2

[State 1015, Sound2]
type = PlaySnd
trigger1 = AnimElem = 6
volume = 0
value = 1000,0

[State 1015, Sound3]
type = PlaySnd
trigger1 = AnimElem = 7
volume = 0
value = 1000,1

[State 1015, Sound4]
type = PlaySnd
trigger1 = AnimElem = 4
volume = 0
value = 1000,3

[State 1015, Explod1]
type = Explod
trigger1 = Time = 20
anim = 1001
pos = 0, -65
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1015, Explod2]
type = Explod
trigger1 = Time = 22
anim = 1001
pos = 21,-59
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1015, Explod3]
type = Explod
trigger1 = Time = 24
anim = 1001
pos = 34,-46
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1015, Explod4]
type = Explod
trigger1 = Time = 26
anim = 1001
pos = 41,-30
sprpriority = 4
removetime = 8
ontop = 1
vel = 0, -2

[State 1015, Pos1]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 1015, Pos2]
type = PosAdd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
x = 7

[State 1015, Pos3]
type = PosAdd
trigger1 = AnimElem = 6
x = 4

[State 1015, Pos4]
type = PosAdd
trigger1 = AnimElem = 10
x = 8

[State 1015, 3]
type = HitDef
trigger1 = AnimElem = 6
attr = S, SA
damage    = 30, 12
animtype = Hard
getpower = 20, 10
givepower = 10,5
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 5, 2
sparkno = 1
sparkxy = -46,-15
hitsound = s1000,2
guardsound = 6,0
ground.type = High
ground.slidetime = 2
ground.hittime  = 7
guard.velocity = -2
ground.velocity = -3.5
airguard.velocity = -2.5,-2
air.velocity = -3.2,-2.3

[State 1015, 3b]
type = HitDef
trigger1 = AnimElem = 7
attr = S, NA
damage    = 35, 17
animtype = Heavy
getpower = 25, 12
givepower = 12,6
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 15, 10
sparkno = 1
sparkxy = -46,-15
hitsound = s1000,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 16
guard.velocity = -4
ground.velocity = -5
airguard.velocity = -3.5,-3.3
air.velocity = -4.2,-3.1
fall = ifelse(p2name = "Mercedes Benz",0, 1)
air.fall = 1
fall.recover = 0

[State 1015, Var1]
type = VarSet
trigger1 = AnimElem = 7
v = 1
value = 0

[State 1015, end!!]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Agradeço a Shinobu por me deixar usar o seu Shoryuken do seu char Ryu!!!
; Muito Obrigado!!!
;---------------------------------------------------------------------------
; HAMMER_UPPER (weak - on the ground)
[Statedef 1020]
type    = A
movetype= A
juggle  = 5
poweradd = 50
;<-- physics defaults to "none"

[State 1020, 0]
type = CtrlSet
trigger1 = Time = 0
value = 0

[State 1020, 1]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0
z = 0

[State 1020, 2]
type = ChangeAnim
trigger1 = Time = 0
value = 1020

[State 1020, 3]; Voice
type = PlaySnd
trigger1 = Time = 2
value = 1,0
volume = 0

[State 1020, 3b]; Wind of move
type = PlaySnd
trigger1 = Time = 2
value = 1020,0
volume = 0

[State 1020, 4]
type = PosAdd
trigger1 = Time = 0
x = 10

[State 1020, 5]
type = HitDef
trigger1 = AnimElem = 3
attr = S, SA
priority = 5
damage    = 50, 22
animtype  = Medium
getpower  = 30, 15
givepower = 15, 7
hitflag = MAF
guardflag = MA
pausetime = 15,15
sparkxy = -9,-34
sparkno = 1
hitsound   = S2,1
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -2.2,-6
guard.velocity = -7
air.velocity = -2.2,-6
fall = ifelse(p2name = "Mercedes Benz",0, 1)

[State 1020, 6]
type = NotHitBy
trigger1 = Time = 2
value = , N, S
time = 7

[State 1020, 7]
type = PosAdd
trigger1 = Time = 9
x = 5

[State 1020, 8]
type = VelSet
trigger1 = Time = 9
x = 3.8
y = -7.8

[State 1020, 9]
type = VelMul
trigger1 = Time >= 13
x = .45

[State 1020, 10] ;Gravity
type = VelAdd
trigger1 = Time >= 9
y = .45

[State 1020, 11] ;Change to coming down animation
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Time > 9
value = 1021
persistent = 0

[State 1020, 12] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger1 = Time > 9
type = PosSet
y = 0

[State 1020, 13] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
trigger1 = time > 9
type = ChangeState
value = 1021

;---------------------------------------------------------------------------
; HAMMER_UPPER (weak - land on ground)
[Statedef 1021]
type    = S
movetype= A
physics = S

[State 1021, 0]
type = PlaySnd
trigger1 = Time = 0
value = 52,0

[State 1021, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 1022

[State 1021, 2]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 1021, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1021, 4]
type = CtrlSet
trigger1 = Time = 3
value = 1

[State 1021, 5]
type = ChangeState
trigger1 = Time = 3
value = 0
;---------------------------------------------------------------------------
; HAMMER_UPPER (strong - on the ground)
[Statedef 1030]
type    = A
movetype= A
juggle  = 5
poweradd= 100
;<-- physics defaults to "none"

[State 1030, 0]
type = CtrlSet
trigger1 = Time = 0
value = 0

[State 1030, 1]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0
z = 0

[State 1030, 2]
type = ChangeAnim
trigger1 = Time = 0
value = 1020

[State 1030, 3]; Voice
type = PlaySnd
trigger1 = Time = 2
value = 1, 1
volume = 0

[State 1030, 3b]; Wind of move
type = PlaySnd
trigger1 = Time = 2
value = 1030,0
volume = 0

[State 1030, 4]
type = PosAdd
trigger1 = Time = 0
x = 15

[State 1030, 4b]
type = PosAdd
triggerall = Anim = 1020
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4,= 0
trigger4 = Animelem = 4,= 1
x = 9

[State 1030, 5]
type = HitDef
trigger1 = AnimElem = 2
attr = S, SA
priority = 5
damage    = 30, 12
animtype  = Hard
getpower  = 20, 10
givepower = 10, 5
hitflag = MAF
guardflag = MA
pausetime = 10, 10
sparkxy = -9,-34
sparkno = 2
hitsound   = S2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -0.1,-6
guard.velocity = -3
air.velocity = -0.1,-6

[State 1030, 5b]
type = HitDef
trigger1 = AnimElem = 3
attr = S, SA
priority = 5
damage    = 30, 12
animtype  = Hard
getpower  = 20, 10
givepower = 10, 5
hitflag = MAF
guardflag = MA
pausetime = 10, 10
sparkxy = -4,-58
sparkno = 2
hitsound   = S2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = 1,-6
guard.velocity = -2
air.velocity = 0,-6

[State 1030, 5c]
type = HitDef
trigger1 = AnimElem = 4
attr = A, SA
priority = 5
damage    = 35, 13
animtype  = Hard
getpower  = 25, 12
givepower = 12, 6
hitflag = MAF
guardflag = MA
pausetime = 15, 15
sparkxy = -3,-96
sparkno = 2
hitsound   = S2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -2.2,-6
guard.velocity = -7
air.velocity = -2.2,-6
fall = ifelse(p2name = "Mercedes Benz",0, 1)

[State 1030, 6]
type = NotHitBy
trigger1 = Time = 2
value = , N, S
time = 7

[State 1030, 7]
type = VelSet 
trigger1 = Time = 10
x = 3.8
y = -9.8

[State 1030, 8]
type = PosAdd
trigger1 = Time = 10
x = 10

[State 1030, 9]
type = VelMul
trigger1 = Time >= 19
x = .45

[State 1030, 10] ;Gravity
type = VelAdd
trigger1 = Time >= 10
y = .45


[State 1030, 11] ;Change to coming down animation
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = time > 10
value = 1021
persistent = 0

[State 1030, 12] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -5
trigger1 = time > 10
type = ChangeState
value = 1031


;---------------------------------------------------------------------------
; HAMMER_UPPER (strong - land on ground)
[Statedef 1031]
type    = S
movetype= A
physics = S

[State 1031, 0]
type = PlaySnd
trigger1 = Time = 0
value = 52,0

[State 1031, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 1022

[State 1031, 2]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 1031, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1031, 4]
type = CtrlSet
trigger1 = Time = 7
value = 1

[State 1031, 5]
type = ChangeState
trigger1 = Time = 7
value = 0
;---------------------------------------------------------------------------
; SHORT JUMP ATTACK (weak - start)
[Statedef 1039]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1039
poweradd = 50

[State 1039, 0]
type = VarSet
trigger1 = Time = 0
V = 1
value = 0

[State 1039, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 1040

;---------------------------------------------------------------------------
; SHORT JUMP ATTACK (weak - attack)
[Statedef 1040]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1040
poweradd = 0

[State 1040, Sound0]
type = PlaySnd
trigger1 = AnimELem = 2
value = 1020, 0
volume = 0

[State 1040, Sound1]
type = PlaySnd
trigger1 = Time = 0
volume = 0
value = 1,1

[State 1040, Sound2]
type = PlaySnd
trigger1 = Time = 1
volume = 0
value = 40, 1

[State 1040, 0]
type = PosSet
trigger1 = Time = 0
y = -0.01

[State 1040, 1]
type = PosAdd
trigger1 = AnimElem = 2
y = -6

[State 1040, 2a]
type = VelSet
trigger1 = Time = 1
x = 3
y = -1

[State 1040, 2b]
type = VelAdd
trigger1 = Time >= 10
y = .4

[State 1040, 2c]
type = VelAdd
trigger1 = Time >= 10
x = .1

[State 1040, 3a]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = Var(1) = 1
attr = A, SA
damage    = 30, 10
animtype = Medium 
getpower = 25, 12
givepower = 12, 6
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 12, 12
sparkno = 1
sparkxy = -12,-21
hitsound = S2,1
guardsound = 6,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 12
guard.velocity = -2
ground.velocity = -3.5
airguard.velocity = -2.5,-2
air.velocity = -3.2,-2.3

[State 1040, 3b]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = Var(1) = 0
attr = A, SA
damage    = 30, 10
animtype = Medium 
getpower = 25, 12
givepower = 12, 6
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 10,10
sparkno = 1
sparkxy = -12,-21
hitsound = S2,1
guardsound = 6,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 12
guard.velocity = -2
ground.velocity = -3.5
airguard.velocity = -2.5,-2
air.velocity = -3.2,-2.3

[State 1040, Change]
type = ChangeState
trigger1 = Var(1) = 1
trigger1 = AnimElem = 2,= 1
value = 1042

[State 1040, end!!]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1041
ctrl = 0
;-------------------------------------------------------------------------
; SHORT_JUMP_ATTACK (Any - land on ground)
[Statedef 1041]
type = S
movetype = I
physics = S
anim = 47
ctrl = 0

[State 1041, Fix]
type = VarSet
trigger1 = Time = 0
v = 1
value = 0

[State 1041, Velocity]
type = VelSet
trigger1 = Time = 0
y = 0

[State 1041, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1041, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------
; DIVE HEAD BUTT (weak) (follow-up)
[Statedef 1042]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1041
poweradd = 50

[State 1042, Sound1]
type = PlaySnd
trigger1 = Time = 0
volume = 0
value = 1,2

[State 1042, Sound2]
type = PlaySnd
trigger1 = Time = 0
volume = 0
value = 1020,0

[State 1042, Vel1]
type = VelAdd
trigger1 = Time >= 0
y = .3

[State 1042, Hit]
type = HitDef
trigger1 = AnimElem = 1,= 1
attr = S, SA
damage    = 65, 30
animtype = Hard
getpower = 35, 17
givepower = 17, 8
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 15,15
sparkno = 1
sparkxy = -16,-26
hitsound = S2,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 16
guard.velocity = -4
ground.velocity = -5
airguard.velocity = -3.5,-3.3
air.velocity = -4.2,-3.1
fall = ifelse(p2name = "Mercedes Benz",0, 1)
palfx.time = 15
palfx.add = 255,255,255
palfx.mul = 255,255,255

[State 1042, Var1]
type = VarSet
trigger1 = Time = 0
v = 1
value = 0

[State 1042, end!!]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1043

;---------------------------------------------------------------------------
; FINAL DIVE HEAD BUTT (Any)
[Statedef 1043]
type = S
movetype = I
physics = N
ctrl = 0
anim = 1042
velset = 3,0

[State 1043, 0]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1043, 1]
type = VelAdd
trigger1 = Time >= 0
x = -.1

[State 1043, 2]
type = VelSet
trigger1 = Time >= 30
x = 0
y = 0

[State 1043, 3]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 42

[State 1043, 4]
type = PlaySnd
trigger1 = Time = 0
value = 5000,0
volume = 0

[State 1043, 4b]
type = PlaySnd
trigger1 = Time = 0
value = 1040,0
volume = 0

[State 1043, 4c]
type = Explod
trigger1 = Time = 1
pos = -5,-2
anim = F120
removetime = 15

[State 1043, 5]
type = PlaySnd
trigger1 = AnimElem = 11
value = 1040,1
volume = 0

[State 1043, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 1043, 7]
type = ChangeState
triggerall = Time >= 45
trigger1 = command = "x_rep"
trigger2 = command = "y_rep"
trigger3 = command = "a_rep"
trigger4 = command = "b_rep"
value = 12
ctrl = 1

;---------------------------------------------------------------------------
; SHORT JUMP ATTACK (strong - start)
[Statedef 1049]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1049
poweradd = 40

[State 1049, 0]
type = VarSet
trigger1 = Time = 0
V = 1
value = 0

[State 1049, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 1050

;---------------------------------------------------------------------------
; SHORT JUMP ATTACK (strong - attack)
[Statedef 1050]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1040
poweradd = 100

[State 1050, Sound0]
type = PlaySnd
trigger1 = AnimELem = 2
value = 1030, 0
volume = 0

[State 1050, Sound1]
type = PlaySnd
trigger1 = Time = 0
volume = 0
value = 1,2

[State 1050, Sound2]
type = PlaySnd
trigger1 = Time = 1
volume = 0
value = 40, 1

[State 1050, 0]
type = PosSet
trigger1 = Time = 0
y = -0.01

[State 1050, 1]
type = PosAdd
trigger1 = AnimElem = 2
y = -11

[State 1050, 2a]
type = VelSet
trigger1 = Time = 1
x = 5
y = -2

[State 1050, 2b]
type = VelAdd
trigger1 = Time >= 10
y = .4

[State 1050, 2c]
type = VelAdd
trigger1 = Time >= 10
x = .1

[State 1050, 3a]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = Var(1) = 1
attr = A, SA
damage    = 45, 15
animtype = Hard
getpower = 25, 12
givepower = 12, 6
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 12, 12
sparkno = 1
sparkxy = -12,-21
hitsound = S2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 12
guard.velocity = -2
ground.velocity = -3.5
airguard.velocity = -2.5,-2
air.velocity = -3.2,-2.3

[State 1050, 3b]
type = HitDef
trigger1 = AnimElem = 2
trigger1 = Var(1) = 0
attr = A, SA
damage    = 45, 15
animtype = Hard
getpower = 25, 12
givepower = 12, 6
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 10,10
sparkno = 1
sparkxy = -12,-21
hitsound = S2,2
guardsound = 6,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 12
guard.velocity = -2
ground.velocity = -3.5
airguard.velocity = -2.5,-2
air.velocity = -3.2,-2.3

[State 1050, Change]
type = ChangeState
trigger1 = Var(1) = 1
trigger1 = AnimElem = 2,= 1
value = 1051

[State 1050, end!!]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1041
ctrl = 0
;-------------------------------------------------------------------------
; DIVE HEAD BUTT (hard) (follow-up)
[Statedef 1051]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1041
poweradd = 100

[State 1051, Sound1]
type = PlaySnd
trigger1 = Time = 0
volume = 0
value = 1,2

[State 1051, Sound2]
type = PlaySnd
trigger1 = Time = 0
volume = 0
value = 1020,0

[State 1051, Vel1]
type = VelAdd
trigger1 = Time >= 0
y = .3

[State 1051, Hit]
type = HitDef
trigger1 = AnimElem = 1,= 1
attr = S, SA
damage    = 80, 40
animtype = Heavy
getpower = 40, 20
givepower = 20, 10
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 30,30
sparkno = 1
sparkxy = -16,-26
hitsound = S2,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
guard.velocity = -6
ground.velocity = -6
airguard.velocity = -6,-4
air.velocity = -6,-4
fall = ifelse(p2name = "Mercedes Benz",0, 1)
fall.recover = 0
palfx.time = 30
palfx.add = 255,0,0
palfx.mul = 255,0,0
palfx.sinadd = 32,5,5,8
envshake.time = 30
fall.envshake.time = 30

[State 1051, Var1]
type = VarSet
trigger1 = Time = 0
v = 1
value = 0

[State 1051, end!!]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1043

;---------------------------------------------------------------------------
; ROSE WHIRLWIND (weak - start)
[Statedef 1060]
type = S
movetype = A
physics = S
juggle = 5
poweradd = 50
ctrl = 0
anim = 1060

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
volume = 0
value = 1,1
channel = 0

[State 1120, 2]
type = Explod
trigger1 = AnimElem = 4
anim = 1061
pos = 14,4
sprpriority = 1
removetime = 9

[State 1000, 3]
type = PlaySnd
trigger1 = AnimElem = 2
volume = 0
value = 1060,0
channel = 1

[State 1000, 4]
type = Projectile
trigger1 = AnimElem = 7
projanim = 1062
ProjHitanim = 1063
ProjRemanim = 1063
ProjRemovetime = 40
ProjCancelAnim = 1063
Projremove = 1
Projpriority = 2
velocity = 1, 0
projid = 1060
accel = 0.1
offset =  31,4
attr = S, SP
damage = 35,10
animtype = Medium
getpower = 26
guardflag = MA
hitflag = MAF
pausetime = 0,14
hitsound = S1060,1
volume = 5000
sparkno = -1
guardsound = S1060,2
ground.type = Low
ground.slidetime = 1
ground.hittime = 14
ground.velocity = -4
air.hittime = 3
guard.velocity = -2
airguard.velocity = -2.1,-.3
air.animtype = Low
air.velocity = -3,-1.2
air.juggle = 3
fall = ifelse(p2name = "Mercedes Benz",0, 1)
air.fall = 1
fall.recover = 1

[State 1060, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; ROSE WHIRLWIND (strong - start)
[Statedef 1080]
type = S
movetype = A
physics = S
juggle = 5
poweradd = 100
ctrl = 0
anim = 1060

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 0
volume = 0
value = 1,2
channel = 0

[State 1120, 2]
type = Explod
trigger1 = AnimElem = 4
anim = 1061
pos = 14,4
sprpriority = 1
removetime = 9

[State 1000, 3]
type = PlaySnd
trigger1 = AnimElem = 2
volume = 0
value = 1060,0
channel = 1

[State 1020, 4]
type = Projectile
trigger1 = AnimElem = 7
projanim = 1064
ProjHitanim = 1063
ProjRemanim = 1063
ProjRemovetime = 25
ProjCancelAnim = 1063
Projremove = 1
Projpriority = 2
projid = 1060
velocity = 2, 0
accel = 0.2
offset =  31,4
attr = S, SP
damage = 50,12
animtype = Hard
getpower = 50
guardflag = MA
hitflag = MAF
pausetime = 0,14
hitsound = S1060,1
volume = 5000
sparkno = -1
guardsound = S1060,2
ground.type = Low
ground.slidetime = 1
ground.hittime = 14
ground.velocity = -6
air.hittime = 3
guard.velocity = -3
airguard.velocity = -2.9,-.6
air.animtype = Low
air.velocity = -4.9,-1.6
air.juggle = 3
fall = ifelse(p2name = "Mercedes Benz",0, 1)
air.fall = 1
fall.recover = 0

[State 1140, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; WHIRLWIND HAMMER (1 time)
[Statedef 1090]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 50
velset = 0,0
anim = 1090
ctrl = 0

[State 1090, movefwd]
type = VelSet
trigger1 = command = "holdfwd"
x = 0.4

[State 1090, moveback]
type = VelSet
trigger1 = command = "holdback"
x = -0.4

[State 1090, Fix1]
type = VarSet
trigger1 = Time = 0
V = 1
value = 0

[State 1090, 1]
type = PlaySnd
trigger1 = Time = 0
value = 1,2
volume = 0

[State 1090, 1b]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
value = 1001,0
volume = 0

[State 1090, 3] 
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
attr = S, SA
animtype  = Hard
damage    = 20,5
getpower = 20,10
givepower = 10,5
priority  = 5
guardflag = MA
pausetime = 8,8
sparkxy = -28,-35
sparkno = 1
hitsound   = S2,3
guardsound = S1060,2
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -.2
air.velocity = -.2,-2.5

[State 1090, Command]
type = ChangeState
trigger1 = Var(1) = 1
trigger1 = AnimElem = 9, = 1
value = 1091

[State 1090, end!!]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; WHIRLWIND HAMMER (2 times)
[Statedef 1091]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 50
velset = 0,0
anim = 1091
ctrl = 0

[State 1090, movefwd]
type = VelSet
trigger1 = command = "holdfwd"
x = 0.4

[State 1090, moveback]
type = VelSet
trigger1 = command = "holdback"
x = -0.4

[State 1091, Fix1]
type = VarSet
trigger1 = Time = 0
V = 1
value = 0

[State 1091, 1b]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1020,0
volume = 0

[State 1091, 1c]
type = PlaySnd
trigger1 = AnimElem = 6
value = 1030,0
volume = 0

[State 1091, 6] 
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 7
attr = S, SA
animtype  = Hard
damage    = 20,5
getpower = 20,10
givepower = 10,5
priority  = 5
guardflag = MA
pausetime = 8,8
sparkxy = -28,-35
sparkno = 1
hitsound   = S2,3
guardsound = S1060,2
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -.2
air.velocity = -.2,-2.5

[State 1091, Command]
type = ChangeState
trigger1 = Var(1) = 1
trigger1 = AnimElem = 9, = 1
value = 1092

[State 1091, end!!]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; WHIRLWIND HAMMER (end)
[Statedef 1092]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 50
velset = 0,0
anim = 1092
ctrl = 0

[State 1090, movefwd]
type = VelSet
triggerall = Time < 18
trigger1 = command = "holdfwd"
x = 0.4

[State 1090, moveback]
type = VelSet
triggerall = Time < 18
trigger1 = command = "holdback"
x = -0.4

[State 1092, Fix1]
type = VarSet
trigger1 = Time = 0
V = 1
value = 0

[State 1092, 1b]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 7
value = 1030,0
volume = 0

[State 1091, 6a] 
type = HitDef
trigger1 = AnimElem = 3
attr = S, SA
animtype  = Hard
damage    = 20,5
getpower = 20,10
givepower = 10,5
priority  = 5
guardflag = MA
pausetime = 8,8
sparkxy = -28,-35
sparkno = 1
hitsound   = S2,3
guardsound = S1060,2
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -.2
air.velocity = -.2,-2.5

[State 1060, 6b] 
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype  = Back
damage    = 60,25
getpower = 25,10
givepower = 25,8
priority  = 5
guardflag = MA
pausetime = 21,21
sparkxy = -28,-35
sparkno = 2
hitsound   = S1000,2
guardsound = S1060,2
envshake.time = 21
ground.type = High
ground.slidetime = 12
ground.hittime  = 20
ground.velocity = -8,-4
air.velocity = -8,-4
fall = ifelse(p2name = "Mercedes Benz",0, 1)
air.fall = 1
fall.recover = 0

[State 1060, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------
; ROOZU KOU REN KEN
[Statedef 3000]
type = S
movetype = A
physics = N
juggle = 0
velset = 0,0
anim = 3000
ctrl = 0

[State 3000, Super A]
type = SuperPause
trigger1 = Time = 0
pos = -5,-33
anim =100

[State 3000, Super B]
type = PlaySnd
trigger1 = Time = 0
value = 3000, 0 ;Play fight sound of super
volume = 0

[State 3000, Super C]
type = PowerAdd
trigger1 = Time = 0
value = -1000

[State 3000, Super D]
type = AfterImage
trigger1 = Time = 2
time = 2

[State 3000, Super E]
type = AfterImageTime
trigger1 = Time = [2, 400]
time = 2

[State 3000, Super F] ;Invunerable to normal and special attacks for a bit
type = NotHitBy
trigger1 = Time = 2
value =, NA, SA, AT
time = 12

[State 3000, 1a]
type = PlaySnd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
value = 1,0
volume = 0

[State 3000, 1b]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 10
value = 1,1
volume = 0

[State 3000, 1c]
type = PlaySnd
trigger1 = AnimElem = 19
value = 1,2
volume = 0

[State 3000, 1d]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 6
trigger3 = AnimElem = 9
trigger4 = AnimElem = 13
trigger5 = AnimElem = 18
value = 0,2
volume = 0

[State 3000, VelConst]
type = VelSet
trigger1 = AnimElem = 2
x = 2
y = 0

[State 3000, PosAtk1]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 7
trigger3 = AnimElem = 10
trigger4 = AnimElem = 14
x = 5

[State 3000, PosAtk2]
type = PosAdd
trigger1 = AnimElem = 19
x = 10

[State 3000. Brake]
type = VelAdd
trigger1 = Time > 67
trigger1 = Vel X > 0
x = -.5
y = 0

[State 3000, Brake2]
type = VelSet
triggerall = Time > 67
trigger1 = Vel X <= 0
x = 0
y = 0

[State 3000, Hits 1 e 3]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 10
attr = S, HA
animtype  = Hard
damage    = 40,10
priority = 4
hitflag = MA
guardflag = MA
getpower = 0,15
givepower = 0,7
pausetime = 10,10
sparkno = 2
sparkxy = -30,-31
hitsound   = S2,2
guardsound = s1000,4
ground.type = Low
ground.slidetime = 10
ground.hittime  = 16
ground.velocity = -3.3
air.velocity = -3.3,-.5
palfx.time = 10
palfx.add = 255,0,0
palfx.mul = 255,0,0

[State 3000, Hit 2]
type = HitDef
trigger1 = AnimElem = 7
attr = S, HA
damage    = 40, 10
animtype = Hard
getpower = 0,10
givepower = 0,5
guardflag = M
hitflag = MAF
priority = 6
pausetime = 10,10
sparkno = 2
sparkxy = -27,-36
hitsound = s2,1
guardsound = s1000,4
ground.type = High
ground.slidetime = 8
ground.hittime  = 13
ground.velocity = -3.3
airguard.velocity = -3
air.velocity = -3.3,-.5
palfx.time = 10
palfx.add = 255,0,0
palfx.mul = 255,0,0

[State 3000, Hit 4]
type = HitDef
trigger1 = AnimElem = 14
attr = S, HA
damage    = 40,10
animtype = Hard
getpower = 0,10
givepower = 0,5
guardflag = M
hitflag = MAF
priority = 6
pausetime = 10,10
sparkno = 2
sparkxy = -27,-36
hitsound = s2,1
guardsound = s1000,4
ground.type = High
ground.slidetime = 14
ground.hittime  = 19
ground.velocity = -3.3
airguard.velocity = -3
air.velocity = -3.3,-.5
palfx.time = 10
palfx.add = 255,0,0
palfx.mul = 255,0,0

[State 3000, Hit Final]
type = HitDef
trigger1 = AnimElem = 19
attr = S, HA
damage    = 90,15
animtype = Heavy
getpower = 0, 20
givepower = 0, 10
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 20,20
sparkno = 2
sparkxy = -37,-24
hitsound = S1000,2
guardsound = S1000,4
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
guard.velocity = -6
ground.velocity = -6
airguard.velocity = -6,-4
air.velocity = -6,-4
fall = ifelse(p2name = "Mercedes Benz",0, 1)
fall.recover = 0
palfx.time = 20
palfx.add = 255,0,0
palfx.mul = 255,0,0
envshake.time = 20
fall.envshake.time = 15

[State 3001, Snd]
type = PlaySnd
trigger1 = WinKO = 1
ignorehitpause = 1
persistent = 0
value = 9000,0
volume = 255

[State 3001, Screen]
type = EnvColor
trigger1 = WinKO = 1
value = 255,255,255
ignorehitpause = 1
persistent = 0
under = 1
time = 20

[State 3001, Chars]
type = PalFX
trigger1 = WinKO = 1
ignorehitpause = 1
persistent = 0
value = 0,0,0
mul = 0,0,0
time = 20

[State 3000, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; SHIN ROOZU KOU REN KEN
[Statedef 3010]
type = S
movetype = A
physics = N
juggle = 0
velset = 0,0
anim = 3010
ctrl = 0

[State 3010, Super A]
type = SuperPause
trigger1 = Time = 0
pos = -5,-33
anim =101

[State 3000, Super B]
type = PlaySnd
trigger1 = Time = 0
value = 3000, 1 ;Play fight sound of super
volume = 0

[State 3000, Super C]
type = PowerAdd
trigger1 = Time = 0
value = -2000

[State 3000, Super D]
type = AfterImage
trigger1 = Time = 2
paladd = 200, 15,15
palmul = .75,.65,.65
time = 2

[State 3000, Super E]
type = AfterImageTime
trigger1 = Time = [2, 1000]
time = 2

[State 3000, Super F] ;Invunerable to normal and special attacks for a bit
type = NotHitBy
trigger1 = Time = 2
value =, NA, SA, AT
time = 12

[State 3000, 1a]
type = PlaySnd
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 21
value = 1,0
volume = 0

[State 3000, 1b]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 10
trigger3 = AnimElem = 17
trigger4 = AnimElem = 24
trigger5 = AnimElem = 28
value = 1,1
volume = 0

[State 3000, 1c]
type = PlaySnd
trigger1 = AnimElem = 35
trigger2 = AnimElem = 41
value = 1,2
volume = 0

[State 3000, 1d]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 6
trigger3 = AnimElem = 9
trigger4 = AnimElem = 13
trigger5 = AnimElem = 16
trigger6 = AnimElem = 20
trigger7 = AnimElem = 23
trigger8 = AnimElem = 27
trigger9 = AnimElem = 34
trigger10 = AnimElem = 40
value = 0,2
volume = 0

[State 3000, VelConst]
type = VelSet
trigger1 = AnimElem = 2
x = 1.4
y = 0

[State 3000, PosAtk1]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 7
trigger3 = AnimElem = 10
trigger4 = AnimElem = 14
trigger5 = AnimElem = 17
trigger6 = AnimElem = 21
trigger7 = AnimElem = 24
trigger8 = AnimElem = 28
trigger9 = AnimElem = 35
x = 3

[State 3000, PosAtk2]
type = PosAdd
trigger1 = AnimElem = 41
x = 13

[State 3000, Brake!!!!]
type = VelSet
trigger1 = AnimElem = 41
x = 0
y = 0

[State 3000, Hits 1 3 e 5]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 10
trigger3 = AnimElem = 17
attr = S, HA
animtype  = Hard
damage    = 40,10
priority = 4
hitflag = MA
guardflag = MA
getpower = 0,15
givepower = 0,7
pausetime = 10,10
sparkno = 2
sparkxy = -30,-31
hitsound   = S2,2
guardsound = s1000,4
ground.type = Low
ground.slidetime = 10
ground.hittime  = 16
ground.velocity = -2.3
air.velocity = -2.3,-.5
palfx.time = 10
palfx.add = 255,255,255
palfx.mul = 255,255,255

[State 3000, Hits 2 4 e 6]
type = HitDef
trigger1 = AnimElem = 7
trigger2 = AnimElem = 14
trigger3 = AnimElem = 21
attr = S, HA
damage    = 40, 10
animtype = Hard
getpower = 0,10
givepower = 0,5
guardflag = M
hitflag = MAF
priority = 6
pausetime = 10,10
sparkno = 2
sparkxy = -27,-36
hitsound = s2,1
guardsound = s1000,4
ground.type = High
ground.slidetime = 8
ground.hittime  = 13
ground.velocity = -2.3
airguard.velocity = -2
air.velocity = -2.3,-.5
palfx.time = 10
palfx.add = 255,255,255
palfx.mul = 255,255,255

[State 3000, Hit 7]
type = HitDef
trigger1 = AnimElem = 24
attr = S, HA
damage    = 30, 12
animtype = Hard
getpower = 0,10
givepower = 0,5
guardflag = M
hitflag = MAF
priority = 6
pausetime = 10,10
sparkno = 2
sparkxy = -30,-31
hitsound = s2,1
guardsound = s1000,4
ground.type = High
ground.slidetime = 13
ground.hittime  = 18
ground.velocity = -2.3
airguard.velocity = -2
air.velocity = -2.3,-.5
palfx.time = 10
palfx.add = 255,255,255
palfx.mul = 255,255,255

[State 3000, Hit 8]
type = HitDef
trigger1 = AnimElem = 28
attr = S, HA
damage    = 40, 12
animtype = Hard
getpower = 0,10
givepower = 0,5
guardflag = M
hitflag = MAF
priority = 6
pausetime = 10,10
sparkno = 2
sparkxy = -26,-30
hitsound = s3010,0
guardsound = s1000,4
volume = 70
ground.type = High
ground.slidetime = 24
ground.hittime  = 29
ground.velocity = -2.3
airguard.velocity = -2
air.velocity = -2.3,-.5
envshake.time = 10
palfx.time = 10
palfx.add = 255,255,255
palfx.mul = 255,255,255

[State 3000, Hit 9]
type = HitDef
trigger1 = AnimElem = 35
attr = S, HA
damage    = 40, 12
animtype = Hard
getpower = 0,10
givepower = 0,5
guardflag = M
hitflag = MAF
priority = 6
pausetime = 10,10
sparkno = 2
sparkxy = -37,-24
hitsound = s3010,0
guardsound = s1000,4
volume = 155
ground.type = High
ground.slidetime = 23
ground.hittime  = 28
ground.velocity = -2.3
airguard.velocity = -2
air.velocity = -2.3,-.5
envshake.time = 10
palfx.time = 10
palfx.add = 255,255,255
palfx.mul = 255,255,255

[State 3000, Hit Final]
type = HitDef
trigger1 = AnimElem = 41
attr = S, HA
damage    = 50,15
animtype = Heavy
getpower = 0, 20
givepower = 0, 10
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 25,25
sparkno = 2
sparkxy = -37,-27
hitsound = S3010,0
guardsound = S1000,4
volume = 255
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
guard.velocity = -8
ground.velocity = -8
airguard.velocity = -8,-4.5
air.velocity = -8,-4.5
fall = ifelse(p2name = "Mercedes Benz",0, 1)
fall.recover = 0
palfx.time = 25
palfx.add = 255,255,255
palfx.mul = 255,255,255
envshake.time = 25
fall.envshake.time = 19

[State 3001, Super_Snd1]
type = PlaySnd
trigger1 = WinKO = 1
ignorehitpause = 1
persistent = 0
value = 9000,1
volume = 255

[State 3001, Super_Screen]
type = EnvColor
trigger1 = WinKO = 1
value = 255,0,0
ignorehitpause = 1
persistent = 0
under = 1
time = 20

[State 3001, Super_Chars]
type = PalFX
trigger1 = WinKO = 1
ignorehitpause = 1
persistent = 0
value = 0,0,0
mul = 0,0,0
time = 20

[State 3000, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; AMY CYCLONE (DM)
[Statedef 3020]
type = S
movetype = A
physics = N
juggle = 0
velset = 0,0
anim = 3020
ctrl = 0

[State 3020, Super A]
type = SuperPause
trigger1 = Time = 0
pos = -5,-33
anim =100

[State 3020, Super B]
type = PlaySnd
trigger1 = Time = 0
value = 3000, 0 ;Play fight sound of super
volume = 0

[State 3020, Super C]
type = PowerAdd
trigger1 = Time = 0
value = -1000

[State 3020, Super D]
type = AfterImage
trigger1 = Time = 2
time = 2

[State 3020, Super E]
type = AfterImageTime
trigger1 = Time = [2, 400]
time = 2

[State 3020, Super F] ;Invunerable to normal and special attacks for a bit
type = NotHitBy
trigger1 = Time = 2
value =, NA, SA, AT
time = 12

[State 3020, 1a]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
value = 1,0
volume = 0

[State 3020, 1b]
type = PlaySnd
trigger1 = AnimElem = 16
value = 1,2
volume = 0

[State 3000, 1d]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
trigger4 = AnimElem = 16
value = 0,2
volume = 0

[State 3000, Pripr]
type = SprPriority
trigger1 = Time = 0
value = 1

[State 3000, Hits Impares]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
attr = S, HA
animtype  = Hard
damage    = 25,8
priority = 2
hitflag = MA
guardflag = MA
getpower = 0,15
givepower = 0,7
pausetime = 1,0
sparkno = 2
sparkxy = -32,-35
hitsound   = S2,3
guardsound = s1000,4
ground.type = Low
ground.slidetime = 1
ground.hittime  = 8
ground.velocity = 24
air.velocity = 24,-.1
palfx.time = 10
palfx.add = 255,0,0
palfx.mul = 255,0,0

[State 3000, Hits Pares]
type = HitDef
trigger1 = AnimElem = 6
trigger2 = AnimElem = 10
trigger3 = AnimElem = 14
attr = S, HA
animtype  = Hard
damage    = 25,8
priority = 2
hitflag = MA
guardflag = MA
getpower = 0,15
givepower = 0,7
pausetime = 1,0
sparkno = 2
sparkxy = -24,-35
hitsound   = S2,3
guardsound = s1000,4
ground.type = Low
ground.slidetime = 1
ground.hittime  = 8
ground.velocity = -24
air.velocity = -24,-.1
palfx.time = 10
palfx.add = 255,0,0
palfx.mul = 255,0,0

[State 3000, Hit Final]
type = HitDef
trigger1 = AnimElem = 16
attr = S, HA
damage    = 100,20
animtype = Heavy
getpower = 0, 20
givepower = 0, 10
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 20,20
sparkno = 2
sparkxy = -32,-35
hitsound = S1000,2
guardsound = S1000,4
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
guard.velocity = -6
ground.velocity = -6
airguard.velocity = -6,-4
air.velocity = -6,-4
fall = ifelse(p2name = "Mercedes Benz",0, 1)
fall.recover = 0
palfx.time = 20
palfx.add = 255,0,0
palfx.mul = 255,0,0
envshake.time = 20
fall.envshake.time = 15

[State 3001, Snd]
type = PlaySnd
trigger1 = WinKO = 1
ignorehitpause = 1
persistent = 0
value = 9000,0
volume = 255

[State 3001, Screen]
type = EnvColor
trigger1 = WinKO = 1
value = 255,255,255
ignorehitpause = 1
persistent = 0
under = 1
time = 20

[State 3001, Chars]
type = PalFX
trigger1 = WinKO = 1
ignorehitpause = 1
persistent = 0
value = 0,0,0
mul = 0,0,0
time = 20

[State 3020, PlayerP]
type = PlayerPush
trigger1 = time >= 0
value = 0

[State 3030, Dust1]
type = GameMakeAnim
trigger1 = AnimElem = 8
trigger2 = AnimElem = 12
trigger3 = AnimElem = 16
pos = -10,0
value = 120

[State 3030, Dust2]
type = GameMakeAnim
trigger1 = AnimElem = 6
trigger2 = AnimElem = 10
trigger3 = AnimElem = 14
pos = 10,0
value = 120

[State 3000, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; AMY TWISTER (SDM)
[Statedef 3030]
type = S
movetype = A
physics = N
juggle = 0
velset = 0,0
anim = 3030
ctrl = 0

[State 3030, Super A]
type = SuperPause
trigger1 = Time = 0
pos = -5,-33
anim =101

[State 3020, Super B]
type = PlaySnd
trigger1 = Time = 0
value = 3000, 1 ;Play fight sound of super
volume = 0

[State 3020, Super C]
type = PowerAdd
trigger1 = Time = 0
value = -2000

[State 3020, Super D]
type = AfterImage
trigger1 = Time = 2
paladd = 200, 15,15
palmul = .75,.65,.65
time = 2

[State 3020, Super E]
type = AfterImageTime
trigger1 = Time = [2, 400]
time = 2

[State 3020, Super F] ;Invunerable to normal and special attacks for a bit
type = NotHitBy
trigger1 = Time = 2
value =, NA, SA, AT
time = 12

[State 3020, 1a]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
trigger4 = AnimElem = 16
trigger5 = AnimElem = 20
trigger6 = AnimElem = 24
trigger7 = AnimElem = 28
value = 1,0
volume = 0

[State 3020, 1b]
type = PlaySnd
trigger1 = AnimElem = 32
value = 1,2
volume = 0

[State 3000, 1d]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
trigger4 = AnimElem = 16
trigger5 = AnimElem = 20
trigger6 = AnimElem = 24
trigger7 = AnimElem = 28
trigger8 = AnimElem = 32
value = 0,2
volume = 0

[State 3000, Pripr]
type = SprPriority
trigger1 = Time = 0
value = 1

[State 3000, Hits Impares]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
trigger4 = AnimElem = 16
trigger5 = AnimElem = 20
trigger6 = AnimElem = 24
trigger7 = AnimElem = 28
attr = S, HA
animtype  = Hard
damage    = 21,8
priority = 2
hitflag = MA
guardflag = MA
getpower = 0,15
givepower = 0,7
pausetime = 1,0
sparkno = 2
sparkxy = -32,-35
hitsound   = S2,3
guardsound = s1000,4
ground.type = Low
ground.slidetime = 1
ground.hittime  = 6
ground.velocity = 30
air.velocity = 30,-.1
palfx.time = 10
palfx.add = 255,255,255
palfx.mul = 255,255,255

[State 3000, Hits Pares]
type = HitDef
trigger1 = AnimElem = 6
trigger2 = AnimElem = 10
trigger3 = AnimElem = 14
trigger4 = AnimElem = 18
trigger5 = AnimElem = 22
trigger6 = AnimElem = 26
trigger7 = AnimElem = 30
attr = S, HA
animtype  = Hard
damage    = 21,8
priority = 2
hitflag = MA
guardflag = MA
getpower = 0,15
givepower = 0,7
pausetime = 1,0
sparkno = 2
sparkxy = -24,-38
hitsound   = S2,3
guardsound = s1000,4
ground.type = Low
ground.slidetime = 1
ground.hittime  = 6
ground.velocity = -30
air.velocity = -30,-.1
palfx.time = 10
palfx.add = 255,255,255
palfx.mul = 255,255,255

[State 3000, Hit Final]
type = HitDef
trigger1 = AnimElem = 32
attr = S, HA
damage    = 100,30
animtype = Heavy
getpower = 0, 20
givepower = 0, 10
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 20,20
sparkno = 2
sparkxy = -32,-35
hitsound = S1000,2
guardsound = S1000,4
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
guard.velocity = -6
ground.velocity = -6
airguard.velocity = -6,-4
air.velocity = -6,-4
fall = ifelse(p2name = "Mercedes Benz",0, 1)
fall.recover = 0
palfx.time = 20
palfx.add = 255,255,255
palfx.mul = 255,255,255
envshake.time = 20
fall.envshake.time = 15

[State 3001, Super_Snd1]
type = PlaySnd
trigger1 = WinKO = 1
ignorehitpause = 1
persistent = 0
value = 9000,1
volume = 255

[State 3001, Super_Screen]
type = EnvColor
trigger1 = WinKO = 1
value = 255,0,0
ignorehitpause = 1
persistent = 0
under = 1
time = 20

[State 3001, Super_Chars]
type = PalFX
trigger1 = WinKO = 1
ignorehitpause = 1
persistent = 0
value = 0,0,0
mul = 0,0,0
time = 20

[State 3030, PlayerP]
type = PlayerPush
trigger1 = time >= 0
value = 0

[State 3030, Dust1]
type = GameMakeAnim
trigger1 = AnimElem = 8
trigger2 = AnimElem = 12
trigger3 = AnimElem = 16
trigger4 = AnimElem = 20
trigger5 = AnimElem = 24
trigger6 = AnimElem = 28
pos = -10,0
value = 120

[State 3030, Dust2]
type = GameMakeAnim
trigger1 = AnimElem = 6
trigger2 = AnimElem = 10
trigger3 = AnimElem = 14
trigger4 = AnimElem = 18
trigger5 = AnimElem = 22
trigger6 = AnimElem = 26
trigger7 = AnimElem = 30
pos = 10,0
value = 120

[State 3030, Change]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;================================================================
;GET_HIT/RECOVER/DAMAGE STATES
;================================================================
; HITG_SHAKE
[Statedef 5000]
type    = S
movetype= H
physics = N
velset = 0,0

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = a

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5001 ;HITG_SLIDE

[State 5000, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITG_SLIDE
[Statedef 5001]
type    = S
movetype= H
physics = S

[State 5001, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5001, 6]
type = ChangeState
trigger1 = HitOver
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; HITC_SHAKE
[Statedef 5010]
type    = C
movetype= H
physics = N
velset = 0,0

[State 5010, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5020 + GetHitVar(animtype)

[State 5010, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5010, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5010, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5010, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5011 ;HITC_SLIDE

[State 5010, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5010, FFB Light]
type = ForceFeedback
trigger1 = anim = 5020
persistent = 0
time = 6
waveform = square

[State 5010, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5021
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5010, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITC_SLIDE
[Statedef 5011]
type    = C
movetype= H
physics = C

[State 5011, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5011, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5025 + GetHitVar(animtype)

[State 5011, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5011, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5011, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5011, 6]
type = ChangeState
trigger1 = HitOver
value = 11
ctrl = 1


;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 5020]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5020, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5020, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5020, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5020, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 5030]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5040 ;HITA_RECOV

[State 5030, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 5035 ;HITA_UP (transition)

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 5035]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;HITA_RECOV

[State 5035, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5050 ;HITA_FALL

;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N

[State 5040, 1]
type = ChangeState
trigger1 = !Alive
value = 5050

[State 5040, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 5040, 3]
type = CtrlSet
trigger1 = HitOver
value = 1

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 5040, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 5050]
type    = A
movetype= H
physics = N

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, 4] ;Recover near ground
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 5050, 5]; Recover in mid air
type = ChangeState
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100 ;HIT_BOUNCE

;---------------------------------------------------------------------------
; HIT_TRIP (shaking)
[Statedef 5070]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5070, 1]
type = ChangeAnim 
trigger1 = 1
value = 5070

[State 5070, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 5071

[State 5070, 3]
type = ForceFeedback
trigger1 = time = 0
time = 12
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]
type    = A
movetype= H
physics = N

[State 5071, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5071, 2] ;Acceleration
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5071, 3] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 15
type = ChangeState
value = 5110

;---------------------------------------------------------------------------
; HITL_SHAKE
[Statedef 5080]
type    = L
movetype= H
physics = N
velset = 0,0

[State 5080, 1] ;Set default anim
type = VarSet
trigger1 = time = 0
sysvar(2) = ifelse (GetHitVar(yvel) = 0, 5080, 5090)

[State 5080, 2]
type = VarAdd
trigger1 = time = 0
trigger1 = (anim = [5081,5089]) || (anim = [5111,5119])
trigger1 = SelfAnimExist(sysvar(2) + (anim % 10))
sysvar(2) = anim % 10

[State 5080, 3] ;If 5090 doesn't exist, default to 5030
type = VarSet
trigger1 = time = 0
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

[State 5080, 3] ;Freeze
type = ChangeAnim
trigger1 = 1
value = sysvar(2)

[State 5080, 4]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5081 ;HITL_SLIDE

[State 5080, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) != 0
value = 5030 ;HITA_UP

;---------------------------------------------------------------------------
; HITL_SLIDE
[Statedef 5081]
type    = L
movetype= H
physics = C

[State 5081, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5081, 2]
type = VelSet
trigger1 = HitOver
x = 0

[State 5081, 3] ;Don't show hit ground frame
type = VarSet
trigger1 = Time = 0
sysvar(0) = 1

[State 5081, 4]
type = ChangeState
trigger1 = HitOver
value = 5110 ;HIT_LIEDOWN

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 5100]
type    = L
movetype= H
physics = N

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
;trigger1 = GetHitVar(fall.yvel) = 0
sysvar(1) = floor(vel y)

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 ;HIT_LIEDOWN

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
;value = 61
;pos = 0, 0
;under = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 10

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 5101

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20

;---------------------------------------------------------------------------
; HIT_BOUNCE (bounce into air)
[Statedef 5101]
type    = L
movetype= H
physics = N

[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5161

[State 5101, 3]
type = HitFallVel
trigger1 = Time = 0

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 5101, 5] ;Acceleration
type = VelAdd
trigger1 = 1
y = .4

[State 5101, 6] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 5110

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N

[State 5110, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5171

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0)
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5110, 7]
type = GameMakeAnim
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 10

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5111

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5110, 14]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

[State 5110, 15]
type = ForceFeedback
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine

;---------------------------------------------------------------------------
; HIT_GETUP
[Statedef 5120]
type    = L
movetype= I
physics = N

[State 5120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5111,5119]
trigger2 = !SelfAnimExist(5120 + (anim % 10))
value = 5120

[State 5120, 1b] ;Get up anim (for hit up/diag-up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5121

[State 5120, 2]
type = VelSet
trigger1 = Time = 0
x = 0

[State 5120, 3]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 5120, 4]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 5120, 5] ;Can't be thrown right after getting up
type = NotHitBy
trigger1 = AnimTime = 0
value = , NT,ST,HT
time = 12

[State 5120, 6] ;Can't be hit right after getting up (short time)
type = NotHitBy
trigger1 = AnimTime = 0
value2 = SCA
time = 3

[State 5120, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; HIT_LIEDEAD
[Statedef 5150]
type    = L
movetype= H
physics = N
sprpriority = -3

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5141

[State 5150, 4] ;Match over anim
type = ChangeAnim
persistent = 0
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[State 5150, 6] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5150, 7] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

[State 5150, 8]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (still falling)
;[Statedef 5200]
;type    = A
;movetype= H
;physics = N

;[State 5200, 1] ;Change anim if done with transition
;type = ChangeAnim
;trigger1 = Anim = 5035
;trigger1 = AnimTime = 0
;value = 5050

;[State 5200, 2]
;type = VelAdd
;trigger1 = 1
;y = GetHitVar(yaccel)

;[State 5200, 3]
;type = SelfState
;trigger1 = Vel Y >= 0
;trigger1 = Pos Y = 0
;value = 5201

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5200]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 5200

[State 256, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 256, ImageB]
type = AfterImageTime
trigger1 = Time = [1,25]
time = 2

[State 255, 1]
type = HitBy
trigger1 = Time >= 0
trigger1 = AnimElem = 3, < 0
value = SCA, AT

[State 255, 2]
type = PlaySnd
trigger1 = Time = 1
value = 1,0
volume = 0

[State 255, 4a]
type = VelSet
trigger1 = AnimElem = 1
x = -5

[State 255, 1]
type = PosAdd
trigger1 = AnimElem = 1
x = -8

[State 255, 2]
type = VelSet
trigger1 = AnimElem = 3
x = 0

[State 255, 3]
type = SprPriority
trigger1 = Time = 0
value = -1

[State 255, 4]
type = PlayerPush
trigger1 = Time >= 0
trigger1 = AnimElem = 3
value = 0

[State 255, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; HIT_AIRFALLRECOVER
[Statedef 5210]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 5210, 1] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5210, 1]
type = PosFreeze
trigger1 = Time = 0
value = 4

[State 5210, Recover]
type = PlaySnd
trigger1 = Time = 1
value = 1,0
volume = 0

[State 5210, 2] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -20

[State 5210, 1] 
type = VelMul
trigger1 = Time = 4
x = .8
y = .8

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
y = -4.5

[State 5210, 1] 
type = VelMul
trigger1 = Time = 4
trigger1 = Vel Y > 0
y = .5

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -3
y = -2

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -2
y = -1

[State 5210, 2] ;Go up
type = VelAdd
trigger1 = Time = 4
trigger1 = Command = "holdup"
y = -2

[State 5210, 2] ;Go down
type = VelAdd
trigger1 = Time = 4
trigger1 = Command = "holddown"
y = 1.5

[State 5210, 2] ;Go fwd
type = VelMul
trigger1 = Time = 4
trigger1 = Command = "holdfwd"
x = 1

[State 5210, 2] ;Go back
type = VelAdd
trigger1 = Time = 4
trigger1 = Command = "holdback"
x = -1

[State 5210, 3]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 5210, 4]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = Time >= 4
y = .35

[State 5210, 5] ;Land on ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMP_LAND
ctrl = 1

;================================================================
;SPECIAL STATES
;================================================================

[Statedef -2]

[State -2, 1b]
type = PlaySnd
trigger1 = time = 1
trigger1 = stateno = 52
value = 52, 0

[State -2, 2a]
type = PlaySnd
triggerall = Random < 300
triggerall = Time = 1
trigger1 = anim = 5000
trigger2 = anim = 5010
trigger3 = anim = 5020
value = 5000, 0
volume = 0

[State -2, 2b]
type = PlaySnd
triggerall = Random < 300
triggerall = Time = 1
trigger1 = anim = 5001
trigger2 = anim = 5011
trigger3 = anim = 5021
value = 5000, 1
volume = 0

[State -2, 2c]
type = PlaySnd
triggerall = Random < 300
triggerall = Time = 1
trigger1 = anim = 5002
trigger2 = anim = 5012
trigger3 = anim = 5022
trigger4 = anim = 5100 & alive = 1
value = 5000, 2
volume = 0

;Get Hit Sound in Supers
[State -2, 2d]
type = PlaySnd
;Triggerall = (p2name = "Spike") || (p4name = "Spike")
trigger1 = anim = 23007 || anim = 23028
trigger1 = Time = 1 && alive = 1
trigger2 = anim = 23025
trigger2 = alive = 1
trigger2 = AnimELem = 2 || AnimElem = 5 || AnimElem = 8 || AnimELem = 11
trigger3 = anim = 25005
trigger3 = alive = 1
trigger3 = AnimElem = 5,1 || AnimElem = 5,5 || AnimElem = 5,9
trigger4 = anim = 25025
trigger4 = AnimElem = 5 && alive = 1
value = 5000, 1
volume = 0

[State -2, 2e]
type = PlaySnd
;Triggerall = (p2name = "Steam") || (p4name = "Steam")
trigger1 = anim = 23007 || anim = 23028
trigger1 = Time = 44 && alive = 1
trigger2 = anim = 25027
trigger2 = Time = 1 && alive = 1
trigger3 = anim = 30007 || anim = 30047
trigger3 = Time = 1 && alive = 1
trigger4 = anim = 30008
trigger4 = alive = 1
trigger4 = time = 1 && alive = 1
value = 5000, 2
volume = 0

[State -2, 2f]
type = PlaySnd
;Triggerall = (p2name = "Espio STF") || (p4name = "Espio STF")
trigger1 = anim = 30008
trigger1 = Time = 10 && alive = 1
value = 11,0
volume = 0

;[State -2, 3]
;type = PowerSet
;trigger1 = Power != 3000
;value = 3000

[State -2, 4b]
type = VarSet
trigger1 = Life > (Lifemax/4)
V = 5
value = 0

[State -2, 4c]
type = VarSet
trigger1 = Life <= (Lifemax/4)
V = 5
value = 1

[State -2, 5]
type = palfx
triggerall = Movetype != H
trigger1 = var(5) = 1
trigger1 = TimeMod = 60,0
add = 238, 77,155
mul = 238, 77,155
time = 3
value = 1

[State -2, Assert]
type = AssertSpecial
trigger1 = RoundState = 0
trigger2 = RoundState = 1
flag = nobardisplay

;-----------------------------------------------------------------
; States -2 to logo CNS

; COUNTER HIT
[State -2, Counter hit font (Player 1)]
type = Explod
triggerall = var(36) = 1 && NumExplod(8000) = 0 && !Win = 1 && var(37) = 1
trigger1 = stateno < 800 && movehit = 1
trigger2 = stateno >= 900 && movehit = 1
anim = 8000
ID = 8000
pos = 10,140
postype = left
sprpriority = 5
removetime = 39
ontop = 1
shadow = 0,0,0
ownpal = 1
bindtime = -1

[State -2, Counter hit Logo (Player 2)]
type = Explod
triggerall = var(36) = 2 && NumExplod(8000) = 0 && !Win = 1 && var(37) = 1
trigger1 = stateno < 800 && movehit = 1
trigger2 = stateno >= 900 && movehit = 1
anim = 8000
ID = 8000
pos = -110,140
postype = right
sprpriority = 5
removetime = 39
ontop = 1
shadow = 0,0,0
ownpal = 1
bindtime = -1

[State -2, Left Facing]
type = VarSet
trigger1 = teamside = 1 && roundstate = 0;Facing = 1 && roundstate = 0
var(36) = 1

[State -2, Right Facing]
type = VarSet
trigger1 = teamside = 2 && roundstate = 0;Facing = -1 && roundstate = 0
var(36) = 2

[State -2, Counter hit varset (P2Attack setting)]
type = Varset
trigger1 = P2movetype = A && var(37) != -1
var(37) = 1

[State -2, Counter hit varset (P2Attack setting)]
type = Varset
trigger1 = P2movetype != A && var(37) != -1
var(37) = 0

[State -2, Counter hit varset (P2Attack setting)]
type = Varset
trigger1 = NumExplod(8000) = 1
var(37) = 0

;-----------------------------------------------------------------
; FIRST ATTACK
[State 3000, FA]
type = Helper
triggerall = var(41) = 0
triggerall = !NumHelper(8002)
triggerall = Roundstate = 2
trigger1 = var(40) = 1
id = 8002
name = "First Attack"
pos = 0,0
postype = p1
stateno = 8005
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*(ifelse(teamside=1,1,-1))
perisistent = 0

[State 180, x]
type = VarSet
triggerall = Var(57) = 0
triggerall = p2movetype = H
trigger1 = stateno != [800, 999]
trigger1 = movehit
trigger2 = projhit = 1
;trigger3 = (stateno = 901) && (animelem = 6) && (movetype = !=H)
var(40) = 1

[State -2, COmbo]
type = VarSet
trigger1 = var(40) = 0
trigger1 = Movetype = H && (stateno != [150, 159])
var(57) = 1
ignorehitpause = 0
persistent = 0

[State -2, VarOn]; Usei esta variavel so para evitar looping do helper First Attack
type = VarSet
trigger1 = numhelper(8002)
var(41) = 1

[State -2, Rst Var1]
type = Varset
trigger1 = Roundstate = 0
var(40) = 0

[State -2, Rst Var2]
type = Varset
trigger1 = Roundstate = 0
var(57) = 0

[State -2, Rst Var3]
type = Varset
trigger1 = Roundstate = 0
var(41) = 0

;-----------------------------------------------------------------
; NORMAL FINISH
[State 3000, NF]
type = Helper
triggerall = var(43) = 0
triggerall = !NumHelper(8010)
triggerall = alive
triggerall = var(42) = 1
trigger1 = winKO
id = 8010
name = "Finish"
pos = 0,0
postype = p1
stateno = 8010
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*(ifelse(teamside=1,1,-1))
perisistent = 0

;-----------------------------------------------------------------
; SPECIAL FINISH
[State 3000, SP]
type = Helper
triggerall = var(43) = 0
triggerall = !NumHelper(8011)
triggerall = alive
triggerall = var(42) = 2
trigger1 = winKO
id = 8011
name = "Special Finish"
pos = 0,0
postype = p1
stateno = 8011
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*(ifelse(teamside=1,1,-1))
perisistent = 0

;-----------------------------------------------------------------
; THROW FINISH
[State 3000, TF]
type = Helper
triggerall = var(43) = 0
triggerall = !NumHelper(8012)
triggerall = alive
triggerall = var(42) = 3
trigger1 = winKO
id = 8012
name = "Throw Finish"
pos = 0,0
postype = p1
stateno = 8012
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*(ifelse(teamside=1,1,-1))
perisistent = 0

;-----------------------------------------------------------------
; SUPER FINISH
[State 3000, DM]
type = Helper
triggerall = var(43) = 0
triggerall = !NumHelper(8013)
triggerall = alive
triggerall = var(42) = 4
trigger1 = winKO
id = 8013
name = "Super Finish"
pos = 0,0
postype = p1
stateno = 8013
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*(ifelse(teamside=1,1,-1))
perisistent = 0

;-----------------------------------------------------------------
; HYPER FINISH
[State 3000, SDM]
type = Helper
triggerall = var(43) = 0
triggerall = !NumHelper(8014)
triggerall = alive
triggerall = var(42) = 5
trigger1 = winKO
id = 8014
name = "Hyper Finish"
pos = 0,0
postype = p1
stateno = 8014
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*(ifelse(teamside=1,1,-1))
perisistent = 0

;-----------------------------------------------------------------
; ULTRA FINISH
[State 3000, SKM]
type = Helper
triggerall = var(43) = 0
triggerall = !NumHelper(8015)
triggerall = alive
triggerall = var(42) = 6
trigger1 = winKO
id = 8015
name = "Ultra Finish"
pos = 0,0
postype = p1
stateno = 8015
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*(ifelse(teamside=1,1,-1))
perisistent = 0

[State -2, VarOn]; Usei esta variavel so para evitar looping do helper % Finish
type = VarSet
trigger1 = numhelper(8010)
trigger2 = numhelper(8011)
trigger3 = numhelper(8012)
trigger4 = numhelper(8013)
trigger5 = numhelper(8014)
trigger6 = numhelper(8015)
var(43) = 1

[State -2, VarSet]
type = Varset
triggerall = roundstate = 3
triggerall = (stateno != [800, 999]) && (stateno != 255) && (stateno != 256)
trigger1 = (stateno = [200, 799])
trigger2 = (stateno = [10000, 10004]) || (stateno = [10010, 10014])
var(42) = 1

[State -2, VarSet2]
type = Varset
triggerall = roundstate = 3
triggerall = (stateno != [800, 999]) && (stateno != 255) && (stateno != 256)
trigger1 = (stateno = [1000, 2999])
trigger2 = projhit(1060) = 1
trigger3 = (stateno = [10005, 10009]) || (stateno = [10015, 10020])
var(42) = 2

[State -2, VarSet3]
type = Varset
triggerall = roundstate = 3
triggerall = (stateno != 255) && (stateno != 256)
trigger1 = (stateno = [800, 999])
var(42) = 3

[State -2, VarSet4]
type = Varset
triggerall = roundstate = 3
triggerall = (stateno != [800, 999]) && (stateno != 255) && (stateno != 256)
trigger1 = (stateno = [3000, 3009]) || (stateno = [3020, 3029])
;trigger2 = projhit(1101) = 1 || projhit(1120) = 1
var(42) = 4

[State -2, VarSet5]
type = Varset
triggerall = roundstate = 3
triggerall = (stateno != [800, 999]) && (stateno != 255) && (stateno != 256)
trigger1 = (stateno = [3010, 3019]) || (stateno = [3030, 3039])
;trigger2 = projhit(1101) = 1 || projhit(1120) = 1
var(42) = 5

[State -2, VarSet6]
type = Varset
triggerall = roundstate = 3
triggerall = (stateno != [800, 999]) && (stateno != 255) && (stateno != 256)
trigger1 = (stateno = [4000, 4999])
var(42) = 6

[State -2, Rst Var4]
type = Varset
trigger1 = Roundstate = 0
var(42) = 0

[State -2, Rst Var5]
type = Varset
trigger1 = Roundstate = 0
var(43) = 0

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