;===========================================================================
;Marvel vs. Capcom - Eternity of Heroes - Animations Template V.8
;by Acey, FX ripped by Kong, Based on MvC2 Guile by RedHot, updated by Scar
;===========================================================================
;Var (0) = Super Jump
;Var (1) = Intro Selector
;Var (2) = Super Combo (Removed)
;Var (7) = Floor Possition
;Var(8 - 10) = Announcer Text
;Var (11) = Super Jump Direction
;Var (12) = Super Jump
; var(13): P2Dist
;Var (17) = Screen Pack
;Var (21) = Combo Mute
;Var (28) = Taunt
;Var (30) = Recovery Roll
;Var (59) = AI On

[Data]
life = 1000
attack = 130
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 = 3.0
walk.back = -2.5
run.fwd = 6
run.back = -8,-3
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

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = N
anim = 100
sprpriority = 1
velset = 12, 0

[state 1101, twister]
type = afterimage
trigger1 = time = 3
time = 12
length = 20
palbright = 30,30,30
palcontrast = 120,120,220
;paladd = 200, 249, 39
paladd = 10,10,25
palmul = .65,.65,.75
framegap = 5
trans = add   ;"none","add1","sub"


[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 7
x = 10

[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 8
x = 8

[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 9
x = 4

[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 100, 3]
type = PlaySnd
trigger1 = time = 3
value = 1100,1
channel = 0

[State 100, 4]
type = PlaySnd
trigger1 = time = 19
value = 8100,0

[State 100, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 4

[State 100, 6]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 1
ID = 41
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -1, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, 7]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 0
ID = 42
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -.8, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, dash dust]
type = Explod
trigger1 = Time = 7
anim = 2223
ID = 2223
pos = 0,6
scale = 1,0.5
sprpriority = 8
ownpal = 1
ignorehitpause = 1


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

[State 100, 9]
type = Explod
trigger1 = time = [16,35]
trigger1 = (time % 4) = 0
ID = 43
anim = 6000
postype = p1
pos = 10, 0
bindtime = 1
removetime = -2
vel = -.2, 0
ownpal = 1
sprpriority = 2 

[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;--run air
; RUN_FWD
[Statedef 101]
type    = A
physics = N
anim = 100
sprpriority = 1
velset = 10, 0


[state 1101, twister]
type = afterimage
trigger1 = time = 3
time = 12
length = 20
palbright = 30,30,30
palcontrast = 120,120,220
;paladd = 200, 249, 39
paladd = 10,10,25
palmul = .65,.65,.75
framegap = 5
trans = add   ;"none","add1","sub"


[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 7
x = 10

[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 8
x = 8

[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 9
x = 4

[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 100, 3]
type = PlaySnd
trigger1 = time = 3
value = 1100,1
channel = 0

[State 100, 4]
type = PlaySnd
trigger1 = time = 19
value = 8100,0

[State 100, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 4

[State 100, 6]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 1
ID = 41
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -1, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, 7]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 0
ID = 42
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -.8, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, dash dust]
type = Explod
trigger1 = Time = 7
anim = 2223
ID = 2223
pos = 0,6
scale = 1,0.5
sprpriority = 8
ownpal = 1
ignorehitpause = 1


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

[State 100, 9]
type = Explod
trigger1 = time = [16,35]
trigger1 = (time % 4) = 0
ID = 43
anim = 6000
postype = p1
pos = 10, 0
bindtime = 1
removetime = -2
vel = -.2, 0
ownpal = 1
sprpriority = 2

[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 1400

;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  time = 0
value = 1100,1



[State 105, VelSet]
type = VelSet
trigger1 = Time = 2
x = -10
y = const(velocity.run.back.y)

[State 105, Flash]
type = Explod
trigger1 = time > 4 && (time%4) = 1
ID = 8500
anim = 2222
postype = P1
pos = 10,-51
bindtime = 1
vel = -2.2
ownpal = 1
random = 18,48
removetime = -2
sprpriority = 2

[State 105, Flash]
type = Explod
trigger1 = time > 4 && (time % 4) = 0
ID = 8501
anim = 2222
postype = p1
pos = 10,-49
bindtime = 1
vel = -2
ownpal = 1
random = 18,48
removetime = -2
sprpriority = 2

[State 100, dash dust]
type = Explod
trigger1 = Time = 7
anim = 2224
ID = 2224
pos = 0,19
scale = 1,0.5
sprpriority = 8
ownpal = 1
ignorehitpause = 1

[State 105, ChangeState]
type = ChangeState
trigger1 = Time > 15
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106


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

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  time = 0
value = 8100,0


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

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

[State 106, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 8100,0


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

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

[Statedef 180]
type = S

[State 180, 2]
type = ChangeState
trigger1 = enemy,name="Miss Marvel"
value = 186

[State 180, 1]
type = VarRandom
triggerall = enemy,name!="Ironman"
triggerall = enemy,name!="Sentry"
triggerall = enemy,name!="Ironman DCvsM"
triggerall = enemy,name!="Ares"
triggerall = enemy,name!="Wasp"
trigger1 = Time = 0
v = 1
range = 0,370

[State 180, 1]
type = VarRandom
trigger1 = Time = 0 && enemy,name="Ironman"
trigger2 = Time = 0 && enemy,name="Sentry"
trigger3 = Time = 0 && enemy,name="Ironman DCvsM"
trigger4 = Time = 0 && enemy,name="Ares"
trigger5 = Time = 0 && enemy,name="Wasp"
v = 1
range = 0,299



[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, 4]
type = ChangeState
trigger1 = Var(1) = [201,300]
value = 183

[State 180, 4]
type = ChangeState
trigger1 = Var(1) = [301,370]
value = 185


[State 180, 5]
type = ChangeState
trigger1 = Var(1) = [371,400]
value = 184
;---------------------------------------------------------------------------------------------
[Statedef 185]
type = S
movetype = I
physics = S
ctrl = 0
anim = 188
velset = 0,-11
sprpriority = 0

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



[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 10207
ID = 189
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = 100
sprpriority = 10


[State 0, Explod]  ;ironman
type = Explod
trigger1 = animelem = 3
anim = 10200
ID = 188
pos = 250,230
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = 450
sprpriority = 6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 54,17

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 121,20

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 8100,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = 121,21


[State 0, Explod] ;wonderman
type = Explod
trigger1 = animelem = 3
anim = 10206
ID = 188
pos = 150,225
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = 450
sprpriority = 4


[State 0, Explod] ;miss marvel
type = Explod
trigger1 = animelem = 3
anim = 10201
ID = 188
pos = 60,230
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = 450
sprpriority = 8

[State 0, Explod]    ; sentry
type = Explod
trigger1 = animelem = 3
anim = 10202
ID = 188
pos = 40,200
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = 450
sprpriority = 5

[State 0, Explod]  ;blackwidow
type = Explod
trigger1 = animelem = 3
anim = 10203
ID = 188
pos = 90,230
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = 450
sprpriority = 8

[State 0, Explod]  ;ares
type = Explod
trigger1 = animelem = 3
anim = 10204
ID = 188
pos = 30,230
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = 450
sprpriority = 6


[State 0, Explod] ; wasp
type = Explod
trigger1 = animelem = 3
anim = 10205
ID = 189
pos = 150,180
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = 450
sprpriority = 12

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 189
ID = 189
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
sprpriority = 3


[State 3200, assertspecial]
type = assertspecial
trigger1 = time = [0,450]
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 181,1]
type = AssertSpecial
trigger1 = Time = [0,450]
flag = RoundNotOver

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




;Win Pose 1
[Statedef 186]
type = S
movetype = A
physics = N
ctrl = 0
anim = 0
velset = 0 ,0

[State 186, a]
type = AssertSpecial
trigger1 = 1
flag = RoundNotOver

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

[State 186, 2]
type = ChangeAnim
triggerall = !var(18)
trigger1 = var(13) < 60
value = 5
persistent = 0

[State 186, 2a]
type = Turn
triggerall = !var(18)
trigger1 = (Anim = 5) && (AnimTime = 0)
persistent = 0

[State 186, 3]
type = ChangeAnim
trigger1 = (Anim = 5) && (AnimTime = 0)
trigger2 = var(13) > 60
trigger3 = var(18)
value = 20
persistent = 0

[State 186, 4]
type = VelSet
trigger1 = Anim = 20
x = 2.5
persistent = 0

[State 186, 5]
type = VarSet
trigger1 = time = 0
fv = 0
value = abs(var(13)+60)

[State 186, 6]
type = VarAdd
trigger1 = Anim = 20
fv = 0
value = -2.5

[State 186, 7]
type = ChangeAnim
triggerall = Anim = 20
trigger1 = fvar(0) <= 70
value = 186

[State 186, 8]
type = ChangeState
trigger1 = Anim = 186
value = 187

;---------------------------------------
; Grab Opponent and Cackle
[Statedef 187]
type = S
movetype = I
physics = N
anim = 186
velset = 0, 0
sprpriority = -5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem =  2
value = 121,15


[State 187, a]
type = Width
trigger1 = 1
value = 80, 0

[State 187, 3]
type = AssertSpecial
trigger1 = time < 180
flag = RoundNotOver

;    ----grab
; Opponent: Grab win pose
[Statedef 9010]
type = L
movetype = H
physics = N
anim = 0
sprpriority = 0

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


;----

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

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

[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 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S121,11

[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 = 185
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S121,0
volume = 999

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 8
trigger3 = animelem = 18
value = S8889,1
volume = 444


[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 184
ID =  184
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 3



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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S8888,0

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

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

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

[Statedef 190]
type = S

[State 190, 2]
type = ChangeState
trigger1 = Time = 0 && (p2name ="Miss Marvel")
value = 199

[State 190, 2]
type = ChangeState
trigger1 = Time = 0 && (p2name ="Vision" || p2name ="CaptainAmerica" || p2name ="Captain America")
value = 198

[State 190, 2]
type = ChangeState
trigger1 = Time = 0 && (p2name ="hulk" || p2name ="Savage Hulk")
value = 197

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

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

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

[State 190, 2]
type = ChangeState
trigger1 = Var(1) = [401,466]
value = 194

[State 190, 2]
type = ChangeState
trigger1 = Var(1) = [467,532]
value = 195

[State 190, 2]
type = ChangeState
trigger1 = Var(1) = [533,600]
value = 196

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S121,6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S8400,0

 [State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = S8000,3

[State 191, roupa]
type = explod
trigger1 = animelem = 6
anim = 191
postype = p1
sprpriority = -3
supermovetime = -1
removetime = 50
pos = -20,-40
bindtime = -1
removeongethit = 1

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

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


;miss marvel
[Statedef 199]
type = S
movetype = I
physics = N
ctrl = 0
anim = 202
velset = 0,0
spriority = 0

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S8400,0

 [State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = S8000,3

[State 191, roupa]
type = explod
trigger1 = animelem = 6
anim = 191
postype = p1
sprpriority = -3
supermovetime = -1
removetime = 50
pos = -20,-40
bindtime = -1
removeongethit = 1

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

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

;---------------------------------------------------------------------------------------------
;Intro2

[Statedef 194]
type = S
movetype = I
physics = N
ctrl = 0
anim = 192
velset = 0,0
spriority = 0

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1000,1

[State 191, roupa]
type = explod
trigger1 = animelem = 2
anim = 196
postype = p1
sprpriority = 3
scale = 1.3,1.3
supermovetime = -1
removetime = -2
pos = 0,0
bindtime = -1
removeongethit = 1

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

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

[Statedef 195]
type = S
movetype = I
physics = N
ctrl = 0
anim = 193
velset = 0,0
spriority = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S121,12


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1000,1

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

[State 191, roupa]
type = explod
trigger1 = animelem = 2
anim = 196
postype = p1
sprpriority = 3
scale = 1.3,1.3
supermovetime = -1
removetime = -2
pos = 0,0
bindtime = -1
removeongethit = 1

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

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

[Statedef 196]
type = S
movetype = I
physics = N
ctrl = 0
anim = 194
velset = 0,0
spriority = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S121,7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1000,1

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

[State 191, roupa]
type = explod
trigger1 = animelem = 2
anim = 196
postype = p1
sprpriority = 3
scale = 1.3,1.3
supermovetime = -1
removetime = -2
pos = 0,0
bindtime = -1
removeongethit = 1

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

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


[Statedef 197]
type = S
movetype = I
physics = N
ctrl = 0
anim = 198
velset = 0,0
spriority = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 121,7

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 20
value = 9999,7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 121,18

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 21
value = 121,19


[State 197, abominavel]
type = explod
trigger1 = animelem = 1
anim = 197
postype = p1
sprpriority = 3
supermovetime = -1
removetime = -2
pos = 0,0
bindtime = -1
removeongethit = 1

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

[State 197, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 193


[Statedef 198]
type = S
movetype = I
physics = N
ctrl = 0
anim = 201
velset = 0,0
spriority = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 121,4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 8889,1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 28
value = 8700,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 30
trigger1 = (p2name ="CaptainAmerica" || p2name ="Captain America")
value = 121,14



[State 198, roupa]
type = explod
trigger1 = animelem = 1
anim = 199
postype = p1
sprpriority = 3
supermovetime = -1
removetime = -2
pos = 80,0
bindtime = -1
removeongethit = 1

[State 198, roupa]
type = explod
trigger1 = animelem = 28
anim = 203
postype = p1
sprpriority = 3
supermovetime = -1
removetime = -2
pos = 80,0
bindtime = -1
removeongethit = 1

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

[State 198, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 193

;-----------------------------------------------
[Statedef 193]; Move around before match
type = S
physics =S
sprpriority = 0

[State 0]
type = varset
trigger1 = time = 1
var(50) = 0

[State 0]
type = posset
trigger1 = 1
y = 0

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

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

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

[State 2]
type = ChangeAnim
trigger1 = command = "holdfwd"
trigger1 = Anim != 20
value = 20

[State 2]
type = ChangeAnim
trigger1 = command = "holdback"
trigger1 = Anim != 21
value = 21

[State 2]
type = ChangeAnim
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
trigger1 = Anim != 0
value = 0

[State 20, 2]
type = VelSet
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
x = 0

[State var]
type = VarSet
trigger1 = roundstate != 2
var(7) = floor(pos x)

[State F]
type = posset
trigger1 = roundstate = 2
trigger1 = var(7) != 0
x = var(7)

[State F]
type = varset
trigger1 = roundstate = 2
var(7) = 0

[State F]
type = changestate
trigger1 = ctrl
value = ifelse((command = "holdfwd") || (command ="holdback"),20,0)

;---------------------------------------------------------------------------------------------
;Taunt

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S121,3


[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  = 4
ctrl = 0
anim = 210
poweradd = 15
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 = time=0
attr = S,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s7770
sparkxy = -10, -60
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3
air.type = Low
air.hittime = 15
air.velocity = -3,-5
envshake.time = 1
envshake.ampl = 1

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

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

[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 200
poweradd = 35
sprpriority = 2

[State 210, VelMul]
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 = AnimElem = 3
attr = S,NA
damage = 25,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = -10,-70
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3
air.type = Low
air.hittime = 15
air.velocity = -3,-5
envshake.time = 1
envshake.ampl = 1

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

[Statedef 211]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 211
poweradd = 35
sprpriority = 2

[State 210, VelMul]
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 = AnimElem = 3
attr = S,NA
damage = 25,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = -10,-75
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -1
air.type = Low
air.hittime = 15
air.velocity = -1,-5
envshake.time = 1
envshake.ampl = 1

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

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

[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 220
poweradd = 55
sprpriority = 2

[State 220, VelMul]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 3

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

;[State 1040, 5]
;type = Explod
;trigger1 = animelem = 2
;ID = 005
;anim = 221
;postype = p1
;pos = 0, 0
;bindtime = 1
;removetime = -2
;sprpriority = 4
;ownpal = 1
;removeongethit = 1

[State 220, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S,NA
damage = 35,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7772
sparkxy = -10, -90
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = -9, -9
air.velocity = -9,-9
airguard.velocity = -6,0
yaccel = 0.39+(enemynear,const(movement.yaccel)/2)

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



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

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

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

[State 230, VelMul]
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 = AnimElem = 2
attr = S,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7770
sparkxy = -10, -50
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,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  = 4
ctrl = 0
anim = 240
poweradd = 35
sprpriority = 2

[State 240, VelMul]
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 = AnimElem = 4
attr = S,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = -10,-60
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -2,0
air.type = Low
air.hittime = 5
air.velocity = -2,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  = 4
ctrl = 0
anim = 250
poweradd = 55
sprpriority = 2

[State 250, VelMul]
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 = AnimElem = 3
attr = S,NA
damage = 55,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7772
sparkxy = -10, -50
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -8,0
air.type = Low
air.hittime = 5
air.velocity = -7,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  = 4
ctrl = 0
anim = 400
poweradd = 15
sprpriority = 2

[State 400, VelMul]
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 = AnimElem = 2
attr = C,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7770
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,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  = 4
ctrl = 0
anim = 410
poweradd = 35
sprpriority = 2

[State 410, VelMul]
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 = AnimElem = 2
attr = C,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = -10,-58
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -3,0
air.type = Low
air.hittime = 5
air.velocity = -3,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  = 4
ctrl = 0
anim = 420
poweradd = 55
sprpriority = 2

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

[State 420, VelMul]
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 = AnimElem = 3
attr = C,NA
damage = 45,1
animtype = up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 14,12
sparkno = s7772
sparkxy = -10, -73
guard.sparkno = s6767
hitsound = 5,4
ground.type = High
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = 0, -18
air.velocity = 0,-18
airguard.velocity = -6,0
yaccel = 0.39+(enemynear,const(movement.yaccel)/2)

[State 450, 4]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4444
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
ownpal = 1
bindtime = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 420, 5]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4445
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
ownpal = 1
bindtime = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64


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

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

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

[State 430, VelMul]
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 = AnimElem = 2
attr = C,NA
damage = 15,1
animtype = Light
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 13,14
sparkno = s7770
sparkxy = -10, -10
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,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  = 4
ctrl = 0
anim = 440
poweradd = 35
sprpriority = 2

[State 440, VelMul]
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 = AnimElem = 2
attr = C,NA
damage = 35,1
animtype = Medium
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = -10,-10
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Trip
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,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  = 4
ctrl = 0
anim = 450
poweradd = 55
sprpriority = 2

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

[State 450, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
trigger2 =  AnimElem = 6
value = 8400,2

[State 450, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 45,1
animtype = High
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 13,14
sparkno = s7772
sparkxy = -10, -50
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = high
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -5,-2
air.type = Low
air.hittime = 5
air.velocity = -7,3
fall = 1

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

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

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

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

[State 600, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = A,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7770
sparkxy = -10, -85
guard.sparkno = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -6
air.fall = 0
air.velocity = -3.2, -10.5

[State 600, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1400

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

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

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

[State 610, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = A,NA
damage = 35,1
animtype = medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = -10,-85
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 25
ground.hittime  = 20
ground.velocity = -8
air.fall = 0
air.velocity = -3.2, -7.5

[State 610, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1400

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

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

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

[State 620, HitDef]
type = HitDef
trigger1 = AnimElem = 3 ||  AnimElem = 4
attr = A,NA
damage = 45,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7772
sparkxy = -10, -85
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -12,10
air.hittime = 25
air.fall = 1

[State 620, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1400


[Statedef 621]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 621
poweradd = 55
sprpriority = 2

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 1
x = -1
y = -5

[State 0, VelSet]
type = VelSet
trigger1 =  AnimElem = 4
x = 10
y = 4



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

[State 650, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = A,NA
damage = 45,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7772
sparkxy = -10, -53
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -12,3
air.fall = 1
fall = 1
air.hittime = 25

[State 650, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1400
;---------------------------------------------------------------------------------------------
;Jumping light kick

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

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

[State 630, HitDef]
type = HitDef
triggerall = anim = 630
trigger1 = AnimElem = 2
attr = A,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7770
sparkxy = -10, -63
guard.sparkno = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.fall = 0
air.velocity = -3.2, -10.5
air.hittime = 25

[State 630, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1400


;---------------------------------------------------------------------------------------------
;Jumping medium kick
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 640
poweradd = 35
sprpriority = 2

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

[State 640, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = A,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = -10,-68
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.fall = 0
air.velocity = -3.2, -7.5
air.hittime = 25

[State 640, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1400

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

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

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

[State 650, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = A,NA
damage = 45,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7772
sparkxy = -10, -73
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -12,3
air.fall = 1
air.hittime = 25

[State 650, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1400


;---------------------------------------------------------------------------------------------
;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 = 801
p2stateno = 802
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 801]
type    = S
movetype= A
physics = N
anim = 801
sprpriority = 2

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 1
pos = 20,-90

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 2
pos = 0,-100

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 3
pos = -15,-80

[State 810, TargetState]
type = TargetState
trigger1 = AnimElem = 4
value = 816


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

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

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

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

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

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

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

[Statedef 816]
type    = A
movetype= H
physics = N
velset = -17,-9
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

;---------------------------------------------------------------------------
;------------------------------ Recovery Rolls ------------------------------
;---------------------------------------------------------------------------

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

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

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

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

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

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

; 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 = (Enemy, 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 = (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

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

;---------------------------------------------------------------------------------------------
;Special1_X

[Statedef 1000]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1000
sprpriority = 0
velset = 0, 0
poweradd = 20

[State 1040, a]
type = Width
trigger1 = AnimElemNo(0) = [4,24]
value = 50, -35

[State 1040, 1]
type = VarSet
trigger1 = PrevStateNo != 9000
trigger1 = time = 0
v = 1
value = 0

[State 1040, 2a]
type = VarSet
trigger1 = time = 0
v = 24
value = 30

[State 1040, 2b]
type = VarSet
trigger1 = time = 0
fv = 0
value = 2

[State 1040, 5]
type = Explod
trigger1 = animelem = 5
ID = 005
anim = 1002
postype = p1
pos = 60, 0
bindtime = 1
removetime = -2
sprpriority = 0
ownpal = 1

[State 1040, 5]
type = Explod
trigger1 = animelem = 2
ID = 005
anim = 1003
postype = p1
pos = 0, 0
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 1
removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S121,2
volume = 255
channel = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S121,16
volume = 50
channel = 2

[State 1040, 8]
type = EnvShake
trigger1 = AnimElem = 5
freq = 320
time = 100

[State 1040, 9]
type = Helper
trigger1 =animelem = 5
ID = 451
name = "terremoto"
postype = p1
pos = 60, 0
stateno = 1050
ownpal = 1

[State 1040, 10]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1

;-----------------------------------
; Shockwave Spawner
[Statedef 1050]
type = A
movetype = A
physics = N
anim = 9999

[State 1050, 2]
type = VelSet
trigger1 = time = 0
x = parent, fvar(0)

[State 1050, 3]
type = Projectile
trigger1 = (time % 14) = 0
projanim = 1001
projremove = 0
projremovetime = 28
projsprpriority = 2
projID = 929
velocity = 0, 0
postype = p1
pos = 0, 0
attr = S, SA
hitflag = MAF
guardflag = MA
animtype = Hard
damage = 20, 2
pausetime = 0, 9
guard.pausetime = 0, 10
sparkno = 2
sparkxy = -5, 0
guard.sparkno = 40
hitsound = S1, 7
guardsound = S1, 0
ground.type = Low
ground.slidetime = 15
ground.hittime = 16
guard.slidetime = 13
guard.hittime = 14
ground.velocity = -6, 0
air.velocity = -6, -1
guard.velocity = -8
hitonce = 1
getpower = 5
givepower = 35

[State 1050, 4]
type = PlaySnd
trigger1 = (time % 14) = 0
value = 121,16
volume = 10
channel = 1

[State 1050, 5]
type = DestroySelf
trigger1 = time >= 100


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

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 3
value = 121,17


[State 1000,helper]
type = Helper
trigger1 = animelem = 5
ID = 1102
pos = 10,-97
postype = p1
stateno = 1102
helpertype = normal
keyctrl = 0
sprpriority = 1

[State 1040, 5]
type = Explod
trigger1 = animelem = 3
ID = 005
anim = 1101
postype = p1
pos = 10,-97
bindtime = -1
removetime = -2
sprpriority = 4
ownpal = 1
removeongethit = 1


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

 ;no ar
[Statedef 1110]
type    = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = 1110
ctrl = 0
sprpriority = -1

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 2
value = 121,17

[State 1000,helper]
type = Helper
trigger1 = animelem = 4
ID = 1102
pos = 2,-121
postype = p1
stateno = 1102
helpertype = normal
keyctrl = 0
sprpriority = 1

[State 1040, 5]
type = Explod
trigger1 = animelem = 2
ID = 005
anim = 1101
postype = p1
pos = 2,-121
bindtime = -1
removetime = -2
sprpriority = 4
ownpal = 1
removeongethit = 1


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

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

[State 1002, HitDef]
type = HitDef
trigger1 = time = 0
attr = S, HP
animtype = Hard
damage = 70,5
getpower = 0
hitflag = MADFP
guardflag = MA
pausetime = 2,2
sparkno = s3005
sparkxy = -20, 15
guard.sparkno = s7772
hitsound = 171,2
guardsound = S202,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



 ;shoryuken
[Statedef 1200]
type    = A
movetype= A
physics = N
juggle  = 4
ctrl = 0
anim = 1200
poweradd = 55
sprpriority = 0


[State 220, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 3
value = 54,17

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 3
x = 4
y = -8
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 4
x = 0
y = -2

[State 0, VelSet]
type = VelSet
trigger1 =  animelem = 5
x = 0
y = 0
;ignorehitpause =
;persistent =



[State 1040, 5]
type = Explod
trigger1 = animelem = 1
ID = 005
anim = 1201
postype = p1
pos = 0,0
bindtime = -1
removetime = -2
sprpriority = 2
ownpal = 1
removeongethit = 1


[State 220, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 120,5
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 4,4
sparkno = s9990
sparkxy = -60, -90
guard.sparkno = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -3,-11
air.velocity = -3,-11
;p2stateno = 9020

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


; super ion punch

[Statedef 1300]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 1300
poweradd = 55
sprpriority = 2
facep2 = 1

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 121,13

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 5
value = 54,18


[State 220, VelMul]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 3

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

[State 1040, 5]
type = Explod
trigger1 = animelem = 2
ID = 005
anim = 1302
postype = p1
pos = 0,0
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 1
removeongethit = 1

[State 1040, 5]
type = Explod
trigger1 = animelem = 2
ID = 005
anim = 1301
postype = p1
pos = 0,0
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 1
removeongethit = 1

[State 1040, 5]
type = Explod
trigger1 = animelem = 5
ID = 005
anim = 1303
postype = p1
pos = 0,0
bindtime = 1
removetime = -2
sprpriority = 4
ownpal = 1
removeongethit = 1

[State 220, HitDef]
type = HitDef
trigger1 = AnimElem = 7
attr = S,NA
damage = 140,5
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,0
sparkno = s1304
sparkxy = -60, 0
guard.sparkno = s1304
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = -20,-7
air.velocity = -20,-7
getpower = 50,25
fall = 1
air.fall = 1
p2stateno = 9020

[State 1040, 8]
type = EnvShake
trigger1 = AnimElem = 7
freq = 120
time = 10

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


;---------------------------------------------------------------------------
;Air Attack Falling
[Statedef 1400]
type    = A
movetype= I
physics = A
anim = 1400
sprpriority = 1

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

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

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

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

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

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

;---------------------------------------------------------------------------
;Hypers
;---------------------------------------------------------------------------

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

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

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 3
trigger2 =  AnimElem = 6
value = 121,17
volume = 10
channel = 1

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 121,9
channel = 1
volume = 256

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

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

[State 3000, SuperPause]
type = SuperPause
trigger1 = animelem = 2
Time =45
pos = 9999,-9951
sound = 8889,0
poweradd = -1000
movetime = 45

[State 3000, Hyper Background]
type  = Explod
triggerall = Time = 45
trigger1 = p2life > 0
anim = 32710
postype = left
ID = 32710
sprpriority = -4
removetime = 110
pos = 0,0
scale = .5,.5
bindtime = -1
;facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999
[State 3000, Hyper Explode]
type = Explod
trigger1 = animelem = 2
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5

[State 3000, Hyper Circle]
type = Explod
trigger1 = animelem = 1
anim = 4533
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, som]
type = PlaySnd
trigger1 = Time = 12
value = 8889,0

[State 3100, Ground Flash]
type = Explod
trigger1 = animelem = 2
anim = 6666
ID = 8400
postype = P1
pos = -40,0
sprpriority = 3
ownpal = 1
supermovetime = 0
;------------hyper raio
[State 3000,helper]
type = Helper
trigger1 = animelem = 3
ID = 3001
pos = 13,-89
postype = p1
stateno = 3001
bindtime = 1
helpertype = normal
keyctrl = 0
sprpriority = 3

;[State 3000, 5]
;type = Explod
;trigger1 = animelem = 3
;ID = 3002
;anim = 3002
;postype = p1
;pos = 13,-89
;bindtime = -1
;removetime = -2
;sprpriority = 4
;ownpal = 1
;removeongethit = 1

;[State 0, ExplodBindTime]
;type = ExplodBindTime
;trigger1 =  animelem = 3
;ID =  3002
;time = -1
;ignorehitpause =
;persistent =

;[State 0, ExplodBindTime]
;type = ExplodBindTime
;trigger1 =  animelem = 6
;ID =  3004
;time = -1
;ignorehitpause =
;persistent =

;[State 3000, 5]
;type = Explod
;trigger1 = animelem = 6
;ID = 3004
;anim = 3004
;postype = p1
;pos = 5,-104
;bindtime = -1
;removetime = -2
;sprpriority = 4
;ownpal = 1
;removeongethit = 1

[State 3000,helper]
type = Helper
trigger1 = animelem = 6
ID = 3003
pos = 5,-104
postype = p1
stateno = 3003
helpertype = normal
keyctrl = 0
sprpriority = 3


                  ;------------
[State 3000, End]
type = ChangeState
trigger1 = animtime=0
value = 0
ctrl = 1
;---------------Raio-----------------
[Statedef 3001]
type = S
movetype = A
physics = N
ctrl = 0
anim = 3001
velset = 0,0
juggle = 1
ctrl = 0
sprpriority = 3

[State 210, HitDef]
type = HitDef
trigger1 = AnimElem = 1 ||  AnimElem = 3 ||  AnimElem = 5 ||  AnimElem = 7
attr = S,HA
damage = 15,2
animtype = Medium
guardflag = MA
hitflag = MAF
;priority = 4, Hit
pausetime = 1,1
sparkno = 3005
sparkxy = -10,0
guard.sparkno = -1
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3
air.type = Low
air.hittime = 15
air.velocity = -3,-5
envshake.time = 1
envshake.ampl = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 210, HitDef]
type = HitDef
triggerall = p2bodydist x <= 70
trigger1 = AnimElem = 9   ||  AnimElem = 11
attr = S,HA
damage = 20,1
animtype = up
guardflag = MA
hitflag = MAF
;priority = 4, Hit
pausetime = 1,1
sparkno = 3005
sparkxy = -10,0
guard.sparkno = -1;s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3,-9
air.type = Low
air.hittime = 15
air.velocity = -3,-9
envshake.time = 1
envshake.ampl = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 210, HitDef]
type = HitDef
triggerall = p2bodydist x > 70
trigger1 = AnimElem = 9   ||  AnimElem = 11
attr = S,HA
damage = 15,1
animtype = up
guardflag = MA
hitflag = MAF
;priority = 4, Hit
pausetime = 1,1
sparkno = 3005
sparkxy = -10,0
guard.sparkno = -1;s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3,-20
air.type = Low
air.hittime = 15
air.velocity = -3,-15
envshake.time = 1
envshake.ampl = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0


[state 3000, destroy]
type = Destroyself
trigger1 = Animtime = 0

;-------------
;---------------Raio-----------------
[Statedef 3003]
type = S
movetype = A
physics = N
ctrl = 0
anim = 3003
velset = 0,0
juggle = 1
ctrl = 0
sprpriority = 3

[State 210, HitDef]
type = HitDef
trigger1 = timemod = 2,1
attr = S,HA
damage = 15,1
animtype = high
guardflag = MA
hitflag = MAF
;priority = 4, Hit
pausetime = 1,1
sparkno = 3005
sparkxy = -10,0
guard.sparkno = -1;s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3,-10
air.type = Low
air.hittime = 15
air.velocity = -3,-5
envshake.time = 1
envshake.ampl = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[state 3000, destroy]
type = Destroyself
trigger1 = Animtime = 0
;---------------------------------------------------------------------------------------------
;Hyper2

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

;[State 3210, 2]
;type = NotHitBy
;trigger1 = 1
;value = SCA, AA, AP
;time = 1

[State 3000, som]
type = PlaySnd
trigger1 = animelem = 9
value = 121,10

[State 3000, som]
type = PlaySnd
trigger1 = animelem = 11
value = 54,17

[State 3000, som]
type = PlaySnd
trigger1 = animelem = 12 || animelem = 13 || animelem = 15 || animelem = 18
trigger2 = animelem = 21 || animelem = 24
value = 8400,1

[State 3100, a]
type = NotHitBy
trigger1 = var(4) > 540
value = SCA, AA, AT, AP

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

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

[State 3100, SuperPause]
type = SuperPause
trigger1 = animelem = 9
Time = 45
pos = 9999,-9951
sound = 8889,0
poweradd = -1000
movetime = 45

[State 3000, Hyper Background]
type  = Explod
triggerall = Time = 45
trigger1 = p2life > 0
anim = 32710
postype = left
ID = 32710
sprpriority = -4
removetime = 110
pos = 0,0
scale = .5,.5
bindtime = -1
;facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999
[State 3000, Hyper Explode]
type = Explod
trigger1 = animelem = 2
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5

[State 3100, Hyper Explode]
type = Explod
trigger1 = animelem = 9
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3100, Hyper Circle]
type = Explod
trigger1 = animelem = 9
anim = 4533
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3100, Sound]
type = PlaySnd
trigger1 = Time = 12
value = 8889,0

[State 3100, Ground Flash]
type = Explod
trigger1 = animelem = 9
anim = 6666
ID = 8400
postype = P1
pos = -40,0
sprpriority = 3
ownpal = 1
supermovetime = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 11
x = 18

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 12
x = 8

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 13
x = 0

[state 1101, twister]
type = afterimage
trigger1 = animelem = 9
time = 120
length = 200
palbright = 30,30,30
palcontrast = 120,120,220
;paladd = 200, 249, 39
paladd = 10,10,25
palmul = .65,.65,.75
framegap = 5
trans = add   ;"none","add1","sub"



[State 210, HitDef]
type = HitDef
trigger1 = animelem = 11 || animelem = 12 || animelem = 13 || animelem = 15 || animelem = 18
trigger2 = animelem = 21 || animelem = 24
attr = S,HA
damage = 25,5
animtype = high
guardflag = MA
hitflag = MAF
;priority = 4, Hit
pausetime = 6,6
sparkno = s8882
sparkxy = -40,-70
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -1
air.type = Low
air.hittime = 15
air.velocity = -1,-2
envshake.time = 1
envshake.ampl = 1



;ignorehitpause =
;persistent =


[State 3100, End]
type = ChangeState
trigger1 = animtime=0 || p2bodydist X <= -30
value = 3101



 [Statedef 3101]
type    = S
movetype= A
physics = N
;juggle  = 1
velset = 0,-4
poweradd = 0
anim = 3102
;ctrl = 0
sprpriority = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 3102
;elem = 1
;ignorehitpause =
;persistent =

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 8700,0


[State 3000, 5]
type = Explod
trigger1 = time = 0
ID = 005
anim = 3101
postype = p1
pos = 0,0
bindtime = 1
removetime = -2
sprpriority = 2
ownpal = 1
removeongethit = 1

[State 210, HitDef]
type = HitDef
trigger1 =  time = 0
attr = S,HA
damage = 80,10
animtype = up
guardflag = MA
hitflag = MAF
;priority = 4, Hit
pausetime = 1,1
sparkno = s8882
sparkxy = -40,-70
guard.sparkno = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6,-16
air.type = Low
fall = 1
air.fall = 1
air.hittime = 15
air.velocity = -6,-16
envshake.time = 1
envshake.ampl = 1


 [State 3100, End]
type = ChangeState
trigger1 = animtime=0 && time > 5
value = 1400
ctrl = 1

;---------
[Statedef 3110]
MoveType = H
anim = 3110
Ctrl = 0


[State 3210, 2]
type = NotHitBy
trigger1 = 1
value = SCA, AA, AP
time = 1


[State 3210, 4]
type = PalFX
trigger1 = time = 0
add = 255, 100, 100
time = 20
color = 50

[State 3210, 5]
type = ChangeState
trigger1 = time = 20
value = 3111

[Statedef 3111]
MoveType = H
anim = 1111

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


;Hyper3

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

;[State 3210, 2]
;type = NotHitBy
;trigger1 = 1
;value = SCA, AA, AP
;time = 1


[State 3100, a]
type = NotHitBy
trigger1 = var(4) > 540
value = SCA, AA, AT, AP

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

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

[State 3100, SuperPause]
type = SuperPause
trigger1 = animelem = 2
Time = 45
pos = 9999,-9951
sound = 8889,0
poweradd = -1000
movetime = 45

[State 3000, Hyper Background]
type  = Explod
triggerall = Time = 20
trigger1 = p2life > 0
anim = 32710
postype = left
ID = 32710
sprpriority = -4
removetime = 110
pos = 0,0
scale = .5,.5
bindtime = -1
;facing=1
ignorehitpause=1
supermovetime=9999
pausemovetime=9999
supermove = 9999
pausemove = 9999
[State 3000, Hyper Explode]
type = Explod
trigger1 = animelem = 2
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5

[State 3100, Hyper Explode]
type = Explod
trigger1 = animelem = 2
anim = 4532
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3100, Hyper Circle]
type = Explod
trigger1 = animelem = 2
anim = 4533
postype = p1
pos = 19,-80
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3100, Sound]
type = PlaySnd
trigger1 = Time = 12
value = 8889,0

[State 3100, Ground Flash]
type = Explod
trigger1 = animelem = 2
anim = 6666
ID = 8400
postype = P1
pos = -40,0
sprpriority = 3
ownpal = 1
supermovetime = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 1
y = -10

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

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 3
y = -2
x = -8

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 4
y = 7
x = 14

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 121,13


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 54,17


[State 3100, Ground Flash]
type = Explod
trigger1 = animelem = 4
anim = 3202
ID = 3202
postype = P1
pos = 0,0
bindtime = -1
sprpriority = 3
ownpal = 1
removetime = -1

[state 1101, twister]
type = afterimage
trigger1 = animelem = 4
time = 100
length = 200
palbright = 30,30,30
palcontrast = 120,120,220
;paladd = 200, 249, 39
paladd = 10,10,25
palmul = .65,.65,.75
framegap = 5
trans = add

[state 1101, twister]
type = afterimage
trigger1 = animelem = 3
time = 25
length = 200
palbright = 30,30,30
palcontrast = 120,120,220
;paladd = 200, 249, 39
paladd = 10,10,25
palmul = .65,.65,.75
framegap = 5
trans = add


[state 1101, twister]
type = afterimage
trigger1 = animelem = 1
time = 25
length = 200
palbright = 30,30,30
palcontrast = 120,120,220
;paladd = 200, 249, 39
paladd = 10,10,25
palmul = .65,.65,.75
framegap = 5
trans = add   ;"none","add1","sub"



[State 210, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,HA
damage = 250,20
animtype = high
guardflag = MA
hitflag = MAF
;priority = 4, Hit
pausetime = 6,6
sparkno = s3204
sparkxy = -60,0
guard.sparkno = s3204
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -10
air.type = Low
air.hittime = 15
air.velocity = -10,-10
fall = 1
air.fall = 1
envshake.time = 1
envshake.ampl = 1
;p1stateno = 9020


[State 3200, End]
type = ChangeState
trigger1 = pos y > -6 && time > 100
value = 3202


 [Statedef 3202]
type    = C
movetype= H
physics = N
velset = 10,0
anim = 3201

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

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 0
anim = 3204
ID = 8400
postype = P1
pos = 0,0
sprpriority = 3
ownpal = 1
supermovetime = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 3202

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

 [State 3200, End]
type = ChangeState
trigger1 = animtime = 0
value = 11
ctrl = 1


;---------------------------------------------------------------------------
;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 = 3333
postype = p1
pos = 53,-50
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

;---------------------------------------------------------------------------
;Guard Push (Crouch)
[Statedef 6310]
type    = C
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 121
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 = 3333
postype = p1
pos = 33,-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

;---------------------------------------------------------------------------
;Guard Push (air)
[Statedef 6320]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 122
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 = 3333
postype = p1
pos = 33,-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

;---------------------------------------------------------------------------
;Guard Push (Helper)
[Statedef 6350]
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


;---------------------------------------------------------------------------------------------
;Beginning of the super jump
[Statedef 7000]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

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

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

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

[State 7000, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0  &&  prevstateno != 220
value = 7001
ctrl = 1

[State 7000, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0  &&  prevstateno = 220
value = 7006
ctrl = 1

;---------------------------------------------------------------------------------------------
;Super Jump
[Statedef 7001]
type = A
physics = A
ctrl = 1
anim = 7000
velset = 0,-16.3

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

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

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

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

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

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

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

[State 7001, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 9999,5

[State 7001, Explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 6669
postype = p1
pos = 12, 60
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 1.20 - (time * 0.15), 1.54 - (time * 0.15) 

[State 7001, explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 6699
postype = p1
pos = 5, 60
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 1.20 - (time * 0.15), 1.54 - (time * 0.15) 

[State 7001, explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 9016
postype = p1
pos = 0, 20
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 2, 2
 
[State 7001, Var Mute]
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 7006]
type = A
physics = A
ctrl = 1
anim = 7006
velset = 10,-9


[State 7001, Var Mute]
type = VarSet
trigger1 = Time = 0
v = 12
value = 1

[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

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

;---------------------------------------------------------------------------
; 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, snd]
type = PlaySnd
triggerall = vel x != 0
triggerall = numexplod(72) <= 0
trigger1 = backedgebodydist <= 5
trigger2 = frontedgebodydist <= 5
persistent = 0
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5030, GMA]
type = Explod
triggerall = vel x != 0
triggerall = backedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = -20,-75
postype = p1
bindtime = 1

[State 5030, GMA]
type = Explod
triggerall = vel x != 0
triggerall = frontedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = 20,-75
sprpriority = 2
facing = -1
bindtime = 1
ownpal = 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, snd]
type = PlaySnd
triggerall = vel x != 0
triggerall = numexplod(72) <= 0
trigger1 = backedgebodydist <= 5
trigger2 = frontedgebodydist <= 5
persistent = 0
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5035, GMA]
type = Explod
triggerall = vel x != 0
triggerall = backedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = -20,-75
postype = p1
bindtime = 1

[State 5035, GMA]
type = Explod
triggerall = vel x != 0
triggerall = frontedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = 20,-75
sprpriority = 2
facing = -1
bindtime = 1
ownpal = 1

[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, snd]
type = PlaySnd
triggerall = vel x != 0
triggerall = numexplod(72) <= 0
trigger1 = backedgebodydist <= 5
trigger2 = frontedgebodydist <= 5
persistent = 0
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5050, GMA]
type = Explod
triggerall = vel x != 0
triggerall = backedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = -20,-75
postype = p1
bindtime = 1

[State 5050, GMA]
type = Explod
triggerall = vel x != 0
triggerall = frontedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = 20,-75
sprpriority = 2
facing = -1
bindtime = 1
ownpal = 1

[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


;julk get hit

;------------------------------------------------------------------------------------------
; Hit by  - shaking from the hit
; (a custom gethit state)

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


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 3202
;ignorehitpause =
;persistent =


[State 9020, Anim] ;Custom animation
type = null;ChangeAnim2
trigger1 = 1
value = 5012


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


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

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



[State 5050, 2] ; anim for trip
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(groundtype) = 3
trigger1 = SelfAnimExist(5070)
value = 5070


[State 9020, State]
type = AfterImage
trigger1 = Time = 5
length = 5
timegap = 1
framegap = 1
PalBright   = 0,0,0
PalContrast = 100,100,100
PalMul      = 1,1,1
trans = Add1
time = 0

[State 9020, State]
type = AfterImageTime
trigger1 = 1
time = 2

[State 9020, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 9030

;----------------------------------------------------------------------
; Hit by - flying through the air
; (a custom gethit state)
[Statedef 9030]
type    = A
movetype= H
physics = N


[State 9030]
type = AfterImage
trigger1 = Time = 5
length = 5
timegap = 1
framegap = 1
PalBright   = 0,0,0
PalContrast = 100,100,100
PalMul      = 1,1,1
trans = Add1
time = 0

[State 9030]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 9030, Gravity]
type = VelAdd
trigger1 = 1
y = .39

[State 9030, No scroll]
type = null;ScreenBound
;triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 0
movecamera = 0,1

[State 9030, Hit wall]
type = ChangeState
;triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 9027


[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
trigger2 = Anim != 5070

[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, 2] ;Coming down anim for trip
type = ChangeAnim
trigger1 = anim = 5070
trigger1 = Vel Y >= 0
trigger1 = SelfAnimExist(anim-10) || SelfAnimExist(5071)
value = ifelse(SelfAnimExist(5071),5071,anim-10)
persistent = 0


[State 5035, 3]
type = null;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 5050, 4] ;Recover near ground
type = null;SelfState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = 1;Command = "recovery"
value = 5200 ;HITFALL_RECOVER

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

[State 9030, Hit ground]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5071]), 0, 25)
value = 5100 ;HIT_BOUNCE

;-----------------------------------------------------------------------------------------------------
; Hit by  - hit wall
; (a custom gethit state)
[Statedef 9027]
type    = A
movetype= H
physics = N

[State 9027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 9027]
type = EnvShake
trigger1 = time = 0
time = 30
freq = 100
ampl = -10
phase = 10

[State 9027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 9027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 9027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

[State 9027, Spark]
type = null;Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 9027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 825

[State 9027, Sound]
type = null;PlaySnd
trigger1 = Time = 0
value = F7,0

[State 9027, State]
type = ChangeState
trigger1 = Time = 5
value = 9028

;----------------------------------------------------------------
; Hit by  - bounce off wall
; (a custom gethit state)
[Statedef 9028]
type    = A
movetype= H
physics = N


[State 9028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

[State 9028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -2

[State 9028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 2


[State 9028, Turn]
type = null;Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 9028, Gravity]
type = VelAdd
trigger1 = 1
y = .39

[State 9028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 9028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 9028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 9028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 9028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;Stand by
[Statedef 7827]
type = S
movetype = I
physics = N
velset = 0,0
ctrl = 0
;anim = 9800

[State 7827]
type = PosSet
trigger1 = Time = 0
y = 0

[State 7827]
type = ChangeState
trigger1 = NumEnemy = [1,2]
trigger1 = Enemy(0),statetype = L || Enemy(0),movetype != H
value = 102


[State 7827]
type = ChangeState
trigger1 = NumEnemy = 2
trigger1 = Enemy(1),statetype = L || Enemy(1),movetype != H
value = 102

[Statedef 102]
type    = S
physics = S
anim = 102
ctrl = 0


[State 102]
type = VelSet
trigger1 = AnimElem = 1
x = 7
y = -3


[State 102]
type = VelSet
trigger1 = AnimElemNo(0) = [1,2]
x = 9


[State 102]
type = VarSet
trigger1 = Time = 0
var(1) = 0


[State 102]
type = VarSet
trigger1 = Time = 0
trigger1 = BackEdgeDist < 0
var(1) = 1


[State 102]
type = VelSet
trigger1 = var(1) && BackEdgeDist > 20
x = 0

[State 102]
type = VelAdd
trigger1 = Pos Y < 0
y = 0.3

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

[State 102] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn


[State 102]
type = CtrlSet
trigger1 = p2bodydist x < 100
trigger2 = enemynear,movetype = A
value = 1



[State 102]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 0;52
ctrl = 1

;----super armor




;-----------
;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]

;For debugging purposes
[State -2, Debug Info]
type = DisplayToClipboard
trigger1 = roundstate > 0
text = "Hits: %d, Screen Pack %d, AI On %d, Super Jump %d"
;text = "Intro No. %d, Win No. %d, Enemy Proj: %d, Enemy Helpers: %d"
;text = "Score %d"
text = "P2 Distance X from P1 %f, P2 Distance Y from P1 %f"
params = var(8), var(17), var(59), var(0)
;params = var(1), var(2), var(7), var(6)
;params = var(11)
params = P2BodyDist X, P2BodyDist Y

;---------------------------------------------------------------------------
;Screenpack?
[State -2, Detect Screeenpack]
type = Varset
trigger1 = 1
v = 17
value = 10

; Misc SCtrls Section ==================================================
[State -2, Lie Down Snd]
type = PlaySnd
trigger1 = Time = 1
trigger1 = anim = 5300
value = 3,21
channel = 0

;voando pela tela
[State -2]
type = ScreenBound
trigger1 = P2StateNo = [9020,9030]
trigger2 = enemynear,stateno = 823
trigger3 = enemynear,stateno = 21285
value = p2bodydist x < 30 && BackEdgeDist < 30


[State -2]
type = ChangeState
triggerall = roundstate = 2
triggerall = Movetype != H && Stateno != 7827
trigger1 = BackEdgeDist < -10 -const(size.ground.front)-const(size.ground.back)
trigger1 = StateType != A
value = 7827
; ----------------------------------------------------------------------
[State -2, PosAdd]
type = PosAdd
trigger1 = Stateno = [5030, 5040]
trigger1 = (anim = 5040) && (AnimElem = 1, < 2)
y = -20
persistent = 0

; Reset Super Jump var
[State -2, Super Jump Reset]
type = VarSet
trigger1 = stateno = 52
trigger2 = stateno = 0
var(0) = 0

; Combo Messages and Score control =====================================
; 
[State -2, VS_Combo]
type = VarSet
trigger1 = var(8) >= 3
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(9) = 1+(var(8)>4)+(var(8)>5)+(var(8)>7)+(var(8)>9)+(var(8)>29)+(var(8)>49)+(var(8)>69)-(var(8)=-1)
ignorehitpause = 1

[State -2, Danger]
type = VarSet
trigger1 = var(10) !=1 && roundstate=2 && life = [1,250]
var(9) = 9
ignorehitpause = 1

[State -2, First Attack]
type = PlaySnd
triggerall = var(8)=-1
triggerall = NumExplod(8701) = 0
trigger1 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
persistent = 0
value = 230,0
volume=255
ignorehitpause = 1

[State -2, Combo Sound]
type = PlaySnd
trigger1 = NumExplod(8701) = 0
trigger1 = var(8)=0 && var(9)!=0
persistent = 0;1
value = 230,var(9)
volume=255
ignorehitpause = 1

[State -2, Left]
type = explod
trigger1 = var(8)=0 && var(9)!=0
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 1 && NumExplod(8701) = 0
anim = (8000 + var(9))
ID = 8701
postype = left
pos = 0,80
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
trigger1 = var(8)=0 && var(9)!=0
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 2 && NumExplod(8701) = 0
anim = (8100+ var(9))
ID = 8701
postype = right
pos = -1,80
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[State -2, VS_Combo]
type = VarAdd
trigger1 = enemynear, time = 0
trigger1 = enemynear, Hitshakeover = 0
trigger1 = p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(8) = 1 + (var(8)=-1)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
trigger1 = var(8)!=-1 && (p2movetype!=H || enemynear, ctrl)
trigger2 = var(8)=-1 && stateno = [5000,5899]
var(8) = 0 - (roundstate<2)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
triggerall = numexplod(8701)!=0
trigger1 = var(8)=0
var(9) = 0
ignorehitpause = 1

[State -2, Score]
type = Varadd
trigger1 = enemynear, time=0
trigger1 = enemynear, Hitshakeover=0
trigger1 = moveguarded || p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
trigger3 = roundstate=4 && time=0 && stateno = [180,189]
var(11) = ceil(stateno/50)*var(8) + (life)*(roundstate=4) + (moveguarded)
ignorehitpause = 1

[State -2, Normalize Score]
type = Varset
triggerall = numpartner=1
trigger1 = var(11)< partner, var(11)
var(11) = partner, var(11)

[State -2, Is Danger]
type = VarSet
trigger2 = var(10) = 0 && life <= 250
trigger1 = var(10) = 1 && roundstate!=2
var(10) = (roundstate>1)
ignorehitpause = 1

[State -2, Is First Attack p3]
type = VarSet
triggerall = numpartner=1
trigger1 = partner, movehit
trigger1 = partner, var(8) != -1
var(8) = 0
ignorehitpause = 1

; sound First attack
[State -2, Finish]
type = PlaySnd
triggerall = numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
persistent = 0
value = f8560, 0
volume = 255
ignorehitpause = 1

[State -2, Left]
type = explod
triggerall = teamside = 2 && numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
anim = f221
ID = 8580
postype = left
pos = 0,100
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
triggerall = teamside = 1 && numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
anim = f222
ID = 8580
postype = right
pos = -9,100
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[State -2, Get P2 Distance]
type = VarSet
trigger1 = P2Dist X != 0
v = 13
value = floor(P2Dist X)

[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
 ;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------------------------
[Statedef -3]

[State -3, VarAdd]
type = VarAdd
trigger1 = (HitPauseTime = 1) && (P2MoveType = H) && (MoveHit = 1) && (StateNo < 3000)
trigger2 = ProjHitTime(0) = 1
v = 21
value = 1
ignorehitpause = 1

[State -3, Overide Hits]
type = HitOverRide
trigger1 = StateNo = 3100  ||  StateNo = 3110
time = 2
slot = 0
attr = SCA, AA, AP, AT
stateno = 3111

[State -3, VarReset]
type = VarSet
trigger1 = P2MoveType != H
v = 21
value = 0

[State -3, AttackMulSet]
type = AttackMulSet
trigger1 = StateNo >= 3000
value = 1

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) <= 1
value = 1

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 2
value = 0.8

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 3
value = 0.6

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 4
value = 0.4

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) >= 5
value = .2

[State 8510, Explode]
type = Explod
trigger1 = Stateno = 52 && time = 1
trigger2 = Stateno = 240 && animelem = 8
trigger3 = Stateno = 1102 && time = 1
trigger4 = Stateno = 1112 && time = 1
trigger5 = Stateno = 1122 && time = 1
trigger6 = Stateno = 106 && time = 1
trigger7 = Stateno = 352 && AnimElemTime(2) = 1
anim = 8510
ID = 8510
postype = P1
pos = 0,4
sprpriority = -1
ownpal = 1
scale = 1.4, 1.2

[State -3, Aterrisagem]
type = PlaySnd
trigger1 = StateNo = 52 && Time = 1
value = 8100,0

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8900

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8901

[State -3, MSSM]
type = VarRandom
trigger1 = 1
v = 23
range = 0,8

[State -3, Super Jump]
type = VarSet
trigger1 = Stateno = 0
v = 12
value = 0

;[State -3, Afterimagetime]
type = Afterimagetime
trigger1 = stateno != [3000,4999]
time = 0

[State -3, ctrl set]
type = ctrlset
trigger1 = roundstate = 4
value = 0

 [State -3, Record Turn]
type = VarSet
triggerall = WinKO
trigger1 = Anim = [5,6]
v = 18
value = 1


