;===========================================================================
;Marvel vs. Capcom - Eternity of Heroes - Constants Template V.7
;by REDHOT, Acey & eSkRo
;===========================================================================
[Data]
life = 1000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 50
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 555
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1
yscale = 1
ground.back = 20
ground.front = 20
air.back = 18
air.front = 22
height = 60
attack.dist = 160
attack.width = 4,4   
proj.dist = 90
proj.attack.dist = 90 
proj.doscale = 0
head.pos = 1, -83
mid.pos = 1, -53
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd = 2.8
walk.back = -2.7
run.fwd = 6
run.back = -8
jump.neu = 0,-9.0
jump.back = -3.7
jump.fwd = 3.2
runjump.fwd = 4.4
runjump.back = -4.4
airjump.neu = 0, -8.9
airjump.fwd = 2.5
airjump.back = -2.55

[Movement]
airjump.num = 0
airjump.height = 35
yaccel = .41
stand.friction = .80
crouch.friction = .80
air.friction = .80

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

; Pre-Round Movement
[Statedef 22]
type    = S
physics = S
sprpriority = 0
ctrl = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = 1.5

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = -1.2

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 22 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 22

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 23 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 23



[State 0, ]
type = ChangeState
trigger1 = command != "holdfwd" && command != "holdback"
value = 0

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
movetype= A
physics = N
anim = 100
ctrl = 0
sprpriority = 1
;velset = 7, 0

[State 100, ]
type = MoveHitReset
trigger1 = movehit = 1
ignorehitpause = 0
persistent = 1

[State 100, 8]
type = VelAdd
triggerall = Vel X = 0
trigger1 = AnimElem = 5
x = 10

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

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

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
;ignorehitpause =
;persistent =


[State 100, 8]
type = VelAdd
triggerall = Vel X > 0
trigger1 = time > 45
x = -.3

[State 100, ChangeState]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = command != "holdfwd"
value = 106

[State 100, ChangeState]
type = ChangeState
trigger1 = var(59) = 1
trigger1 = p2bodydist y<=30
value = 106
;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 105]
type    = S
movetype= A
physics = N
anim = 105
sprpriority = 1

[State 105, ]
type = MoveHitReset
trigger1 = movehit = 1
ignorehitpause = 0
persistent = 1

[State 105, 8]
type = VelAdd
triggerall = Vel X = 0
trigger1 = AnimElem = 5
x = -8

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

[State 105, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 105, 8]
type = VelAdd
triggerall = Vel X < 0
trigger1 = time > 45
x = 0.3

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
;ignorehitpause =
;persistent =

[State 105, ChangeState]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = command != "holdback"
value = 106

[State 105, ChangeState]
type = ChangeState
trigger1 = var(59) = 1
trigger1 =time = 20
value = 106


;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 106
sprpriority = 1

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

[State 106, posset]
type = posset
trigger1 = time = 0
y = 0


[State 106, VelSet]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------
;Win Poses

[Statedef 180]
type = S

[State 180, 1]
type = VarRandom
trigger1 = Time = 0 && Var(1) <= 300
v = 1
range = 0,200

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

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [101,200]
value = 182

[State 180, 3]
type = ChangeState
trigger1 = Var(1) >= 300
value = 183


;---------------------------------------------------------------------------------------------
;Win Pose 1

[Statedef 181]
type = S
movetype = I
physics = S
ctrl = 0
anim = 181
velset = 0,0

[State 3000, som]
type = PlaySnd
trigger1 = time = 10
value = 121, 6

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

;---------------------------------------------------------------------------------------------
;Win Pose 2

[Statedef 182]
type = S
movetype = I
physics = S
ctrl = 0
anim = 182
velset = 0,0

[State 3000, som]
type = PlaySnd
trigger1 = time = 10
value = 121, 0

[State 182, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------------------------
;Win Pose 3

[Statedef 183]
type = S
movetype = I
physics = S
ctrl = 0
anim = 183
velset = 0,0
sprpriority = 0

;voz
;coisa
[State 3000, som]
type = PlaySnd
trigger1 = time = 110 && Var(1) >= 300 && Var(1) < 333
value = 121, 18
;susan
[State 3000, som]
type = PlaySnd
trigger1 = time = 110 && Var(1) >= 333 && Var(1) < 366
value = 121, 16
;tocha
[State 3000, som]
type = PlaySnd
trigger1 = time = 110 && Var(1) >= 366 && Var(1) <= 400
value = 121, 21


;som geral
 [State 3000, som]
type = PlaySnd
trigger1 = time = 10
value = 54, 18

 [State 3000, som]
type = PlaySnd
trigger1 = time = 40
value = 8200, 0

 [State 3000, som]
type = PlaySnd
trigger1 = time = 67
value = 121, 17

 [State 3000, som]
type = PlaySnd
trigger1 = time = 100
value = 1000, 1

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 10
anim = 184
ID =184
postype = P1
pos = -40,-10
sprpriority = -2
removetime = -1

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 50
anim = 185
ID = 185
postype = P1
pos = -50,0
sprpriority = -1
removetime = -1

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 100
anim = 186
ID = 186
postype = P1
pos = 40,0
sprpriority = 2
removetime = -1

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 100
anim = 187
ID = 187
postype = P1
pos = 40,0
sprpriority = 1
removetime = -1

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

[State 183,1]
type = AssertSpecial
trigger1 = Time = [0,350]
flag = RoundNotOver


;---------------------------------------------------------------------------------------------
;Introductions

[Statedef 190]
type = S

[State 190, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,400

[State 190, 2]
type = ChangeState
trigger1 = Var(1) = [0,200]
value = 191

[State 190, 3]
type = ChangeState
trigger1 = Var(1) = [201,400]
value = 192

;---------------------------------------------------------------------------------------------
;Intro1
[Statedef 191]
type = S
movetype = I
physics = N
ctrl = 0
anim = 190
velset = 0,0
sprpriority = 0

[State 0, ]
type = PlaySnd
trigger1 = time = 5
value = S121, 3
channel = 4



[State 191, Explod]
type = Explod
trigger1 = AnimElem = 45
anim = 199
ID = 3
pos = 20,-10
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 110
scale = 1,1
sprpriority = 1
;ontop = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------------------------
;Intro2
[Statedef 192]
type = S
movetype = I
physics = N
ctrl = 0
anim = 191
velset = 0,0
spriority = 0

[State 0, VarSet]
type = VarRandom
trigger1 = time =0
v = 1
range = 6,8

[State 0, ]
type = PlaySnd
trigger1 = animelem = 17
value = 121, 10

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------------------------
;Taunt

[Statedef 195]
type = A
movetype = I
physics = N
ctrl = 0
anim = 195
velset = 0,0
sprpriority = 0

[State 3000, som]
type = PlaySnd
trigger1 = animelem = 1
value = 121, 2

[State 195, VarSet]
type = VarRandom
trigger1 = time =0
v = 28
range = 6,8

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


;---------------------------------------------------------------------------
;Basic Attacks
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Standing Light Punch

[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 200
poweradd = 20
sprpriority = 2

[State 200, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 200, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = S,NA
damage = ifelse(21 - var(17) < 7, 7, 21 - var(17)), 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s8200
sparkxy = -10, -60
guard.sparkno = s6767
hitsound = S8000,0
guardsound = S22,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------
; Standing Medium Punch

[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 210
poweradd = 40
sprpriority = 2

[State 210, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 210, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = S,NA
damage = ifelse(35 - var(17) < 7, 7, 35 - var(17)), 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s8210
sparkxy = -10,-60
guard.sparkno = s6767
hitsound = S8000,1
guardsound = S22,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------
; Standing Heavy Punch

[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = ifelse(p2bodydist x < 70,220,221)
poweradd = 60
sprpriority = 2

[State 220, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 220, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 220, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = S,NA
damage    = ifelse(69 - var(17) < 7, 7, 69 - var(17)), 0
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = s8220
sparkxy = -10, -60
guard.sparkno = s6767
hitsound = S8000,2
guardsound = S22,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -10
air.type = Low
air.hittime = 18
air.velocity = -6,-7
envshake.time = 2
envshake.ampl = 2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------
; Close Heavy Punch

[Statedef 221]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 221
poweradd = 60
sprpriority = 2

[State 221, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 221, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 221, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = S,NA
damage    = ifelse(69 - var(17) < 7, 7, 69 - var(17)), 0
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = s8220
sparkxy = -10, -60
guard.sparkno = s6767
hitsound = S8000,2
guardsound = S22,0
ground.type = low
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -20
air.velocity = -22,-10
air.hittime = 25
air.fall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0
;p2stateno = 5050

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

[Statedef 222]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 222
sprpriority = 2

[State 222, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p2facing = 1
p1stateno = 223
p2stateno = 224
fall = 1

[State 222, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 223]
type    = S
movetype= A
physics = N
anim = 223
poweradd = 50

[State 223, TargetBind1]
type = TargetBind
trigger1 = (AnimElem = 4)
pos = 10,-50

[State 223, TargetBind1]
type = TargetBind
trigger1 = (AnimElem = 5)
pos = -30,-95

[State 223, TargetBind1]
type = TargetBind
trigger1 = (AnimElem = 6)
pos = -90,-100

[State 223, TargetBind1]
type = TargetBind
trigger1 = (AnimElem = 7)
pos = -115,-90

[State 223, TargetBind1]
type = TargetBind
trigger1 = (AnimElem = 8)
pos = -115,-45


[State 810, a]
type = Turn
trigger1 = AnimTime = 0
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 9
anim = 6003
ID = 6003
pos = 0,0
postype = p2
removetime = -2
scale = 1,1
sprpriority = 3
ownpal = 1
removeongethit = 0

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

[Statedef 224]
type = A
movetype = H
physics = N
velset = 0,0

[State 3200, 1]
type = Turn
trigger1 = time = 0


[State 821, 3]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090
value = 5090

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

[State 821, 5]
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200

[State 821, 6]
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210

[State 820, 1a]
type = ScreenBound
trigger1 = 1
value = 0

[State 820, 2]
type = Turn
Trigger1 = AnimElem = 5

[State 7130, Damage]
type = LifeAdd
trigger1 = time = 0
value = -80
kill = 1

[State 820, 3]
type = SelfState
trigger1 =time = 23
value = 5100

;---------------------------------------------------------------------------------------------
;Standing light kick

[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 230
poweradd = 20
sprpriority = 2

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

[State 230, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 230, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = S,NA
damage    = ifelse(21 - var(17) < 7, 7, 21 - var(17)), 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s8200
sparkxy = -10, -40
guard.sparkno = s6767
hitsound = S8000,0
guardsound = S22,0
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -6,0
air.type = Low
air.hittime = 3
air.velocity = -6,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------------------------
;Standing medium kick

[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 240
poweradd = 40
sprpriority = 2

[State 240, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 240, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 240, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = S,NA
damage    = ifelse(35 - var(17) < 7, 7, 35 - var(17)), 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s8210
sparkxy = -10,-68
guard.sparkno = s6767
hitsound = S8000,1
guardsound = S22,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------------------------
;Standing strong Kick

[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 250
poweradd = 60
sprpriority = 2

[State 250, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 250, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 250, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = S,NA
damage    = ifelse(69 - var(17) < 7, 7, 69 - var(17)), 0
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = s8220
sparkxy = -10, -70
guard.sparkno = s6767
hitsound = S8000,2
guardsound = S22,0
ground.type = High
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -8,0
air.type = Low
air.hittime = 5
air.velocity = -7,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------------------------
;Crouching light punch

[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 1
ctrl = 0
anim = 400
poweradd = 20
sprpriority = 2

[State 400, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 400, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = C,NA
damage    = ifelse(21 - var(17) < 7, 7, 21 - var(17)), 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s8200
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = S8000,0
guardsound = S22,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------------------------
;Crouching medium punch

[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 1
ctrl = 0
anim = 410
poweradd = 40
sprpriority = 2

[State 410, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 410, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = C,NA
damage    = ifelse(35 - var(17) < 7, 7, 35 - var(17)), 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s8210
sparkxy = -10,-58
guard.sparkno = s6767
hitsound = S8000,1
guardsound = S22,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------------------------
;Crouching strong punch

[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 1
ctrl = 0
anim = 420
poweradd = 60
sprpriority = 2

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 420, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 420, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 420, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = C,NA
damage    = ifelse(69 - var(17) < 7, 7, 69 - var(17)), 0
animtype = up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = s8210
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = S8000,2
ground.type = High
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -5,-2
air.type = Low
air.hittime = 5
air.velocity = -7,3
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------------------------
;Crouching light kick

[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 1
ctrl = 0
anim = 430
poweradd = 20
sprpriority = 2

[State 430, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 430, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = C,NA
damage    = ifelse(21 - var(17) < 7, 7, 21 - var(17)), 0
animtype = Light
hitflag = MAF
guardflag = L
priority = 4, Hit
pausetime = 8,8
sparkno = s8200
sparkxy = -10, -30
guard.sparkno = s6767
hitsound = S8000,0
guardsound = S22,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------------------------
;Crouching medium kick

[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 1
ctrl = 0
anim = 440
poweradd = 40
sprpriority = 2

[State 440, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 440, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 440, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = C,NA
damage    = ifelse(35 - var(17) < 7, 7, 35 - var(17)), 0
animtype = Medium
hitflag = MAF
guardflag = L
priority = 4, Hit
pausetime = 10,10
sparkno = s8210
sparkxy = -10,-30
guard.sparkno = s6767
hitsound = S8000,1
guardsound = S22,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------------------------
;Crouching strong kick

[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 1
ctrl = 0
anim = 450
poweradd = 60
sprpriority = 2

[State 650, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = 121,8

[State 640, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1


[State 450, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = C,NA
damage    = ifelse(69 - var(17) < 7, 7, 69 - var(17)), 0
animtype = High
hitflag = MAF
guardflag = L
priority = 4, Hit
pausetime = 12,12
sparkno = s8220
sparkxy = -10, -30
guard.sparkno = s6767
hitsound = S8000,2
guardsound = S22,0
ground.type = low
guard.slidetime = 13
guard.hittime = 13
guard.velocity = -10
airguard.velocity = -10
p2stateno = 10210
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

[State 240, Explod]
type = Explod
trigger1 = MoveHit
anim = 6002
ID = 6002
pos = 24,-73
postype = p1
facing = 1
vfacing = 1
bindtime = 10
scale = .9,.9
sprpriority = 1
ontop = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 420, Chase Jump]
type = ChangeState
value = 7000
triggerall = movehit && (Time <= 20) && enemy, movetype = H
trigger1 = command = "holdup" && command = "holdfwd" || command = "holdup" && command = "holdback" || Command = "holdup"

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

;---------------------------------------------------------------------------
; Launched
[Statedef 10210]
type = A
movetype = H
physics = N
velset = 0,0
facep2 = 1
ctrl = 0

[State 10210, ChangeAnim]
type = ChangeAnim
trigger1 = Time < 9
value = IfElse(SelfAnimExist(5052),5052,(IfElse(SelfAnimExist(5051),5051,5050)))

[State 10210, VelSet]
type = VelSet
trigger1 = Time = 8
x = -.5
y = -13.5

[State 10210, Gravity]
type = Gravity
trigger1 = Time > 9

[State 10210, VelSet]
type = VelSet
trigger1 = !Alive
x = -8
y = -15

[State 10210, SelfState]
type = SelfState
trigger1 = !Alive
value = 5050

[State 10210, SelfState]
type = SelfState
trigger1 = Vel Y > 0
value = 5040
ctrl = 1

;---------------------------------------------------------------------------------------------
;Jumping light punch

[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 600
poweradd = 20
sprpriority = 2

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

[State 600, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = A,NA
damage    = ifelse(21 - var(17) < 7, 7, 21 - var(17)), 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s8200
sparkxy = -10, -63
guard.sparkno = s6767
hitsound = S8000,0
guardsound = S22,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 14
ground.velocity = -4
air.type = High
air.velocity = 0,ifelse((numhelper(7003) < 1),-7.5,((vel y)-.1))  ; (vel y)-.1 allows p2 to follow & stay aligned with p1. This is necessary for aerial rave.
air.hittime = 14
yaccel = enemynear, const(movement.yaccel)+0.1
envshake.time = 3
envshake.ampl = 3
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

[State AR-A, H.Control AR] ;Add 1 to the AR count to enable Flying Screen if finishing the combo
type = VarAdd
triggerall = P2StateType = A
trigger1 = Movehit
var(5) = 1
ignorehitpause = 1
persistent = 0

[State 600, 3]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
ctrl = 1

[State 600, 4]
type = CtrlSet
trigger1 = Time = 24
value = 1


;---------------------------------------------------------------------------------------------
;Jumping medium punch

[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 610
poweradd = 40
sprpriority = 2

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

[State 610, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = A,NA
damage    = ifelse(35 - var(17) < 7, 7, 35 - var(17)), 0
animtype = medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s8210
sparkxy = -10,-68
guard.sparkno = s6767
hitsound = S8000,1
guardsound = S22,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 14
ground.velocity = -4
air.type = High
air.velocity = 0,ifelse((numhelper(7003) < 1),-7.5,((vel y)-.1))  ; (vel y)-.1 allows p2 to follow & stay aligned with p1. This is necessary for aerial rave.
air.hittime = 14
yaccel = enemynear, const(movement.yaccel)+0.2
envshake.time = 3
envshake.ampl = 3
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

[State AR-A, H.Control AR] ;Add 1 to the AR count to enable Flying Screen if finishing the combo
type = VarAdd
triggerall = P2StateType = A
trigger1 = Movehit
var(5) = 1
ignorehitpause = 1
persistent = 0

[State 610, 3]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
ctrl = 0

[State 610, 4]
type = CtrlSet
trigger1 = Time = 32
value = 1
;---------------------------------------------------------------------------------------------
;Jumping strong punch

[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 620
poweradd = 60
sprpriority = 2

;This state change is very important, if var(5) > 0 (aerial rave being executed) then we change into the Finisher state
[State AR-ON, F-Change]
type = ChangeState
triggerall = var(5) > 0
trigger1 = P2StateType = A
trigger1 = time = 0
value = 625


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

[State 620, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = A,NA
damage    = ifelse(69 - var(17) < 7, 7, 69 - var(17)), 0
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = s8220
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = S8000,2
guardsound = S22,0
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -10,9
air.fall = 1
air.type=High
yaccel = enemynear, const(movement.yaccel)+0.3
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

[State AR-A, H.Control AR] ;Add 1 to the AR count to enable Flying Screen if finishing the combo
type = VarAdd
triggerall = P2StateType = A
trigger1 = Movehit
var(5) = 1
ignorehitpause = 1
persistent = 0

[State 620, 3]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
ctrl = 0

[State 620, 4]
type = CtrlSet
trigger1 = Time = 34
value = 1

;---------------------------------------------------------------------------------------------
;Jumping strong punch

[Statedef 625]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 620
poweradd = 60
sprpriority = 2


[State 625, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 625, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = A,NA
damage    = ifelse(69 - var(17) < 7, 7, 69 - var(17)), 0
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = s8220
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = S8000,2
guardsound = S22,0
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -16,14
air.fall = 1
air.type=High
ID = 225
yaccel = enemynear, const(movement.yaccel)+0.3
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

[State AR-B, FS Set] ;Flying Screen is now active
type = VarSet
triggerall = var(5) > 0
trigger1 = MoveHit
var(6) = 1
ignorehitpause = 1
persistent = 0

[State SC, TargetState] ;Forces enemy to enter the vs-system gethits
type = TargetState
triggerall = P2StateType = A
trigger1 = MoveHit
value = 6020
ID = 225
ignorehitpause = 1
persistent = 0

[State 625, 3]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
ctrl = 0

[State 625, 4]
type = CtrlSet
trigger1 = Time = 34
value = 1
;---------------------------------------------------------------------------------------------
;Jumping light kick

[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 630
poweradd = 20
sprpriority = 2

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

[State 630, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = A,NA
damage    = ifelse(21 - var(17) < 7, 7, 21 - var(17)), 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s8200
sparkxy = -10, -63
guard.sparkno = s6767
hitsound = S8000,0
guardsound = S22,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 14
ground.velocity = -4
air.type = High
air.velocity = 0, ifelse((numhelper(7003) < 1),-7.5,((vel y)-.1))  ; (vel y)-.1 allows p2 to follow & stay aligned with p1. This is necessary for aerial rave.
air.hittime = 14
envshake.time = 3
envshake.ampl = 3
yaccel = enemynear, const(movement.yaccel)+0.1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

[State AR-A, H.Control AR] ;Add 1 to the AR count to enable Flying Screen if finishing the combo
type = VarAdd
triggerall = P2StateType = A
trigger1 = Movehit
var(5) = 1
ignorehitpause = 1
persistent = 0

[State 630, 3]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
ctrl = 0

[State 630, 4]
type = CtrlSet
trigger1 = Time = 26
value = 1


;---------------------------------------------------------------------------------------------
;Jumping medium kick

[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 640
poweradd = 40
sprpriority = 2

[State 640, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 640, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = A,NA
damage    = ifelse(35 - var(17) < 7, 7, 35 - var(17)), 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s8210
sparkxy = -10,-68
guard.sparkno = s6767
hitsound = S8000,1
guardsound = S22,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 14
ground.velocity = -4
air.type = High
air.velocity = 0, ifelse((numhelper(7003) < 1),-7.5,((vel y)-.1))  ; (vel y)-.1 allows p2 to follow & stay aligned with p1. This is necessary for aerial rave.
air.hittime = 14
envshake.time = 3
envshake.ampl = 3
yaccel = enemynear, const(movement.yaccel)+0.2
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

[State AR-A, H.Control AR] ;Add 1 to the AR count to enable Flying Screen if finishing the combo
type = VarAdd
triggerall = P2StateType = A
trigger1 = Movehit
var(5) = 1
ignorehitpause = 1
persistent = 0

[State 640, 3]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
ctrl = 0

[State 640, 4]
type = CtrlSet
trigger1 = Time = 32
value = 1

;---------------------------------------------------------------------------------------------
;Jumping strong kick

[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 650
poweradd = 60
sprpriority = 2

;This state change is very important, if var(5) > 0 (aerial rave being executed) then we change into the Finisher state
[State AR-ON, F-Change]
type = ChangeState
triggerall = var(5) > 0
trigger1 = P2StateType = A
trigger1 = time = 0
value = 655


[State 640, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 650, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = A,NA
damage    = ifelse(69 - var(17) < 7, 7, 69 - var(17)), 0
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = s8220
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = S8000,2
guardsound = S22,0
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -12,10
air.fall=1
yaccel = enemynear, const(movement.yaccel)+0.3
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

[State AR-A, H.Control AR] ;Add 1 to the AR count to enable Flying Screen if finishing the combo
type = VarAdd
triggerall = P2StateType = A
trigger1 = Movehit
var(5) = 1
ignorehitpause = 1
persistent = 0

[State 650, 3]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
ctrl = 0

[State 650, 4]
type = CtrlSet
trigger1 = Time = 36
value = 1

;---------------------------------------------------------------------------------------------
;Jumping strong kick

[Statedef 655]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 650
poweradd = 60
sprpriority = 2


[State 640, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 655, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = A,NA
damage    = ifelse(69 - var(17) < 7, 7, 69 - var(17)), 0
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = s8220
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = S8000,2
guardsound = S22,0
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -16,14
air.fall=1
ID = 255
yaccel = enemynear, const(movement.yaccel)+0.3
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

[State AR-B, FS Set] ;Flying Screen is now active
type = VarSet
triggerall = var(5) > 0
trigger1 = MoveHit
var(6) = 1
ignorehitpause = 1
persistent = 0

[State SC, TargetState] ;Forces enemy to enter the vs-system gethits
type = TargetState
triggerall = P2StateType = A
trigger1 = MoveHit
value = 6020
ID = 255
ignorehitpause = 1
persistent = 0

[State 650, 3]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 50
ctrl = 0

[State 650, 4]
type = CtrlSet
trigger1 = Time = 36
value = 1

;---------------------------------------------------------------------------------------------
;Throw 1
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 800, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = 8400,2

[State 800, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse(Command = "holdfwd",-1,1)
p2facing = -1
p1stateno = 810
p2stateno = 815
guard.dist = 0
fall.xvelocity = 0
fall.yvelocity = 0
fall = ifelse(PalNo > 6, 0, 1)
fall.recover = 0
fall.damage = 80


[State 800, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

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

[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
sprpriority = 2

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 1
pos = 45,0

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 2
pos = 35,-90

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 3
pos = 0,-84

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4
pos = -35,-84
time = 5

[State 810, TargetState]
type = TargetState
trigger1 = AnimElemtime(4) = 5
value = 816


[State 810, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 8600,0

[State 810, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 5
value = 50

[State 810, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -120

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

[Statedef 815]
type    = A
movetype= H
physics = N
velset = 0,0

[State 815, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 815, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 815

[Statedef 816]
type    = A
movetype= H
physics = N
velset = -15,-5
poweradd = 50

[State 816, ChangeAnim]
type = ChangeAnim
trigger1 = (Time = [0,10]) && (SelfAnimExist(5060));Not if hit off ground anim
value = 5060

[State 816, ChangeAnim2]
type = ChangeAnim2
trigger1 = (Time = 0) && (!SelfAnimExist(5060));Not if hit off ground anim
value = 816

[State 816, PosAdd]
type = PosAdd
trigger1 = Time = 0
Y = 40

[State 816, VelAdd]
type = VelAdd
trigger1 = Time >= 1
Y = 0.5

[State 816, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

;---------------------------------------------------------------------------------------------
;Throw 2
[Statedef 820]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 820, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = 8400,2

[State 820, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse(Command = "holdfwd",-1,1)
p2facing = -1
p1stateno = 830
p2stateno = 835
guard.dist = 0
fall.xvelocity = 0
fall.yvelocity = 1
fall = 1
fall.recover = 0
fall.damage = 0

[State 820, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 820, ChangeState]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 830]
type    = S
movetype= A
physics = N
anim = 820

[State 830, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 8600,0

[State 830, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 5
value = 9999,7

[State 830, TargetBind]
type = TargetBind
trigger1 = animelem = 1
pos = 21,-10

[State 830, TargetBind]
type = TargetBind
trigger1 = animelem = 2
pos = 4,-10

[State 830, TargetBind]
type = TargetBind
trigger1 = animelem = 3
pos = -22,-29

[State 830, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4
pos = -19,-16

[State 830, Bind 6]
type = TargetBind
trigger1 = animelem = 5
pos = -110,-10

[State 830, Shake]
type = EnvShake
trigger1 = AnimElem = 5
time = 15
ampl = -10

[State 830, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 5
value = -120

[State 830, TargetState]
type = TargetState
trigger1 = AnimElem = 6
value = 836

[State 830, Turn]
type = Turn
trigger1 = AnimElem = 7

[State 830, PowerAdd]
type = PowerAdd
trigger1 = animelem = 5
value = 50
persistent = 0

[State 830, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 12
ctrl = 1

;-------------------------------------------------------------------------------------------------------------------------------------------
;P2
[Statedef 835]
type    = A
movetype= H
physics = N
velset = 0,0

[State 835, ChangeAnim2]
type = ChangeAnim2
Trigger1 = time = 0
value = 836

;---------------------------------------------------------------------------------------------
;P2
[Statedef 836]
type    = A
movetype= H
physics = N
velset = -15,-12

[State 836, VelAdd]
type = VelAdd
Trigger1 = 1
y = .4

[State 836, Turn]
type = Turn
trigger1 = Vel Y > 0
trigger1 = pos Y >= 0

[State 836, SelfState]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
[Statedef 860]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 860
sprpriority = 2

[State 860, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 8400,2

[State 860, HitDef]
type = HitDef
trigger1 = AnimElem = 3
trigger1 = P2StateType = A
attr = S, NT
hitflag = A
priority = 2, Miss
sparkno = -1
sprpriority = 1
p2getp1state = 1
p1facing = ifelse(Command = "holdfwd",1,-1)
p2facing = -1
p1stateno = 861
p2stateno = 865
fall = 1

;---------------------------------------------------------------------------
[Statedef 861]
type    = A
movetype= A
physics = N
anim = 861

[State 861, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S8600,0

[State 861, TargetBind]
type = TargetBind
trigger1 = animelem = 1
pos = 78,0

[State 861, TargetBind]
type = TargetBind
trigger1 = animelem = 2
pos = 40, -22

[State 861, TargetBind]
type = TargetBind
trigger1 = animelem = 3
pos = 55,-25

[State 861, TargetBind]
type = TargetBind
trigger1 = animelem = 4
pos = 66,26

[State 861, vel]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 861, vel]
type = VelSet
trigger1 = animelemtime(4) = 3
x = 0
y = 7

[State 861, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 4
value = -120

[State 861, Targetstate]
type = TargetState
trigger1 = animelem = 4
value = 866

[State 861, PowerAdd]
type = PowerAdd
trigger1 = time = 0
value = 20

[State 861, ChangeState]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52
ctrl = 1

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

[State 865, ChamgeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 865

;---------------------------------------------------------------------------
[Statedef 866]
type    = A
movetype= H
physics = N
velset = 10,5

[State 866, Veladd]
type = VelAdd
trigger1 = 1
y = .5

[State 866, SelfState]
type = SelfState
trigger1 = vel Y > 0
trigger1 = pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
;Falling

[Statedef 950]
type    = A
movetype= I
physics = A
anim = 950
sprpriority = 1

[State 950, Ctrl]
type = CtrlSet
trigger1 = prevstateno = 4100
value = 0

[State 950, Ctrl]
type = CtrlSet
triggerall = prevstateno != 4100
trigger1 = Var(12) = 0
value = 0

[State 950, Ctrl]
type = CtrlSet
triggerall = prevstateno != 4100
trigger1 = Var(12) = 1
value = 1

[State 950, Turn]
type = Turn
trigger1 = P2Dist X < -5

[State 950, VelSet]
type = VelSet
trigger1 = FrontEdgeBodyDist <= 0
x = 0

[State 950, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 52

;---------------------------------------------------------------------------
;Super Moves
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------------------------
;Special1_X
[Statedef 1000]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 1000
ctrl = 0
poweradd = 80
sprpriority = 2

[State 1240, Explod]
type = Explod
trigger1 = time = 0
anim = 7023
ID = 7023
postype = p1
pos = 0,0
scale = 0.55,0.55
ownpal = 1
sprpriority = 5
supermovetime = 40



[State 0, ]
type = ChangeState
trigger1 = animtime = 0
value = 1003
ctrl = 0


[Statedef 1003]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 1003
ctrl = 0
sprpriority = 2

[State 0, ]
type = PlaySnd
trigger1 = timemod = 10,0
value = 54, 18


[State 1003, ]
type = VelAdd
triggerall = Vel X >= -2 && time >= 5
trigger1 = command = "holdback"  && command != "holdup"
x = -1.

[State 1003, ]
type = VelAdd
triggerall = Vel X <= 2 && time >= 5
trigger1 = command = "holdfwd" && command != "holdup"
x = 1.3

[State 1003, 3]
type = ChangeAnim
trigger1 = command = "holdup" && anim != 1004
value = 1004

[State 1003, ChangeState]
type = ChangeState
trigger1 = command = "Hyper1"
trigger1 = power >= 1000
trigger1 = movehit != 0
value = 3000

[State -1, Hyper2]
type = ChangeState
value = 3100
trigger1 = command = "Hyper2"
trigger1 = power >= 1000
trigger1 = !IsHelper && NumHelper(13000) = 0
trigger1 = movehit != 0

[State -1, Hyper3]
type = ChangeState
value = 2000
trigger1 = command = "Hyper3"
trigger1 = power >= 1000
trigger1 = movehit != 0

[State -1, Hyper4] ;The Thing   Invisible Woman    Human Torch
type = ChangeState
value = 4000
trigger1 = command = "Hyper4"
trigger1 = power >= 1000
trigger1 = movehit != 0
trigger1 = p2name != "The Thing" && p3name != "he Thing" && p4name != "he Thing"
trigger1 = p2name != "Invisible Woman" && p3name != "Invisible Woman" && p4name != "Invisible Woman"
trigger1 = p2name != "Human Torch" && p3name != "Human Torch" && p4name != "Human Torch"

[State 1003, ]
type = null;ChangeState
trigger1 = command = "holddown"
value = 0
ctrl = 1

[State 1003, 3]
type = ChangeAnim
trigger1 = vel x > 0 && anim != 1001
value = 1001

[State 1003, 4]
type = ChangeAnim
trigger1 =  vel x < 0 && anim != 1002
value = 1002

[State 1003, 5]
type = ChangeAnim
trigger1 =  vel x = 0  && anim != 1003 && command != "holdup"
value = 1003

[State 1003, 6]
type = MoveHitReset
trigger1 = movehit = 1
ignorehitpause = 0
persistent = 1


[State 1003, 7]
type = HitDef
trigger1 = timemod = 6,4 ;hitcount <= 15
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = Medium
air.animtype = Medium
ground.type = High
air.type = Low
fall.animtype = Diagup
damage = ifelse(19 - var(17) < 7, 7, 19 - var(17)), 0
pausetime = 4,2
guard.pausetime = 4,2
sparkno = s8220
sparkxy = -25, -30
guard.sparkno = s6767
hitsound = S0,6
guardsound = S22,0
ground.slidetime = 10
guard.slidetime = 10
ground.hittime = 10
guard.hittime = 10
ground.velocity = 0
guard.velocity = 0
air.velocity = 0
airguard.velocity = 0
ground.cornerpush.veloff = 2
air.cornerpush.veloff = 2
down.cornerpush.veloff = 2
guard.cornerpush.veloff = 5
airguard.cornerpush.veloff = 5
forcestand = 1

[State 1003, ]
type = ChangeState
trigger1 = time >= 130
value = 0
ctrl = 1


;---------------------------------------------------------------------------------------------
;Special2_a
[Statedef 1100]
type    = C
movetype= A
physics = C
juggle  = 7
ctrl = 0
anim = 1100
poweradd = 80
sprpriority = 0

[State 1260, Explod]
type = Explod
trigger1 = time = 0
anim = 7023
ID = 7023
postype = p1
pos = 0,0
scale = 0.55,0.55
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 0, ]
type = PlaySnd
trigger1 = animelem = 5
value = S121, 8

[State 0, ]
type = PlaySnd
trigger1 = animelem = 8
value = 54, 18

[State 1100, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage    = ifelse(100 - var(17) < 7, 7, 100 - var(17)), 0
animtype = High
hitflag = MA
guardflag = MA;L
priority = 4, Hit
pausetime = 13,14
sparkno = s8220
sparkxy = -10, -30
guard.sparkno = s6767
hitsound = S8000,2
guardsound = S22,0
ground.type = trip
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = 0, -11
air.velocity = 0,-11
air.fall = 1
airguard.velocity = -6,0
yaccel = 0.39+(enemynear,const(movement.yaccel)/2)


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



;---------------------------------------------------------------------------------------------
;Special2_b
[Statedef 1110]
type    = C
movetype= A
physics = C
juggle  = 7
ctrl = 0
anim = 1110
poweradd = 80
sprpriority = 0

[State 1260, Explod]
type = Explod
trigger1 = time = 0
anim = 7023
ID = 7023
postype = p1
pos = 0,0
scale = 0.55,0.55
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 0, ]
type = PlaySnd
trigger1 = animelem = 5
value = S121, 8

[State 0, ]
type = PlaySnd
trigger1 = animelem = 10
value = 54, 18

[State 1100, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = ifelse(100 - var(17) < 7, 7, 100 - var(17)), 0
animtype = High
hitflag = MA
guardflag = MA;L
priority = 4, Hit
pausetime = 13,14
sparkno = s8220
sparkxy = -10, -30
guard.sparkno = s6767
hitsound = S8000,2
guardsound = S22,0
ground.type = trip
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = 0, -11
air.velocity = 0,-11
air.fall = 1
airguard.velocity = -6,0
yaccel = 0.39+(enemynear,const(movement.yaccel)/2)

[State 1112, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------
;Special2_c
[Statedef 1120]
type    = C
movetype= A
physics = C
juggle  = 7
ctrl = 0
anim = 1120
poweradd = 80
sprpriority = 0

[State 1260, Explod]
type = Explod
trigger1 = time = 0
anim = 7023
ID = 7023
postype = p1
pos = 0,0
scale = 0.55,0.55
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 0, ]
type = PlaySnd
trigger1 = animelem = 5
value = S121, 8

[State 0, ]
type = PlaySnd
trigger1 = animelem = 12
value = 54, 18

[State 1100, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage    = ifelse(100 - var(17) < 7, 7, 100 - var(17)), 0
animtype = High
hitflag = MA
guardflag = MA;L
priority = 4, Hit
pausetime = 13,14
sparkno = s8220
sparkxy = -10, -30
guard.sparkno = s6767
hitsound = S8000,2
guardsound = S22,0
ground.type = trip
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = 0, -11
air.velocity = 0,-11
air.fall = 1
airguard.velocity = -6,0
yaccel = 0.39+(enemynear,const(movement.yaccel)/2)

[State 1122, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1


             ;pistola
[Statedef 1220]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 80
anim = 1220
ctrl = 0
sprpriority = -1

[State 1260, Explod]
type = Explod
trigger1 = time = 0
anim = 7023
ID = 7023
postype = p1
pos = 0,0
scale = 0.55,0.55
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 774]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage    = ifelse(25 - var(17) < 7, 7, 25 - var(17)), 0
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0,10
sparkno = S8220
sparkxy = -10,-90
hitsound = S8000,1
guardsound = S22,0
guard.sparkno = S10017
ground.type = High
ground.slidetime = 8
ground.hittime  = 13
ground.velocity = 0
airguard.velocity = -6,0
air.type = High
air.velocity = -7,1
air.hittime = 10

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 4
value = 121,14


[State 1000,helper]
type = Helper
;trigger1 = StateNo = 4100
trigger1 = animelem = 4
ID = 1221
pos = 80,-97
postype = p1
stateno = 1221
helpertype = normal
keyctrl = 0
;ownpal = 1
sprpriority = 1


[State 1000, Fim]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 1221]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1221
velset = 0,0
juggle = 1
ctrl = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1002, HitDef]
type = HitDef
trigger1 = time = 0
attr = S, HP
animtype = Hard
damage = ifelse(85 - var(17) < 7, 7, 85 - var(17)), 0
sprpriority = 1
hitflag = MADFP
guardflag = MA
pausetime = 2,2
sparkno = s8220
sparkxy = -10, 0
guard.sparkno = s6767
hitsound = S11,3
guardsound = S22,0
ground.type = High
ground.slidetime = 22
ground.hittime = 23
ground.velocity = -8
guard.slidetime = 11
guard.hittime = 11
guard.velocity = 0
air.type = Low
air.velocity = -5
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[state 1002, destroy]
type = Destroyself
trigger1 = animtime = 0

;granada
[Statedef 1210]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 1210
juggle  = 4
poweradd = 80

[State 0, VelSet]
type = VelSet
trigger1 =  time = 0
x = 0
y = 0

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

[State 1260, Explod]
type = Explod
trigger1 = time = 0
anim = 7023
ID = 7023
postype = p1
pos = 0,0
scale = 0.55,0.55
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "Granade1"
ID = 1211
stateno = 1211
pos = 15,-90
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

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

;----------
;Granade
[Statedef 1211]
type = A
movetype = A
physics = A
ctrl = 0
anim = 1211
velset = 7,-7

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = movehit >=1
value = S15,4

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = ,NA,SA,HA,NT,ST,HT
time = -1

[State 0, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA,AP; SCA,AA,AT,AP
slot = 1
stateno = 1203
time = -1

[State 200, HitDef]
type = HitDef
trigger1 = anim = 1211
attr = A,SP
damage = ifelse(95 - var(17) < 7, 7, 95 - var(17)), 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,5
sparkno = S8220
sparkxy = 0, 25
guard.sparkno = S6767
hitsound = S11, 3
guardsound = S22,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 0
air.type = Low
air.hittime = 15
air.velocity = 0,0
envshake.time = 1
envshake.ampl = 1


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1211 && movecontact > 0
value = 1212

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1212
x = 0
y = 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1212
movetype = I

[State 0, DestroySelf]
type = DestroySelf
trigger1 = frontedgebodydist <= -15
trigger2 = anim = 1212 && animtime = 0

[Statedef 1203]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 1212
sprpriority = 0



[state 10356, 2]
type = destroyself
trigger1 = animtime = 0

;choque
[StateDef 1200]
type = S
movetype = A
physics = S
anim = 1200
poweradd = 80
ctrl = 0
velset = 0,0

[State 1260, Explod]
type = Explod
trigger1 = time = 0
anim = 7023
ID = 7023
postype = p1
pos = 0,0
scale = 0.55,0.55
ownpal = 1
sprpriority = 5
supermovetime = 40


; voice
[State 1210, 0]
type = PlaySnd
trigger1 = AnimElem = 3
value = S121, 19


[State 1210, 2]
type = Projectile
trigger1 = AnimElem = 3
ProjID = 1201
projanim = 1201
projhitanim = 1202
projremanim = 1202
projcancelanim = 1202
velocity = 4,0
offset = 35,-60
; HitDef
attr = S,SP
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = medium
priority = 4,Hit   ;Hit,Miss,Dodge
damage    = ifelse(100 - var(17) < 7, 7, 100 - var(17)), 0
pausetime = 4,4
sparkno = S8220
guard.sparkno = S6767
hitsound = S11, 3
guardsound = S22,0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -6,0
air.velocity = -2,-2
p2stateno = 7696

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

[Statedef 7696]
type    = A
physics = N
movetype = H
ctrl = 0
anim = 5002

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

[State 3210, Electrocuted FXs]
type = PalFX
trigger1 = Time % 4
trigger1 = !AnimExist(7696)
time = 1
color = 64
invertall = 1
add = 128,128,1
mul = 256,256,256

[State 3210, Electrocuted FXs]
type = PalFX
trigger1 = Time % 6
trigger1 = !AnimExist(7696)
time = 1
color = 64
invertall = 1
add = 1,1,128
mul = 256,256,256

[State 7696, Electrocuted_Anim]
type = ChangeAnim
trigger1 = AnimExist(7696)
trigger1 = Anim != 7696
value = 7696

;[State 7696, 5]
;type = VelAdd
;trigger1 = Time > 2
;y = 0.45

[State 7696, 6]
type = SelfState
trigger1 = Time = 20
value = 5000;5100

;---------------------------------------------------------------------------
;Hypers
;---------------------------------------------------------------------------
 ; Maximum ball
[Statedef 2000]
type    = U
movetype= I
physics = N
velset = backedgedist/-5 * (.35),-10
anim = 2000
ctrl = 0
sprpriority = 2

[State 0, ]
type = ScreenBound
trigger1 = time >= 0

[State 0, ]
type = VelAdd
trigger1 = 1
y = .26

[State 1260, Explod]
type = Explod
trigger1 = time = 0
trigger1 = statetype != A
anim = 7023
ID = 7023
postype = p1
pos = 0,0
scale = 0.55,0.55
ownpal = 1
sprpriority = 5
supermovetime = 40



[State 1210, 0]
type = PlaySnd
trigger1 = time = 0
value = 54, 18


[State 0, ]
type = VelSet
trigger1 = vel x = 0
trigger1 = backedgedist < 10
x = .35

[State 0, ]
type = changestate
trigger1 = pos y < -100
trigger1 = backedgebodydist <= 10
trigger2 = vel y > 1
value = 2001

[State 0, ]
type = Playerpush
trigger1 = 1
value = 0

[State 0, ]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 53

[statedef 2001]
type = A
movetype = I
physics = N
anim = 2001
velset = 0,0
ctrl = 0

[State 3100, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,-2010


[State 0, ]
type = null;ScreenBound
trigger1 = time >= 0

[State 0, ]
type = PosFreeze
triggerall = Stateno = 2001
trigger1 = BackEdgeBodyDist < 2

[State 0, ]
type = PlayerPush
trigger1 = Stateno = 2001
value = 0

[State 0, ]
type = VelSet
trigger1 = BackEdgeBodyDist > 1
x = -5

[State 0]
type = NotHitBy
trigger1 = AnimElem = 1
value = SCA,NA,SA,NT,HT

[State 3000, SuperPause]
type = SuperPause
trigger1 = Time = 2
time = 45
sound = S8889,0
pos = 0,-80
darken = 0
anim = -1
poweradd = -1000

[State 3000, Hyper Spark]
type = Explod
trigger1 = Time = 2
anim = 1223
id = 1223
postype = p1
;scale = 0.5, 0.5
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, Hyper BG Sound]
type = null;PlaySnd
trigger1 = Time = 3
value =  21, 0
volume = 255
channel = 3

[State 3000, superportrait]
type = Explod
trigger1 = Time = 2
anim = 1080
ID = 1080
pos = 0,0
facing = 1
postype = back
bindtime = 999
removetime = 45
supermovetime = 40
pausemovetime = 40
sprpriority = -2
ownpal = 1

[State 3000, Explod]
type = Explod
trigger1 = Time = 2
removetime = 45
id = 32719
anim = 32716
pos = 0,0
postype = Left
scale = 1,1
sprpriority = -4
facing = 1
vfacing = 1
ownpal = 1
bindtime = -1
ontop = 0
ownpal = 1
supermove = 1
pausemove = 1
removeongethit = 1
ignorehitpause = 1
persistent = 1
supermovetime = 9999
pausemovetime =  9999
name = "Black BG"

[State 3000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG ;<-- removes the stage layer
flag = noFG ;<-- removes the lifebars and any foreground stage layers
ignorehitpause = 1
persistent = 1

[State 3000, superbg 1] ;Use this & 1.2 for timed hypers where user sets the BG remove time
type = Explod
trigger1 = Time = 3
anim = 32710
ID = 32710
pos = 0,0
postype = left
bindtime = -1
removetime = -1 ;infinite time
supermove = 40
pausemovetime = 40
removeongethit = 1
sprpriority = -2
ownpal = 1

[State 0, ]
type = AfterImage
trigger1 = time = 2
trigger1 = palno != 10
time = 10
length = 32
framegap = 8
trans = add1
ignorehitpause = 0

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x > 80
trigger1 = p2bodydist y > 20
value = 2005

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x > 80
trigger1 = p2bodydist y < -20
value = 2010

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist y = [-20,20]
value = 2015

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x <= 80
trigger1 = p2bodydist y < -20
value = 2020

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x <= 80
trigger1 = p2bodydist y > 20
value = 2025

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
value = 50

[statedef 2002]
type = A
movetype = I
physics = N
anim = 2002
velset = 0,0
hitcountpersist = 1
ctrl = 0

[State 1210, 0]
type = PlaySnd
trigger1 = time = 1
value = S121, 8


[State 0, ]
type = ScreenBound
trigger1 = time >= 0
value = 1
movecamera = 0,0

[State 0, ]
type = Turn
trigger1 = time = 0

[State 0, ]
type = PosFreeze
triggerall = Stateno = 2002
trigger1 = BackEdgeBodyDist < 2

[State 0, ]
type = PlayerPush
trigger1 = Stateno = 2002
value = 0

[State 0, ]
type = VelSet
trigger1 = BackEdgeBodyDist > 1
x = -5

[State 0, ]
type = AfterImageTime
trigger1 = stateno = 2002
trigger1 = palno != 10
time = 5

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x > 20
trigger1 = p2bodydist y > 20
value = 2005

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x > 20
trigger1 = p2bodydist y < -20
value = 2010

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist y = [-20,20]
value = 2015

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x <= 20
trigger1 = p2bodydist y < -20
value = 2020

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x <= 20
trigger1 = p2bodydist y > 20
value = 2025

[State 0, ]
type = ChangeState
trigger1 = p2statetype = L
value = 50

[statedef 2003]
type = S
movetype = I
physics = S
anim = 2003
velset = 0,0
hitcountpersist = 1

[State 1210, 0]
type = PlaySnd
trigger1 = time = 1
value = S121, 8

[State 0, ]
type = ScreenBound
trigger1 = time >= 0
value = 1
movecamera = 0,0

[State 0, ]
type = Width
trigger1 = 1
edge = -20,-30
player = -20,-30

[State 0, ]
type = Turn
trigger1 = time = 0
trigger1 = p2dist x < 0

[State 0, ]
type = AfterImageTime
trigger1 = stateno = 2003
trigger1 = palno != 10
time = 10

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x > 20
trigger1 = p2bodydist y < -20
value = 2010

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist y = [-20,20]
value = 2015

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x <= 20
trigger1 = p2bodydist y < -20
value = 2020

[State 0, ]
type = ChangeState
trigger1 = p2statetype = L
value = 12

[statedef 2004]
type = A
movetype = I
physics = N
anim = 2004
velset = 0,0
hitcountpersist = 1

[State 1210, 0]
type = PlaySnd
trigger1 = time = 1
value = S121, 8

[State 0, ]
type = ScreenBound
trigger1 = time >= 0
value = 1
movecamera = 0,0

[State 0, ]
type = Width
trigger1 = 1
edge = -20,-30
player = -20,-30

[State 0, ]
type = Turn
trigger1 = time = 0
trigger1 = p2dist x < 0

[State 0, ]
type = PlayerPush
trigger1 = Stateno = 2004
value = 0

[State 0, ]
type = AfterImageTime
trigger1 = stateno = 2004
trigger1 = palno != 10
time = 10

[State 0, ]
type = VelSet
trigger1 = screenpos y >= 50
y = 0

[State 0, ]
type = VelSet
trigger1 = screenpos y > 50
y = -5

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x > 150
trigger1 = p2bodydist y > 0
trigger2 = screenpos y < 50 && random > 333
trigger2 = random = 0 && random > 333
value = 2005

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist y = [-20,0]
trigger2 = screenpos y < 50 && random = [333,666]
trigger2 = animtime = 0 && random = [333,666]
value = 2015

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
trigger1 = p2bodydist x <= 150
trigger1 = p2bodydist y > 0
trigger2 = screenpos y < 50 && random < 666
trigger2 = animtime = 0 && random < 666
value = 2025

[State 0, ]
type = ChangeState
trigger1 = p2statetype = L
value = 50

[statedef 2005]
type = A
movetype = A
physics = N
anim = 2005
velset = 13,7
hitcountpersist = 1
ctrl = 0

[State 1210, 0]
type = PlaySnd
trigger1 = time = 1
value = S121, 8

[State 0, ]
type = VarSet
trigger1 = movehit =1
trigger1 = Win
v =  1
value = 1

[State 0, ]
type = VelAdd
trigger1 = time >= 5
x = .2
y = .2

[State 0, ]
type = ScreenBound
trigger1 = stateno = 2005
value = 1
movecamera = 0,0

[State 0, ]
type = PlayerPush
trigger1 = stateno = 2005
value = 0

[State 0, ]
type = AfterImageTime
trigger1 = stateno = 2005
trigger1 = palno != 10
time = 20

[State 0, ]
type = EnvColor
trigger1 = movehit = 1
value = 255,255,255
time = 4
under = 0
ignorehitpause = 1
persistent = 0

[State 0, ]
type = HitDef
trigger1 = movehit = 0
attr = A,HA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
fall.animtype = up
getpower = 0,0
givepower = 0,0
ground.type = low
air.type = low
priority = 7,Hit
damage = ifelse(50 - var(17) < 7, 7, 50 - var(17)), 0
pausetime = 5,12
guard.pausetime = 5,5
sparkno = S8220
guard.sparkno = S6767
sparkxy = 0,-40
hitsound = S8000,2;S121,10
guardsound = S22,0
ground.slidetime = 50
ground.hittime = 50
air.hittime = 100
ground.velocity = -6,-10
guard.velocity = -4
air.velocity = -2.25,-9
airguard.velocity = -5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 0
envshake.time = 35
envshake.freq = 60
envshake.ampl = 2
envshake.phase =  2
fall.envshake.time = 0
fall.envshake.freq = 2
fall.envshake.ampl =  2
fall.envshake.phase =  2

[State 0, ]
type = ChangeState
trigger1 = movehit = 1
trigger1 = hitcount = 5
trigger2 = moveguarded = 1
trigger3 = hitcount = 0
trigger3 = movehit = 0
trigger3 = pos y >= 0
value = 2030

[State 0, ]
type = ChangeState
triggerall = frontedgedist <= 5
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2002

[State 0, ]
type = ChangeState
triggerall = pos y >= 0
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2003

[State 0, ]
type = ChangeState
triggerall = screenpos y >= 225
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2003

[State 0, ]
type = ChangeState
trigger1 = prevstateno != 2001
trigger1 = p2statetype = L
value = 50

[statedef 2010]
type = A
movetype = A
physics = N
anim = 2005
velset = 13,-7
hitcountpersist = 1
ctrl = 0

[State 1210, 0]
type = PlaySnd
trigger1 = time = 1
value = S121, 8

[State 0, ]
type = VarSet
trigger1 = movehit =1
trigger1 = Win
v =  1
value = 1

[State 0, ]
type = VelAdd
trigger1 = time >= 5
x = .2
y = -0.2

[State 0, ]
type = ScreenBound
trigger1 = stateno = 2010
value = 1
movecamera = 0,0

[State 0, ]
type = PlayerPush
trigger1 = stateno = 2010
value = 0

[State 0, ]
type = AfterImageTime
trigger1 = stateno = 2010
trigger1 = palno != 10
time = 20

[State 0, ]
type = EnvColor
trigger1 = movehit = 1
value = 255,255,255
time = 4
under = 0
ignorehitpause = 1
persistent = 0

[State 0, ]
type = HitDef
trigger1 = movehit = 0
attr = A,HA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
fall.animtype = up
ground.type = low
getpower = 0,0
givepower = 0,0
air.type = low
priority = 7,Hit
damage = ifelse(50 - var(17) < 7, 7, 50 - var(17)), 0
pausetime = 5,12
guard.pausetime = 5,5
sparkno = S8220
guard.sparkno = S6767
sparkxy = 0,-105
hitsound = S8000,2;S121, 10
guardsound = S22,0
ground.slidetime = 100
ground.hittime = 100
air.hittime = 100
ground.velocity = -0.25,-10
guard.velocity = -4
air.velocity = -2.25,-5
airguard.velocity = -5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 0
envshake.time = 35
envshake.freq = 60
envshake.ampl = 2
envshake.phase =  2
fall.envshake.time = 0
fall.envshake.freq = 2
fall.envshake.ampl =  2
fall.envshake.phase =  2

[State 0, ]
type = ChangeState
trigger1 = movehit = 1
trigger1 = hitcount = 5
trigger2 = moveguarded = 1
value = 2030

[State 0, ]
type = ChangeState
triggerall = frontedgedist <= 5
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2002

[State 0, ]
type = ChangeState
triggerall = screenpos y <= 0
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2004

[State 0, ]
type = ChangeState
triggerall = hitcount = 0
trigger1 = movehit = 0
trigger1 = screenpos y <= 50
trigger2 = p2stateno = 5100
value = 50

[statedef 2015]
type = A
movetype = A
physics = N
anim = 2005
velset = 10,0
hitcountpersist = 1
ctrl = 0

[State 1210, 0]
type = PlaySnd
trigger1 = time = 1
value = S121, 8

[State 0, ]
type = VarSet
trigger1 = movehit =1
trigger1 = Win
v =  1
value = 1

[State 0, ]
type = VelAdd
trigger1 = time >= 5
x = .2

[State 0, ]
type = ScreenBound
trigger1 = stateno = 2015
value = 1
movecamera = 0,0

[State 0, ]
type = PlayerPush
trigger1 = stateno = 2015
value = 0

[State 0, ]
type = AfterImageTime
trigger1 = stateno = 2015
trigger1 = palno != 10
time = 20

[State 0, ]
type = EnvColor
trigger1 = movehit = 1
value = 255,255,255
time = 4
under = 0
ignorehitpause = 1
persistent = 0

[State 0, ]
type = HitDef
trigger1 = movehit = 0
attr = A,HA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
fall.animtype = up
ground.type = low
air.type = low
priority = 7,Hit
damage = ifelse(50 - var(17) < 7, 7, 50 - var(17)), 0
getpower = 0,0
givepower = 0,0
pausetime = 5,12
guard.pausetime = 5,5
sparkno = S8220
guard.sparkno = S6767
sparkxy = 0,-75
hitsound = S8000,2;S121, 10
guardsound = S22,0
ground.slidetime = 100
ground.hittime = 100
air.hittime = 100
ground.velocity = -0.25,-10
guard.velocity = -4
air.velocity = -4,-7.5
airguard.velocity = -5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 0
envshake.time = 35
envshake.freq = 60
envshake.ampl = 2
envshake.phase =  2
fall.envshake.time = 0
fall.envshake.freq = 2
fall.envshake.ampl =  2
fall.envshake.phase =  2
[State 0, ]
type = ChangeState
trigger1 = movehit = 1
trigger1 = hitcount = 5
trigger2 = moveguarded = 1
value = 2030

[State 0, ]
type = ChangeState
triggerall = frontedgedist <= 5
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2002

[State 0, ]
type = ChangeState
triggerall = hitcount = 0
trigger1 = movehit = 0
trigger1 = frontedgedist <= 5
trigger2 = p2stateno = 5100
value = 50

[statedef 2020]
type = A
movetype = A
physics = N
anim = 2005
velset = 7,-13
hitcountpersist = 1
ctrl = 0

[State 1210, 0]
type = PlaySnd
trigger1 = time = 1
value = S121, 8

[State 0, ]
type = VarSet
trigger1 = movehit =1
trigger1 = Win
v =  1
value = 1

[State 0, ]
type = VelSet
trigger1 = time = 0
trigger1 = p2bodydist x <= 0 && p2bodydist y <= -100
x = 0

[State 0, ]
type = VelAdd
trigger1 = time >= 5
x = .2
y = -0.2

[State 0, ]
type = ScreenBound
trigger1 = stateno = 2020
value = 1
movecamera = 0,0

[State 0, ]
type = PlayerPush
trigger1 = stateno = 2020
value = 0

[State 0, ]
type = AfterImageTime
trigger1 = stateno = 2020
trigger1 = palno != 10
time = 20

[State 0, ]
type = EnvColor
trigger1 = movehit = 1
value = 255,255,255
time = 4
under = 0
ignorehitpause = 1
persistent = 0

[State 0, ]
type = HitDef
trigger1 = movehit = 0
attr = A,HA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
fall.animtype = up
ground.type = low
air.type = low
priority = 7,Hit
damage = ifelse(50 - var(17) < 7, 7, 50 - var(17)), 0
getpower = 0,0
givepower = 0,0
pausetime = 5,12
guard.pausetime = 5,5
sparkno = S8220
guard.sparkno = S6767
sparkxy = 0,-120
hitsound = S8000,2;S121, 10
guardsound = S22,0
ground.slidetime = 100
ground.hittime = 100
air.hittime = 100
ground.velocity = -0.25,-10
guard.velocity = -4
air.velocity = -1.25,-7
airguard.velocity = -5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 0
envshake.time = 35
envshake.freq = 60
envshake.ampl = 2
envshake.phase =  2
fall.envshake.time = 0
fall.envshake.freq = 2
fall.envshake.ampl =  2
fall.envshake.phase =  2

[State 0, ]
type = ChangeState
trigger1 = movehit = 1
trigger1 = hitcount = 5
trigger2 = moveguarded = 1
value = 2030

[State 0, ]
type = ChangeState
triggerall = frontedgedist <= 5
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2002

[State 0, ]
type = ChangeState
triggerall = screenpos y <= 0
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2004

[State 0, ]
type = ChangeState
triggerall = hitcount = 0
trigger1 = movehit = 0
trigger1 = screenpos y >= 50
trigger2 = p2stateno = 5100
value = 50

[statedef 2025]
type = A
movetype = A
physics = N
anim = 2005
velset = 7,13
hitcountpersist = 1
ctrl = 0

[State 1210, 0]
type = PlaySnd
trigger1 = time = 1
value = S121, 8

[State 0, ]
type = VarSet
trigger1 = movehit =1
trigger1 = Win
v =  1
value = 1

[State 0, ]
type = VelSet
trigger1 = time = 0
trigger1 = p2bodydist x <= 0 && p2bodydist y >= 100
x = 0

[State 0, ]
type = VelAdd
trigger1 = time >= 5
x = .2
y = .2

[State 0, ]
type = ScreenBound
trigger1 = stateno = 2025
value = 1
movecamera = 0,0

[State 0, ]
type = PlayerPush
trigger1 = stateno = 2025
value = 0

[State 0, ]
type = AfterImageTime
trigger1 = stateno = 2025
trigger1 = palno != 10
time = 20

[State 0, ]
type = EnvColor
trigger1 = movehit = 1
value = 255,255,255
time = 4
under = 0
ignorehitpause = 1
persistent = 0

[State 0, ]
type = HitDef
trigger1 = movehit = 0
attr = A,HA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
fall.animtype = up
ground.type = low
getpower = 0,0
givepower = 0,0
air.type = low
priority = 7,Hit
damage = ifelse(50 - var(17) < 7, 7, 50 - var(17)), 0
pausetime = 5,12
guard.pausetime = 5,5
sparkno = S8220
guard.sparkno = S6767
sparkxy = 0,-10
hitsound = S8000,2;S121, 10
guardsound = S22,0
ground.slidetime = 100
ground.hittime = 100
air.hittime = 100
ground.velocity = -0.25,-10
guard.velocity = -4
air.velocity = -1.25,-3
airguard.velocity = -5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
air.fall = 1
fall.recover = 0
envshake.time = 35
envshake.freq = 60
envshake.ampl = 2
envshake.phase =  2
fall.envshake.time = 0
fall.envshake.freq = 2
fall.envshake.ampl =  2
fall.envshake.phase =  2

[State 0, ]
type = ChangeState
trigger1 = movehit = 1
trigger1 = hitcount = 5
trigger2 = moveguarded = 1
trigger3 = hitcount = 0
trigger3 = movehit = 0
trigger3 = pos y >= 0
value = 2030

[State 0, ]
type = ChangeState
triggerall = frontedgedist <= 5
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2002

[State 0, ]
type = ChangeState
triggerall = pos y >= 0
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2003

[State 0, ]
type = ChangeState
triggerall = screenpos y >= 225
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2003

[State 0, ]
type = ChangeState
trigger1 = prevstateno != 2001
trigger1 = p2statetype = L
value = 50

[statedef 2030]
type = A
movetype = A
physics = N
velset = -3,-8
hitcountpersist = 1
ctrl = 0

[State 0, ]
type = ChangeAnim
trigger1 = time = 0
trigger1 = hitcount = 0
value = 43

[State 0, ]
type = ChangeState
trigger1 = time = 1
value = 50

[statedef 2050]
type = A
movetype = H
physics = A
ctrl = 0

[State 0, ]
type = ChangeState
triggerall = frontedgedist <= 5
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2051

[State 0, ]
type = ChangeState
triggerall = pos y >= 0
trigger1 = movehit = 1
trigger2 = hitcount >= 1
value = 2052
;---------------------------------------------------------------------------------------------
;Hyper1

[Statedef 3000]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2

[State 0]
type = NotHitBy
trigger1 = AnimElem = 1
value = SCA,NA,SA,NT,HT

[State 1260, Explod]
type = Explod
trigger1 = Time = 1
anim = 7023
ID = 7023
postype = p1
pos = 0,0
scale = 0.55,0.55
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, SuperPause]
type = SuperPause
trigger1 = Time = 1
time = 45
sound = S8889,0
pos = 0,-80
darken = 0
anim = -1
poweradd = -1000

[State 3000, Hyper Spark]
type = Explod
trigger1 = Time = 1
anim = 1223
id = 1223
postype = p1
;scale = 0.5, 0.5
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, superportrait]
type = Explod
trigger1 = Time = 1
anim = 1080
ID = 1080
pos = 0,0
facing = 1
postype = back
bindtime = 999
removetime = 45
supermovetime = 40
pausemovetime = 40
sprpriority = -2
ownpal = 1

[State 3000, Explod]
type = Explod
trigger1 = time = 1
removetime = 45
id = 32719
anim = 32716
pos = 0,0
postype = Left
scale = 1,1
sprpriority = -4
facing = 1
vfacing = 1
ownpal = 1
bindtime = -1
ontop = 0
ownpal = 1
supermove = 1
pausemove = 1
removeongethit = 1
ignorehitpause = 1
persistent = 1
supermovetime = 9999
pausemovetime =  9999
name = "Black BG"

[State 3000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG ;<-- removes the stage layer
flag = noFG ;<-- removes the lifebars and any foreground stage layers
ignorehitpause = 1
persistent = 1

[State 3000, Hyper BG Sound]
type = null;PlaySnd
trigger1 = Time = 2
value =  21, 0
volume = 255
channel = 3

[State 3000, superbg 1] ;Use this & 1.2 for timed hypers where user sets the BG remove time
type = Explod
trigger1 = time = 2
anim = 32710
ID = 32710
pos = 0,0
postype = left
bindtime = -1
removetime = -1 ;infinite time
supermove = 40
pausemovetime = 40
removeongethit = 1
sprpriority = -2
ownpal = 1

[State 1210, 0]
type = PlaySnd
trigger1 = Animelem = 2
trigger2 = Animelem = 7
trigger3 = Animelem = 12
trigger4 = Animelem = 17
trigger5 = Animelem = 22
trigger6 = Animelem = 27
trigger7 = Animelem = 32
trigger8 = Animelem = 37
trigger9 = Animelem = 42
trigger10 = Animelem = 47
trigger11 = Animelem = 52
value = S121, 8

[State 3000, 3]
type = Hitdef
trigger1 = !movehit
trigger1 = Animelem = 4
trigger2 = Animelem = 9
trigger3 = Animelem = 14
trigger4 = Animelem = 19
trigger5 = Animelem = 24
trigger6 = Animelem = 29
trigger7 = Animelem = 34
trigger8 = Animelem = 39
trigger9 = Animelem = 44
trigger10 = Animelem = 49
attr = A, NA
hitflag = MAF
guardflag = MA
animtype = Hard
getpower = 0,0
givepower = 0,0
ground.type = Hard
damage = ifelse(39 - var(17) < 7, 7, 39 - var(17)), 0
pausetime = 2,2
guard.pausetime = 3, 3
sparkno = s8220
sparkxy = -20, -73
guard.sparkno = S6767
hitsound = S8000,2
guardsound = S22,0
ground.hittime = 20
ground.slidetime = 20
guard.slidetime = 12
ground.velocity = 0
air.velocity = 0;-7, -2
velset = 2,0
air.recover = 0
fall.recover = 0
envshake.time = 35
envshake.freq = 60
envshake.ampl = 2
envshake.phase =  2
fall.envshake.time = 0
fall.envshake.freq = 2
fall.envshake.ampl =  2
fall.envshake.phase =  2

[State 3000, 3]
type = Hitdef
trigger1 = Animelem =  54
attr = A, NA
hitflag = MAF
guardflag = MA
animtype = Hard
damage = ifelse(30 - var(17) < 7, 7, 30 - var(17)), 0
getpower = 0,0
givepower = 0,0
pausetime = 15, 15
guard.pausetime = 12, 12
sparkno = s8220
sparkxy = -20, -73
guard.sparkno = S6767
hitsound = S8000,4
guardsound = S22,0
guard.slidetime = 12
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -20,-3
air.velocity = -22,-10
air.hittime = 25
air.recover = 0
fall.recover = 0
air.fall = 1
fall = 1
envshake.time = 35
envshake.freq = 60
envshake.ampl = 2
envshake.phase =  2
fall.envshake.time = 0
fall.envshake.freq = 2
fall.envshake.ampl =  2
fall.envshake.phase =  2

[State 3000, End]
type = ChangeState
trigger1 = animtime=0
trigger1 = BackEdgeBodyDist > -1
value = 0
ctrl = 1

;---------------------------------------------------------------------------------------------
;Hyper2

[Statedef 3100]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
anim = 3100
ctrl = 0
sprpriority = 2

[State 3000, som]
type = PlaySnd
trigger1 = AnimElem = 3
value = 121, 7


[State 1260, Explod]
type = Explod
trigger1 = animelem = 10
anim = 7023
ID = 7023
postype = p1
pos = 0,0
scale = 0.55,0.55
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, Hyper Portrait]
type = explod
trigger1 = animElem = 3
anim = 3177
postype = p1
sprpriority = -2
supermovetime = -1
removetime = 100
pos = 110, 0
bindtime = -1
removeongethit = 1

[State 3000, som]
type = PlaySnd
trigger1 = time = 28
value = 121, 9

[State 3000, Hyper Portrait]
type = explod
trigger1 = time = 28
anim = 3170
postype = back
sprpriority = -3
supermovetime = -1
removetime = 22
pos = -5,0
bindtime = -1
removeongethit = 1
ontop = 1

[State 3000, assertspecial]
type = assertspecial
trigger1 = time = 28
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
trigger1 = animElem = 10
time = 45;60
sound = S8889,0
pos =  9999,-9951
darken = 0
p2defmul = 0
anim = -1
poweradd = -1000


[State 3000, Hyper Portrait]
type = explod
trigger1 = animElem = 10
anim = 1080
id = 1080
postype = back
sprpriority = -3
supermovetime = -1
removetime = 45
pos = 0,0
bindtime = -1
removeongethit = 1

[State 3000, Explod]
type = Explod
trigger1 = animelem = 10
removetime = 45
id = 32719
anim = 32716
pos = 0,0
postype = Left
scale = 1,1
sprpriority = -4
facing = 1
vfacing = 1
ownpal = 1
bindtime = -1
ontop = 0
ownpal = 1
supermove = 1
pausemove = 1
removeongethit = 1
ignorehitpause = 1
persistent = 1
supermovetime = 9999
pausemovetime =  9999
name = "Black BG"

[State 3000, superbg 1] ;Use this & 1.2 for timed hypers where user sets the BG remove time
type = Explod
trigger1 = animelem = 11
anim = 32710
ID = 32710
pos = 0,0
postype = left
bindtime = -1
removetime = -1 ;infinite time
supermove = 40
pausemovetime = 40
removeongethit = 1
sprpriority = -2
ownpal = 1

[State 3000, Hyper BG Sound]
type = null;PlaySnd
trigger1 = time = 32
value =  21, 0
volume = 255
channel = 3

[State 3000, Hyper Spark]
type = Explod
trigger1 = AnimElem = 10
anim = 1223
postype = p1
scale = 0.5, 0.5
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, SuperPause]
type = SuperPause
trigger1 = time = 28
time = 21
pos =  9999,-9951
darken = 0
anim = -1
p2defmul = 0

[State 3000, SuperPause]
type = SuperPause
trigger1 = time = 29
time = 135
pos =  9999,-9951
darken = 0
anim = -1
p2defmul = 0

[State 3000, SuperPause]
type = SuperPause
trigger1 = time = 30
time = 100
pos =  9999,-9951
darken = 0
anim = -1
p2defmul = 0

[State 3000, SuperPause]
type = SuperPause
trigger1 = time = 31
time = 20
pos =  9999,-9951
darken = 0
anim = -1
p2defmul = 0



[State 3100, HyperBg]
type = Explod
trigger1 = time = 29
anim = 3172
pos = 0,0
sprpriority = 4
postype = back
bindtime = -1
removetime = 240
removeongethit = 1
;facing = ifelse(Facing = -1, -1, 1)
supermovetime = 99999999
pausemovetime = 99999999
ontop = 1
;shadow = 68,68,68
;ownpal = 1


[State 3100, HyperBg]
type = Explod
trigger1 = time = 29
anim = 3173
pos = 150,60
sprpriority = 1
postype = back
bindtime = -1
removetime = 240
removeongethit = 1
;facing = ifelse(Facing = -1, -1, 1)
supermovetime = 99999999
pausemovetime = 99999999
ontop = 1
;shadow = 68,68,68
;ownpal = 1


[State 3100, HyperBg]
type = Explod
trigger1 = time = 29
anim = 3171
pos = 150,85
sprpriority = 3
postype = back
bindtime = -1
removetime = 188
removeongethit = 1
;facing = ifelse(Facing = -1, -1, 1)
supermovetime = 99999999
pausemovetime = 99999999
ontop = 1

[State 3000, som]
type = PlaySnd
trigger1 = time = 30
value = 121, 13


[State 3000, Hyper Portrait]
type = explod
trigger1 = time = 31
anim = 3175
postype = back
sprpriority = -3
supermovetime = -1
removetime = 20
pos = -5,0
bindtime = -1
removeongethit = 1
ontop = 1

[State 3000, som]
type = PlaySnd
trigger1 = time = 32
value = 121, 12

[State 3100,helper]
type = Helper
;trigger1 = StateNo = 4100
trigger1 = time = 32
ID = 13000
pos = 110,-400
postype = p1
stateno = 13000
helpertype = normal
keyctrl = 1
;ownpal = 1
ontop = 1
sprpriority = 5


[State 3100, End]
type = ChangeState
trigger1 = time = 119
trigger1 = BackEdgeBodyDist > -1
value = 0
ctrl = 1

[Statedef 13000]
type = S
movetype = A
physics = N
ctrl = 0
anim = 3176
velset = 0,0
juggle = 1
ctrl = 0
sprpriority = 5

[State 1003, ]
type = VelAdd
triggerall = command ="holdfwd"
triggerall = Vel X <= 0.5
trigger1 = 1
x = 0.2

[State 1003, ]
type = VelAdd
triggerall = command ="holdback"
triggerall = Vel X >= -0.5
trigger1 = 1
x = -0.2

[State 13000, HitDef]
type = HitDef
trigger1 = time = 0
trigger2 = time = 4
trigger3 = time = 7
trigger4 = time = 10
trigger5 = time = 13
trigger6 = time = 16
trigger7 = time = 19
trigger8 = time = 22
trigger9 = time = 25
trigger10 = time = 28
trigger11 = time = 31
trigger12 = time = 34
trigger13 = time = 37
trigger14 = time = 40
trigger15 = time = 43
trigger16 = time = 46
trigger17 = time = 49
trigger18 = time = 52
trigger19 = time = 55
attr = S, HP
animtype = Hard
damage = ifelse(15 - var(17) < 7, 7, 15 - var(17)), 0
getpower = 0,0
givepower = 0,0
sprpriority = 1
hitflag = MADFP
guardflag = MA
pausetime = 0,0
sparkno = S8220
sparkxy = 0,0
guard.sparkno = S6767
hitsound = S8000,2
guardsound = S22,0
ground.type = High
ground.slidetime = 22
ground.hittime = 23
ground.velocity = 0,-6
guard.slidetime = 11
guard.hittime = 11
guard.velocity = 0
air.type = Low
air.velocity = 0,-3
airguard.velocity = 0
fall.recover =0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 35
envshake.freq = 60
envshake.ampl = 2
envshake.phase =  2
fall.envshake.time = 0
fall.envshake.freq = 2
fall.envshake.ampl =  2
fall.envshake.phase =  2


[State 13000, HitDef]
type = HitDef
trigger1 = time = 58
attr = S, HP
animtype = Hard
damage = ifelse(28 - var(17) < 7, 7, 28 - var(17)), 0
getpower = 0,0
givepower = 0,0
sprpriority = 1
hitflag = MADFP
guardflag = MA
pausetime = 0,0
sparkno = S8220
guard.sparkno = S6767
hitsound = S8000,2
guardsound = S22,0
ground.type = High
ground.slidetime = 22
ground.hittime = 43
ground.velocity = 0,-4
guard.slidetime = 11
guard.hittime = 11
guard.velocity = 0
air.type = Low
air.velocity = 0,-1
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall.recover =0
air.fall = 1
fall = 1
envshake.time = 35
envshake.freq = 60
envshake.ampl = 2
envshake.phase =  2
fall.envshake.time = 0
fall.envshake.freq = 2
fall.envshake.ampl =  2
fall.envshake.phase =  2

[State Helper Hits Count Too]
type = ParentVarAdd
trigger1 = MoveHit
trigger1 = HitCount > var(33)
v = 14
value = 1

[State Fix Internal Hitcount]
type = VarSet
trigger1 = HitCount > var(33)
var(33) = HitCount


[state 13000, destroy]
type = Destroyself
trigger1 = animtime = 0

;happy family
[Statedef 4000]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 4000
sprpriority = -2

[State 1260, Explod]
type = Explod
trigger1 = time = 0
anim = 7023
ID = 7023
postype = p1
pos = 0,0
scale = 0.55,0.55
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 0]
type = NotHitBy
trigger1 = AnimElem = 3
value = SCA,NA,SA,NT,HT

[State 3000, SuperPause]
type = SuperPause
trigger1 = AnimElem = 3
time = 45
sound = S8889,0
pos = 0,-80
darken = 0
anim = -1
poweradd = -1000

[State 3000, Hyper Spark]
type = Explod
trigger1 = animelem = 3
anim = 1223
id = 1223
postype = p1
;scale = 0.5, 0.5
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, superportrait]
type = Explod
trigger1 = animelem = 3
anim = 1081
ID = 1081
pos = 0,0
facing = 1
postype = back
bindtime = 999
removetime = 45
supermovetime = 40
pausemovetime = 40
sprpriority = -2
ownpal = 1

[State 3000, Explod]
type = Explod
trigger1 = animelem = 3
removetime = 45
id = 32719
anim = 32716
pos = 0,0
postype = Left
scale = 1,1
sprpriority = -4
facing = 1
vfacing = 1
ownpal = 1
bindtime = -1
ontop = 0
ownpal = 1
supermove = 1
pausemove = 1
removeongethit = 1
ignorehitpause = 1
persistent = 1
supermovetime = 9999
pausemovetime =  9999
name = "Black BG"

[State 3000, superbg 1] ;Use this & 1.2 for timed hypers where user sets the BG remove time
type = Explod
trigger1 = animelem = 4
anim = 32710
ID = 32710
pos = 0,0
postype = left
bindtime = -1
removetime = -1 ;infinite time
supermove = 40
pausemovetime = 40
removeongethit = 1
sprpriority = -2
ownpal = 1

[State 3000, Hyper BG Sound]
type = null;PlaySnd
trigger1 = Animelem = 3
value =  21, 0
volume = 255
channel = 3



[State 1210, 0]
type = PlaySnd
trigger1 = AnimElem = 4
value = S121, 8

[State 222, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
getpower = 0,0
givepower = 0,0
priority = 1, Miss
sparkno = -1
sprpriority = 1
p2facing = 1
p1stateno = 4001
p2stateno = 4010
fall = 1
fall.recover =0



[State 191, RemoveExplod]
type = RemoveExplod
trigger1 = AnimTime = 0
id = 750

[State 191, RemoveExplod]
type = RemoveExplod
trigger1 = AnimTime = 0
id = 751

[State 222, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 4001]
type    = S
movetype= A
physics = N
anim = 4001
sprpriority = 2

[State 3032]
type = HitAdd
trigger1 = Time = 61
value = 1

[State 810]
type = Explod
trigger1 = Time = 61
anim = 8220
ontop = 1
persistent = 0
postype = p2
pos = 0,0
ownpal = 1


[State 3032]
type = HitAdd
trigger1 = Time >= 120 && Timemod= 2,1 && time < 179
value = 1

[State 810]
type = Explod
trigger1 = Time >= 120 && Timemod= 2,1 && time < 179
anim = 8220
ontop = 1
persistent = 0
postype = p2
pos = 0,0
ownpal = 1

[State 3000, som]
type = PlaySnd
trigger1 = time = 2
value = 121, 5

;coisa
[State 3000, som]
type = PlaySnd
trigger1 = time = 21
value = 54, 18

;coisa cai
[State 3000, som]
type = PlaySnd
trigger1 = time = 51
value = 8200, 0

;coisa bate
[State 3000, som]
type = PlaySnd
trigger1 = time = 61
value = 8000, 2

;coisa sai
[State 3000, som]
type = PlaySnd
trigger1 = time = 83
value = 8400, 2

;susan chega
[State 3000, som]
type = PlaySnd
trigger1 = time = 60
value = 8400, 2

;susan power
[State 3000, som]
type = PlaySnd
trigger1 = time = 80
value = 121, 20

;tocha chega
[State 3000, som]
type = PlaySnd
trigger1 = time = 100
value = 8400, 2

;tocha atira
[State 3000, som]
type = PlaySnd
trigger1 = time >= 120 && timemod = 2,1 && time < 179
value = 121, 17

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 20
anim = 4002
ID = 8400
postype = P2
facing = -1
pos = 20,0
sprpriority = -2
ownpal = 1
supermovetime = 0

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 20
anim = 4008
ID = 8400
postype = P2
facing = 1
pos = 0,0
sprpriority = 2
ownpal = 1
supermovetime = 0

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 21
anim = 4003
ID = 8400
postype = P2
facing = 1
pos = -40,0
sprpriority = 1
ownpal = 1
supermovetime = 0

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 60
anim = 4004
ID = 8400
postype = P1
facing = 1
pos = -60,-160
sprpriority = 1
ownpal = 1
supermovetime = 0


[State 3100, Ground Flash]
type = Explod
trigger1 = time = 60
anim = 4005
ID = 8400
postype = P1
facing = 1
pos = -60,-160
sprpriority = -1
ownpal = 1
supermovetime = 0

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 80
anim = 4006
ID = 8400
postype = P2
facing = 1
pos = 0,0
sprpriority = 2
ownpal = 1
supermovetime = 0

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 100
anim = 4007
ID = 8400
postype = P2
facing = 1
pos = -80,-10
sprpriority = 4
ownpal = 1
supermovetime = 0

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 115
anim = 4009
ID = 8400
postype = P2
facing = 1
pos =0,0
sprpriority = 1
ownpal = 1
supermovetime = 0

[State 180, 1]
type = VarRandom
trigger1 = win = 1
v = 1
range = 300,400

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

[Statedef 4010]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 0

[State 2643, 1]
type = VelSet
trigger1 = time = 62
y = -10

[State 2643, 3]
type = PosSet
trigger1 = time > 62
trigger1 = Pos Y >= -7
y = -13

[State 2643, 4]
type = VelSet
trigger1 = time = 80
y = 0



[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 4010

;damage coise
[State 7130, Damage]
type = LifeAdd
trigger1 = time = 82
value = -200
kill = 0


;danage tocha
[State 7130, Damage]
type = LifeAdd
trigger1 = time = 120
trigger2 = time = 122
trigger3 = time = 124
trigger4 = time = 126
trigger5 = time = 128
trigger6 = time = 130
value = -10
kill = 0

;damage final
[State 7130, Damage]
type = LifeAdd
trigger1 = AnimTime = 0
value = -20
kill = 1

[State 820, 3]
type = SelfState
trigger1 = AnimTime = 0
value = 5050
;---------------------------------------------------------------------------------------------
;Beginning of the super jump
[Statedef 7000]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 7000, Helper]   ;this determines whether an aerial rave comes into play or not
type = Helper
triggerall = prevstateno = 450
trigger1 = time = 0
helpertype = normal
name = "Rave_Timer"
ID = 7003
stateno = 7003
pos = 0,0
postype = p1
facing = 1

[State 7000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 11
value = 0

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdfwd"
v = 11
value = 1

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdback"
v = 11
value = -1

[State 7001, Explod]
type = Explod
trigger1 = Time = 0
ID = 7022
anim = 7022
postype = p1
pos = -120, 0
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 0.54,0.48

[State 7000, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 7001
ctrl = 1

;---------------------------------------------------------------------------------------------
[Statedef 4210]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
velset = 0,-16
sprpriority = 0

[State 4210, VelSet 2]
type = VelSet
trigger1 = (Pos Y >= 10) && (Vel Y > 0)
y = 0

[State 4210, VelSet]
type = VelSet
trigger1 = (Pos Y >= 10) && (Vel Y > 0)
y = 10

[State 4210, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 4210

[State 4210, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

[State 4210, ChangeState]
type = ChangeState
trigger1 = Time = 40
value = 4211
ctrl = 0

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

[Statedef 4211]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 3

[State 4211, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 4211

[State 4211, VelAdd]
type = VelAdd
trigger1 = Time > 49
y = 0.5

[State 4211, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

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

[Statedef 4212]
type    = A
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = 0

[State 4212, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 4212

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

[Statedef 4213]
type    = L
movetype= H
physics = N
poweradd= 0
ctrl = 0
sprpriority = 0

[State 4213, SelfState]
type = SelfState
trigger1 = Time = 0
value = 5100
ctrl = 0


;---------------------------------------------------------------------------------------------
;Backbreaker

[Statedef 4551]
type    = A
movetype= A
physics = N
anim = 871
ctrl = 0

[State 4551, ScreenBound]
type = Null
trigger1 = 1
value = 0
movecamera = 0,0

[State 4551, Explod]
type = Explod
trigger1 = time = 0
anim = 8396
ID = 8396
postype = P2
pos  =  -5,-23
sprpriority = 3
ignorehitpause = 1
ownpal = 1

[State 4551, Width]
type = Width
trigger1 = Time >= 0
value = 25,10

[State 4551, PosFreeze]
type = PosFreeze
trigger1 = Time = [0,5]
value = 1

[State 4551, Jumping Up 1]
type = VelSet
trigger1 = Time = [0, 34]
x = 0
y = -24

[State 4551, Jumping Up 2]
type = VelSet
trigger1 = Time = 34
x = 0
y = 26

[State 4551, Jumping Up 2]
type = VelSet
trigger1 = Time >= 35
x = 0
y = 28

[State 4551, PlaySnd 1]
type = PlaySnd
trigger1 = Time = 0
value = 8600,0

[State 4551, PlaySnd 2]
type = PlaySnd
trigger1 = Time = 5
value = 9999,2

[State 4551, Bind 1]
type = TargetBind
trigger1 = Time >= 0
pos = 45,-85

[State 4551, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 20
value = 4552
ctrl = 0

[Statedef 4552]
type    = S
movetype= A
physics = S
anim = 872
velset = 0,0
poweradd = 0
sprpriority = -1

[State 4551, ScreenBound]
type = Null
trigger1 = 1
value = 0
movecamera = 0,0

[State 4552, TargetBind]
type = TargetBind
trigger1 = Time = 0
pos = 10,-34

[State 4552, PosSet]
type = PosSet
trigger1 = Time = 0
Y = 0

[State 4552, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 8200,0

[State 4552, EnvShake]
type = EnvShake
trigger1 = Time = 0
ampl = -35
time = 15

[State 4552, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = Time = 0
value = -70

[State 4552, TargetState]
type = TargetState
trigger1 = Time = 15
value = 4556

[State 4552, Explod]
type = Explod
trigger1 = time = 0
anim = 8394
ID = 8394
postype = P2
pos  =  0,0
sprpriority = 2
ignorehitpause = 1
ownpal = 1

[State 4552, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 4553
ctrl = 0

[Statedef 4553]
type = A
movetype = A
physics = A
anim = 4006
velset = -9,-14


[State 4006, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 4006, Vel]
type = VelAdd
trigger1 = 1
y = .02

[State 4006,ChangeState]
type = ChangeState
trigger1 = Time > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52

;---------------------------------------------------------------------------------------------
;Backbreaker - p2

[Statedef 4555]
type    = A
movetype= H
physics = N

[State 4555,SprPriority]
type = SprPriority
trigger1 = P2StateNo = 872
value = 3

[State 4555, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 875

[State 4555, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time > 0 && P2StateNo = 872
value = 4556

[Statedef 4556]
type    = A
movetype= H
physics = N
velset = 10,-14
poweradd = 40
sprpriority = 2

[State 4556, VelAdd]
type = VelAdd
Trigger1 = 1
y = .4

[State 4556, SelfState]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5100

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

[Statedef 7001]
type = A
physics = A
ctrl = 1
anim = 7001
velset = 0,-16

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 7003
x = -0.1

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 7002
x = 0.25

[State 7711]
type = turn
trigger1 = p2dist x < -5

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 7002
trigger1 = Time = [0,5]
x = 4

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 7003
trigger1 = Time = [0,5]
x = -3.5

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 0
trigger1 = Time = [0,4]
value = 7001

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 1
trigger1 = Time = [0,4]
value = 7002

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = -1
trigger1 = Time = [0,4]
value = 7003

[State 7001, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 9999,5
 
[State 7001, Variavelzinha muito útil]
type = VarSet
trigger1 = Time = 0
v = 12
value = 1

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

[Statedef 7002]
type    = A
physics = A
ctrl = 1

[State 7005, Vel]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7005, Vel]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25


;---------------------------------------------------------------------------------------------
[Statedef 8882]
type = S
physics = S
anim = 0
sprpriority = 1
ctrl = 0

[State 8882, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

[State 8882, ChangeState]
type = Changestate
trigger1 = time = 30
value = 8883

[Statedef 8883]
type = S
physics = S
anim = 100
sprpriority = 1
ctrl = 0

[State 8883, PlaySnd]
type = PlaySnd
trigger1 = (AnimElem = 5) || (AnimElem = 9)
value = 8100,0

[State 8883, VelSet]
type = VelSet
trigger1 = 1
x = 8

[State 8883, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0

[State 8883, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 8883, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 8883, ChangeState]
type = ChangeState
trigger1 = p2bodydist x <= 190
value = 101
ctrl = 0
;---------------------------------------------------------------------------
;Guard Push (Stand)
[Statedef 6300]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 1111
sprpriority = 2

[State 6300, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6300, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6300, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6300, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6300, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6300, a6]
type = Explod
trigger1 = Time = 0
anim = 6009
postype = p1
pos = 100,-90
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7

[State 6300, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6300, a8]
type = PlaySnd
trigger1 = Time = 0
value = 1,0
channel = 0

[State 6300, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 6310];--------------crouch
type    = C
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 1113
sprpriority = 2

[State 6310, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6310, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6310, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6310, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6310, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6310, a6]
type = Explod
trigger1 = Time = 0
anim = 6009
postype = p1
pos = 100,-45
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7

[State 6310, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6310, a8]
type = PlaySnd
trigger1 = Time = 0
value = 50,0
channel = 0

[State 6310, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1


[Statedef 6320];------------air
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 1114
sprpriority = 2

[State 6320, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6320, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6320, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6320, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6320, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6320, a6]
type = Explod
trigger1 = Time = 0
anim = 6009
postype = p1
pos = 100,-55
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7

[State 6320, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6320, a8]
type = PlaySnd
trigger1 = Time = 0
value = 50,0
channel = 0

[State 6320, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
ctrl = 1

[Statedef 6350];guard push helper
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = 1112
sprpriority = -4

[State 6350, a1]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 6350, a2]
type = VelSet
trigger1 = Time = [0,10]
x = 30

[State 6350, a3]
type = VelSet
trigger1 = Time = [11,13]
x = 20

[State 6350, a4]
type = VelSet
trigger1 = Time >= 14
x = 10

[State 6350, a5]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 6350, a6]
type = DestroySelf
trigger1 = Time >= 18



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

;---------------------------------------------------------------------------
; Near Roll

[Statedef 890]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 890, 1]
type = VelSet
trigger1 = Time != 1
x = 4

[State 890, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 890, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 890, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 890, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 810,0

[State 890, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2
value = 810,1

[State 890, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 890, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Medium Roll

[Statedef 895]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 895, 1]
type = VelSet
trigger1 = Time != 1
x = 5

[State 895, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 815, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 895, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 895, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 810,0

[State 895, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2
value = 810,1

[State 895, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 895, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Far Roll

[Statedef 898]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 898, 1]
type = VelSet
trigger1 = Time != 1
x = 6

[State 898, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 898, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 898, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 898, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 810,0

[State 898, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2
value = 810,1

[State 898, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 898, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

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

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

[Statedef 831]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 831
sprpriority = -1

[State 831, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

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

[State 831, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

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

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

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

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

[Statedef 832]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 8,0
ctrl = 0
anim = 832
sprpriority = -1

[State 832, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 832, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

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

[State 832, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 832, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 10

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

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

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

[Statedef 840]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 8,0
ctrl = 0
anim = 840
sprpriority = -1

[State 840, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 840, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

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

[State 840, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 840, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

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

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

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

[Statedef 850]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 850
sprpriority = -1

[State 850, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

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

[State 850, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

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

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

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

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

[Statedef 855]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = -8,0
ctrl = 0
anim = 855
sprpriority = -1

[State 855, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 855, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

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

[State 855, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 855, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 10

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

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

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

[Statedef 860]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = -8,0
ctrl = 0
anim = 860
sprpriority = -1

[State 860, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 860, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

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

[State 860, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 860, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

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

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
; Recovery Roll - Variable "Reset"

[State -2, 1]
type = VarSet
trigger1 = (StateNo != 5050) && (StateNo != 5071)
v = 30
value = 0

;-------------------------------------------------------------------------
; A.I. - Far Foward Recovery Roll

[State -2, 2]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType != L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (Pos Y = [-10,0])
triggerall = (StateNo = 5050)||(StateNo = 5071)||(StateNo = 50700)
trigger1 = (P2Dist X)+(BackEdgeDist) <= 160
trigger2 = numenemy > 0
trigger2 = (Enemynear, NumProj > 0)
value = 840

;-------------------------------------------------------------------------
; A.I. - Far Backward Recovery Roll

[State -2, 3]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType != L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (Pos Y = [-10,0])
trigger1 = (StateNo = 5050)||(StateNo = 5071)||(StateNo = 50700)
trigger1 = (P2Dist X)+(BackEdgeDist) > 160
value = 55

;-------------------------------------------------------------------------
; A.I. - Lie Down Forward Recovery Roll

[State -2, 4]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType = L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (StateNo = 5120)&&(StateNo = 51200)
trigger1 = Time = 1
trigger1 = (P2Dist X)+(BackEdgeDist) <= 160
trigger2 = numenemy > 0
trigger2 = (Enemy, NumProj > 0)
value = 832

;-------------------------------------------------------------------------
; A.I. - Lie Down Backward Recovery Roll

[State -2, 5]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType = L)
triggerall = (P2Life != 0)&&(Alive = 1)
trigger1 = (StateNo = 5120)&&(StateNo = 51200)
trigger1 = Time = 1
trigger1 = (P2Dist X)+(BackEdgeDist) > 160
value = 855
;---------------------------------------------------------------------------
; 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_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

;---------------------------------------------------------------------------
; Aerial Rave Finisher Get Hit State (being hit)
[Statedef 6020]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 5012
facep2 = 1

[State 6020, 1x]
type = ChangeState
triggerall = (RoundState > 1) && (!Alive)
trigger1 = HitShakeOver
value = 5050

[State 6020, 1rs]
type = VarSet
trigger1 = time = 0
sysvar(3) = 0
ignorehitpause = 1

[State 6020, 1vs]
type = VarSet
triggerall = HitVel Y > 0
triggerall = GetHitVar(yaccel) > 0
triggerall = HitFall
trigger1 = Pos Y < 0
sysvar(3) = 1
ignorehitpause = 1

[State 6020, 1]
type = ChangeAnim
trigger1 = 1
value = anim

[State 6020, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 6030

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

;---------------------------------------------------------------------------
; Aerial Rave Finisher Get Hit State (going down)
[Statedef 6030]
type    = A
movetype= H
physics = N
ctrl = 0

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

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

[State 6030, 3a] ;Anim for HIT_BACK/HIT_DIAG_UP
type = ChangeAnim
triggerall = !sysvar(3)
triggerall = GetHitVar(animtype) != 4
trigger1 = (Pos Y >= 0) && (Time = 0)
trigger2 = (Pos Y < 0) && (Time = (ifelse((SysFVar(1) >= 0), 0, 7)))
value = 5030
persistent = 0

[State 6030, 3b] ;Anim for HIT_UP (it HAS to exist)
type = ChangeAnim
triggerall = !sysvar(3)
triggerall = anim != 5030
triggerall = GetHitVar(animtype) = 4
trigger1 = (Pos Y >= 0) && (Time = 0)
trigger2 = (Pos Y < 0) && (Time = (ifelse((SysFVar(1) >= 0), 0, 7)))
value = ifelse(SelfAnimExist(5051), 5051, ifelse(SelfAnimExist(5035), 5035, 5030))
persistent = 0

[State 6030, 5]
type = ChangeState
trigger1 = (Anim = 5030) && (ifelse((HitVel Y > 0), (Vel Y > 0), (Time >= (ifelse((Pos Y < -60), 5, (ifelse((Pos Y = [-60, 60]), 2, 10)))))))
trigger2 = (Anim = 5051) && (Vel Y > 0) && (Time >= 15)
trigger3 = ((Anim != 5030) && (Anim != 5051)) && (Time >= 8)
trigger4 = Pos Y >= 10
trigger5 = sysvar(3)
trigger6 = (!Alive) && (Vel Y > 0)
value = 6050

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

[State 6050, 2] ;Hit transition
type = ChangeAnim
triggerall = !sysvar(3)
triggerall = time = 0
triggerall = (anim != 5060) && (anim != 5061)
trigger1 = SelfAnimExist(5035)
value = 5035
persistent = 0

[State 6050, 2RX]
type = ChangeAnim
triggerall = anim = 5035
trigger1 = Vel Y < -4
value = anim

[State 6050, 3] ;Change anim when done with transition
type = ChangeAnim
triggerall = (anim != 5060) && (anim != 5061)
trigger1 = Anim = 5035
trigger1 = AnimTime = 0
trigger2 = Anim != 5035
trigger2 = Vel Y > 0
trigger3 = (sysvar(3)) && (!SelfAnimExist(5060))
value = 5050
persistent = 0

[State 6050, 4] ;Coming down anim
type = ChangeAnim
triggerall = SelfAnimExist(5060)
trigger1 = (Anim = 5050) && (AnimTime = 0)
trigger2 = ((Anim = 5051) || (Anim = 5052)) && (Vel Y > 0)
trigger3 = sysvar(3)
value = 5060
persistent = 0

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

[State 6050, 1rs]
type = VarSet
trigger1 = anim = 5060
sysvar(3) = 0

[State 6050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 20
value = 6100 ;HIT_BOUNCE

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground, custom version)
[Statedef 6100]
type = L
movetype = H
physics = N
anim = 5100
ctrl = 0

[State 6100, Var]
type = VarSet
trigger1 = Time = 0
SysFVar(0) = vel y

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

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

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

[State 6100, 3]
type = ChangeAnim
trigger1 = Anim = 5100 && AnimTime = 0
value = 5110

[State 6100, 4]
type = ChangeState
triggerall = Alive
trigger1 = time >= 15
value = 6120

[State 6100, 5]
type = SelfState
triggerall = !Alive
trigger1 = time >= 15
value = 5150

[State 6110, 6]
type = VarSet
trigger1 = Time > 1
SysFVar(0) = 0

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

;---------------------------------------------------------------------------
; HIT_GETUP (custom type)
[Statedef 6120]
type    = S
movetype= I
physics = N
velset = 0, 0
anim = 5120
ctrl = 0

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

[State 6120, 2]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 6120, 3]
type = NotHitBy
trigger1 = AnimTime = 0
value = , NT,ST,HT
time = 12

[State 6120, 4]
type = NotHitBy
trigger1 = AnimTime = 0
value2 = SCA
time = 3

[State 6120, 5]
type = SelfState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------
;Aerial Rave Timer
[Statedef 7003]
physics = N
anim = 9500
sprpriority = -3

[State 0, 1]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible

[State 0, 2]
type = NotHitBy
trigger1 = 1
value = SCA

[State 7003, 8]
Type = Destroyself
trigger1 = time = 50 || time > 10 && parent, vel y > 0 || parent, movetype = H


; -----------------------------------------------------------------------
; Flying Screen Effect (Vs series feature, Aerial Rave Only) - by FerchogtX
[Statedef 7500]
type = A
physics = N
ctrl = 0
anim = 9501

[State FS-1, Camera]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1, 1

[State FS-1, Get X-Vel]
type = VarSet
triggerall = P2StateNo = 6020
trigger1 = time = 0
fvar(0) = abs(enemy, GetHitVar(xvel))

[State FS-1, Get Y-Vel]
type = VarSet
triggerall = P2StateNo = 6020
trigger1 = time = 0
fvar(1) = (enemy, GetHitVar(yvel))

[State FS-1, Get Y-Accel]
type = VarSet
triggerall = P2StateNo = 6020
trigger1 = time = 0
fvar(2) = (enemy, GetHitVar(yaccel))

[State FS-1, Get Pausetime 1]
type = VarSet
trigger1 = P2StateNo = [6020, 6100]
var(0) = (enemy, GetHitVar(HitShakeTime))

[State FS-1, Get Pausetime 2]
type = VarSet
trigger1 = P2StateNo = 6020
trigger1 = time = 0
var(1) = (enemy, GetHitVar(HitShakeTime)) + 2

[State FS-1, Fix Pos]
type = PosAdd
trigger1 = var(0)
x = -(var(1))

[State FS-1, Set Y-Accel]
type = VelAdd
trigger1 = !var(0)
y = fvar(2)

[State FS-1, Set Velocity]
type = VelSet
trigger1 = !var(0)
x = -(fvar(0))
y = fvar(1)
persistent = 0

[State FS-1, No Movement]
type = VelSet
trigger1 = P2StateNo = 6100
x = 0
y = 0

[State FS-1, End!]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = P2StateNo != [6020, 6100]

; -----------------------------------------------------------------------
; Aerial Rave Finisher State (Dash after AR Finisher) - by FerchogtX
[Statedef 7600]
type     = A
movetype = I
physics  = N
ctrl = 0

[State 6500, 2] ;Change to going down anim
type = ChangeAnim
trigger1 = AnimTime = 0
value = 44

[State 6500, 3] ;Don't follow me
type = ScreenBound
trigger1 = 1
value = 0
ignorehitpause = 1

[State 6500, 4] ;Reset My pos to 0
type = VelSet
trigger1 = time >= 0
x = 0
y = 0

[State 6500, 5] ;I'm offscreen
type = PosSet
trigger1 = time >= 0
x = (Pos X - (ScreenPos X + 100)*(facing))
y = 0
ignorehitpause = 1

[State 6500, xR] ;I'm on land
type = StateTypeSet
trigger1 = Pos Y >= 0
statetype = S

[State 6500, 6] ;Dash Onscreen now!!!
type = ChangeState
trigger1 = !var(6)
trigger2 = time >= 200
value = 100
ctrl = 0
;-------------------------------------------------------------------------------
; Wall Hit Helper
;---------------------------------------------------------------------------
; Wall Hit Helper
[Statedef 7750]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 9800

[State 7750]
type = explod
trigger1 = Time = 1
trigger1 = enemynear,screenpos x < 150
anim = 7024
id = 7024
pos = 0,floor(enemynear,screenpos y -abs(enemynear,const(size.mid.pos.y)))
postype = left
bindtime = -1
facing = -1
removetime = -2
scale = 0.6,0.52
sprpriority = 4
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 7750]
type = explod
trigger1 = Time = 1
trigger1 = enemynear,screenpos x > 150
anim = 7024
id = 7024
pos = 0,floor(enemynear,screenpos y -abs(enemynear,const(size.mid.pos.y)))
postype = right
bindtime = -1
facing = 1
removetime = -2
scale = 0.6,0.52
sprpriority = 4
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 7750]
type = playsnd
trigger1 = Time = 1
value = 825,0
channel = 1
volume = 255
persistent = 0

[State 7750]
type = EnvShake
trigger1 = Time = 1
time = 8
ampl = -8
phase = 10
freq = 100


[State 7750]
type = DestroySelf
trigger1 = enemynear,movetype != H

;------------------------------------------------------------------------------
; Hyper Combo Finish BG
[Statedef 7802]
movetype= I
physics = S
velset = 0,0
anim = 9801
ctrl = 0
sprpriority = 5

[State 6000, Hyper Combo Finish]
type = PlaySnd
trigger1 = Time = 10
value = S5000,13
volume = 255
ignorehitpause = 1
persistent = 1

[State 6000, Explod]
type = Explod
trigger1 = Time = 0
anim = 32715
ID = 32715
postype = Left
pos = 0,0
bindtime = -1
facing = 1
vfacing = 1
removetime = -2
sprpriority = -3
scale = 1,1
ownpal = 1
ignorehitpause = 1
ontop = 0
supermovetime = 9999
pausemovetime  = 9999
name = "MVC2 Hyper Combo Finish BG"

[State 6000, Explod]
type = Explod
trigger1 = Time = 0
anim = 32716
ID = 32716
postype = Left
pos = 0,0
bindtime = -1
facing = 1
vfacing = 1
removetime = 120
sprpriority = -3
scale = 1,1
ownpal = 1
ignorehitpause = 1
ontop = 0
supermovetime = 9999
pausemovetime  = 9999
name = "Black BG"
;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]
;VS Series Move around before the match
;Prevent Roundstate=2 Snapback
[State 0, 1]
type = VarSet
triggerall = roundstate < 2
trigger1 = Roundno > 1
trigger2 = numenemy > 0
trigger2 = roundno = 1 && enemy, stateno = 0
var(1) = 1

[State 0, 1]
type = VarSet
triggerall = roundstate < 2
trigger1 = Roundno > 1
trigger2 = numenemy > 0
trigger2 = roundno = 1 && enemy, stateno = 0
var(2) = 1

[State -2]
type = ScreenBound
trigger1 = Var(2)
value = 1
movecamera = 0,1



[State -2]
type = PosSet
trigger1 = roundstate = 2 && Var(2)
x = fvar(0)
ignorehitpause = 1
persistent = 0

[State -2]
type = VarSet
trigger1 = roundstate = 2 && Var(2)
var(2) = 0

[State -2]
type = VarSet
trigger1 = roundstate = 2 && ctrl && Var(1)
var(1) = 0

[State -2]
type = VarSet
trigger1 = roundstate < 2
fvar(0)= pos x

;------------------------------------------------------------------------------
;MVC2 Ground Explod
[State 0, Explod]
type = Explod
Triggerall = Time = 1
trigger1 = Stateno = 5110
trigger2 = Stateno = 5100
anim = 6003
ID = 6003
pos = 0,0
postype = p1
removetime = -2
scale = 1,1
sprpriority = 3
ownpal = 1
removeongethit = 0


;Remove Hyper Background Explod
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=[2000,4999]
trigger1 = NumExplod(32710)>0
trigger2 = winko
id =32710

;Remove Hyper Portrait
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=[2000,4999]
trigger1 = NumExplod(1080)>0
id =1080

;Remove Hyper Portrait
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=[2000,4999]
trigger1 = NumExplod(1081)>0
id =1081

; Remove Black Background
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=[2000,4999]
trigger1 = NumExplod(32719)>0
id = 32719

;Remove Hyper Sparks
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno!=[2000,4999]
trigger1 = NumExplod(1223)>0
id =1223


; Hyper Combo Finish BG & Sounds
[State -2, Helper]
type = Helper
trigger1 = winko && stateno = [2000,4999]
triggerall = NumHelper(7802) < 1
helpertype = normal
name = "Hyper Combo Finish BG"
ID = 7802
stateno = 7802
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermove = 1
pausemove = 1
supermovetime = 999999
pausemovetime = 999999
ignorehitpause = 1


;MVC2 Landing Dust
[State -2]
type = Explod
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
anim = 9201
ID = 9201
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
scale = 1,1
ownpal = 1
sprpriority = 3
removeongethit = 0

; ------------------------------------------
; Flying Screen Effect (Vs series feature)  - TUTORIAL By FerchogtX
; ------------------------------------------
[State -2, Flying Screen Var Reset]
type = VarSet
trigger1 = P2MoveType != H
trigger2 = numenemy > 0
trigger2 = (enemy, alive = 0) && roundstate > 2
var(5) := var(6) := 0

[State -2, Flying Screen ScreenBound]
type = ScreenBound
trigger1 = (stateno = [620, 625]) && (var(6))
trigger2 = (stateno = [650, 655]) && (var(6))
value = 0
movecamera = 0,0
ignorehitpause = 1

[State -2, Don't exchange Positions with foe if AR in corner]
type = PosAdd
triggerall = stateno != [3000, 4999]
trigger1 = (PrevStateNo = [620, 625]) && (FrontEdgeDist < 35)
trigger2 = (PrevStateNo = [650, 655]) && (FrontEdgeDist < 35)
x = -5
ignorehitpause = 1

[State -2, Dash On Screen after Flying Screen]
type = ChangeState
triggerall = (BackEdgeDist < 5) && (Pos Y < -50)
trigger1 = (stateno = [620, 625]) && (var(6))
trigger2 = (stateno = [650, 655]) && (var(6))
value = 7600
ctrl = 0

[State -2, Flying Screen (Aerial Rave)]
type = Helper
triggerall = !NumHelper(7500)
triggerall = P2Stateno != [150, 155]
trigger1 = (stateno = [620, 625]) && (var(6))
trigger2 = (stateno = [650, 655]) && (var(6))
name = "FS Effect (Aerial Rave)"
ID = 7500
stateno = 7500
pos = 0,0
postype = p2
ownpal = 1
bindtime = 1
size.air.back = 20
size.air.front = 20
ignorehitpause = 1
persistent = 0

; ----------------------------------------------------------------------
[State -2, PosAdd]
type = PosAdd
trigger1 = Stateno = [5030, 5040]
trigger1 = (anim = 5040) && (AnimElem = 1, < 2)
y = -20
persistent = 0

;Stop Sound in intro from running
[State -2, StopSnd]
type = StopSnd
trigger1 = roundstate = 2
channel = 4

[State -3, 2]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5000 && anim != 5010
trigger2 = stateno = 5010
trigger2 = anim != 5020
value = 11,1
channel = 0
ignorehitpause = 1
volume = 255

[State -3, 2]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5000 && anim != 5010
trigger2 = stateno = 5010
trigger2 = anim != 5020
value = 11,2
channel = 0
ignorehitpause = 1
volume = 255

;First Attack Message
[State -2, First Attack]
type = VarSet
triggerall = Var(10) = 0
triggerall = RoundState = 2
trigger1 = movetype = A && movehit
trigger2 = NumHelper = 1
trigger2 = helper, movehit
trigger3 = (stateno = [1000,4999]) || stateno = 3000
trigger3 = p2movetype = H && p2stateno != [120,160]
v = 10
value = 1
ignorehitpause = 1

;=====================================================================
;FIRST ATTACK
;=====================================================================
[State -2, First Attack]
type = Explod
trigger1 = NumExplod(7000) = 0
trigger1 = Var(10) = 1
anim = 9200+(Teamside = 2)
sprpriority = 100
postype = Left
pos = ifelse(TeamSide = 2,369,-50),55
bindtime = -1
supermove = 1
ownpal = 1
persistent = 0
ignorehitpause = 1
ontop = 1
size.shadowoffset = -9999
id = 7000


[State -2, First Attack]
type = PlaySnd
triggerall = (Teamside =1 && IsHomeTeam) || (Teamside =2 && !IsHomeTeam) || (TeamSide=1 && !IsHomeTeam)
trigger1 = Var(10) = 1
value = 40,0
volume = 255

[State -3, First Attack Left]
trigger1 = Var(10) = 1
trigger1 = TeamSide = 1
type = Explod
ownpal = 1
anim = 9911
scale = 0.5,0.5
postype = left
pos = 10, 83
ontop = 1
bindtime = -1

[State -3, First Attack Right]
trigger1 = Var(10) = 1
trigger1 = TeamSide = 2 && !IsHomeTeam
type = Explod
ownpal = 1
anim = 9911
scale = 0.5,0.5
ontop = 1
postype = right
pos = -182, 83
bindtime = -1

[State -2, First Attack]
type = VarSet
trigger1 = Var(10) = 1
trigger2 = movetype = H && Var(10) = 0 && stateno != [150,159]
v = 10
value = 2

;=====================================================================
;DANGER
;=====================================================================
;Danger!
[State -2, Danger]
type = PlaySnd
triggerall = Var(21) = 1
triggerall = (Teamside =1 && IsHomeTeam) || (Teamside =2 && !IsHomeTeam) || (TeamSide=1 && !IsHomeTeam)
trigger1 = Life <= 200
value = 40,8

[State -3, Danger Left]
triggerall = Var(21) = 1
triggerall = TeamSide = 1
trigger1 = Life <= 200
type = Explod
ownpal = 1
anim = 9910
scale = 0.5,0.5
postype = left
pos = 10, 83
ontop = 1
bindtime = -1

[State -3, Danger Right]
triggerall = Var(21) = 1
triggerall = TeamSide = 2 && !IsHomeTeam
trigger1 = Life <= 200
type = Explod
ownpal = 1
anim = 9910
scale = 0.5,0.5
ontop = 1
postype = right
pos = -122, 83
bindtime = -1

[State -2, First Attack]
type = Explod
trigger1 = NumExplod(7008) = 0
trigger1 = Var(21) = 1
anim = 9210+(Teamside = 2)
sprpriority = 100
postype = Left
pos = ifelse(TeamSide = 2,369,-50),55
bindtime = -1
supermove = 1
ownpal = 1
persistent = 0
ignorehitpause = 1
ontop = 1
size.shadowoffset = -9999
id = 7008

[State -2, Danger VarAdd]
type = varadd
triggerall = Life <= 200
trigger1 = Var(21) <= 2
v = 21
value = 1
;-------------------------------------------------------------------------------
;Marvel vs Capcom 2 Player indictators
; Shows a simbol P1 (O)- own
[State -3, s1]
type = Explod
triggerall = roundstate > 1
triggerall = numenemy > 0
triggerall = enemynear, alive
trigger1 = enemynear, screenpos y < 0
trigger2 = enemynear, screenpos y > 220 - (const(size.head.pos.y))
trigger3 = P2bodyDist y > 200
anim = 10002 + 2*(!ishometeam)
id = 10002
pos = ceil(enemynear, screenpos x), 20 + (enemynear, screenpos y > 0) * 200
postype = left
ignorehitpause = 1
ontop = 1
bindtime = -1
persistent = 1
removetime = 1
scale = const(size.xscale)*0.5, const(size.yscale)*0.5

; Shows a simbol P1 (>)- own
[State -3, s2]
type = Explod
triggerall = roundstate > 1
triggerall = numenemy > 0
triggerall = enemynear, alive
trigger1 = enemynear, screenpos y < 0
trigger2 = enemynear, screenpos y > 220 - (const(size.head.pos.y))
trigger3 = P2bodyDist y > 200
anim = 10003 + 2*(!ishometeam)
id = 10003
pos = ceil(enemynear, screenpos x), 20 + (enemynear, screenpos y > 0) * 200
postype = left
ignorehitpause = 1
ontop = 1
bindtime = -1
persistent = 1
facing = (enemynear, facing)
removetime = 1
scale = const(size.xscale)*0.30, const(size.yscale)*0.30

; Shows a simbol P2 (O)- own
[State -3, s3]
type = Explod
triggerall = roundstate > 1
triggerall = alive
trigger1 = screenpos y < 0
trigger2 = screenpos y > 220 - (const(size.head.pos.y))
trigger3 = P2bodyDist y < -200
anim = 10004 - 2*(!ishometeam)
id = 10004
pos = ceil(screenpos x), 20 + (screenpos y > 0) * 200
postype = left
ignorehitpause = 1
ontop = 1
bindtime = -1
persistent = 1
removetime = 1
scale = const(size.xscale)*0.5, const(size.yscale)*0.5

; Shows a simbol P2 (>)- own
[State -3, s4]
type = Explod
triggerall = roundstate > 1
triggerall = alive
trigger1 = screenpos y < 0
trigger2 = screenpos y > 220 - (const(size.head.pos.y))
trigger3 = P2bodyDist y < -200
anim = 10005 - 2*(!ishometeam)
id = 10005
pos = ceil(screenpos x), 20 + (screenpos y > 0) * 200
postype = left
ignorehitpause = 1
ontop = 1
bindtime = -1
persistent = 1
facing = facing
removetime = 1
scale = const(size.xscale)*0.30, const(size.yscale)*0.30
;-------------------------------------------------------------------------------
;Helper and Projectible Hitcount for MVC2 Announcer
;choque Hitcount
[State 0, 1]
type = Varset
triggerall = stateno = 1200
trigger1 = numprojid(1201) > 0
trigger1 = numenemy > 0
trigger1 = enemynear, movetype = H
v = 11
value = enemynear, gethitvar(hitcount)

;granada Hitcount
[State 0, 1]
type = Varset
triggerall = stateno = 1210
trigger1 = numhelper(1211) > 0
trigger1 = numenemy > 0
trigger1 = enemynear, movetype = H
v = 14
value = enemynear, gethitvar(hitcount)

;pistola Hitcount
[State 0, 1]
type = Varset
triggerall = stateno = 1220
trigger1 = numhelper(1221) > 0
trigger1 = numenemy > 0
trigger1 = enemynear, movetype = H
v = 14
value = enemynear, gethitvar(hitcount)

;---------------------------------------------------------------------------------------------
[Statedef -3]

; ======================================
; Combo Counting Code
; ======================================
[State -3: Inc Non-Proj Hits]
type = VarAdd
trigger1 = HitCount > var(12)
v = 13
value = 1

[State -3: Combo Counter]
type = VarSet
trigger1 = HitCount > var(12)
trigger2 = HitCount = 0
var(12) = HitCount

[State -3: Projectile Hits Count Too]
type = VarAdd
trigger1 = ProjHit = 1
v = 11
value = 1

[State -3: Combo Counter]
type = VarSet
trigger1 = var(12) > 0
trigger2 = var(11) > 0
trigger3 = var(14) > 0
var(15) = var(13) + var(11) + var(14)

[State -3: Damage Dampener]
type = VarSet
trigger1 = var(15) > 3
var(17) = floor((var(15) - 1)/3)*7

;==========================================================
[State -3, Aerial Rave Sound]
type = PlaySnd
trigger1 = var(15) >= 5
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = var(16) >= 1
;value = S25, 8
value = S25, 9
abspan = 0
volume = 999

[State -3, Aerial Rave Left]
trigger1 = var(15) >= 3
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 1
trigger1 = var(16) >= 1
type = Explod
ownpal = 1
anim = 9908
scale = 0.5,0.5
postype = left
pos = 10, 83
ontop = 1
bindtime = -1

[State -3, Aerial Rave Right]
trigger1 = var(15) >= 3
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 2
trigger1 = var(16) >= 1
type = Explod
ownpal = 1
anim = 9908
scale = 0.5,0.5
ontop = 1
postype = right
pos = -168, 83
bindtime = -1

[State -3, Yes Sound]
type = PlaySnd
trigger1 = var(15) = 3
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = var(16) < 1
value = S25, 0
abspan = 0
volume = 999

[State -3, Yes Left]
trigger1 = var(15) = 3
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 1
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9900
scale = 0.5,0.5
postype = left
pos = 10, 83
ontop = 1
bindtime = -1

[State -3, Yes Right]
trigger1 = var(15) = 3
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 2
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9900
scale = 0.5,0.5
ontop = 1
postype = right
pos = -58, 83
bindtime = -1

[State -3, Good Sound]
type = PlaySnd
trigger1 = var(15) = [4,5]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = var(16) < 1
value = S25, 1
abspan = 0
volume = 999

[State -3, Good Left]
trigger1 = var(15) = [4,5]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 1
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9901
scale = 0.5,0.5
postype = left
pos = 10, 83
ontop = 1
bindtime = -1

[State -3, Good Right]
trigger1 = var(15) = [4,5]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 2
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9901
scale = 0.5,0.5
ontop = 1
postype = right
pos = -88, 83
bindtime = -1

[State -3, Great Sound]
type = PlaySnd
trigger1 = var(15) = [6,7]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = var(16) < 1
value = S25, 2
abspan = 0
volume = 999

[State -3, Great Left]
trigger1 = var(15) = [6,7]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 1
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9902
scale = 0.5,0.5
postype = left
pos = 10, 83
ontop = 1
bindtime = -1

[State -3, Great Right]
trigger1 = var(15) = [6,7]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 2
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9902
scale = 0.5,0.5
ontop = 1
postype = right
pos = -93, 83
bindtime = -1

[State -3, VGood Sound]
type = PlaySnd
trigger1 = var(15) = [8,9]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = var(16) < 1
value = S25, 3
abspan = 0
volume = 999

[State -3, VGood Left]
trigger1 = var(15) = [8,9]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 1
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9903
scale = 0.5,0.5
postype = left
pos = 10, 83
ontop = 1
bindtime = -1

[State -3, VGood Right]
trigger1 = var(15) = [8,9]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 2
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9903
scale = 0.5,0.5
ontop = 1
postype = right
pos = -159, 83
bindtime = -1

[State -3, Wonderful Sound]
type = PlaySnd
trigger1 = var(15) = [10,29]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = var(16) < 1
value = S25, 4
abspan = 0
volume = 999

[State -3, Wonderful Left]
trigger1 = var(15) = [10,29]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 1
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9904
scale = 0.5,0.5
postype = left
pos = 10, 83
ontop = 1
bindtime = -1

[State -3, Wonderful Right]
trigger1 = var(15) = [10,29]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 2
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9904
scale = 0.5,0.5
ontop = 1
postype = right
pos = -170, 83
bindtime = -1

[State -3, Fantastic Sound]
type = PlaySnd
trigger1 = var(15) = [30,49]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = var(16) < 1
value = S25, 5
abspan = 0
volume = 999

[State -3, Fantastic Left]
trigger1 = var(15) = [30,49]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 1
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9905
scale = 0.5,0.5
postype = left
pos = 10, 83
ontop = 1
bindtime = -1

[State -3, Fantastic Right]
trigger1 = var(15) = [30,49]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 2
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9905
scale = 0.5,0.5
ontop = 1
postype = right
pos = -146, 83
bindtime = -1

[State -3, Monster Sound]
type = PlaySnd
trigger1 = var(15) = [50,99]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = var(16) < 1
value = S25, 6
abspan = 0
volume = 999

[State -3, Monster Left]
trigger1 = var(15) = [50,99]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 1
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9906
scale = 0.5,0.5
postype = left
pos = 10, 83
ontop = 1
bindtime = -1

[State -3, Monster Right]
trigger1 = var(15) = [50,99]
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 2
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9906
scale = 0.5,0.5
ontop = 1
postype = right
pos = -132, 83
bindtime = -1

[State -3, Marvelous Sound]
type = PlaySnd
trigger1 = var(15) > 99
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = var(16) < 1
value = S25, 7
abspan = 0
volume = 999

[State -3, Marvelous Left]
trigger1 = var(15) > 99
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 1
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9907
postype = left
pos = 10, 83
ontop = 1
bindtime = -1
scale = 0.5,0.5

[State -3, Marvelous Right]
trigger1 = var(15) > 99
trigger1 = NumEnemy = 1
trigger1 = enemyNear, MoveType != H && var(15) > 0
trigger1 = TeamSide = 2
trigger1 = var(16) < 1
type = Explod
ownpal = 1
anim = 9907
ontop = 1
postype = right
pos = -152, 83
bindtime = -1
scale = 0.5,0.5
;==========================================================

[State -3: Reset Stuff]
type = VarSet
trigger1 = numenemy > 0
trigger1 = enemyNear, MoveType != H
var(15) = (var(11) := (var(12) := (var(13) := (var(14) := (var(16) := (var(17) := 0))))))


[State -3, Aterrisagem]
type = PlaySnd
trigger1 = StateNo = 52 && Time = 1
value = 8100,0

[State -3, ctrl set]
type = ctrlset
trigger1 = roundstate = 4
value = 0

;Wall Hit
[State -3]
type = Helper
triggerall = NumEnemy = [1,2]
triggerall = NumHelper(7750) = 0
triggerall = enemy(0),stateno != [120,159]
trigger1 = enemy(0),movetype = h
trigger1 = enemy(0),backedgedist <= 15
trigger1 = enemy(0),statetype = a
trigger1 = enemy(0),vel x < 0
stateno = 7750
id = 7750
pos = floor(enemy(0),pos x - pos x), floor(enemy(0),pos y)

[State -3]
type = Helper
triggerall = NumEnemy = 2
triggerall = NumHelper(7751) = 0
triggerall = enemy(1),stateno != [120,159]
trigger1 = enemy(1),movetype = h
trigger1 = enemy(1),backedgedist <= 15
trigger1 = enemy(1),statetype = a
trigger1 = enemy(1),vel x < 0
stateno = 7750
id = 7751
pos = floor(enemy(1),pos x - pos x), floor(enemy(1),pos y)

;-------------------------------------------------------------------------------
;----------------------POTS Corner Push System----------------------------------
;-------------------------------------------------------------------------------

[State -3, Corner Push]; Reset
type= varset
trigger1= fvar(5)
trigger1= numtarget
trigger1= (target, hitover) || (target, gethitvar(hitshaketime) > 0 && target, time <= 0)
fvar(5)= 0

[State -3, Corner Push]; Get initial velocity
type= varset
trigger1= movecontact=1 && numtarget
fvar(5)= (target, gethitvar(xvel))
ignorehitpause= 1

[State -3, Corner Push]; Apply corner push
type= posadd
triggerall= fvar(5)
triggerall= (statetype = S || statetype = C) && numtarget
triggerall= !hitpausetime && (target, gethitvar(hitshaketime) <= 0)
triggerall= (target, statetype = S || target, statetype = C) && !(target, gethitvar(yvel)) && !(target, hitfall); See note below
trigger1= target, frontedgebodydist <= abs(target, vel x)
trigger1= (target, gethitvar(xvel) * target, facing) > 0
trigger2= target, backedgebodydist <= abs(target, vel x)
trigger2= (target, gethitvar(xvel) * target, facing) < 0
x= ifelse(target, frontedgebodydist <= 0, -1, 1) * (target, facing) * fvar(5)

[State -3, Corner Push]; Apply friction to the velocity
type= varset
trigger1= numtarget
trigger1= target, gethitvar(hitshaketime) <= 0
fvar(5)= fvar(5) * 0.85

