;www.infinitymugenteam.com
;===========================================================================
;========================_____________________________======================
;========================|                           |======================
;========================| MARVEL VS CAPCOM 2        |======================
;========================|                           |======================
;========================|          NORIMARO         |======================
;========================|___________________________|======================
;===========================================================================
;===========================================================================

;----------------------------________________-------------------------------
;---------------------------|                |------------------------------
;---------------------------| Configuration  |------------------------------
;---------------------------|________________|------------------------------

;---------------------------------------------------------------------------
[Data]
life = 1000
attack = 100
defence = 100
fall.defence_up = 100
liedown.time = 30
airjuggle = 10
sparkno = 2
guard.sparkno = S449
KO.echo = 0
volume = 255
IntPersistIndex = 30
FloatPersistIndex = 40

[Size]
xscale = 1;0.83
yscale = 1;1.07
ground.back = 25          ;Player width (back, ground)
ground.front = 23         ;Player width (front, ground)
air.back = 12             ;Player width (back, air)
air.front = 12            ;Player width (front, air)
height = 60               ;Height of player (for opponent to jump over)
attack.dist = 160         ;Default attack distance
proj.attack.dist = 90     ;Default attack distance for projectiles
proj.doscale = 0          ;Set to 1 to scale projectiles too   
head.pos = -5, -90        ;Approximate position of head
mid.pos = -5, -60         ;Approximate position of midsection
shadowoffset = 0          ;Number of pixels to vertically offset the shadow
draw.offset = 0,0         ;Player drawing offset in pixels (x, y)
front.width = 20

[Velocity]
walk.fwd  = 2.9 
walk.back = -2.5  
run.fwd  = 8.5, 0  
run.back = -7,-3.8 
jump.neu = 0,-8.3 
jump.back = -2.45 
jump.fwd = 2.55 
runjump.back = -2.55,-8.1
runjump.fwd = 4,-8.1 
airjump.neu = 0,-8.1  
airjump.back = -2.55 
airjump.fwd = 2.5 

[Movement]
airjump.num = 0 
airjump.height = 35 
yaccel = .39 
stand.friction = .85 
crouch.friction = .82 

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

[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11

[state 11,2]
type = changestate
trigger1 = prevstateno = 10 && time < 4 && command = "holdup"
value = 90
;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[state 40,0]
type = varset
trigger1 = 1
v = 6
value = 0

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

[State 40, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[state 40,6]
type = posset
trigger1 = time = 0
y = 0

[State 40,7]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A

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

[state 50,2]
type = changeanim
trigger1 = time = 0 && prevstateno = [400,575]
value = 88

[state 50,3]
type = changeanim
trigger1 = time = 0 && prevstateno = [700,705]
value = 88

[State 50,4]
type = ChangeAnim
trigger1 = Time = 0 && prevstateno != [400,575]
trigger1 = prevstateno != [700,705]
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[state 50,5]
type = changestate
trigger1 = anim = 88 && command = "QCF_p" && time > 5
value = 575

[State 50,6]
type = ChangeAnim 
triggerall = prevstateno != [400,575]
triggerall = prevstateno != [700,705]
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[state 50,8]
type = ChangeState
trigger1 = (screenpos x != [-1000,320]) && var(6) = 1 && facing = -1
trigger2 = (screenpos x != [0,1320]) && var(6) = 1 && facing = 1
value = 710
;---------------------------------------------------------------------------
; Super Jump Start
[Statedef 90]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

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

[State 90,2]
type = VelSet
trigger1 = AnimTime = 0
y = -16.6

[State 90,3]
type = VelSet
trigger1 = AnimTime = 0 && sysvar(1) = 1
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))

[State 90,4]
type = VelSet
trigger1 = AnimTime = 0 && sysvar(1) = -1
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))

[State 7001, Explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 20002
postype = p1
pos = -115, 10
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = .5,.5

[state 90,6]
type = varset
trigger1 = 1
v = 6
value = 1

[State 90,6]
type = ChangeState
trigger1 = AnimTime = 0
value = 91
ctrl = 1
;---------------------------------------------------------------------------
; Super Jump Up
[Statedef 91]
type    = A
physics = A
anim = 90

[State 660, 3]
type = PlaySnd
trigger1 = AnimElem = 1
value = 8800, 0
volume = 255

[state 91,16]
type = changeanim
trigger1 = time = 0 && prevstateno = [400,425]
trigger2 = time = 0 && prevstateno = 575
value = 88

[State 91, VelAdd]
type = VelAdd
trigger1 = Vel Y > 0
y= - 0.17

[State 91,18]
type = veladd
trigger1 = time >= 5 && command = "holdback" && vel x > -1.3875
x = -0.126

[State 91,19]
type = veladd
trigger1 = time >= 5 && command = "holdfwd" && vel x < 3.3
x = 0.3

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

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = N
anim = 100
sprpriority = 1

[state 100,1]
type = playsnd
trigger1 = animelem = 2
value = 20,0

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

[State 100, a7]
type = Explod 
trigger1 = Time %7=0
sprpriority = 7
anim = 20003
postype = P1
pos = ifelse(random<500,-10,10),ifelse(random<500,-65,-40)
accel = ifelse(random<500,-1,-.7),0
random = 6,60
removeongethit = 1
ownpal = 1
;bindtime= 1
supermovetime = 9999
pausemovetime = 9999
scale = .5,.5

[State 100,3]
type = VelSet
trigger1 = time = 1
x = 0

[State 100,4]
type = VelSet
trigger1 = time = 2
x = 9

[State 100,5]
type = VelSet
trigger1 = time >= 3 && time < 8
x = 8

[State 100,6]
type = VelSet
trigger1 = time >= 8 && time < 14
x = 7

[State 100,7]
type = VelSet
trigger1 = time >= 14 && time < 18
x = 6

[State 100,8]
type = VelSet
trigger1 = time >= 18 && time < 22
x = 5

[State 100,9]
type = VelSet
trigger1 = time >= 22 && time < 28
x = 4

[State 100,10]
type = VelSet
trigger1 = time >= 28 && time < 31
x = 3

[State 100,11]
type = VelSet
trigger1 = time >= 31 && time < 34
x = 2

[State 100,12]
type = VelSet
trigger1 = time >= 34 && time < 39
x = 1

[State 100,13]
type = VelSet
trigger1 = time >= 39
x = 0

[State 100,14] 
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100,15] 
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100,6]
type = changestate
trigger1 = command = "holdup" && prevstateno != 710
value = 40

[state 12,12]
type = ctrlset
trigger1 = prevstateno = 710 && screenpos x != [15,305]
value = 0

[state 12,12]
type = ctrlset
trigger1 = prevstateno = 710 && screenpos x = [15,305]
value = 1

[State -3, 3]
type = ScreenBound
trigger1 = prevstateno = 710
value = 0
movecamera = 0,0

[State 100,16]
type = ChangeState
trigger1 = animtime = 0
value = 0

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type    = S
physics = N
anim = 105
sprpriority = 1

[state 105,1]
type = playsnd
trigger1 = animelem = 2
value = 20,1

[State 105,2]
type = VelSet
trigger1 = time = 7
x = -10

[State 100, 7]
type = Explod
trigger1 = Time % 5 = 0
trigger2 = (StateNo = 200) && (Movecontact)
trigger3 = (StateNo = 230) && (Movecontact)
trigger4 = (StateNo = 210) && (Movecontact)
trigger5 = (StateNo = 211) && (Movecontact)
trigger6 = (StateNo = 240) && (Movecontact)
trigger7 = (StateNo = 241) && (Movecontact)
anim = 20007
postype = p1
pos = 116, 40
removetime = -2
sprpriority = 3
ownpal = 1

[State 105,3]
type = VelSet
trigger1 = time >= 8 && time < 13
x = -9

[State 105,4]
type = VelSet
trigger1 = time >= 13 && time < 18
x = -8

[State 105,5]
type = VelSet
trigger1 = time >= 18 && time < 23
x = -7

[State 105,6]
type = VelSet
trigger1 = time >= 23 && time < 27
x = -6

[State 105,7]
type = VelSet
trigger1 = time = 27
x = -5

[State 105,8]
type = VelSet
trigger1 = time >= 28
x = 0

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

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

[State 105,11]
type = ChangeState
trigger1 = animtime = 0
value = 0

;---------------------------------------------------------------------------
; SGUARDHIT (shaking)
[Statedef 150]
type    = S
movetype= H
physics = N
velset = 0,0

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

[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 151

[state 150,3]
type = changestate
trigger1 = command = "counter" && command = "z" && power >= 1000
value = 1800

[State 150,4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3
;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]
type    = S
movetype= H
physics = S
anim = 150

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

[State 151,2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = Time >= GetHitVar(hittime)
x = 0

[State 151,3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[state 151,4]
type = changestate
trigger1 = command = "counter" && command = "z" && power >= 1000
value = 1800

[State 151,5]
type = ChangeState
trigger1 = Time >= GetHitVar(hittime)
value = 130
ctrl = 1
;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 152]
type    = C
movetype= H
physics = N
velset = 0,0

[State 152,1]
type = ChangeAnim
trigger1 = 1
value = 151

[State 152,2]
type = ChangeState
trigger1 = HitShakeOver
value = 153

[state 152,3]
type = changestate
trigger1 = command = "counter" && command = "z" && power >= 1000
value = 1800

[State 152,4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4
;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 153]
type    = C
movetype= H
physics = C
anim = 151

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

[State 153,2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = Time >= GetHitVar(hittime)
x = 0

[State 153,3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 153,4]
type = ChangeState
trigger1 = Time >= GetHitVar(hittime)
value = 131
ctrl = 1

[state 153,5]
type = changestate
trigger1 = command = "counter" && command = "z" && power >= 1000
value = 1800
;---------------------------------------------------------------------------
; Lose by Time Over
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170,1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win state decider
[Statedef 180]
type = S

[state 180,1]
type = varrandom
trigger1 = time = 0
v = 1
range = 1,3

[state 180,2]
type = varset
triggerall = p2life = 0
trigger1 = command = "hold_a" || command = "hold_x"
v = 1
value = 1

[state 180,3]
type = varset
trigger1 = command = "hold_b" || command = "hold_y"
trigger2 = p2life != 0
v = 1
value = 2

[state 180,4]
type = varset
trigger1 = command = "hold_c" || command = "hold_z"
trigger2 = p2life != 0
v = 1
value = 3

[State 180, sound1] 
type=PlaySnd 
trigger1 = time=0 && var(17)>=10 && ishometeam!=1
value = 180,0
persistent = 0 
channel = 1 

[State 180, sound2-perfect] 
type=PlaySnd 
trigger1 = time=0 && var(17)>=10 && ishometeam!=1
triggerall = numpartner=0
trigger1 = const(Data.life) = life
value = 180,1 + (!NumEnemy)
persistent = 0 
channel = 1 

[State 180, sound2-perfect] 
type=PlaySnd 
trigger1 = time=0 && var(17)>=10 && ishometeam!=1
triggerall = numpartner=1
trigger1 = partner,const(Data.life) = partner,life
trigger1 = const(Data.life) = life
value = 180,1 + (!NumEnemy)
persistent = 0 
channel = 1

[State 180, 1]; Score Bonus
type = Helper
trigger1 = time=0 && ishometeam!=1 && numenemy!=0
postype = p1
pos = 50,0
name = "Score Bonus"
id = 8750
stateno = 8750

[State 180,5]
type = ChangeState
trigger1 = var(1) = 1
value = 181

[State 180,6]
type = ChangeState
trigger1 = var(1) = 2
value = 182

[State 180,7]
type = ChangeState
trigger1 = var(1) = 3
value = 183
;---------------------------------------------------------------------------
; Win pose 1 - Take a Picture
[Statedef 181]
type = S
ctrl = 0
anim = 20
velset = 3.5,0

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

[State 181,2]
type     = assertspecial
trigger1 = Time = [0,300]
flag     = roundnotover

[state 181,3]
type = changestate
trigger1 = screenPos x = [220, 320]
trigger1 = facing = 1
trigger2 = p2life != 0
trigger3 = screenPos x = [0, 100]
trigger3 = facing = -1
value = 184
;---------------------------------------------------------------------------
; Win pose 1 - Take a Picture (cont)
[Statedef 184]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 184,1]
type     = assertspecial
trigger1 = Time = [0,180]
flag     = roundnotover

[State 184,2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win pose 2 - Pose 1
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

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

[state 182,2]
type = playsnd
trigger1 = animelem = 2
value = 18,0

[State 182,3]
type     = assertspecial
trigger1 = Time = [0,180]
flag     = roundnotover
;---------------------------------------------------------------------------
; Win pose 3 - Pose 2
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0

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

[state 183,2]
type = explod
trigger1 = time = 12
persistent = 0
anim = 459
pos = 0,0
postype = p1
supermove = 1
sprpriority = -5
removeonhit = 1
scale = 0.75, 0.75
bindtime = -1
ownpal = 1

[state 183,3]
type = explod
trigger1 = time = 12 && facing = 1
persistent = 0
anim = 462
pos = -1,-70
postype = p1
supermove = 1
sprpriority = 1
removeonhit = 1
bindtime = -1
ownpal = 1

[state 183,4]
type = explod
trigger1 = time = 12 && facing = -1
persistent = 0
anim = 463
pos = -1,-70
postype = p1
supermove = 1
sprpriority = 1
removeonhit = 1
bindtime = -1
ownpal = 1

[State 183,5]
type     = assertspecial
trigger1 = Time = [0,180]
flag     = roundnotover
;--------------------------------------------------------------------------
Introduction Select
[Statedef 191]
type = S
ctrl = 0
velset = 0,0

[State 191,1]
type = VarSet
trigger1 = p2name = "ChunLi" || p4name = "ChunLi"
trigger2 = p2name = "Sakura" || p4name = "Sakura"
trigger3 = p2name = "Chun Li" || p4name = "Chun Li"
trigger4 = p2name = "Sakura Kusagano" || p4name = "Sakura Kusagano"
trigger5 = p2name = "Chun-Li" || p4name = "Chun-Li"
trigger6 = p2name = "Cammy" || p4name = "Cammy"
trigger7 = p2name = "Felicia" || p4name = "Felicia"
trigger8 = p2name = "Morrigan" || p4name = "Morrigan"
v = 1
value = 1

; Like in vs Series, you always start with 1 power stock...
[State 191, PowerAdd]
type = PowerSet
trigger1 = time = 0
value = 1000

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

[State 191,3]
type = ChangeState
trigger1 = Var(1) = 1
value = 193

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

[State 191]
type = destroyself
trigger1 = parent,stateno = 194

;---------------------------------------------------------------------------
; Introduction
[Statedef 192]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 192,1] 
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[state 192,2]
type = playsnd
trigger1 = animelem = 2
channel = 1
value = 16,0

[State 192,3]
type = AssertSpecial
trigger1 = 1
flag = Intro

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

[State 192, ChangeState]
type = ChangeState
trigger1 = Animelem = 36
value = 194

[State 192]
type = destroyself
trigger1 = parent,stateno = 194

[Statedef 194];開幕移動可能ステート
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 = 1.2

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = -1.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(9) = floor(pos x)

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

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

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

;---------------------------------------------------------------------------
; Introduction 2
[Statedef 193]
type = S
ctrl = 0
anim = 191
velset = 0,0

[State 193,1] 
type = ChangeAnim
trigger1 = RoundState = 0
value = 191

[state 193,2]
type = playsnd
trigger1 = animelem = 24
channel = 1
value = 16,1

[State 193,3] 
type = AssertSpecial
trigger1 = 1
flag = Intro

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

[State 193, ChangeState]
type = ChangeState
trigger1 = Animelem = 43
value = 194

[State 193]
type = destroyself
trigger1 = parent,stateno = 194

;---------------------------------------------------------------------------
; Taunt
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[state 195,1]
type = playsnd
trigger1 = animelem = 2
channel = 0
value = 17,0

[State 195,2]
type = CtrlSet
trigger1 = Time = 40
value = 1

[State 195,3]
type = Explod
trigger1 = animelem = 11 && facing = 1
anim = 196
id = 196
postype = p1
pos = 60,0
ownpal = 1
bindtime = -1
sprpriority = 5
persistent = 0
removeongethit = 1

[State 195,4]
type = Explod
trigger1 = animelem = 11 && facing = -1
anim = 197
id = 196
postype = p1
pos = 60,0
ownpal = 1
bindtime = -1
sprpriority = 5
persistent = 0
removeongethit = 1

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

;---------------------------------------------------------------------------
; Move your partner!! (After KO)
[Statedef 1950]
type = S
physics = S
sprpriority = 0

[State 1950, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

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

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

[State 1950, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050
;---------------------------------------------------------------------------
; Standing Jab
[Statedef 200]
type    = S                     
movetype= A                    
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 200                       
poweradd = 20                   
sprpriority = 2                 

[state 200,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,0

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[state 200,3]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 200,4]
type = HitDef
trigger1 = time = 0
attr = S, NA                   
damage = 30 , 0                 
animtype = Light              
guardflag = MA                  
hitflag = MAF                   
priority = 3, Hit              
pausetime = 10,12                 
sparkno = -1   
sparkxy = -10, -76              
hitsound = 5,0                
guardsound = 6,0  
guard.sparkno = 3
ground.type = High
ground.slidetime = 12             
ground.hittime  = 12            
ground.velocity = -6            
airguard.velocity = -1.9,-.8   
air.type = High                 
air.velocity = -3.3,-4.4         
air.hittime = 12                
ground.cornerpush.veloff = -10
guard.cornerpush.veloff = -5
air.cornerpush.veloff = -10
airguard.cornerpush.veloff = -5

[State 200,4]
type = HitDef
trigger1 = time = 0 && (WinKO) && (Var(54) !=1)
attr = S, NA                   
damage = 30 , 0                 
animtype = Light              
guardflag = MA                  
hitflag = MAF                   
priority = 3, Hit              
pausetime = 10,12                 
sparkno = -1   
sparkxy = -10, -76              
hitsound = 5,0                
guardsound = 6,0  
guard.sparkno = 3
ground.type = High
ground.slidetime = 12             
ground.hittime  = 12            
ground.velocity = -6            
airguard.velocity = -1.9,-.8   
air.type = High                 
air.velocity = -3.3,-4.4         
air.hittime = 12                
ground.cornerpush.veloff = -10
guard.cornerpush.veloff = -5
air.cornerpush.veloff = -10
airguard.cornerpush.veloff = -5
p2stateno = 5051

[State 200,4]
type = HitDef
trigger1 = time = 0 && (WinKO) && (Var(54) !=0)
attr = S, NA                   
damage = 30 , 0                 
animtype = Light              
guardflag = MA                  
hitflag = MAF                   
priority = 3, Hit              
pausetime = 10,12                 
sparkno = -1   
sparkxy = -10, -76              
hitsound = 5,0                
guardsound = 6,0  
guard.sparkno = 3
ground.type = High
ground.slidetime = 12             
ground.hittime  = 12            
ground.velocity = -6            
airguard.velocity = -1.9,-.8   
air.type = High                 
air.velocity = -3.3,-4.4         
air.hittime = 12                
ground.cornerpush.veloff = -10
guard.cornerpush.veloff = -5
air.cornerpush.veloff = -10
airguard.cornerpush.veloff = -5
p2stateno = 5051

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 80
anim = 7770
scale = 0.48,0.48

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

[State 200,5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing Strong
[Statedef 205]
type    = S                     
movetype= A                    
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 205                       
poweradd = 35                   
sprpriority = 2                 

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[state 205,1]
type = playsnd
trigger1 = animelem = 1
value = 190,1

[state 205,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,1

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[state 205,3]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 205,4]
type = HitDef
trigger1 = time = 0
attr = S, NA                   
damage = 45 , 0                 
animtype = med              
guardflag = MA                  
hitflag = MAF                   
priority = 3, Hit              
pausetime = 13,14
sparkno = -1
sparkxy = -10,-76
hitsound   = 5,1
guardsound = 6,0
guard.sparkno = 3
ground.type = High             
ground.slidetime = 17             
ground.hittime  = 17            
ground.velocity = -10            
airguard.velocity = -1.9,-.8   
air.type = High                 
air.velocity = -4.3,-4.4         
air.hittime = 12                
ground.cornerpush.veloff = -11
guard.cornerpush.veloff = -5.5
air.cornerpush.veloff = -11
airguard.cornerpush.veloff = -5.5

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 74
anim = 8880
scale = 0.58,0.58

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

;---------------------------------------------------------------------------
; Standing Fierce
[Statedef 210]
type    = S                     
movetype= A                    
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0
anim = 210
poweradd = 50
sprpriority = 2

[state 210,1]
type = playsnd
trigger1 = animelem = 1
value = 190,2

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[state 210,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,2

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[state 210,3]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 210,4]
type = HitDef
trigger1 = AnimElem = 3 
attr = S, NA                   
damage = 60 , 0                 
animtype = heavy       
guardflag = MA
hitflag = MAF                   
priority = 3, Hit              
pausetime = 13, 14               
sparkno = 8880
sparkxy = -25, -80
hitsound = 5,2
guardsound = 6,0
guard.sparkno = 3     
ground.type = High             
ground.slidetime = 18             
ground.hittime  = 18            
ground.velocity = -15            
airguard.velocity = -1.9,-.8   
air.type = High                 
air.velocity = -5.5,-4.4        
air.hittime = 12                
ground.cornerpush.veloff = -16
guard.cornerpush.veloff = -8
air.cornerpush.veloff = -16
airguard.cornerpush.veloff = -8
p2stateno = 211
p2facing = 1

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

;---------------------------------------------------------------------------
; Standing Short
[Statedef 215]
type    = S                     
movetype= A                    
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 215                       
poweradd = 20                   
sprpriority = 2                 

[state 215,1]
type = playsnd
trigger1 = animelem = 1
value = 190,0

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[state 215,2]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 215,3]
type = HitDef
trigger1 = time = 0
attr = S, NA                   
damage = 30 , 0                 
animtype = Light              
guardflag = MA                  
hitflag = MAF                   
priority = 3, Hit              
pausetime = 13,14
sparkno = -1
sparkxy = -10,-1
hitsound   = 5,0
guardsound = 6,0
guard.sparkno = 3
ground.type = low
ground.slidetime = 12             
ground.hittime  = 12            
ground.velocity = -6            
airguard.velocity = -1.9,-.8   
air.type = High                 
air.velocity = -3.3,-4.4         
air.hittime = 12                
ground.cornerpush.veloff = -10
guard.cornerpush.veloff = -5
air.cornerpush.veloff = -10
airguard.cornerpush.veloff = -5

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 30
anim = 7770
scale = 0.48,0.48

[State 215,4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing Forward
[Statedef 220]
type    = S                     
movetype= A                    
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 220                       
poweradd = 35                   
sprpriority = 2                 

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[state 200,1]
type = playsnd
trigger1 = animelem = 1
value = 190,1

[state 220,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,3

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[state 220,3]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 220,4]
type = HitDef
trigger1 = time = 0
attr = S, NA                   
damage = 45 , 0                 
animtype = med              
guardflag = MA                  
hitflag = MAF                   
priority = 3, Hit              
pausetime = 13,14
sparkno = -1
sparkxy = -10,-50
hitsound   = 5,1
guardsound = 6,0
guard.sparkno = 3   
ground.type = low             
ground.slidetime = 17             
ground.hittime  = 17            
ground.velocity = -11            
airguard.velocity = -1.9,-.8   
air.type = High                 
air.velocity = -4.3,-4.4         
air.hittime = 12                
ground.cornerpush.veloff = -11
guard.cornerpush.veloff = -5.5
air.cornerpush.veloff = -11
airguard.cornerpush.veloff = -5.5

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 60
anim = 8880
scale = 0.58,0.58

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

;---------------------------------------------------------------------------
; Standing Roundhouse
[Statedef 225]
type    = S                     
movetype= A                    
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 225                       
poweradd = 50                   
sprpriority = 2                 

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[state 225,1]
type = playsnd
trigger1 = animelem = 1
value = 190,2

[state 225,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,0

[state 225,3]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 225,4]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype = up
damage   = 60
guardflag = MA
pausetime = 10,10
sparkno = 8880
sparkxy = -5, -80
hitsound = 5,2
guardsound = 6,0
guard.sparkno = 3
ground.type = High
ground.slidetime = 20
ground.hittime  = 45
air.hittime = 45
ground.velocity = 0, -15
air.velocity = 0,-15.8
air.type = Low
airguard.velocity = -6,0
yaccel = 0.45+(enemynear,const(movement.yaccel)/2)
p2stateno = 5051

[State 255, Launcher Xplod]
type = Explod
trigger1 = movehit
anim = 8709
postype = p1
scale = 0.5, 0.5
pos = 10, -70
sprpriority = 3
ownpal = 1
removetime = -2
pausemovetime = 500
supermovetime = 500
ignorehitpause = 1
persistent = 0

[State 410, helper efectes]
type = Helper
trigger1 = movehit
helpertype = normal
name = "efectes"
ID = 5502
postype = P2
stateno = 8411
ownpal = 1
persistent = 0

[state 225,6]
type = changestate
triggerall = movehit = 1 && command = "holdup"
trigger1 = animelem = 3 || animelem = 4
value = 90

[State 225,7]
type = helper
trigger1 = animelem = 3
ID = (226)
pos = 55,-55
postype = p1
stateno = 226
helpertype = normal
name = "Banana"
ownpal = 1
keyctrl = 0

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

;---------------------------------------------------------------------------
; Opponent Launched

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

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

[State 5051, PlaySnd]
type = VelSet
trigger1 = AnimElem = 2
y = -13

[State 5051, PlaySnd]
type = VelAdd
trigger1 = AnimElem = 2,>= 0
y = .44

[State 5051, ChangeState]
type = SelfState
trigger1 = Time > 27
trigger1 = Vel Y >= 0
value = 5040
ctrl = 1

;---------------------------------------------------------------------------
; Banana (in the air)
[Statedef 226]
type    = A                     
movetype= A                    
physics = N                     
juggle  = 1                     
velset = 2,-5.5                    
ctrl = 0                      
anim = 226                       
poweradd = 0                   
sprpriority = 2                 

[state 226,1]
type = veladd
trigger1 = time >= 0 
y = 0.3

[state 226,2]
type = changestate
trigger1 = pos y > 0 && vel y > 0
value = 227
;---------------------------------------------------------------------------
; Banana (on the ground)
[Statedef 227]
type    = C                     
movetype= A                    
physics = C                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 227                       
poweradd = 0                   
sprpriority = 2                 

[State 227,1]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 2
hitflag = MAF
guardflag = ML
pausetime = 0,2
sparkno = 8880
sparkxy = -5, 0
hitsound = 5,2
guardsound = 6,0
guard.sparkno = 3
ground.type = Trip
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = 0,-5
affectteam = B
guard.sparkno = S449
air.velocity = 0,-5
guard.velocity = -5
air.fall = 1
fall = 1

[state 227,2]
type = velset
trigger1 = time >= 0 
x = 0
y = 0

[state 227,3]
type = posset
trigger1 = time >= 0
y = 0

[state 227,4]
type = changestate
trigger1 = animtime = 0 || movehit = 1 || numhelper(226) > 1
value = 228
;---------------------------------------------------------------------------
; Banana (disappear)
[Statedef 228]
type    = C                     
movetype= A                    
physics = C                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 228                       
poweradd = 0                   
sprpriority = 2                 

[state 228,1]
type = destroyself
trigger1 = animtime = 0

;---------------------------------------------------------------------------
;Helper efectes
[Statedef 8411]
type    = A
movetype= I
physics = N
anim = 8010

[State 8411, puntets]
type = explod
trigger1 = Time = 0
anim = 49
postype = p2
pos = 0,-50
sprpriority = 4
facing = 1
persistent = 0
ownpal = 1
scale = 0.8,0.8

[State 8411,final]
type = Destroyself
trigger1 = numexplod(5502)+numexplod(5503) = 0

;--------------------------------------------------------------------------
;Crouching light punch
[Statedef 300]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 20
ctrl = 0
anim = 300
sprpriority = 2

[state 300,1]
type = playsnd
trigger1 = animelem = 1
value = 190,0

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[state 300,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,5

[state 300,3]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 300,4]
type = HitDef
trigger1 = time = 0
attr = S, NA                   
damage = 30 , 0                 
animtype = Light              
guardflag = MA                  
hitflag = MAF                   
priority = 3, Hit              
pausetime = 13,14
sparkno = -1
sparkxy = -10,-46
hitsound   = 5,0
guardsound = 6,0
guard.sparkno = 3
ground.type = low
ground.slidetime = 12             
ground.hittime  = 12            
ground.velocity = -7            
airguard.velocity = -1.9,-.8   
air.type = High                 
air.velocity = -3.3,-4.4         
air.hittime = 12                
ground.cornerpush.veloff = -8
guard.cornerpush.veloff = -4
air.cornerpush.veloff = -8
airguard.cornerpush.veloff = -4

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 50
anim = 7770
scale = 0.48,0.48

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

;---------------------------------------------------------------------------
;Crouching Strong
[Statedef 305]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 35
ctrl = 0
anim = 305
sprpriority = 2

[state 305,1]
type = playsnd
trigger1 = animelem = 1
value = 190,1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[state 305,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,4

[state 305,3]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 305,4]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype = up
damage   = 45
guardflag = MA
pausetime = 13,14
sparkno = -1
sparkxy = -5,-80
hitsound   = 5,1
guardsound = 6,0
guard.sparkno = 3
ground.type = High
ground.slidetime = 20
ground.hittime  = 45
air.hittime = 45
ground.velocity = 1.5, -3.2
air.velocity = 1.5,-3.2
airguard.velocity = -2,-2

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 85
anim = 8880
scale = 0.58,0.58

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

;---------------------------------------------------------------------------
;Crouching Fierce
[Statedef 310]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 50
ctrl = 0
anim = 310
sprpriority = 2

[state 310,1]
type = playsnd
trigger1 = animelem = 1
value = 190,2

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[state 310,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,1

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[state 310,3]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 310,4]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage    = 30
priority  = 3
animtype  = heavy
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = 8880
sparkxy = -10, -42
hitsound = 5, 2
guardsound = 6, 0
guard.sparkno = 3
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -15
air.velocity = -8,-3
ground.cornerpush.veloff = -10
guard.cornerpush.veloff = -5
air.cornerpush.veloff = -10
airguard.cornerpush.veloff = -5

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

;---------------------------------------------------------------------------
;Crouching Short
[Statedef 315]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 20
ctrl = 0
anim = 315
sprpriority = 2

[state 315,1]
type = playsnd
trigger1 = animelem = 1
value = 190,0

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[state 315,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,6

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[state 315,3]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 315,4]
type = HitDef
trigger1 = time = 0
attr = S, NA                   
damage = 30 , 0                 
animtype = Light              
guardflag = MA                  
hitflag = MAFDLH                   
priority = 3, Hit              
pausetime = 13, 14               
sparkno = -1
sparkxy = -10,-26
hitsound   = 5,0
guardsound = 6,0
guard.sparkno = 3
ground.type = low
ground.slidetime = 12             
ground.hittime  = 12            
ground.velocity = -7            
airguard.velocity = -1.9,-.8   
air.type = High                 
air.velocity = -3.3,-4.4         
air.hittime = 12                
ground.cornerpush.veloff = -8
guard.cornerpush.veloff = -4
air.cornerpush.veloff = -8
airguard.cornerpush.veloff = -4

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 10
anim = 7770
scale = 0.48,0.48

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

;---------------------------------------------------------------------------
;Crouching forward
[Statedef 320]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 35
ctrl = 0
anim = 320
sprpriority = 2

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[state 320,1]
type = playsnd
trigger1 = animelem = 1
value = 190,1

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[state 320,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,7

[state 320,3]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 320,4]
type = HitDef
trigger1 = time = 0
attr = S, NA                   
damage = 45 , 0                 
animtype = med              
guardflag = MA                  
hitflag = MAFD                   
priority = 3, Hit              
pausetime = 13,14
sparkno = -1
sparkxy = -10,-26
hitsound   = 5,1
guardsound = 6,0
guard.sparkno = 3         
ground.type = High             
ground.slidetime = 17             
ground.hittime  = 17            
ground.velocity = -11            
airguard.velocity = -1.9,-.8   
air.type = High                 
air.velocity = -4.3,-4.4         
air.hittime = 12                
ground.cornerpush.veloff = -9
guard.cornerpush.veloff = -4.5
air.cornerpush.veloff = -9
airguard.cornerpush.veloff = -4.5

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -5,p2dist y - 41
anim = 8880
scale = 0.58,0.58

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

;---------------------------------------------------------------------------
;Crouching roundhouse
[Statedef 325]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 50
ctrl = 0
anim = 325
sprpriority = 2

[state 325,1]
type = playsnd
trigger1 = animelem = 1
value = 190,2

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 100 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 250, dust]
type = Explod 
trigger1 = PrevStateno = 105 && !time
anim = 20007
postype = p1
pos = 30, -3
removetime = -2
sprpriority = 3
persistent = 0
ownpal=1

[State 211, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = 1.4

[state 325,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,9

[state 325,3]
type = velset
trigger1 = time = 0 && prevstateno = 100
x = 4

[State 325,4]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 60
hitflag = MAF
guardflag = L
pausetime = 13,15
sparkno = 8880
sparkxy = -5, -21
hitsound = 5,2
guardsound = 6, 0
guard.sparkno = 3
ground.type = Trip
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3,-5
air.velocity = -3,-5
guard.velocity = -5
air.fall = 1
fall = 1
ground.cornerpush.veloff = -10
guard.cornerpush.veloff = -5
air.cornerpush.veloff = -10
airguard.cornerpush.veloff = -5
p2stateno = 326
p2facing = 1

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

;---------------------------------------------------------------------------
;Jump Jab
[Statedef 400]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 20
ctrl = 0
anim = 400
sprpriority = 2

[state 400,1]
type = playsnd
trigger1 = animelem = 1
value = 190,0

[state 400,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,0

[State 400,3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 22
guardflag = HA
priority = 3
animtype = Up
pausetime = 12,10
sparkno = -1
sparkxy = -10,-58
hitsound   = 5+var(37),0
guardsound = 6,0
guard.sparkno = 3
ground.type = High
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -6
air.type = Low
air.fall = 0
air.velocity = -0.2, -7.2
yaccel = const(movement.yaccel)+0.32
p2facing = 1

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 92
anim = 7770
scale = 0.48,0.48


[state 400,4]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;Jump Strong
[Statedef 405]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 35
ctrl = 0
anim = 405
sprpriority = 2

[state 405,1]
type = playsnd
trigger1 = animelem = 1
value = 190,1

[state 405,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,5

[State 405,3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 45
guardflag = HA
priority = 3
pausetime = 11,11
sparkno = -1
sparkxy = -10,-58
hitsound   = 5+var(37),1
guardsound = 6,0
guard.sparkno = 3
animtype = Up
ground.type = High
ground.slidetime = 25
ground.hittime  = 20
ground.velocity = -8
air.type = Low
air.fall = 0
air.velocity = -0.1, -7.2
yaccel = const(movement.yaccel)+0.32
p2facing = 1

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 25
anim = 8880
scale = 0.58,0.58


[state 405,4]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;Jump Fierce
[Statedef 410]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 50
ctrl = 0
anim = 410
sprpriority = 2

[state 410,1]
type = playsnd
trigger1 = animelem = 1
value = 190,2

[state 410,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,10

[State 425,1]
type = HitDef
trigger1 = Time = 0 && prevstateno != [400,425]
attr = A, NA
damage    = 60
guardflag = MA
priority = 3
pausetime = 12,12
sparkno = 8880
sparkxy = -0, -25
hitsound = 5+var(37), 2
guardsound = 6,0
guard.sparkno = 3
animtype = Heavy
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.type = Low
air.velocity = -10,4
air.fall = 1
air.hittime = 25
yaccel = .25
p2stateno = 1700
p2facing = 1

[State 425,1]
type = HitDef
trigger1 = Time = 0 && (prevstateno = [400,425]) && var(6) = 1
attr = A, NA
damage    = 60
guardflag = MA
priority = 3
pausetime = 12,12
sparkno = 8880
sparkxy = -0, -25
hitsound = 5, 2
guardsound = 6,0
guard.sparkno = 3
animtype = Heavy
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.type = Low
air.velocity = -15,4
air.fall = 1
air.hittime = 25
yaccel = .25
p2stateno = 1715
p2facing = 1

[State 425,1]
type = HitDef
trigger1 = Time = 0 && (prevstateno = [400,425]) && var(6) = 0
attr = A, NA
damage    = 60
guardflag = MA
priority = 3
pausetime = 12,12
sparkno = 8880
sparkxy = -0, -25
hitsound = 5, 2
guardsound = 6,0
guard.sparkno = 3
animtype = Heavy
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.type = Low
air.velocity = -10,4
air.fall = 1
air.hittime = 25
yaccel = .25
p2stateno = 1700
p2facing = 1

[State 706, 5]
type = Helper
trigger1 = numhelper(708) = 0 && (prevstateno = [400,425]) && var(6) = 1 && movehit = 1
name = "Scroll Screen"
id = 708
stateno = 708
postype = p1
pos = 50, 0
bindtime = -1
persistent = 0

[State 425, 3]
type = varset
trigger1 = (prevstateno = [400,425]) && var(6) = 1 && movehit = 1
v = 3
value = 1
persistent = 0

[state 425,3]
type = veladd
trigger1 = var(6) = 1
y = -0.105

[state 451,6]
type = screenbound
triggerall = movehit
trigger1 = var(6) = 1
trigger1 = prevstateno != 50
value = 0

[State 625,Screenbound]
type = screenbound
triggerall = movehit
triggerall = p2statetype = A
trigger1 = Var(6)
trigger1 = time >=0
value = 0

[State 625, taking him out of the screen]
type = changestate
trigger1 = ctrl
trigger1 = Var(6)
trigger1 = BackEdgeDist < 0
;trigger1 = time >10
value = 708

[State 0, ScreenBound]
type = ScreenBound
triggerall = movecontact && !moveguarded  &&  pos y < -340
trigger1 = 1
value = 0
 
[state 410,4]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;Jump Short
[Statedef 415]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 20
ctrl = 0
anim = 415
sprpriority = 2

[state 415,1]
type = playsnd
trigger1 = animelem = 1
value = 190,0

[state 415,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,0

[State 415,3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 30
guardflag = HA
priority = 3
pausetime = 10,10
sparkno = -1
sparkxy = -5,-50
hitsound   = 5+var(37),0
guardsound = 6,0
guard.sparkno = 3
animtype = Up
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.fall = 0
air.hittime = 25
air.velocity = -0.1, -8
yaccel = const(movement.yaccel)+0.32
p2facing = 1

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 79
anim = 7770
scale = 0.48,0.48


[state 415,4]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;Jump Forward
[Statedef 420]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 35
ctrl = 0
anim = 420
sprpriority = 2

[state 420,1]
type = playsnd
trigger1 = animelem = 1
value = 190,1

[State 420,2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 45
guardflag = HA
priority = 3
pausetime = 11,11
sparkno = -1
sparkxy = -10,-58
hitsound   = 5+var(37),1
guardsound = 6,0
guard.sparkno = 3
animtype = Up
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.fall = 0
air.velocity = -0.1, -6.7
yaccel = const(movement.yaccel)+0.32
p2facing = 1

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 68
anim = 8880
scale = 0.58,0.58

[state 420,3]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;Jump Forward
[Statedef 421]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 35
ctrl = 0
anim = 421
sprpriority = 2

[state 421,1]
type = playsnd
trigger1 = animelem = 1
value = 190,1

[state 421,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,11

[State 421,3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 45
hitflag = MAF
guardflag = HA
priority = 3
pausetime = 11,11
sparkno = -1
sparkxy = -10,-68
hitsound   = 5,1
guardsound = 6,0
guard.sparkno = 3
animtype = Medium
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.type = Low
air.fall = 0
air.hittime = 25
air.velocity = -0.1, -6.7
yaccel = const(movement.yaccel)+0.32
p2facing = 1

[State 0]
type = explod;d4
trigger1 = movehit
persistent = 0
ignorehitpause = 1
sprpriority = 2
pos = p2dist x -10,p2dist y - 68
anim = 8880
scale = 0.58,0.58

[state 421,4]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1
;---------------------------------------------------------------------------
;Jump Roundhouse
[Statedef 425]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 50
ctrl = 0
anim = 425
sprpriority = 2

[state 425,1]
type = playsnd
trigger1 = animelem = 1
value = 190,2

[state 425,2]
type = playsnd
trigger1 = animelem = 2
channel = 6
value = 0,8

[State 425,1]
type = HitDef
trigger1 = Time = 0 && prevstateno != [400,425]
attr = A, NA
damage    = 60
guardflag = MA
priority = 3
pausetime = 12,12
sparkno = 8880
sparkxy = -5, -25
hitsound = 5,2
guardsound = 6,0
guard.sparkno = 3
animtype = Heavy
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.type = Low
air.velocity = -10,4
air.fall = 1
air.hittime = 25
yaccel = .25
p2stateno = 1700
p2facing = 1

[State 425,1]
type = HitDef
trigger1 = Time = 0 && (prevstateno = [400,425]) && var(6) = 1
attr = A, NA
damage    = 60
guardflag = MA
priority = 3
pausetime = 12,12
sparkno = 8880
sparkxy = -5, -25
hitsound = 5,2
guardsound = 6,0
guard.sparkno = 3
animtype = Heavy
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.type = Low
air.velocity = -15,4
air.fall = 1
air.hittime = 25
yaccel = .25
p2stateno = 1715
p2facing = 1

[State 425,1]
type = HitDef
trigger1 = Time = 0 && (prevstateno = [400,425]) && var(6) = 0
attr = A, NA
damage    = 60
guardflag = MA
priority = 3
pausetime = 12,12
sparkno = 8880
sparkxy = -5, -25
hitsound = 5,2
guardsound = 6,0
guard.sparkno = 3
animtype = Heavy
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.type = Low
air.velocity = -10,4
air.fall = 1
air.hittime = 25
yaccel = .25
p2stateno = 1700
p2facing = 1

[State 706, 5]
type = Helper
trigger1 = numhelper(708) = 0 && (prevstateno = [400,425]) && var(6) = 1 && movehit = 1
name = "Scroll Screen"
id = 708
stateno = 708
postype = p1
pos = 50, 0
ignorehitpause = 1
persistent = 0

[State 425, 3]
type = varset
trigger1 = (prevstateno = [400,425]) && var(6) = 1 && movehit = 1
v = 3
value = 1
ignorehitpause = 1
persistent = 0

[state 425,3]
type = veladd
trigger1 = var(6) = 1
y = -0.105

[state 451,6]
type = screenbound
triggerall = movehit
trigger1 = var(6) = 1
trigger1 = prevstateno != 50
value = 0

[State 625,Screenbound]
type = screenbound
triggerall = movehit
triggerall = p2statetype = A
trigger1 = Var(6)
trigger1 = time >=0
value = 0

[State 625, taking him out of the screen]
type = changestate
trigger1 = ctrl
trigger1 = Var(6)
trigger1 = BackEdgeDist < 0
;trigger1 = time >10
value = 708

[State 0, ScreenBound]
type = ScreenBound
triggerall = movecontact && !moveguarded  &&  pos y < -340
trigger1 = 1
value = 0

[state 425,4]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1
;---------------------------------------------------------------------------
; Tourist's Treasure
[Statedef 500]
type    = S                     
movetype= A                    
physics = S                     
juggle  = 0                     
velset = 0,0                    
ctrl = 0                      
anim = 500                       
poweradd = 100                   
sprpriority = 2                 

[state 500,1]
type = playsnd
trigger1 = animelem = 1
channel = 0
value = 10,1

;[State 1000, Poeira]
;type = Explod
;trigger1 = AnimElemTime(1) = 1
;anim = 13
;ID = 8400
;postype = P1
;pos = -90,0
;sprpriority = 3
;ownpal = 1
;supermovetime = 40
;scale = 0.5, 0.5

[state 500,3]
type = varrandom
trigger1 = time = 0
v = 4
range = 501,510

[State 500,4]
type = Projectile
trigger1 = AnimElem = 3
offset = 40, -40
projid = 500
projanim = var(4)
projhitanim = 8881
velocity = 5,-2.5
projheightbound = -480, 0
projedgebound = 2000
projscreenbound = 2000
accel = 0, 0.1
attr = S, SP
animtype = Hard
damage = 75,10
hitflag = MAF
guardflag = MA
pausetime = 0,14
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
sparkno = -1
sparkxy = 0,0
ground.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -6
guard.velocity = -3
air.velocity = -5,2
airguard.velocity = -5,1

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

;---------------------------------------------------------------------------
; Tourist's Treasure (air)
[Statedef 575]
type    = A                     
movetype= A                    
physics = N                                 
ctrl = 0                      
anim = 575                       
poweradd = 100                   
sprpriority = 2                 

[state 575,1]
type = playsnd
trigger1 = animelem = 1
channel = 0
value = 10,1

[state 575,2]
type = changeanim
trigger1 = time = 0 && prevstateno = [400,425]
value = 576

[State 1010, 1]
type = VelMul
trigger1 = time = 0
x = .15
y = .15

[State 1010, 1a]
type = VelAdd
trigger1 = time = 0
trigger1 = Vel Y = [-.1,.1]
y = ifelse(Vel Y <= 0, .1, -.1)

[state 575,5]
type = varrandom
trigger1 = time = 0
v = 4
range = 501,510

[State 575,6]
type = Projectile
trigger1 = AnimElem = 3
offset = 20, -30
projid = 500
projanim = var(4)
projhitanim = -1
projheightbound = -480, 0
projedgebound = 2000
projscreenbound = 2000
projhits = 1
projmisstime = 0
velocity = 5,-2.5
accel = 0, 0.1
attr = S, SP
animtype = Hard
damage = 50,7
hitflag = MAF
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
sparkno = 8880
sparkxy = 0,0
guardflag = MA
pausetime = 0,4
ground.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -6
guard.velocity = -3
air.juggle = 1
air.velocity = -10,5
airguard.velocity = -5,1

[State 1010, 3a]
type = VelSet
trigger1 = Pos Y >= 4
y = 0

[State 1010, 3b]
type = VarSet
trigger1 = time = 0
v = 0
value = ifelse(PrevStateNo = 670 || var(20), 1, 0)

[State 575,7]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------------------------
; Opponent Daig Hit

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

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

[State 45434, PlaySnd]
type = VelSet
trigger1 = AnimElem = 2
y = -17
x = -8

[State 45434, PlaySnd]
type = VelAdd
trigger1 = AnimElem = 2,>= 0
y = .44

[State 45434, ChangeState]
type = SelfState
trigger1 = Time > 27
trigger1 = Vel Y >= 0
value = 5040
ctrl = 1

;---------------------------------------------------------------------------
; Opponent Daig Hit 2

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

[State 45435, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 45434

[State 45435, PlaySnd]
type = VelSet
trigger1 = AnimElem = 2
y = -13
x = -5

[State 45435, PlaySnd]
type = VelAdd
trigger1 = AnimElem = 2,>= 0
y = .44

[State 45435, ChangeState]
type = SelfState
trigger1 = Time > 27
trigger1 = Vel Y >= 0
value = 5040
ctrl = 1

;---------------------------------------------------------------------------
; Opponent Daig Hit 3
 
[Statedef 45436]
type    = A
movetype= H
physics = N
velset = 0, 0
ctrl = 0

[State 45436, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 45434

[State 45436, PlaySnd]
type = VelSet
trigger1 = AnimElem = 2
y = -15
x = -6.5

[State 45436, PlaySnd]
type = VelAdd
trigger1 = AnimElem = 2,>= 0
y = .44

[State 45436, ChangeState]
type = SelfState
trigger1 = Time > 27
trigger1 = Vel Y >= 0
value = 5040
ctrl = 1

;---------------------------------------------------------------------------
; Multiple Hand Slaps of Fury
[Statedef 600]
type    = S                     
movetype= A                    
physics = N                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 600                       
poweradd = 100                   
sprpriority = 2                 

[state 600,1]
type = playsnd
trigger1 = animelem = 1
value = 10,0

[state 600,2]
type = varrandom
trigger1 = animelem = 1 || animelem = 3 || animelem = 6 || animelem = 8
persistent = 1
v = 5
range = 50,85

[State 1000, Poeira]
type = Explod
trigger1 = AnimElemTime(1) = 1
anim = 13
ID = 8400
postype = P1
pos = -90,0
sprpriority = 3
ownpal = 1
supermovetime = 40
scale = 0.5, 0.5

[state 600,4]
type = velset
trigger1 = time = 2
x = 5

[state 600,5]
type = velset
trigger1 = animelem = 11
x = 0

[State 600,6]
type = HitDef
trigger1 = animelem = 2 || animelem = 4 || animelem = 7
attr = S, NA                   
damage = 30 , 3                 
animtype = Hard              
guardflag = MA                  
hitflag = MAF                   
priority = 3, Hit              
pausetime = 2, 2               
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
sparkno = 8880
sparkxy = -10, -(var(5))             
ground.type = High
ground.slidetime = 12             
ground.hittime  = 12            
ground.velocity = -4            
airguard.velocity = -1.9,-.8   
air.type = low                 
air.velocity = -2,-2         
air.hittime = 12                

[State 600,7]
type = HitDef
trigger1 = animelem = 9
attr = S, NA
animtype  = hard
damage    = 50, 10
guardflag = MA
pausetime = 2,2
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
sparkno = 8880
sparkxy = -10, -(var(5))
ground.type = Low
ground.slidetime = 15
ground.hittime  = 27
ground.velocity = -10,-14
air.velocity = -10,-14
p2stateno = 45434

[State 600,12]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Not So Grand 3rd Place Jump (weak - start)
[Statedef 650]
type    = S                     
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 650                       
poweradd = 100                   
sprpriority = 2                 

[State 1000, Poeira]
type = Explod
trigger1 = AnimElemTime(1) = 1
anim = 13
ID = 8400
postype = P1
pos = -90,0
sprpriority = 3
ownpal = 1
supermovetime = 40
scale = 0.5, 0.5

[State 650,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 651
;---------------------------------------------------------------------------
; Not So Grand 3rd Place Jump (weak - rising)
[Statedef 651]
type    = A                     
movetype= A                    
physics = N                     
juggle  = 0                     
velset = 0,0                    
ctrl = 0                      
anim = 651                       
poweradd = 0                   
sprpriority = 2                 

[state 651,1]
type = playsnd
trigger1 = animelem = 1
value = 10,2

[state 651,2]
type = velset
trigger1 = time = 1
x = 6
y = -8

[state 651,3]
type = velset
trigger1 = time = 2
x = 11
y = -15

[state 651,4]
type = velset
trigger1 = time = 3 || time = 4
x = 5
y = -6

[state 651,5]
type = velset
trigger1 = time = 5
x = 4
y = -6

[state 651,6]
type = velset
trigger1 = time = 6
x = 4
y = -5

[state 651,7]
type = velset
trigger1 = time = 7
x = 4
y = -4

[state 651,8]
type = velset
trigger1 = time = 8
x = 7
y = -8

[state 651,9]
type = velset
trigger1 = time = 9
x = 3
y = -3

[state 651,10]
type = velset
trigger1 = time = 10 || time = 12
x = 2
y = -2

[state 651,11]
type = velset
trigger1 = time = 13
x = 1
y = -1

[State 651,12]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = hard
damage    = 75, 7
guardflag = MA
pausetime = 9,9
sparkno = 8880
sparkxy = -10,-70
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
ground.type = Low
ground.slidetime = 15
ground.hittime  = 27
ground.velocity = -7,-11
air.velocity = -7,-11
p2stateno = 45435

[State 651,14]
type = ChangeState
trigger1 = AnimTime = 0
value = 652

;---------------------------------------------------------------------------
; Not So Grand 3rd Place Jump (falling)
[Statedef 652]
type    = A                     
physics = N                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 654                       
poweradd = 0                   
sprpriority = 2                 

[state 652,1]
type = gravity
trigger1 = time >= 0

[State 652,2]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 653

;---------------------------------------------------------------------------
; Not So Grand 3rd Place Jump (land)
[Statedef 653]
type    = S                     
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 655                       
poweradd = 0                   
sprpriority = 2                 

[state 653,1]
type = posset
trigger1 = time = 0
y = 0

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

;---------------------------------------------------------------------------
; Not So Grand 3rd Place Jump (medium - start)
[Statedef 660]
type    = S                     
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 650                       
poweradd = 100                   
sprpriority = 2                 

[State 1000, Poeira]
type = Explod
trigger1 = AnimElemTime(1) = 1
anim = 13
ID = 8400
postype = P1
pos = -90,0
sprpriority = 3
ownpal = 1
supermovetime = 40
scale = 0.5, 0.5

[State 660,3]
type = ChangeState
trigger1 = AnimTime = 0
value = 661

;---------------------------------------------------------------------------
; Not So Grand 3rd Place Jump (medium - rising)
[Statedef 661]
type    = A                     
movetype= A                    
physics = N                     
juggle  = 0                     
velset = 0,0                    
ctrl = 0                      
anim = 652                       
poweradd = 0                   
sprpriority = 2                 

[state 652,1]
type = playsnd
trigger1 = animelem = 1
value = 10,2

[State 652,2]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = hard
damage    = 85, 9
guardflag = MA
pausetime = 9,9
sparkno = 8880
sparkxy = -10,-70
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
ground.type = Low
ground.slidetime = 15
ground.hittime  = 37
ground.velocity = -10,-14
air.velocity = -10,-14
p2stateno = 45436

[state 652,4]
type = velset
trigger1 = time = 1
x = 8
y = -12

[state 652,5]
type = velset
trigger1 = time = 2
x = 7
y = -12

[state 652,6]
type = velset
trigger1 = time = 3
x = 8
y = -11

[state 652,7]
type = velset
trigger1 = time = 4
x = 7
y = -10

[state 652,8]
type = velset
trigger1 = time = 5
x = 13
y = -20

[state 652,9]
type = velset
trigger1 = time = 6
x = 6
y = -9

[state 652,10]
type = velset
trigger1 = time = 7
x = 6
y = -8

[state 652,11]
type = velset
trigger1 = time = 8
x = 5
y = -8

[state 652,12]
type = velset
trigger1 = time = 9
x = 6
y = -8

[state 652,13]
type = velset
trigger1 = time = 10
x = 4
y = -13

[state 652,14]
type = velset
trigger1 = time = 11
x = 9
y = -6

[state 652,15]
type = velset
trigger1 = time = 12
x = 4
y = -6

[state 652,16]
type = velset
trigger1 = time = 13
x = 4
y = -5

[state 652,17]
type = velset
trigger1 = time = 14
x = 3
y = -4

[state 652,18]
type = velset
trigger1 = time = 15
x = 3
y = -4

[state 652,19]
type = velset
trigger1 = time = 16
x = 3
y = -8

[state 652,20]
type = velset
trigger1 = time = 17
x = 4
y = -1

[state 652,21]
type = velset
trigger1 = time = 18
x = 2
y = -2

[state 652,22]
type = velset
trigger1 = time = 19
x = 1
y = -2

[state 652,23]
type = velset
trigger1 = time = 20
x = 2
y = -1

[State 652,24]
type = ChangeState
trigger1 = AnimTime = 0
value = 652

;---------------------------------------------------------------------------
; Not So Grand 3rd Place Jump (fierce - start)
[Statedef 670]
type    = S                     
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 650                       
poweradd = 100                   
sprpriority = 2                 

[State 1000, Poeira]
type = Explod
trigger1 = AnimElemTime(1) = 1
anim = 13
ID = 8400
postype = P1
pos = -90,0
sprpriority = 3
ownpal = 1
supermovetime = 40
scale = 0.5, 0.5

[State 670,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 671

;---------------------------------------------------------------------------
; Not So Grand 3rd Place Jump (fierce - rising)
[Statedef 671]
type    = A                     
movetype= A                    
physics = N                     
juggle  = 0                     
velset = 0,0                    
ctrl = 0                      
anim = 653                       
poweradd = 0                   
sprpriority = 2                 

[state 671,1]
type = playsnd
trigger1 = animelem = 1
value = 10,3

[State 671,2]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = hard
damage    = 95, 11
guardflag = MA
pausetime = 9,9
sparkno = 8880
sparkxy = -10,-70
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
accel = 0.5
ground.type = Low
ground.slidetime = 15
ground.hittime  = 47
ground.velocity = -13,-17
air.velocity = -13,-17
p2stateno = 45434

[state 671,4]
type = velset
trigger1 = time = 1
x = 20
y = -16

[state 671,5]
type = velset
trigger1 = time = 2
x = 9
y = -31

[state 671,6]
type = velset
trigger1 = time = 3 || time = 4 || time = 5
x = 9
y = -14

[state 671,7]
type = velset
trigger1 = time = 6
x = 7
y = -12

[state 671,8]
type = velset
trigger1 = time = 7
x = 6
y = -21

[state 671,9]
type = velset
trigger1 = time = 8
x = 7
y = -15

[state 671,10]
type = velset
trigger1 = time = 9
x = 7
y = -11

[state 671,11]
type = velset
trigger1 = time = 10
x = 7
y = -10

[state 671,12]
type = velset
trigger1 = time = 11 || time = 12
x = 6
y = -10

[state 671,13]
type = velset
trigger1 = time = 13
x = 11
y = -18

[state 671,14]
type = velset
trigger1 = time = 14
x = 5
y = -7

[state 671,15]
type = velset
trigger1 = time = 15
x = 4
y = -8

[state 671,16]
type = velset
trigger1 = time = 16
x = 5
y = -7

[state 671,17]
type = velset
trigger1 = time = 17 || time = 18
x = 4
y = -6

[state 671,18]
type = velset
trigger1 = time = 19
x = 6
y = -12

[state 671,19]
type = velset
trigger1 = time = 20
x = 3
y = -3

[state 671,20]
type = velset
trigger1 = time = 21
x = 2
y = -4

[state 671,21]
type = velset
trigger1 = time = 22
x = 3
y = -4

[state 671,22]
type = velset
trigger1 = time = 23
x = 2
y = -3

[state 671,23]
type = velset
trigger1 = time = 24
x = 1
y = -2

[state 671,24]
type = velset
trigger1 = time = 25
x = 2
y = -5

[state 671,25]
type = velset
trigger1 = time = 26
x = 1
y = -1

[State 671,26]
type = ChangeState
trigger1 = AnimTime = 0
value = 652

;----------------------------------------------------------------------
;Headbutt Throw Attempt
[Statedef 699]
type = S
movetype = A
physics = S
velset = 0,0
anim = 699
ctrl = 0

[State -2, Throw Sound]
type = PlaySnd
trigger1 = Time = 0
value = 800,0
volume = 255

[State 699,1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
priority = 5, hit
sparkno = 10010
p1stateno = 700
p2stateno = 702
p2facing = 1

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

;---------------------------------------------------------------------------
;Headbutt Throw Success 
[Statedef 700]
type = A
movetype = A
physics = N
anim = 700
velset = 0,0

[state 700,1]
type = velset
trigger1 = time = 11
x = 5
y = -2

[state 700,2]
type = veladd
trigger1 = time >= 11
y = 0.2

[State 700,3]
type = ChangeState
trigger1 = animtime = 0
value = 701

;--------------------------------------------------------------------------
;Headbutt Throw Success cont
[Statedef 701]
type = A
movetype = A
physics = N
anim = 701
velset = 0,0

;[state 701,1]
;type = explod
;trigger1 = p2stateno = 703 && p2movetype = H
;persistent = 0
;anim = 52
;pos = -70,0
;postype = p2
;sprpriority = 5
;scale = 0.6,0.6
;velocity = 0, 0
;bindtime = 1
;ownpal = 1

[State 701,3]
type = Explod
trigger1 = animelem = 3 || animelem = 9 || animelem = 15
anim = 8880
postype = p1
pos = 30,-80
ownpal = 1
bindtime = 1
sprpriority = 5
persistent = 1
removeongethit = 1

[state 701,4]
type = playsnd
trigger1 = animelem = 3 || animelem = 9 || animelem = 15
persistent = 1
value = 500,3

[state 701,5]
type = playsnd
trigger1 = p2stateno = 703 && p2movetype = H
persistent = 0
value = 8,2

[state 701,6]
type = bindtotarget
trigger1 = time = 0 || time = 1
time = 52
pos = 0,-10

[State 701,7]
type = Envshake
trigger1 = animelem = 16
time = 15
freq = 70
ampl = -4

[State 801]
type = VarSet
trigger1 = Time = [0,10]
trigger1 = target, command = "x" 
trigger2 = target, command = "y" 
trigger3 = target, command = "z" 
trigger4 = target, command = "recovery" 
var(32) = 1

[State 801]
type = targetstate
TriggerAll = Time = 0
trigger1 = var(32) = 1
value = 897

[State 301, end]
type = changeState
triggerall = var(32) = 1
Trigger1 = Time = 0
value = 896
ctrl = 0

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

;----------------------------------------------------------------------
;Rubber Band Throw Attempt
[Statedef 749]
type = S
movetype = A
physics = N
velset = 0,0
anim = 699
ctrl = 0

[State -2, Throw Sound]
type = PlaySnd
trigger1 = Time = 0
value = 800,0
volume = 255

[State 749,1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
priority = 5, hit
sparkno = 10010
p1stateno = 750
p2stateno = 760
p2facing = 1

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

;-------------------------------------------------------------------------
;RB Throw Success 
[Statedef 750]
type = A
movetype = A
physics = N
anim = 750
velset = 0,0

[state 750,1]
type = velset
trigger1 = time = 11
x = 2.5
y = -1.5

[state 750,2]
type = veladd
trigger1 = time >= 11
y = 0.05

[State 750,3]
type = ChangeState
trigger1 = animtime = 0
value = 751

;----------------------------------------------------------------------
;Rubber Band Throw Attempt (air)
[Statedef 1749]
type = A
movetype = A
physics = A
velset = 0,0
anim = 699
ctrl = 0

[State 1749,1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
priority = 5, hit
hitsound = S5,7
sparkno = -1
p1stateno = 750
p2stateno = 760
p2facing = 1

[State 195,3]
type = Explod
trigger1 = animelem = 1
anim = 10010
id = 10010
postype = p1
pos = 50,20
bindtime = -1
sprpriority = 5
persistent = 0
removeongethit = 1

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

;-------------------------------------------------------------------------
;RB Throw Success cont
[Statedef 751]
type = A
movetype = A
physics = N
anim = 751
velset = 0,0

[state 751,1]
type = velset
trigger1 = time < 11
x = 0
y = 0

[state 751,2]
type = bindtotarget
trigger1 = time = 0
time = 10
pos = 0,-10

[State 751,3]
type = ChangeState
trigger1 = animtime = 0
value = 752

;---------------------------------------------------------------------------
; RB Throw Success (flying back)
[Statedef 752]
type    = A                     
physics = N                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 752                       
poweradd = 0                   
sprpriority = 5                 

[state 752,1]
type = playsnd
trigger1 = animelem = 1
channel = 6
value = 0,3

[State 752,2]
type = Explod
trigger1 = Time = 0
anim = 8880
postype = p1
pos = 56,-61
ownpal = 1
bindtime = 1
sprpriority = 5
persistent = 0
removeongethit = 1

[State 752,3]
type = Projectile
trigger1 = time = 0
projanim = 755
projremanim = 756
projremovetime = 13
offset = 56, -61
velocity = 0, 0
remvelocity = 15, -6
velmul = 1.00, 1
accel = 0, 0.0
projsprpriority = 4

[state 752,4]
type = velset
trigger1 = time = 0
x = -30

[State 752,5]
type = ChangeState
trigger1 = animtime = 0
value = 753

;---------------------------------------------------------------------------
; RB Throw Success (falling)
[Statedef 753]
type    = A                     
physics = N                     
velset = 0,0                    
ctrl = 0                      
anim = 753                       
poweradd = 0                   
sprpriority = 2                 

[state 753,1]
type = gravity
trigger1 = time >= 0

[State 753,2]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 754

;---------------------------------------------------------------------------
; RB Throw Success (land/recover)
[Statedef 754]
type    = S                     
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 754                       
poweradd = 0                   
sprpriority = 2                 

[state 754,1]
type = posset
trigger1 = time = 0
y = 0

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

;---------------------------------
;P1 THROW TECH HIT STATE
[Statedef 896]
type    = S
movetype= I 
physics = S
anim = 0
ctrl = 0

[State 896]
type = PlaySnd
trigger1 = time = 0
value = 4,17
;value = 4,16
volume = 200
channel = 0

[State 896]
type = EnvShake
trigger1 = time = 0
time = 20
ampl = -2

[State 896]
type = PalFX
trigger1 = Time = 0
trigger2 = Time = 10
time = 2
add = 50,50,50
mul = 300,300,300

[State 896]
type = Explod
Anim = 7050
trigger1 = Time = 0
postype = Left
pos = 160,240
bindtime = 1
removeTime = 20
sprpriority = -5
ownpal = 1

[State 896]
type = VarSet
trigger1 = Time = 0
var(32) = 0

[State 896]
type = ChangeState
trigger1 = Time = 30
value = 0
ctrl = 1
;---------------------------------
;P2 THROWN TECH HIT STATE
[Statedef 897]
type    = S
movetype= I 
physics = S
ctrl = 0

[State 897]
type = VelSet
trigger1 = time <= 5 
x = -10
y = -15

[State 897]
type = PosSet
trigger1 = time = 0 
y = 0

[State 897]
type = PalFX
trigger1 = Time = 0
trigger2 = Time = 10
time = 2
add = 50,50,50
mul = 300,300,300

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

[State 897]
type = VarSet
trigger1 = animtime = 0
v = 32
value = 0

[State 897]
type = SelfState
trigger1 = Time = 30
value = 0
ctrl = 1

;---------------------------------
;P2 THROWN TECH HIT State
[Statedef 898]
type    = S
movetype= I 
physics = S
ctrl = 0

[State 898]
type = VelSet
trigger1 = time <= 5 
x = 10
y = -15

[State 898]
type = PosSet
trigger1 = time = 0 
y = 0

[State 898]
type = PalFX
trigger1 = Time = 0
trigger2 = Time = 10
time = 2
add = 50,50,50
mul = 300,300,300

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

[State 898]
type = VarSet
trigger1 = animtime = 0
v = 32
value = 0

[State 898]
type = SelfState
trigger1 = Time = 30
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Ultimate Grand Champion Jump (start)
[Statedef 1000]
type    = S                     
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 1000                       
poweradd = -1000                   
sprpriority = 2                 

[State 1000, 4]
type = explod
trigger1 = time =4
anim = 1080
pos = -2,44
postype = back
under = 1
supermove = 1
bindtime = 15
removetime = 55
supermovetime = 55
scale = 1,1
ID = 9999
sprpriority = -10
ownpal = 1

[State 1000, 2]
type = DestroySelf
trigger1 = time =50

[State 1000,0]
type = ModifyExplod
trigger1 = time = [4,10]
ID = 9999
scale = 1.02- (.05*time), 1.018- (.05*time)
sprpriority = -10
under = 1

[State 1000, Poeira]
type = Explod
trigger1 = AnimElem = 1
anim = 13
ID = 8400
postype = P1
pos = -90,0
sprpriority = 3
ownpal = 1
supermovetime = 40
scale = 0.5, 0.5

[State 1000, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(1) = 1
Time = 60
pos = 9999,-9951
poweradd = -1000
movetime = 40

[State 1000];super fundo helper
type = helper 
stateno = 8500; helper 
trigger1 = time > 43 && numhelper(8500)=0
pos = 0,0
postype = left
ID=8500
ownpal = 1
name = "super-fundo"
sprpriority = -5

[State 1000, Hyper Spark]
type = Explod
trigger1 = AnimElemTime(1) = 3
anim = 8
postype = p1
scale = 0.5, 0.5
pos = 5,-41
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 1000, BGPalFX]
type = BGPalFX
trigger1 = AnimElem = 1, = 0
time = 65
add = -255,-255,-255

[State 1000, som]
type = PlaySnd
trigger1 = AnimElemTime(1) = 1
value = 20,0

[state 1000,6]
type = playsnd
trigger1 = time = 10
value = 25,2

[State 1000,7]
type = Explod
trigger1 = animelem = 5
anim = 461
pos = 0, 0
postype = p1
removetime = -2
ignorehitpause = 1
bindtime = 1
persistent = 0
sprpriority = 4
ownpal = 1

[State 1000,8]
type = ChangeState
trigger1 = AnimTime = 0
value = 1001

;---------------------------------------------------------------------------
; Ultimate Grand Champion Jump (rising)
[Statedef 1001]
type    = A                     
movetype= A                    
physics = N                    
juggle  = 0                     
velset = 0,0                    
ctrl = 0                      
anim = 1001                       
poweradd = 0                   
sprpriority = 2                 

[state 1001,3]
type = hitadd
trigger1 = movehit = 1
value = 1
persistent = 0

[state 1001,4]
type = playsnd
trigger1 = time = 1
value = 25,3

[State 1001,5]
type = HitDef
trigger1 = time % 3 = 0 && hitcount < 8 
attr = S, NA
animtype  = hard
damage    = 50, 11
guardflag = MA
pausetime = 3,3
sparkno = 8880
sparkxy = -10, -70
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
yaccel = 0.5
ground.type = Low
ground.slidetime = 15
ground.hittime  = 47
ground.velocity = -5,-13 
air.velocity = -5,-13
getpower = 0

[state 1001,6]
type = posadd
triggerall = movehit = 1 && hitcount = 8
trigger1 = facing = 1 && screenPos x = [260, 320]
trigger2 = facing = -1 && screenPos x = [0, 60]
x = -60

[state 1001,7]
type = velset
triggerall = movehit = 1 && hitcount = 8
trigger1 = facing = 1 && screenPos x = [260, 320]
trigger2 = facing = -1 && screenPos x = [0, 60]
x = 0

[State 1001,8]
type = playerpush
trigger1 = AnimElem = 1, >= 0 && AnimElem = 9, < 0 && movehit = 1
value = 0

[State 1001,9]
type = TargetBind
trigger1 = AnimElem = 1, >= 0 && AnimElem = 9, < 0 && movehit = 1
postype = p1
pos = 15,-20

[state 1001,11]
type = velset
trigger1 = time = 1
x = 20
y = -16

[state 1001,12]
type = velset
trigger1 = time = 2
x = 9
y = -31

[state 1001,13]
type = velset
trigger1 = time = 3 || time = 4 || time = 5
x = 9
y = -14

[state 1001,14]
type = velset
trigger1 = time = 6
x = 7
y = -12

[state 1001,15]
type = velset
trigger1 = time = 7
x = 6
y = -21

[state 1001,16]
type = velset
trigger1 = time = 8
x = 7
y = -15

[state 1001,17]
type = velset
trigger1 = time = 9
x = 7
y = -11

[state 1001,18]
type = velset
trigger1 = time = 10
x = 7
y = -10

[state 1001,19]
type = velset
trigger1 = time = 11 || time = 12
x = 6
y = -10

[state 1001,20]
type = velset
trigger1 = time = 13
x = 11
y = -18

[state 1001,21]
type = velset
trigger1 = time = 14
x = 5
y = -7

[state 1001,22]
type = velset
trigger1 = time = 15
x = 4
y = -8

[state 1001,23]
type = velset
trigger1 = time = 16
x = 5
y = -7

[state 1001,24]
type = velset
trigger1 = time = 17 || time = 18
x = 4
y = -6

[state 1001,25]
type = velset
trigger1 = time = 19
x = 6
y = -12

[state 1001,26]
type = velset
trigger1 = time = 20
x = 3
y = -3

[state 1001,27]
type = velset
trigger1 = time = 21
x = 2
y = -4

[state 1001,28]
type = velset
trigger1 = time = 22
x = 3
y = -4

[state 1001,29]
type = velset
trigger1 = time = 23
x = 2
y = -3

[state 1001,30]
type = velset
trigger1 = time = 24
x = 1
y = -2

[state 1001,31]
type = velset
trigger1 = time = 25
x = 2
y = -5

[state 1001,32]
type = velset
trigger1 = time = 26
x = 1
y = -1

[State 1001,33]
type = explod
trigger1 = numexplod(4000) = 0 && p2life = 0 && winko = 1
anim = 4000
id = 4000
ignorehitpause = 1
removetime = 88
bindtime = -1
postype = back
persistent = 0
pos = 160,120
sprpriority = -5

[State 1001,34]
type = explod
trigger1 = numexplod(4001) = 0 && p2life = 0 && winko = 1
anim = 4001
id = 4001
ignorehitpause = 1
removetime = 88
bindtime = -1
postype = back
persistent = 0
pos = 159,119
sprpriority = -5

[State 1001,35]
type = ChangeState
trigger1 = AnimTime = 0
value = 652

;---------------------------------------------------------------------------
; Hyper Strong Micacle Treasure
[Statedef 1050]
type    = S                     
movetype= A                    
physics = S                     
juggle  = 0                     
velset = 0,0                    
ctrl = 0                      
anim = 1050                       
poweradd = -1000                   
sprpriority = 2                 

[State 3000]
type = helper 
stateno = 85900
trigger1 = animelem =7
pos = 0,0
postype = p1
ID=85900
ownpal = 1
name = "Norimaro Hyper Portait"
sprpriority = -10

[State 3000, Poeira]
type = Explod
trigger1 = AnimElem = 4
anim = 13
ID = 8400
postype = P1
pos = -90,0
sprpriority = 3
ownpal = 1
supermovetime = 40
scale = 0.5, 0.5

[State 3000, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(10) = 1
Time = 60
pos = 9999,-9951
poweradd = -1000
movetime = 40

[State 3000];super fundo helper
type = helper 
stateno = 8500; helper 
trigger1 = time > 74 && numhelper(8500)=0
pos = 0,0
postype = left
ID=8500
ownpal = 1
name = "super-fundo"
sprpriority = -5

[State 3000, Hyper Spark]
type = Explod
trigger1 = AnimElemTime(10) = 3
anim = 8
postype = p1
scale = 0.5, 0.5
pos = 2,-37
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, BGPalFX]
type = BGPalFX
trigger1 = AnimElem = 9, = 0
time = 74
add = -255,-255,-255

[State 3000, som]
type = PlaySnd
trigger1 = AnimElemTime(10) = 1
value = 20,0

[state 1050,6]
type = playsnd
trigger1 = AnimElem = 5
channel = 0
volume = 255
value = 25,0

[state 1050,7]
type = playsnd
trigger1 = AnimElem = 13
channel = 0
volume = 5
value = 25,1

[state 1050,8]
type = playsnd
trigger1 = animelem = 39
channel = 0
volume = 5
value = 18,0

[state 1050,10]
type = varrandom
trigger1 = time % 2 = 0
persistent = 1
v = 4
range = 501,510

[state 1050,11]
type = varrandom
trigger1 = time % 2 = 0
persistent = 1
v = 4
range = 501,510

[state 1050,12]
type = varrandom
trigger1 = time % 2 = 0
persistent = 1
v = 5
range = 0,40

[state 1050,13]
type = varrandom
trigger1 = time % 2 = 0
persistent = 1
v = 6
range = -70,-40

[State 1050,15]
type = Projectile
trigger1 = time = [72, 143]
trigger1 = time % 7 = 5
offset = var(5), var(6)
projid = 500
projanim = var(4)
projhitanim = -1
velocity = 7,-2
projheightbound = -480, 0
projedgebound = 2000
projscreenbound = 2000
accel = 0, 0.15
attr = S, SP
animtype = Hard
damage = 20,1
hitflag = MAF
guardflag = MA
pausetime = 0,0
sparkno = 8880
sparkxy = 0, 0
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
ground.type = Low
ground.slidetime = 20
guard.sparkno = S449
ground.hittime = 20
ground.velocity = -2, -3
guard.velocity = -3
air.velocity = -2, -3
airguard.velocity = -5,1
p2stateno = 1051
fall = 1
p2facing = 1
getpower = 0

[State 1050,16]
type = Projectile
trigger1 = time = [72, 143]
trigger1 = time % 7 = 6
offset = var(5), var(6)
projid = 500
projanim = var(4)
projhitanim = -1
velocity = 7,-3.25
projheightbound = -480, 0
projedgebound = 2000
projscreenbound = 2000
accel = 0, 0.15
attr = S, SP
animtype = Hard
damage = 20,1
hitflag = MAF
guardflag = MA
pausetime = 0,0
sparkno = 8880
sparkxy = 0, 0
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
guard.sparkno = S449
ground.velocity = -2, -3
guard.velocity = -3
air.velocity = -2, -2
airguard.velocity = -5,1
p2stateno = 1051
fall = 1
p2facing = 1
getpower = 0

[State 1050,17]
type = Projectile
trigger1 = time = [72, 143]
trigger1 = time % 7 = 7
offset = var(5), var(6)
projid = 500
projanim = var(4)
projhitanim = -1
velocity = 7,-4.5
projheightbound = -480, 0
projedgebound = 2000
projscreenbound = 2000
accel = 0, 0.15
attr = S, SP
animtype = Hard
damage = 20,1
hitflag = MAF
guardflag = MA
pausetime = 0,0
sparkno = 8880
sparkxy = 0, 0
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
ground.type = Low
guard.sparkno = S449
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -2, -3
guard.velocity = -3
air.velocity = -2, -1.5
airguard.velocity = -5,1
p2stateno = 1051
fall = 1
p2facing = 1
getpower = 0

[State 1050,18]
type = explod
trigger1 = numexplod(4000) = 0 && p2life = 0 && winko = 1
anim = 4000
id = 4000
ignorehitpause = 1
removetime = 88
bindtime = -1
postype = back
persistent = 0
pos = 160,120
sprpriority = -5

[State 1050,19]
type = explod
trigger1 = numexplod(4001) = 0 && p2life = 0 && winko = 1
anim = 4001
id = 4001
ignorehitpause = 1
removetime = 88
bindtime = -1
postype = back
persistent = 0
pos = 159,119
sprpriority = -5

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

;---------------------------------------------------------------------------
; Hit by HSMT
[Statedef 1051]
type    = A                     
movetype= H                    
physics = N                     
ctrl = 0                      
sprpriority = 2                 

[state 1051,1]
type = changeanim2
trigger1 = time = 0
value = 1051

[state 1051,2]
type = velset
trigger1 = time = 0
x = -3
y = -3

[state 1051,3]
type = veladd
trigger1 = time >= 0
y = 0.5

[State 1051,4]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5100
ctrl = 1

;---------------------------------------------------------------------------
; Ultra Variety Private Memories (start)
[Statedef 1070]
type    = S                     
movetype= I                    
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 1070                       
poweradd = -1000                   
sprpriority = 2                 

[State 3000]
type = helper 
stateno = 85900
trigger1 = time =6
pos = 0,0
postype = p1
ID=85900
ownpal = 1
name = "Norimaro Hyper Portait"
sprpriority = -10

[State 3000];super fundo helper
type = helper 
stateno = 8500; helper 
trigger1 = time > 59 && numhelper(8500)=0
pos = 0,0
postype = left
ID=8500
ownpal = 1
name = "super-fundo"
sprpriority = -5

[State 3000, Poeira]
type = Explod
trigger1 = AnimElem = 2
anim = 13
ID = 8400
postype = P1
pos = -90,0
sprpriority = 3
ownpal = 1
supermovetime = 40
scale = 0.5, 0.5

[State 3000, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(9) = 1
Time = 60
pos = 9999,-9951
poweradd = -1000
movetime = 40

[State 3000, Hyper Spark]
type = Explod
trigger1 = AnimElemTime(9) = 3
anim = 8
postype = p1
scale = 0.5, 0.5
pos = 5,-71
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, BGPalFX]
type = BGPalFX
trigger1 = AnimElem = 8, = 0
time = 64
add = -255,-255,-255

[State 3000, som]
type = PlaySnd
trigger1 = AnimElemTime(9) = 1
value = 20,0

[state 1070,5]
type = playsnd
trigger1 = animelem = 9
channel = 0
value = 25,4

[State 1070,6]
type = ChangeState
trigger1 = AnimTime = 0
value = 1071

;---------------------------------------------------------------------------
; UVPM (running forward)
[Statedef 1071]
type    = S
movetype = A
physics = N
anim = 1071
sprpriority = 1

[state 1071,2]
type = playsnd
trigger1 = animelem = 1
channel = 0
value = 25,5

[State 1071,3]
type = HitDef
trigger1 = time = 0
attr = S, NA                   
damage = 0 , 0                 
animtype = Light              
guardflag = MA                  
hitflag = MAF                   
priority = 3, Hit              
pausetime = 12, 12              
sparkno = 8880
sparkxy = -10, -76             
hitsound = 5,2
guardsound = 6,0
guard.sparkno = 3
ground.type = High
ground.slidetime = 12             
ground.hittime  = 12            
ground.velocity = -6            
airguard.velocity = -1.9,-.8   
air.type = High                 
air.velocity = -3.3,-4.4         
air.hittime = 12
p1stateno = 1072
p2stateno = 1075
p2facing = 1
getpower = 0

[State 1071,4]
type = VelSet
trigger1 = time = 1
x = 0

[State 1071,5]
type = VelSet
trigger1 = time = 2
x = 9

[State 1071,6]
type = VelSet
trigger1 = time >= 3 && time < 8
x = 8

[State 1071,7]
type = VelSet
trigger1 = time >= 8 && time < 14
x = 7

[State 1071,8]
type = VelSet
trigger1 = time >= 14 && time < 18
x = 6

[State 1071,9]
type = VelSet
trigger1 = time >= 18 && time < 22
x = 5

[State 1071,10]
type = VelSet
trigger1 = time >= 22 && time < 28
x = 4

[State 1071,11]
type = VelSet
trigger1 = time >= 28 && time < 31
x = 3

[State 1071,12]
type = VelSet
trigger1 = time >= 31 && time < 34
x = 2

[State 1071,13]
type = VelSet
trigger1 = time >= 34 && time < 39
x = 1

[State 1071,14]
type = VelSet
trigger1 = time >= 39
x = 0

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

;---------------------------------------------------------------------------
; Ultra Variety Private Memories (SUCCESS)
[Statedef 1072]
type    = S                     
movetype= A                    
physics = S                     
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
anim = 1072                       
poweradd = 0                   
sprpriority = 2                 

[state 1072,1]
type = hitadd
trigger1 = time % 7 = 0 && hitcount < 20
value = 1

[state 1072,2]
type = playsnd
trigger1 = time % 9 = 0 && hitcount < 20
value = 500,2

[state 1072,3]
type = playsnd
trigger1 = p2stateno = 1075 && p2movetype = H
persistent = 0
value = 500,2

[State 1072,4]
type = playerpush
trigger1 = AnimElem = 1, >= 0
value = 0

[state 1072,5]
type = targetbind
trigger1 = time < 147
pos = 40,0

[state 1072,6]
type = explod
trigger1 = time % 14 = 0
trigger1 = time < 148
persistent = 1
anim = 8880
pos = 40,-40
postype = p1
supermove = 1
sprpriority = 5
removeonhit = 1
ontop = 1
bindtime = -1
ownpal = 1

[state 1072,7]
type = explod
trigger1 = time % 14 = 7
trigger1 = time < 148
persistent = 1
anim = 8880
pos = 40,-70
postype = p1
supermove = 1
sprpriority = 5
removeonhit = 1
ontop = 1
bindtime = -1
ownpal = 1

[state 1072,8]
type = explod
trigger1 = time = 158;151
persistent = 0
anim = 20005
pos = 0,0
postype = p1
supermove = 1
sprpriority = -5
removeonhit = 1
scale = 0.75, 0.75
bindtime = -1
ownpal = 1

[state 1072,9]
type = explod
trigger1 = time = 158 && facing = 1
persistent = 0
anim = 462
pos = -1,-70
postype = p1
supermove = 1
sprpriority = 1
removeonhit = 1
bindtime = -1
ownpal = 1

[state 1072,10]
type = explod
trigger1 = time = 158 && facing = -1
persistent = 0
anim = 463
pos = -1,-70
postype = p1
supermove = 1
sprpriority = 1
removeonhit = 1
bindtime = -1
ownpal = 1

[state 1072,14]
type = playsnd
trigger1 = time = 151
channel = 0
value = 25,6

[state 1072,15]
type = velset
triggerall = time = 148
trigger1 = facing = 1 && screenPos x = [240, 320]
trigger2 = facing = -1 && screenPos x = [0, 80]
x = -20

[state 1072,16]
type = velset
triggerall = time = 148
trigger1 = facing = 1 && screenPos x = [220, 240]
trigger2 = facing = -1 && screenPos x = [80, 100]
x = -15

[state 1072,17]
type = velset
triggerall = time = 148
trigger1 = facing = 1 && screenPos x = [200, 220]
trigger2 = facing = -1 && screenPos x = [100, 120]
x = -10

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

;---------------------------------------------------------------------------
; UVPM (hit by)
[Statedef 1075]
type = S
movetype = H
physics = N
velset = 0

[state 1075,1]
type = posset
trigger1 = time >= 0
y = 0

[state 1075,2]
type = statetypeset
trigger1 = time >= 0
value = S

[state 1075,3]
type = velset
trigger1 = time >= 0
x = 0
y = 0

[state 1075,4]
type = lifeadd
trigger1 = time % 7 = 0
persistent = 1
kill = 0
value = -12

[state 1075,5]
type = lifeadd
trigger1 = time = 147
persistent = 0
kill = 1
value = -20

[State 1075,6]
type = ChangeAnim2
trigger1 = time = 0
value = 1075

[State 1075,7]
type = ChangeState
trigger1 = animTime = 0
value = 1076

;---------------------------------------------------------------------------
; UVPM (hit by) 2
[Statedef 1076]
type    = A                     
physics = N                     
juggle  = 1                     
velset = -7,-12                    
ctrl = 0                      
poweradd = 0                   
sprpriority = -5                 

[state 1076,1]
type = veladd
trigger1 = time >= 0
y = 0.50

[state 1076,2]
type = changeanim2
trigger1 = time = 0
value = 1076

[State 1076,3]
type = selfState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
; Hyper Strong Micacle Treasure (level 2)
[Statedef 10450]
type    = S                     
movetype= A                    
physics = S                     
juggle  = 0                     
velset = 0,0                    
ctrl = 0                      
anim = 1061                       
poweradd = -1000                   
sprpriority = 2                 

[State 1000, 4]
type = explod
trigger1 = time =4
anim = 1080
pos = -2,44
postype = back
under = 1
supermove = 1
bindtime = 15
removetime = 55
supermovetime = 55
scale = 1,1
ID = 9999
sprpriority = -10
ownpal = 1

[State 1000, 2]
type = DestroySelf
trigger1 = time =50

[State 1000,0]
type = ModifyExplod
trigger1 = time = [4,10]
ID = 9999
scale = 1.02- (.05*time), 1.018- (.05*time)
sprpriority = -10
under = 1

[State 3000, Poeira]
type = Explod
trigger1 = AnimElem = 1
anim = 13
ID = 8400
postype = P1
pos = -90,0
sprpriority = 3
ownpal = 1
supermovetime = 40
scale = 0.5, 0.5

[State 3000, SuperPause]
type = SuperPause
trigger1 = AnimElem = 1
Time = 60
pos = 9999,-9951
poweradd = -1000
movetime = 40

[State 3000];super fundo (level 2) helper
type = helper 
stateno = 85500; helper 
trigger1 = time > 1 && numhelper(8500)=0
pos = 0,0
postype = left
ID=8500
ownpal = 1
name = "super-fundo"
sprpriority = -5

[State 3000, Hyper Spark]
type = Explod
trigger1 = AnimElem = 1
anim = 8
postype = p1
scale = 0.5, 0.5
pos = 2,-37
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 3000, BGPalFX]
type = BGPalFX
trigger1 = AnimElem = 1
time = 74
add = -255,-255,-255

[State 3000, som]
type = PlaySnd
trigger1 = AnimElem = 1
value = 22,0

[state 1050,6]
type = playsnd
trigger1 = AnimElem = 1
channel = 0
volume = 255
value = 10,2

[state 1050,7]
type = playsnd
trigger1 = AnimElem = 3
channel = 0
volume = 5
value = 25,1

[state 1050,8]
type = playsnd
trigger1 = animelem = 30
channel = 0
volume = 5
value = 18,0

[state 1050,10]
type = varrandom
trigger1 = time % 2 = 0
persistent = 1
v = 4
range = 501,510

[state 1050,11]
type = varrandom
trigger1 = time % 2 = 0
persistent = 1
v = 4
range = 501,510

[state 1050,12]
type = varrandom
trigger1 = time % 2 = 0
persistent = 1
v = 5
range = 0,40

[state 1050,13]
type = varrandom
trigger1 = time % 2 = 0
persistent = 1
v = 6
range = -70,-40

[State 1050,15]
type = Projectile
trigger1 = time = [43, 100]
trigger1 = time % 7 = 5
offset = var(5), var(6)
projid = 500
projanim = var(4)
projhitanim = -1
velocity = 7,-2
projheightbound = -480, 0
projedgebound = 2000
projscreenbound = 2000
accel = 0, 0.15
attr = S, SP
animtype = Hard
damage = 20,1
hitflag = MAF
guardflag = MA
pausetime = 0,0
sparkno = 8880
sparkxy = 0, 0
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
ground.type = Low
ground.slidetime = 20
guard.sparkno = S449
ground.hittime = 20
ground.velocity = -2, -3
guard.velocity = -3
air.velocity = -2, -3
airguard.velocity = -5,1
p2stateno = 1051
fall = 1
p2facing = 1
getpower = 0

[State 1050,16]
type = Projectile
trigger1 = time = [43, 100]
trigger1 = time % 7 = 6
offset = var(5), var(6)
projid = 500
projanim = var(4)
projhitanim = -1
velocity = 7,-3.25
projheightbound = -480, 0
projedgebound = 2000
projscreenbound = 2000
accel = 0, 0.15
attr = S, SP
animtype = Hard
damage = 20,1
hitflag = MAF
guardflag = MA
pausetime = 0,0
sparkno = 8880
sparkxy = 0, 0
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
guard.sparkno = S449
ground.velocity = -2, -3
guard.velocity = -3
air.velocity = -2, -2
airguard.velocity = -5,1
p2stateno = 1051
fall = 1
p2facing = 1
getpower = 0

[State 1050,17]
type = Projectile
trigger1 = time = [43, 100]
trigger1 = time % 7 = 7
offset = var(5), var(6)
projid = 500
projanim = var(4)
projhitanim = -1
velocity = 7,-4.5
projheightbound = -480, 0
projedgebound = 2000
projscreenbound = 2000
accel = 0, 0.15
attr = S, SP
animtype = Hard
damage = 20,1
hitflag = MAF
guardflag = MA
pausetime = 0,0
sparkno = 8880
sparkxy = 0, 0
hitsound = 5, 3
guardsound = 6, 0
guard.sparkno = 3
ground.type = Low
guard.sparkno = S449
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -2, -3
guard.velocity = -3
air.velocity = -2, -1.5
airguard.velocity = -5,1
p2stateno = 1051
fall = 1
p2facing = 1
getpower = 0

[State 1050,18]
type = explod
trigger1 = numexplod(4000) = 0 && p2life = 0 && winko = 1
anim = 4000
id = 4000
ignorehitpause = 1
removetime = 88
bindtime = -1
postype = back
persistent = 0
pos = 160,120
sprpriority = -5

[State 1050,19]
type = explod
trigger1 = numexplod(4001) = 0 && p2life = 0 && winko = 1
anim = 4001
id = 4001
ignorehitpause = 1
removetime = 88
bindtime = -1
postype = back
persistent = 0
pos = 159,119
sprpriority = -5

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

;----------------------------------------------------------------------
; Recovery Roll 
[Statedef 1100]
type    = C      
movetype= I
physics = N
poweradd= 0
velset = 10.5,0   
ctrl = 0
anim = 888000
sprpriority = -1

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

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

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

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

[State 1100,5] 
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

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

;---------------------------------------------------------------------------
; Waiting off screen after aerial rave
[Statedef 710]
type    = S                     
physics = S                     
juggle  = 0                     
velset = 0,0                    
ctrl = 0                      
anim = 0                       
poweradd = 0                   
sprpriority = 2                 

[state 710,1]
type = nothitby
trigger1 = 1
value = SCA, AA, AP, AT, NA, NP, NT, SA, SP, ST, HA, HP, HT
time = 2
ignorehitpause = 1

[state 710,2]
type = assertspecial
trigger1 = 1
flag = invisible

[state 710,3]
type = posset
trigger1 = facing = 1
x = -200
y = 0

[state 710,4]
type = posset
trigger1 = facing = -1
x = 200
y = 0

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

[State 710,6]
type = ChangeState
trigger1 = Time = 20
value = 100

;---------------------------------------------------------------------------
; Hit by Standing Fierce
[Statedef 211]
type    = A                     
movetype= H                    
physics = N                     
ctrl = 0                      
sprpriority = 2                 

[state 211,1]
type = turn
trigger1 = p2dist x < 0

[state 211,2]
type = nothitby
trigger1 = time >= 0
value = SCA

[state 211,3]
type = velset
trigger1 = time = 0
x = 0
y = 0

[state 211,4]
type = changeanim2
trigger1 = time = 0
value = 211

[state 211,5]
type = velset
trigger1 = time = 9
x = -9
y = -6

[state 211,6]
type = veladd
trigger1 = time >= 9
y = 0.6

[State 211,7]
type = ChangeState
triggerall = alive = 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5100

[State 211,8]
type = ChangeState
triggerall = alive = 1
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 212

;---------------------------------------------------------------------------
; Hit by Standing Fierce (hit the ground)
[Statedef 212]
type    = A                     
movetype= H                    
physics = N                     
ctrl = 0                      
sprpriority = 2                 

[state 212,1]
type = posset
trigger1 = time = 0
y = 0

[state 212,2]
type = nothitby
trigger1 = time >= 0
value = SCA

[state 212,3]
type = changeanim2
trigger1 = time = 0
value = 212

[state 212,4]
type = velset
trigger1 = time >= 0
x = 0
y = 0

[State 212,5]
type = ChangeState
trigger1 = animtime = 0
value = 213

;---------------------------------------------------------------------------
; Hit by Standing Fierce (recover)
[Statedef 213]
type    = A                     
movetype= H                    
physics = N                     
ctrl = 0                      
sprpriority = 2                 

[state 213,1]
type = nothitby
trigger1 = time >= 0
value = SCA

[state 213,2]
type = changeanim
trigger1 = time = 0
value = 5200

[state 213,3]
type = velset
trigger1 = time = 0
x = -3
y = -4

[state 213,4]
type = veladd
trigger1 = time >= 0
y = 0.5

[State 213,5]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 214
ctrl = 1

;---------------------------------------------------------------------------
; Hit by Standing Fierce (end)
[Statedef 214]
type    = A                     
movetype= H                    
physics = N                     
ctrl = 0                      
sprpriority = 2                 

[state 214,1]
type = posset
trigger1 = time = 0
y = 0

[state 214,2]
type = changeanim
trigger1 = time = 0
value = 12

[state 214,3]
type = nothitby
trigger1 = time >= 0
value = SCA

[state 214,4]
type = velset
trigger1 = time >= 0
x = 0
y = 0

[State 214,5]
type = SelfState
trigger1 = animtime = 0 || time > 8
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Launched by Roundhouse
[Statedef 230]
type    = S
movetype= H
physics = N
velset = 0,0

[State 230,1]
type = ChangeAnim
trigger1 = Time = 0
value = 5012

[State 230,2]
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 230,3]
type = StateTypeSet
trigger1 = Time = 0 && GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = A

[State 230,4]
type = ChangeState
trigger1 = HitShakeOver
value = 231
;---------------------------------------------------------------------------
; Launched (cont)
[Statedef 231]
type    = A
movetype= H
physics = N
ctrl = 0

[State 231,1]
type = ChangeAnim
trigger1 = Time = 0 && (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) 

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

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

[State 231,4]
type = ChangeState     
trigger1 = (Time = 15) ;|| Animtime = 0
value = 232
;---------------------------------------------------------------------------
;Launched (cont)
[Statedef 232]
type    = A
movetype= H
physics = N

[State 232,1]
type = ChangeAnim
trigger1 = Time = 0 && SelfAnimExist(5035) && (Anim != [5051,5059]) && Anim != 5090
value = 5035

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

[State 232,3]
type = ChangeState
trigger1 = HitOver || AnimTime = 0
trigger2 = Vel Y > 0 && Pos Y >= 10  
trigger3 = Time = 0 && Anim != 5035 
value = 233 
;---------------------------------------------------------------------------
; Launched (end)
[Statedef 233]
type    = A
movetype= H
physics = N

[State 233,1] 
type = ChangeAnim
trigger1 = AnimTime = 0 && Anim = 5035
trigger2 = Time = 0 && Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5060, 5069]) && Anim != 5090
value = 5050

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

[State 233,3]
type = SelfState
triggerall = Alive = 1
trigger1 = (Time = 15) || (Vel Y >= 0)
value = 5040
ctrl = 1

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

[State 233,5]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5060,5069]), 0, 25)
value = 5100
;---------------------------------------------------------------------------
; TRIPPED (shaking)
[Statedef 326]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 326, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 327

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

[state 326,4]
type = nothitby
trigger1 = 1
value = SCA, AA, AP, AT, NA, NP, NT, SA, SP, ST, HA, HP, HT
time = 2
ignorehitpause = 1

[state 326,5]
type = playerpush
trigger1 = 1
value = 0
;---------------------------------------------------------------------------
; TRIPPED (fall through air)
[Statedef 327]
type    = A
movetype= H
physics = N

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

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

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

[state 327,4]
type = nothitby
trigger1 = 1
value = SCA, AA, AP, AT, NA, NP, NT, SA, SP, ST, HA, HP, HT
time = 2
ignorehitpause = 1

[state 327,5]
type = playerpush
trigger1 = 1
value = 0
;---------------------------------------------------------------------------
; TRIP LIEDOWN
[Statedef 328]
type    = L
movetype= H
physics = N

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

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

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

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

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

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

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

[State 328, 6]
type = PlaySnd
triggerall = prevstateno != [1715,1720]
trigger1 = Time = 0 && !SysVar(0)
value = 7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 328, 6]
type = PlaySnd
triggerall = prevstateno = 1720
trigger1 = Time = 0 && !SysVar(0)
value = 7, 2

[State 328, 8]
type = VelSet
trigger1 = 1
x = 0
y = 0

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

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

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

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

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

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

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

[state 328,16]
type = playerpush
trigger1 = 1
value = 0

[state 328,17]
type = nothitby
trigger1 = time = 0
value = SCA, AA, AP, AT, NA, NP, NT, SA, SP, ST, HA, HP, HT
time = 0
ignorehitpause = 1

[State 250,13]
type = Envshake
trigger1 = time = 0 && prevstateno = 1720
persistent = 0
time = 15
freq = 70
ampl = -4

[state 328,18]
type = selfstate
trigger1 = alive && time = 7 && (prevstateno != [1700,1709]) && prevstateno != 1720
trigger2 = alive && time = 9 && prevstateno = [1700,1709]
trigger3 = alive && time = 12 && prevstateno = 1720
value = 5120

;---------------------------------------------------------------------------
; Not Aerial Raved A
[Statedef 1700]
movetype= H
physics = N
velset = 0,0
ctrl = 0

[state 700,1]
type = selfstate
trigger1 = time = 0 && pos y >= 0 && command != "holddown"
value = 5000

[state 700,2]
type = selfstate
trigger1 = time = 0 && pos y >= 0 && command = "holddown"
value = 5010

[state 700, 3]
type = statetypeset
trigger1 = time = 1
value = A

[State 700, 4]
type = ChangeAnim
trigger1 = 1
value = 5012

[State 700, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 1701
;---------------------------------------------------------------------------
; Not Aerial Raved B
[Statedef 1701]
type    = A
movetype= H
physics = N
ctrl = 0

[State 701, 1]
type = VelAdd
trigger1 = 1
y = 0.5

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

[State 701, 3]
type = SelfState
trigger1 = !Alive && Pos Y >= 0 && Vel Y > 0
value = 5100

[State 701, 4]
type = ChangeState
trigger1 = AnimTime = 0 || Time >= 10
value = 1702

[State 701, 5]
type = ChangeState
trigger1 = Alive && Pos Y >= 10 && Vel Y > 0
value = 1703
;---------------------------------------------------------------------------
; Not Aerial Raved C
[Statedef 1702]
type    = A
movetype= H
physics = N
ctrl = 0

[State 702, 1]
type = VelAdd
trigger1 = 1
y = 0.5

[State 702, 2]
type = ChangeAnim
trigger1 = Time = 0 && SelfAnimExist(5060)
value = 5060

[State 702, 3]
type = ChangeState
trigger1 = Pos Y >= 10 && Vel Y > 0 && Alive
value = 1703

[State 702, 4]
type = SelfState
trigger1 = Pos Y >= 0 && Vel Y > 0 && !Alive
value = 5100
;---------------------------------------------------------------------------
; Not Aerial Raved D
[Statedef 1703]
type    = A
movetype= H
physics = N
anim = 5210
ctrl = 0

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

[State 703, 2]
type = VelSet
trigger1 = Time = 0
x = vel x / 2
y = -8

[State 703, 3]
type = Turn
trigger1 = P2Dist X < -10 && time = 0
persistent = 0

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

[State 703, 5]
type = VelAdd
trigger1 = 1
y = .6

[State 703, 6]
type = SelfState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52
ctrl = 1
;---------------------------------------------------------------------------
; Aerial Raved A
[Statedef 1705]
movetype= H
physics = N
velset = 0,0
ctrl = 0

[state 705,1]
type = selfstate
trigger1 = time = 0 && pos y >= 0 && command != "holddown"
value = 5000

[state 705,2]
type = selfstate
trigger1 = time = 0 && pos y >= 0 && command = "holddown"
value = 5010

[state 705,3]
type = statetypeset
trigger1 = time = 1
value = A

[State 705,4]
type = ChangeAnim
trigger1 = 1
value = 5012

[State 705,5]
type = ChangeState
trigger1 = HitShakeOver
value = 1706
;---------------------------------------------------------------------------
; Aerial Raved B
[Statedef 1706]
type    = A
movetype= H
physics = N
ctrl = 0

[State 706, 1]
type = VelAdd
trigger1 = 1
y = 0.5

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

[State 706, 3]
type = ChangeState
trigger1 = AnimTime = 0 || Time >= 10
value = 1707

[State 706, 4]
type = ScreenBound
trigger1 = 1 
value = 1
movecamera = 1,1

[State 702, 2]
type = ChangeAnim
trigger1 = SelfAnimExist(5060) && anim != 5060
value = 5060

[State 706, 6]
type = ChangeState
trigger1 = Pos Y >= 10 && Vel Y > 0
value = 328
;---------------------------------------------------------------------------
; Aerial Raved C
[Statedef 1707]
type    = A
movetype= H
physics = N
ctrl = 0

[State 707, 1]
type = VelAdd
trigger1 = 1
y = 0.5

[State 707, 2]
type = ChangeAnim
trigger1 = SelfAnimExist(5060) && anim != 5060
value = 5060

[State -3, 3]
type = ScreenBound
trigger1 = 1 
value = 1
movecamera = 1,1

[State 707, 3]
type = ChangeState
trigger1 = Pos Y >= 10 && Vel Y > 0 
value = 328
;---------------------------------------------------------------------------
[Statedef 708]
type    = A
movetype= I
anim = 708
physics = N
ctrl = 0
velset = -42,5;ifelse(prevstateno=625,-12.5,ifelse(prevstateno=1900,-20,0)),ifelse(prevstateno=625,5,10)
sprpriority = -5

[state 12,12]
type = velset
trigger1 = time = 0
x = 20
y = 8

[state 250,15]
type = playsnd
trigger1 = time = 0
persistent = 0
value = 54

[state 12,12]
type = veladd
trigger1 = 1
y = 0.5

[State 708, 3]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,1

[State 708, 4]
type = Velset
trigger1 = p2stateno = 328 && p2movetype = H
x = 0
y = 0

;[state 250,11]
;type = explod
;trigger1 = p2stateno = 328 && p2movetype = H
;persistent = 0
;anim =F52
;pos = -55,-5
;scale = 0.6,0.6
;postype = p2
;sprpriority = 5
;velocity = 0, 0
;bindtime = 1
;ownpal = 1

[state 250,15]
type = playsnd
trigger1 = p2stateno = 328 && p2movetype = H
persistent = 0
value = 8,2

[State 250,13]
type = Envshake
trigger1 = p2stateno = 328 && p2movetype = H
persistent = 0
time = 15
freq = 70
ampl = -4

[state 12,12]
type = destroyself
trigger1 = (root, stateno != [100,102]) && (root, stateno != 710) && vel x = 0
trigger1 = p2stateno != 5120
trigger2 = time = 40

;---------------------------------------------------------------------------
; Aerial Raved A
[Statedef 1715]
movetype= H
physics = N
velset = 0,0
ctrl = 0

[state 710,1]
type = selfstate
trigger1 = time = 0 && pos y >= 0 && command != "holddown"
value = 5000

[state 710,2]
type = selfstate
trigger1 = time = 0 && pos y >= 0 && command = "holddown"
value = 5010

[state 710,3]
type = statetypeset
trigger1 = time = 1
value = A

[State 710,4]
type = ChangeAnim
trigger1 = 1
value = 5012

[State 710,5]
type = ChangeState
trigger1 = HitShakeOver
value = 1716
;---------------------------------------------------------------------------
; Aerial Raved B
[Statedef 1716]
type    = A
movetype= H
physics = N
ctrl = 0

[State 711, 1]
type = VelAdd
trigger1 = 1
y = 0.5

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

[State 711, 3]
type = ChangeState
trigger1 = AnimTime = 0 || Time >= 10
value = 1717

[State 711, 4]
type = ScreenBound
trigger1 = 1 
value = 1
movecamera = 1,1

[State 711, 2]
type = ChangeAnim
trigger1 = SelfAnimExist(5060) && anim != 5060
value = 5060

[State 711, 6]
type = ChangeState
trigger1 = Pos Y >= 10 && Vel Y > 0
value = 328
;---------------------------------------------------------------------------
; Aerial Raved C
[Statedef 1717]
type    = A
movetype= H
physics = N
ctrl = 0

[State 712, 1]
type = VelAdd
trigger1 = 1
y = 0.5

[State 712, 2]
type = ChangeAnim
trigger1 = SelfAnimExist(5060) && anim != 5060
value = 5060

[State 712, 3]
type = ScreenBound
trigger1 = 1 
value = 1
movecamera = 1,1

[State 712, 3]
type = ChangeState
trigger1 = Pos Y >= 10 && Vel Y > 0 
value = 328
;---------------------------------------------------------------------------
;Headbutt Throw (Caught by) 
[Statedef 702]
type = A
movetype = H
physics = N
velset = 0,0

[state 702,1]
type = lifeadd
trigger1 = animelem = 3 || animelem = 7 || animelem = 11
persistent = 1
kill = 0
value = -30

[state 702,2]
type = changeanim2
trigger1 = time = 0
value = 702

[State 801]
type = targetstate
TriggerAll = Time = 0
trigger1 = var(32) = 1
value = 899

[State 702, 3]
type = SelfState
triggerall=alive
triggerall= CanRecover
trigger1= time = [0,5]
trigger1=Command = "x" || Command = "y" || Command = "z" || Command = "a" || Command = "b" || Command = "c"
value = 5210 ;HITFALL_AIRRECOVER

[State 702,4]
type = ChangeState
trigger1 = animtime = 0
value = 703
;---------------------------------------------------------------------------
; Headbutt Throw Caught by part 2
[Statedef 703]
type    = A                     
movetype= H                    
physics = N                     
ctrl = 0                      
sprpriority = 2                 

[state 703,1]
type = lifeadd
trigger1 = time = 1
kill = 1
value = -10

[state 703,2]
type = posadd
trigger1 = time = 0
x = -60

[state 703,3]
type = posset
trigger1 = time = 0
y = 0

[state 703,4]
type = nothitby
trigger1 = time >= 0
value = SCA

[state 703,5]
type = changeanim2
trigger1 = time = 0
value = 703

[state 703,6]
type = velset
trigger1 = time >= 0
x = 0
y = 0

[State 703,7]
type = ChangeState
triggerall = alive = 0
trigger1 = animtime = 0
value = 5100

[State 703,8]
type = ChangeState
triggerall = alive = 1
trigger1 = animtime = 0
value = 704
;---------------------------------------------------------------------------
; Headbutt throw caught by 3 (recovery)
[Statedef 704]
type    = A                     
movetype= H                    
physics = N                     
ctrl = 0                      
sprpriority = 2                 

[state 704,1]
type = nothitby
trigger1 = time >= 0
value = SCA

[state 704,2]
type = changeanim
trigger1 = time = 0
value = 5200

[state 704,3]
type = velset
trigger1 = time = 0
x = -6
y = -10

[state 704,4]
type = veladd
trigger1 = time >= 0
y = 0.5

[State 704,5]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 705
ctrl = 1
;---------------------------------------------------------------------------
; Headbutt throw caught by 4 (end)
[Statedef 705]
type    = A                     
movetype= H                    
physics = N                     
ctrl = 0                      
sprpriority = 2                 

[state 705,1]
type = posset
trigger1 = time = 0
y = 0

[state 705,2]
type = changeanim
trigger1 = time = 0
value = 10

[state 705,3]
type = nothitby
trigger1 = time >= 0
value = SCA

[state 705,4]
type = velset
trigger1 = time >= 0
x = 0
y = 0

[State 705,5]
type = SelfState
trigger1 = animtime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
; RB Throw (caught by)
[Statedef 760]
type    = S                     
movetype = H
physics = N
juggle  = 1                     
velset = 0,0                    
ctrl = 0                      
poweradd = 0                   
sprpriority = -5                 

[state 760,1]
type = velset
trigger1 = time > 0
x = 0
y = 0

[state 760,2]
type = changeanim2
trigger1 = time = 0
value = 760

[State 760, 3]
type = SelfState
triggerall=alive
triggerall= CanRecover
trigger1= time = [0,5]
trigger1= Command = "x" || Command = "y" || Command = "z" || Command = "a" || Command = "b" || Command = "c"
value = 5210 ;HITFALL_AIRRECOVER

[State 760,4]
type = ChangeState
trigger1 = AnimTime = 0
value = 761
;---------------------------------------------------------------------------
; RB Throw (caught by) 2
[Statedef 761]
type    = A                     
physics = N                     
juggle  = 1                     
velset = -8,-8                    
ctrl = 0                      
poweradd = 0                   
sprpriority = -5                 

[State 761, 3]
type = SelfState
triggerall=alive
triggerall= CanRecover
trigger1= time = [0,5]
trigger1= Command = "x" || Command = "y" || Command = "z" || Command = "a" || Command = "b" || Command = "c"
value = 5210 ;HITFALL_AIRRECOVER

[state 761,1]
type = lifeadd
trigger1 = time = 1
value = -100

[state 761,2]
type = veladd
trigger1 = time >= 0
y = 0.50

[state 761,3]
type = changeanim2
trigger1 = time = 0
value = 761

[State 761,4]
type = selfState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
;Guard Push (Stand)
[Statedef 6300]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
anim = 888011
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 = 14
postype = p1
pos = 63,-50
ownpal = 1
vel = 0,0
scale = 0.5,0.5
ignorehitpause = 1
sprpriority = 7

[State 6300, a7]
type = PlaySnd
trigger1 = Time = 0
value = 7,0
volume = 255

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

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

[Statedef 6310];--------------crouch
type    = C
movetype= I
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
anim = 888013
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 = 14
postype = p1
pos = 33,-45
ownpal = 1
vel = 0,0
scale = 0.5,0.5
ignorehitpause = 1
sprpriority = 7

[State 6300, a7]
type = PlaySnd
trigger1 = Time = 0
value = 7,0
volume = 255

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

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


[Statedef 6320];------------air
type    = S
movetype= I
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
anim = 888014
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 = 14
postype = p1
pos = 33,-55
ownpal = 1
scale = 0.5,0.5
vel = 0,0
ignorehitpause = 1
sprpriority = 7

[State 6300, a7]
type = PlaySnd
trigger1 = Time = 0
value = 7,0
volume = 255

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

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

[Statedef 6350];guard push helper
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = 888012
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

;**********************************
; super-fundo
[Statedef 8500]
physics = N
anim = 8500
sprpriority = -3

[State 8500, 5] 
type = Varadd 
trigger1 = roundstate=3
v=1
value=1 

[State 8500, 5] 
type = VarSet 
trigger1 = Time = 0 
var(2) = root, ID 

[State 8500, 5] 
type = VarSet 
trigger1 = Time = 0 
var(17) = root, var(17) 

[State 8500, 9] ;Sem fundo e frente
type        = AssertSpecial 
trigger1 = anim=8500;1
flag = noBG 
flag2 = noFG 
ignorehitpause = 1

[State 8500, 9] ;anima鈬o de fundo
type        = Explod 
triggerall = p2life >0
trigger1 = numexplod(8510)=0
anim = 10000
postype = left
ID = 8510 
sprpriority = -11
supermovetime = 1 
removetime = 123
pos = 160,152
scale = 0.7,0.7
bindtime = -1

[State 8000, 1] ;Anim for Super KO FX
type = ChangeAnim
trigger1 = anim=8500 && roundstate=3 && p2life=0
value = 8550

[State 8500, 7] 
Type = RemoveExplod 
triggerall = root, var(9)<=0
triggerall = anim=8500
trigger1 = root, stateno!=[1050,1051]
trigger1 = root, stateno!=[1000,1001]
trigger1 = root, stateno!=[1070,1076]
trigger2 = anim=8500 && roundstate=3

[State 8500, 7] 
Type = destroyself 
triggerall = root, var(9)<=0
triggerall = anim=8500 && roundstate!=3
trigger1 = root, stateno!=[1050,1051]
trigger1 = root, stateno!=[1000,1001]
trigger1 = root, stateno!=[1070,1076]
;trigger2 = root, Numhelper(8550)!=0

;;---------------------------------------------------------
;; Super KO FX
;;[Statedef 8550]
;type = A
;movetype = I
;physics = N
;anim = 8550

[State 8550, hiper combo finish!]
type = PlaySnd
triggerall = roundstate=3 && var(17)>=10 && p2life=0
trigger1 = var(1)=2
trigger2 = var(1)=3
trigger3 = var(1)=4
trigger4 = var(1)=1
value = 8550,0
;persistent=0
;channel=0
volume=255

[State 8550, 1]
type = null;AssertSpecial
trigger1 = 1;(time%2)=0;roundstate=3;1
ignorehitpause = 1
flag = NoFG
flag2 = NoBG
flag3= NoMusic

[State 0,1]
type = StopSnd
trigger1 = !time 
channel = 9
;ignorehitpause = 0
;persistent = 1

[State 8550, 2] ;Hiper fundo finish (com MvsC2SP)
type = Explod
trigger1 = anim=8550 && animelemtime(1)=0 && var(17)>=10
trigger1 = p2life = 0
anim = 50
postype = back
sprpriority = -3
scale = 1,1
supermovetime = -1 
pos = 1,0
bindtime = -1
removeongethit = 1
persistent = 0

[State 8550, 7] 
Type = destroyself 
trigger1 = animelemtime(1)=120 && anim=8550
trigger2 = roundstate=4

;;---------------------------------------------------------
; Super KO FX
[Statedef 8550]
type = A
movetype = I
physics = N
anim = 8550

[State 8500, 7] 
Type = destroyself 
trigger1 = 1

;-----------------------------------------------------------
; super-fundo (level 2)
[Statedef 85500]
physics = N
anim = 8500
sprpriority = -3

[State 88500, 5] 
type = Varadd 
trigger1 = roundstate=3
v=1
value=1 

[State 88500, 5] 
type = VarSet 
trigger1 = Time = 0 
var(2) = root, ID 

[State 88500, 5] 
type = VarSet 
trigger1 = Time = 0 
var(17) = root, var(17) 

[State 88500, 9] ;Sem fundo e frente
type        = AssertSpecial 
trigger1 = anim=8500;1
flag = noBG 
flag2 = noFG 
ignorehitpause = 1

[State 88500, 9] ;anima鈬o de fundo
type        = Explod 
triggerall = p2life >0
trigger1 = numexplod(8510)=0
anim = 6070
postype = left
ID = 8510 
sprpriority = -11
supermovetime = 50 
removetime = 123
pos = 160,0
bindtime = -1
scale = 0.742,1

[State 88500, 9] ;anima鈬o de fundo
type        = Explod 
triggerall = p2life >0
trigger1 = numexplod(8511)=0
anim = 6080
postype = right
ID = 8511 
sprpriority = -11
supermovetime = 50 
removetime = 123
pos = -160,0
scale = 0.742,1
bindtime = -1

[State 8000, 1] ;Anim for Super KO FX
type = ChangeAnim
trigger1 = anim=8500 && roundstate=3 && p2life=0
value = 8550

[State 8500, 7] 
Type = RemoveExplod 
triggerall = root, var(9)<=0
triggerall = anim=8500
trigger1 = root, stateno!= 10450
trigger2 = anim=8500 && roundstate=3

[State 8500, 7] 
Type = destroyself 
triggerall = root, var(9)<=0
triggerall = anim=8500 && roundstate!=3
trigger1 = root, stateno!= 10450
;trigger2 = root, Numhelper(8550)!=0

;;---------------------------------------------------------
;; Super KO FX
;;[Statedef 8550]
;type = A
;movetype = I
;physics = N
;anim = 8550

[State 8550, hiper combo finish!]
type = PlaySnd
triggerall = roundstate=3 && var(17)>=10 && p2life=0
trigger1 = var(1)=2
trigger2 = var(1)=3
trigger3 = var(1)=4
trigger4 = var(1)=1
value = 8550,0
;persistent=0
;channel=0
volume=255

[State 8550, 1]
type = null;AssertSpecial
trigger1 = 1;(time%2)=0;roundstate=3;1
flag = NoFG
flag2 = NoBG
flag3= NoMusic
ignorehitpause = 1

[State 0,1]
type = StopSnd
trigger1 = !time 
channel = 9
;ignorehitpause = 0
;persistent = 1

[State 8550, 2] ;Hiper fundo finish (com MvsC2SP)
type = Explod
trigger1 = anim=8550 && animelemtime(1)=0 && var(17)>=10
trigger1 = p2life = 0
anim = 50
postype = back
sprpriority = -3
scale = 1,1
supermovetime = -1 
pos = 1,0
bindtime = -1
removeongethit = 1
persistent = 0

[State 8550, 7] 
Type = destroyself 
trigger1 = animelemtime(1)=120 && anim=8550
trigger2 = roundstate=4

;;---------------------------------------------------------
; Super KO FX
[Statedef 8550]
type = A
movetype = I
physics = N
anim = 8550

[State 8500, 7] 
Type = destroyself 
trigger1 = 1

;----------------------------------------------------
; Helper - score
[Statedef 8600]
type    = S
physics = N
ctrl = 0
anim = 8500

[State -3, varset]
type=Varset
trigger1=1
var(1)=abs(root, var(19))

;[State -3, test]
;type=Varset
;trigger1=1
;2.147.483.646 limite numerico
;Dois bilhoes cento e quarenta e sete milhoes quatrocentos e oitenta e tres mil seiscentos e quarenta e seis
;var(13)=var(1)/1000000000-var(1)/10000000000*10;10digito Bilhoes
;var(13)=var(1)/100000000-var(1)/1000000000*10;9digito CMilhoes
;var(13)=var(1)/10000000-var(1)/100000000*10;8digito DMilhoes
;var(13)=var(1)/1000000-var(1)/10000000*10;7digito Milhoes
;var(13)=var(1)/100000-var(1)/1000000*10;6digito Cmilhares
;var(13)=var(1)/10000-var(1)/100000*10;5digito Dmilhares
;var(13)=var(1)/1000-var(1)/10000*10;4digito milhares
;var(13)=var(1)/100-var(1)/1000*10;3digito centenas
;var(13)=var(1)/10-var(1)/100*10;2digito dezenas
;var(13)=var(1)-var(1)/10*10;1digito unidades

[State 8600,uni]
type=explod
trigger1=1
ID=8600
anim=f250+(var(1)-var(1)/10*10)
postype=left
pos=114+160*(teamside=2),5
bindtime=-1
removetime=10
sprpriority=2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,dez]
type=explod
trigger1=var(1)>9
ID=8601
anim=f(var(1)/10-var(1)/100*10)+250
postype=left
pos=114+160*(teamside=2)-8,5
bindtime=-1
removetime=10
sprpriority=2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,cen]
type=explod
trigger1=var(1)>99
ID=8602
anim=f(var(1)/100-var(1)/1000*10)+250
postype=left
pos=114+160*(teamside=2)-16,5
bindtime=-1
removetime=10
sprpriority=2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,mil]
type=explod
trigger1=var(1)>999
ID=8603
anim=f(var(1)/1000-var(1)/10000*10)+250
postype=left
pos=114+160*(teamside=2)-24,5
bindtime=-1
removetime=10
sprpriority=2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,Dmil]
type=explod
trigger1=var(1)>9999
ID=8604
anim=f(var(1)/10000-var(1)/100000*10)+250
postype=left
pos=114+160*(teamside=2)-32,5
bindtime=-1
removetime=10
sprpriority=2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,Cmil]
type=explod
trigger1=var(1)>99999
ID=8605
anim=f(var(1)/100000-var(1)/1000000*10)+250
postype=left
pos=114+160*(teamside=2)-40,5
bindtime=-1
removetime=10
sprpriority=2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,Milhao]
type=explod
trigger1=var(1)>999999
ID=8606
anim=f(var(1)/1000000-var(1)/10000000*10)+250
postype=left
pos=114+160*(teamside=2)-48,5
bindtime=-1
removetime=10
sprpriority=2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,DMilhao]
type=explod
trigger1=var(1)>9999999
ID=8607
anim=f(var(1)/10000000-var(1)/100000000*10)+250
postype=left
pos=114+160*(teamside=2)-56,5
bindtime=-1
removetime=10
sprpriority=2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,CMilhao]
type=explod
trigger1=var(1)>99999999
ID=8608
anim=f(var(1)/100000000-var(1)/1000000000*10)+250
postype=left
pos=114+160*(teamside=2)-64,5
bindtime=-1
removetime=10
sprpriority=2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,Bilhao]
type=explod
trigger1=var(1)>999999999
ID=8609
anim=f(var(1)/1000000000-var(1)/10000000000*10)+250
postype=left
pos=114+160*(teamside=2)-72,5
bindtime=-1
removetime=10
sprpriority=2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600, cancela helper]
type = DestroySelf
trigger1 = time=0

; ========================================================================
; Win Quotes Helper (Overrided)
[Statedef 1338000004]
anim = 1337000000
ctrl = 0

[State WQ, Identifier 1]
type = VarSet
trigger1 = enemy, name = "cvsterry"
var(10) = 1

[State WQ, Identifier 2]
type = VarSet
trigger1 = enemy, name != "cvsterry"
var(10) = 0

[State WQ, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible

[State WQ, AssertSpecial]
type = AssertSpecial
triggerall = ifelse((root, NumPartner), (root, ID < partner, ID), 1)
trigger1 = time = [0, 800]
flag = roundnotover

[State WQ, AssertSpecial]
type = AssertSpecial
triggerall = ifelse((root, NumPartner), (root, ID < partner, ID), 1)
trigger1 = time >= 200
flag = nobardisplay
flag2 = nomusic
flag3 = nofg

[State WQ, BGM]
type = StopSnd
trigger1 = time = 0
channel = -1

[State WQ, BGM]
type = PlaySnd
triggerall = ifelse((root, NumPartner), (root, ID < partner, ID), 1)
trigger1 = time = 190
value = 185, 0
channel = 4
volume = 255

[State WQ, FX - Varset]
type = VarAdd
triggerall = ifelse((root, NumPartner), (root, ID < partner, ID), 1)
trigger1 = time >= 200
var(0) = 10

[State WQ, VarAdd]
type = VarSet
triggerall = ifelse((root, NumPartner), (root, ID < partner, ID), 1)
trigger1 = var(0) > 255
var(0) = 255

[State WQ, EnvColor]
type = EnvColor
triggerall = ifelse((root, NumPartner), (root, ID < partner, ID), 1)
trigger1 = time >= 200
value = 255 - var(0), 255 - var(0), 255 - var(0)
time = 1
under = 1

[State WQ, Win BG]
type = Explod
triggerall = ifelse((root, NumPartner), (root, ID < partner, ID), 1)
trigger1 = !NumExplod(10000) && time >= 230
anim = 8702
ID = 10000
pos = 160,120
postype = back
bindtime = -1
scale = 0.5, 0.5
sprpriority = 2
ontop = 1
ownpal = 1

[State WQ, Portraits]
type = Explod
triggerall = root, NumPartner
trigger1 = !NumExplod(9105) && time >= 230
anim = 9105
ID = 9105
pos = 65 + (250 * (root, ID > partner, ID)), 0 + (51 * (root, ID > partner, ID))
postype = back
bindtime = -1
scale = 0.5 - (0.15 * (root, ID > partner, ID)), 0.5 - (0.15 * (root, ID > partner, ID))
sprpriority = 2 - (1 * (root, ID > partner, ID))
ontop = 1
ownpal = 1
facing = ifelse((root, ID > partner, ID), -1, 1)

[State WQ, Portrait]
type = Explod
triggerall = !(root, NumPartner)
trigger1 = !NumExplod(9105) && time >= 230
anim = 9105
ID = 9105
pos = 60, 0
postype = back
bindtime = -1
scale = 0.5, 0.5
sprpriority = 2
ontop = 1
ownpal = 1

;---------------------------------------
; Helper - score de fim de round
[Statedef 8750]
type    = S
physics = N
ctrl = 0
anim = 1337000000

[State 50, 1] 
type = Turn 
trigger1 = facing=-1

[State 8700, pontua鈬o]
trigger1 = time = 60
type = Explod
anim = 8750
vel = 0, 0
pos = 0, 0
postype = left
ownpal = 1
pausemovetime = 180
removetime = 180
sprpriority = -2

[State 8850, sound1] 
type=PlaySnd 
trigger1 = time=60
value = 8750,0
persistent = 0 
channel = 1 

[State 8750, time]
type=Varset
trigger1= time = 0
var(0)=(100-ceil(root, var(0)/60))*10

[State 8750, vital]
type=Varset
trigger1= time = 0
var(1)=root, life *10

[State 8750, vital partner]
type=Varset
trigger1= time = 0 && numpartner!=0
var(1)=var(1) + partner, life *10

[State 8750, perfect]
type=Varset
trigger1= time = 0 && numpartner=0
var(2)=1000*((root,const(Data.life)) = (root,life))*10

[State 8750, perfect partner]
type=Varset
trigger1= time = 0 && numpartner!=0
trigger1=((root,const(Data.life)) = (root,life))
trigger1=((partner,const(Data.life)) = (partner,life))
var(2)=((partner,life)+(root,life))*10

[State 8750, bonus]
type=Varset
trigger1= time = 0
var(3)=(var(0)+var(1)+var(2))

[State 8750, bonus]
type=Varset
trigger1= time = 0
var(4)=(root,var(19))+var(3)

[State 8750, bonus]
type=parentVarset
trigger1= time = 0
var(19)=var(4)

;-------------------------------------------------------------
[State -3, varset]
type=Varset
trigger1= time = [60,63]
var(9)=var(time-60)

[State 8600,uni]
type=explod
trigger1= time = [60,63]
ID=8600
anim=f(var(9)-var(9)/10*10)+9600
postype=left
pos=240+0,90+(time-60)*19
bindtime=-1
pausemovetime = 180
removetime=180
sprpriority=-2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,dez]
type=explod
trigger1= time = [60,63]
trigger1= var(9)>9
ID=8601
anim=f(var(9)/10-var(9)/100*10)+9600
postype=left
pos=240-8,90+(time-60)*19
bindtime=-1
pausemovetime = 180
removetime = 180
sprpriority=-2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,cen]
type=explod
trigger1= time = [60,63]
trigger1=var(9)>99
ID=8602
anim=f(var(9)/100-var(9)/1000*10)+9600
postype=left
pos=240-16,90+(time-60)*19
bindtime=-1
pausemovetime = 180
removetime = 180
sprpriority=-2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,mil]
type=explod
trigger1= time = [60,63]
trigger1=var(9)>999
ID=8603
anim=f(var(9)/1000-var(9)/10000*10)+9600
postype=left
pos=240-24,90+(time-60)*19
bindtime=-1
pausemovetime = 180
removetime = 180
sprpriority=-2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,Dmil]
type=explod
trigger1= time = [60,63]
trigger1=var(9)>9999
ID=8604
anim=f(var(9)/10000-var(9)/100000*10)+9600
postype=left
pos=240-32,90+(time-60)*19
bindtime=-1
pausemovetime = 180
removetime = 180
sprpriority=-2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,Cmil]
type=explod
trigger1= time = [60,63]
trigger1=var(9)>99999
ID=8605
anim=f(var(9)/100000-var(9)/1000000*10)+9600
postype=left
pos=240-40,90+(time-60)*19
bindtime=-1
pausemovetime = 180
removetime = 180
sprpriority=-2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,Milhao]
type=explod
trigger1= time = [60,63]
trigger1=var(9)>999999
ID=8606
anim=f(var(9)/1000000-var(9)/10000000*10)+9600
postype=left
pos=240-48,90+(time-60)*19
bindtime=-1
pausemovetime = 180
removetime = 180
sprpriority=-2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,DMilhao]
type=explod
trigger1= time = [60,63]
trigger1=var(9)>9999999
ID=8607
anim=f(var(9)/10000000-var(9)/100000000*10)+9600
postype=left
pos=240-56,90+(time-60)*19
bindtime=-1
pausemovetime = 180
removetime = 180
sprpriority=-2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,CMilhao]
type=explod
trigger1= time = [60,63]
trigger1=var(9)>99999999
ID=8608
anim=f(var(9)/100000000-var(9)/1000000000*10)+9600
postype=left
pos=240-64,90+(time-60)*19
bindtime=-1
pausemovetime = 180
removetime = 180
sprpriority=-2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600,Bilhao]
type=explod
trigger1= time = [60,63]
trigger1=var(9)>999999999
ID=8609
anim=f(var(9)/1000000000-var(9)/10000000000*10)+9600
postype=left
pos=240-72,90+(time-60)*19
bindtime=-1
pausemovetime = 180
removetime = 180
sprpriority=-2
ownpal =1
facing=facing
ignorehitpause = 1

[State 8600, cancela helper]
type = DestroySelf
trigger1 = time=124

;---------------------------------------------------------------------------
; Snap back
[Statedef 4900]
type = S     
movetype= A     
physics = S         
ctrl = 0
anim = 321

[State SP]
type = SuperPause
trigger1 = AnimElem = 2,=1
time = 45
anim = 909909
sound = s8888,0
poweradd = -1000

[State 1020, Poeira]
type = Explod
trigger1 = AnimElemTime(1) = 1
anim = 4112
ID = 8400
postype = P1
pos = -100,0
sprpriority = 3
ownpal = 1
supermovetime = 40
scale = 0.5, 0.5

[state 4440,2]
type = playsnd
trigger1 = animelem = 5
channel = 6
value = 0,2

[State 3]
type = Pause
trigger1 = AnimElem = 2,= 1
movetime = 10
time = 10

[State e_H];集中線
type = explod
trigger1 = AnimElem = 2
postype = P1
pos = -40,-110
scale = 0.5,0.5
anim = 51
ownpal = 1
sprpriority = 5
supermovetime = 500
pausemovetime = 500

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

[State 0]
type = HitDef
trigger1 = AnimElem = 5
attr = S,NA
damage = 105
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 2,2
sparkno = 8880
sparkxy = -10, -30
hitsound   = 5,2
guardsound = 6,0
guard.sparkno = 3
ground.type = High	
ground.slidetime = 5	
ground.hittime  = 12		
ground.velocity = -15, -7		
airguard.velocity = -1.9,-.8	
air.type = High			
air.velocity = -14,-7		
air.hittime = 12
fall = 1
fall.recover = 0
	
[State 0]
type = varset
trigger1 = time = 0
trigger2 = animtime = 0
var(50) = 0

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

;---------------------------------------------------------
; Norimaro Hyper Portait
[Statedef 85900]
physics = N
anim = 8010
sprpriority = -3

[State 85900]
type = explod
trigger1 = time =4
anim = 1080
pos = -2,44
postype = back
under = 1
supermove = 1
bindtime = 15
removetime = 55
supermovetime = 55
scale = 1,1
ID = 85900
sprpriority = -10
ownpal = 1

[State 85900]
type = DestroySelf
trigger1 = time =50

[State 85900]
type = ModifyExplod
trigger1 = time = [4,10]
ID = 85900
scale = 1.02- (.05*time), 1.018- (.05*time)
sprpriority = -10
under = 1

;--------------------------------------------------------------------------
; winko
[Statedef 6119]
physics = N
anim = 8010
sprpriority = -3

[State 6119, Explod]
type = Explod
triggerall = !NumExplod(6119)
trigger1 = WinKO
trigger2 = Time = 0
persistent = 0
anim = 10011
id = 6119
postype = Back
pos = 0, 0
bindtime = -1
removetime = -2
ontop = 1
supermovetime = 1000
pausemovetime = 1000
ignorehitpause = 1

[State 6119]
type = PlaySnd
trigger1 = (WinKO) && (Var(54) !=1)
value = 1111,0
volume=255

[State 6119, Super Var 2]
type = VarSet
trigger1 = (WinKO) && (Var(54) !=1)
v = 54
value = 1

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


;---------------------------------------------------------------------------
; 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, Win or DOS? %d, AI On %d, Super Jump %d, Recovery Roll %d"
;text = "Intro No. %d, Win No. %d, Enemy Proj: %d, Enemy Helpers: %d"
;text = "S.Bound: %d, A.Rave F. %d"
;text = "H.Count: %d, D.H.Combo: %d, H.Juggle: %d, A.Rave: %d, Tag: %d"
;text = "System %d, R.Roll %d, T.Bind: %d, AR Vel Var: %d, S.Jump: %d"
;text = "Score %d"
;text = "Danger: %d"
;text = "RoundState: %d, Round No: %d"
;text = " AI =  %d - P2dist = %.0f - P2dist = %.0f"
;text = "var(52) is %d"
;text = "P2 Distance X from P1 %f, P2 Distance Y from P1 %f"
;text="Var(3) %d, rndstate %d, var(13) %d, animtime %d";numhelper(1337000000)= 
;text="eu39 %d, vez37 %d, Colab38 %d, var(11) %d";sair? %d";bake %d";
;text = "Var(19) %d, Var(11) %d, ataca? %d, pos y %d"
;text="p2bodydist x %d, p2bodydist x %d, var(20) %d, var(2) %d"
;text="39=37? %d, Colab %d, var(36) %d, bake %d";sair? %d";
params = var(8), var(17), var(59), var(0), var(5)
;params = var(1), var(2), var(7), var(6), var(30)
;params = var(11), var(34)
;params = var(42), var(31)
;params = var(22),P2BodyDist X, P2BodyDist Y
;params = (10000+9+(var(40)*10)),p2bodydist x, p2bodydist y
;params = var(59), var(58), var(12), fvar(0), fvar(1)
;params = var(52)
;params = var(51)
;params = var(10), var(20)
;params = var(9), var(19), var(13)
;params = var(39), var(37)
;params = (Var(3)), (roundstate),Var(13), animtime;numhelper(1337000000)
;params = Roundstate, RoundNo
;params = Var(39), var(37),var(38),var(11);floor(backedgedist);
;params= Var(19), Var(11), ((matchno*80)>random), ceil(pos y)
;params = floor(p2bodydist x), floor(p2bodydist x), (var(20)),var(2)
;params = (Var(39)=Var(37)), var(38),var(36),floor(backedgedist);Var(35);

[State -2, Debug Data]
type = AppendToClipboard
trigger1 = 1
;text = "System HitCount: %d, Tag: %d, DHC: %d, Score PlaceHolder %d, AI: %d"
;text = "Pos X: %f, Pos Y: %f, Vel X: %f, Vel Y: %f"
;text = "A.R. Counter: %d, A.R. On: %d"
text = "Enemy Dist X: %f, Enemy Dist Y: %f"
;params = (Helper(1337000000), var(2)), var(30), var(31), var(59), var(58)
;params = Pos X, Pos Y, Vel X, Vel Y
;params = var(3), var(4)
params = P2BodyDist X, P2BodyDist Y
ignorehitpause = 1

[State -2, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 || stateno = 653
value = 52,2
volume = 255

[State -2,1]
type = Explod
triggerall = time = 1
trigger1 = stateno = 52 || stateno = 653
anim = F8510
postype = p1
pos = -5, 0
scale = 0.6,0.6
bindtime = 1
removetime = -2
sprpriority = 5

[State -2,4]
type = VarSet
trigger1 = StateNo != 5050 && StateNo != 5071
v = 3
value = 0

[State -2,7]
type = playsnd
triggerall = random < 250 && time = 1 && alive = 1
trigger1  = stateno = 5000 && anim = 5000 
trigger2  = stateno = 5000 && anim = 5001
trigger3  = stateno = 5000 && anim = 5010
trigger4  = stateno = 5000 && anim = 5011
trigger5  = stateno = 5010 && anim = 5020
trigger6  = stateno = 5010 && anim = 5021
trigger7  = stateno = 5020 && anim = 5000
trigger8  = stateno = 5020 && anim = 5001 
trigger9  = stateno = 5020 && anim = 5010
trigger10 = stateno = 5020 && anim = 5011 
value = 15, 0

[State -2,8]
type = playsnd
triggerall = random < 250 && time = 1 && alive = 1
trigger1 = stateno = 5000 && anim = 5002
trigger2 = stateno = 5000 && anim = 5012 
trigger3 = stateno = 5010 && anim = 5022 
trigger4 = stateno = 5020 && anim = 5012
trigger5 = stateno = 5020 && anim = 5002 
value = 15, 1

; --------------------------------------
;[State LHS - 5100-5111 -2, x2]
;type = Explod
;trigger1 = (stateno = 5100) && (time = 2)
;trigger2 = (stateno = 5111) && (time = 2)
;trigger3 = (stateno = 6100) && (time = 1)
;trigger4 = (stateno = 6403) && (time = 1)
;trigger5 = (stateno = 1703) && (time = 1)
;trigger6 = (stateno = 212) && (time = 1)
;trigger8 = (stateno = 328) && (time = 1)
;anim = 52
;pos = -70, 0
;postype = p1
;scale = 0.5, 0.5
;ownpal = 1
;sprpriority = 5
;ignorehitpause = 1

[State LHS - 5111 -2, x2a]
type = PlaySnd
trigger1 = (stateno = 5100) && (time = 2)
trigger2 = (stateno = 5111) && (time = 2)
trigger3 = (stateno = 6100) && (time = 1)
trigger4 = (stateno = 6403) && (time = 1)
trigger5 = (stateno = 1703) && (time = 1)
trigger6 = (stateno = 212) && (time = 1)
trigger8 = (stateno = 328) && (time = 1)
value = 8,2
volume = 255
ignorehitpause = 1

; ============================ (After KO attacking) =============================
;---------------------------------------------------------------------------
;-[ After KO attacking ]-
[State -2, ChangeState]
type = ChangeState
trigger1 = StateNo = [180,184]
trigger1 = command = "s"
value = 0
ctrl = 1

; ============================ (TAG SYSTEM) =============================
[State -2, Tag System: Delayed Hyper Combo Var Control]
type = VarSet
trigger1 = stateno != [4650, 4670]
trigger1 = (stateno != [1000,1001]) && (stateno != [1050,1051]) && (stateno != [1070,1076])
trigger2 = var(31) > 3
var(30) = 6

[State -2, Deactivate Tag]
type = VarSet
triggerall = var(30)	; Partner TAG mode activated
trigger1 = roundstate > 2
trigger1 = Win || Lose
var(30) = 0

; NEW !! Tag active definer
[State -2, def]
type = VarSet
trigger1 = teammode = simul
trigger1 = roundstate < 1
trigger1 = time = [0,1]
var(30) = 1

; NEW !! Tag active ctrl
[State -2, ctrl]
type = ChangeState
triggerall = var(30)        ; Partner TAG mode activated
triggerall = NumPartner
triggerall = ID > Partner,ID
trigger1 = var(30) != [2, 5]
trigger1 = partner, var(30) != [2, 5]
trigger1 = RoundState <= 2
trigger1 = Life && Partner, Life		; Team is alive
trigger1 = (stateno != [1000,4000]) && (stateno != [4500,4999])
trigger1 = (partner, stateno != [1000,4000]) && (partner, stateno != [4500,4999])
trigger1 = (stateno != 5500) && (stateno != 5500)
trigger1 = (partner, stateno != 5500) && (partner, stateno != 5500)
; -- Nobuyuki's chars fix (avoids stuck state) ---
trigger1 = stateno != [293, 299]
trigger1 = partner, stateno != [293, 299]
value = 4512

; No AR Finisher for the following Chars
; --------------------------------------
[State -2, Special Cases for AR]
type = VarSet
trigger1  = p2name != "Apocalypse"
trigger2  = p4name != "Apocalypse"
trigger3  = p2name != "Onslaught"
trigger4  = p4name != "Onslaught"
trigger5  = P2name != "Abyss Form 1"
trigger6  = P4name != "Abyss Form 1"
trigger7  = P2name != "Abyss Form 2"
trigger8  = P4name != "Abyss Form 2"
trigger9  = P2name != "Abyss Form 3"
trigger10 = P4name != "Abyss Form 3"
trigger11 = P2name != "Abyss"
trigger12 = P4name != "Abyss"
var(15) = 1

[State -2, Special Cases for AR]
type = VarSet
trigger1  = p2name = "Apocalypse"
trigger2  = p4name = "Apocalypse"
trigger3  = p2name = "Onslaught"
trigger4  = p4name = "Onslaught"
trigger5  = P2name = "Abyss Form 1"
trigger6  = P4name = "Abyss Form 1"
trigger7  = P2name = "Abyss Form 2"
trigger8  = P4name = "Abyss Form 2"
trigger9  = P2name = "Abyss Form 3"
trigger10 = P4name = "Abyss Form 3"
trigger11 = P2name = "Abyss"
trigger12 = P4name = "Abyss"
var(15) = 0

;---------------------------------------------------------------------------
;Is DOS or Win?
[State -2, Detect System]
type = Varadd
trigger1 = (var(17)%2 = 0) && (movecontact) > (movecontact = 1)
v = 17
value = 1

;screenpack mvsc2?
[State -2, Detect Screeenpack]
type = Varadd
trigger1 = var(17) < 10 && roundstate < 2 && numexplod(8522) != 0
v = 17
value = 10

;---------------------------------------------------------------------------
; - MvC2 Screenpack
[State -2, Is MvC2 Screeenpack]
type = Explod
trigger1 = var(17) < 10 && roundstate < 2 && numexplod(8522) = 0
id = 8522
anim = 44
pos = 0,240
postype = p1
removetime = 1
bindtime = -1
sprpriority = -1
ownpal = 1

;---------------------------------------------------------------------------
; - Press Start leyend (from the Mvc2 screen pack)
[State -2, Press Start Label]
type = Explod
triggerall = var(17) >= 10
triggerall = var(59) = 1
trigger1 = (gametime%60) = id && life != 0
id = 8620
anim = 10044
pos = ((enemy, id)<id)*172, 0
scale = 0.5,0.5
postype = Left
removetime = 30
bindtime = -1
sprpriority = -1
ownpal = 1
ontop = 1

; Super FX Section ==================================================


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

; ----------------------------------------------------------------------
[State -2, NoHitBy]
Type = NotHitBy
trigger1 = (NumHelper(9985) = 1) && (NumHelper(9986) = 1)
trigger1 = Time = 0
value = SCA
Time = 30

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

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

; Remove Explods Section ==============================================
; Remove Special BG if ------------------------------------------------
; State != 3100:
[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 3100
id = 9052

; Combo Messages and Score control =====================================
; 
[State -2, HitCount]
type = VarSet
triggerall = roundstate = 2
trigger1 = var(31) >= 3
trigger2 = P2Movetype = H
trigger2 = var(31) = -1 && (movehit || (p2stateno = [6000, 6999]) || (p2stateno = [5000, 5899]) || p2stateno = [1051, 1075])
var(32) = 1 + (var(31) > 4) + (var(31) > 5) + (var(31) > 7) + (var(31) > 9) + (var(31) > 29) + (var(31) > 49) + (var(31) > 69) - (var(31) = -1)
ignorehitpause = 1

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

[State -2, Air Combo Var]
type = VarAdd
triggerall = roundstate = 2
triggerall = (StateType = A) && (P2StateType = A)
triggerall = (stateno != 3103) && (stateno != 1120) && (stateno != 3000)
trigger1 = enemynear, time = 0
trigger1 = enemynear, Hitshakeover = 0
trigger1 = ((p2stateno = [6000, 6999]) || (p2stateno = [5000, 5899]) || p2stateno = [1051, 1075]) && (P2Movetype = H)
var(34) = 1 - (var(31)*statetype = S)
ignorehitpause = 1

[State -2, First Attack (snd)]
type = PlaySnd
triggerall = var(31) = -1
triggerall = NumExplod(8701) = 0
trigger2 = P2Movetype = H
trigger2 = var(31) = -1 && (movehit || (p2stateno = [6000, 6999]) || (p2stateno = [5000, 5899]) || p2stateno = [1051, 1075])
trigger1 = var(32) = 9 && var(33) = 0 && life > 0
persistent = 0
value = 9500, 0
volume = 255
ignorehitpause = 1

[State -2, Combo Sounds]
type = PlaySnd
trigger1 = NumExplod(8701) = 0
trigger1 = var(31) = 0 && var(32) != 0
persistent = 0
value = 9500, ifelse((var(34) > 1), 11, var(32))
volume = 255
ignorehitpause = 1

[State -2, Combo Message (left)]
type = explod
trigger1 = var(31) = 0 && var(32) != 0
trigger2 = P2Movetype = H
trigger2 = var(31) = -1 && (movehit || (p2stateno = [6000, 6999]) || (p2stateno = [5000, 5899]) || p2stateno = [1051, 1075])
trigger3 = var(32) = 9 && var(33) = 0 && life > 0
triggerall = TeamSide = 1 && NumExplod(8701) = 0
anim = 9500 + (ifelse((var(34) > 1), 30, var(32)))
ID = 8701
postype = left
pos = 0, 80
ontop = 1
ownpal = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Combo Message (right)]
type = explod
trigger1 = var(31) = 0 && var(32) != 0
trigger2 = P2Movetype = H
trigger2 = var(31) = -1 && (movehit || (p2stateno = [6000, 6999]) || (p2stateno = [5000, 5899]) || p2stateno = [1051, 1075])
trigger3 = var(32) = 9 && var(33) = 0 && life > 0
triggerall = TeamSide = 2 && NumExplod(8701) = 0
anim = 9510 + (ifelse((var(34) > 1), 21, var(32)))
ID = 8701
postype = right
pos = -1, 80
ontop = 1
ownpal = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Main HitCount ctrl]
type = VarAdd
triggerall = roundstate = 2
trigger1 = enemynear, time = 0
trigger1 = enemynear, Hitshakeover = 0
trigger1 = ((p2stateno = [6000, 6999]) || (p2stateno = [5000, 5899]) || p2stateno = [1051, 1075]) && (P2Movetype = H)
trigger2 = P2Movetype = H
trigger2 = var(31) = -1 && (movehit || (p2stateno = [6000, 6999]) || (p2stateno = [5000, 5899]) || p2stateno = [1051, 1075])
var(31) = 1 + (var(31) = -1)
ignorehitpause = 1

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

[State -2, Reset HitCount]
type = VarSet
triggerall = numexplod(8701)!=0
trigger1 = var(31) = 0
trigger2 = roundstate = [3,4]
var(32) := var(34) := 0
ignorehitpause = 1

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

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

; ---------------------------------------------------------
; Down message (Appears when partner dies)
; sound First attack
[State -2, Finish]
type = PlaySnd
triggerall = numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || (p2stateno = [5000,5899]) || p2stateno = [1051, 1075])
trigger2 = (numproj > 0) && (p2stateno = 8000 || (p2stateno = [5000,5899]) || p2stateno = [1051, 1075])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || (p2stateno = [5000,5899]) || p2stateno = [1051, 1075])
persistent = 0
value = 8560, 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]) || p2stateno = [1051, 1075])
trigger2 = (numproj > 0) && (p2stateno = 8000 || (p2stateno = [5000,5899]) || p2stateno = [1051, 1075])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || (p2stateno = [5000,5899]) || p2stateno = [1051, 1075])
anim = 221
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]) || p2stateno = [1051, 1075])
trigger2 = (numproj > 0) && (p2stateno = 8000 || (p2stateno = [5000,5899]) || p2stateno = [1051, 1075])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || (p2stateno = [5000,5899]) || p2stateno = [1051, 1075])
anim = 222
ID = 8580
postype = right
pos = -9,100;130;82
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60;90
pausemovetime = 60;90
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[state 19]
type = varadd
trigger1 = RoundState = 2
var(17) = 1

;Damage dampener
;-----------------
[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = var(31) <= 0
value = 1
ignorehitpause = 1

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = var(31) > 15
value = 0.65
ignorehitpause = 1

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = var(31) > 25
value = 0.50
ignorehitpause = 1

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = var(31) > 40
value = 0.35
ignorehitpause = 1

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = var(31) > 60
value = 0.15
ignorehitpause = 1

;------------------------------------------------------------------------
; Shows a simbol P1 (O)- own
[State -3, s1]
type = Explod
triggerall = enemynear, alive
trigger1 = enemynear, screenpos y < 0
trigger2 = enemynear, screenpos y > 220 - (const(size.head.pos.y))
trigger3 = P2bodyDist y > 200
anim = 10002 + 2*(!ishometeam)
id = 10002
pos = ceil(enemynear, screenpos x), 20 + (enemynear, screenpos y > 0) * 200
postype = left
ignorehitpause = 1
ontop = 1
bindtime = -1
persistent = 1
removetime = 1
scale = const(size.xscale)*0.5, const(size.yscale)*0.5

; Shows a simbol P1 (>)- own
[State -3, s2]
type = Explod
triggerall = enemynear, alive
trigger1 = enemynear, screenpos y < 0
trigger2 = enemynear, screenpos y > 220 - (const(size.head.pos.y))
trigger3 = P2bodyDist y > 200
anim = 10003 + 2*(!ishometeam)
id = 10003
pos = ceil(enemynear, screenpos x), 20 + (enemynear, screenpos y > 0) * 200
postype = left
ignorehitpause = 1
ontop = 1
bindtime = -1
persistent = 1
facing = (enemynear, facing)
removetime = 1
scale = const(size.xscale)*0.30, const(size.yscale)*0.30

; Shows a simbol P2 (O)- own
;[State -3, s3]
;type = Explod
;triggerall = alive
;trigger1 = screenpos y < 0
;trigger2 = screenpos y > 220 - (const(size.head.pos.y))
;trigger3 = P2bodyDist y < -200
;anim = 10004 - 2*(!ishometeam)
;id = 10004
;pos = ceil(screenpos x), 20 + (screenpos y > 0) * 200
;postype = left
;ignorehitpause = 1
;ontop = 1
;bindtime = -1
;persistent = 1
;removetime = 1
;scale = const(size.xscale)*0.5, const(size.yscale)*0.5

; Shows a simbol P2 (>)- own
;[State -3, s4]
;type = Explod
;triggerall = alive
;trigger1 = screenpos y < 0
;trigger2 = screenpos y > 220 - (const(size.head.pos.y))
;trigger3 = P2bodyDist y < -200
;anim = 10005 - 2*(!ishometeam)
;id = 10005
;pos = ceil(screenpos x), 20 + (screenpos y > 0) * 200
;postype = left
;ignorehitpause = 1
;ontop = 1
;bindtime = -1
;persistent = 1
;facing = facing
;removetime = 1
;scale = const(size.xscale)*0.30, const(size.yscale)*0.30

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

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3,1]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 40, 0

[State -3]
type = Helper
trigger1 = NumHelper(6119) = 0
trigger1 = WinKO
id = 6119
pos = 0, 0
postype = p1
facing = 0
name = "winko"
stateno = 6119
keyctrl = 0
ownpal = 1
supermovetime = 1000
pausemovetime = 1000
ignorehitpause = 1

[state -3,2]
type = afterimagetime
trigger1 = movetype = H
time = 0
 
[state -3, 1]
type = varset
trigger1 = statetype != A && ctrl
v = 6
value = 0

[state -3, 2]
type = varset
trigger1 = statetype != A && ctrl && stateno != 100
v = 4
value = 0

[state -3, 2]
type = varset
trigger1 = statetype != A && ctrl
v = 11
value = 0

[State -3, 3]
type = ScreenBound
trigger1 = Var(9) = 1 ; && var(11) < 32 && stateno != 100
value = 0
movecamera = 0,0

[State -3, 4]
type = ScreenBound
trigger1 = Var(9) = 0 ; || (statetype = A && var(11) >= 32)
value = 1
movecamera = 1,1

[state -3, 5]
type = varadd
trigger1 = var(9) = 1
v = 11
value = 1

;-------- Activating AI ----------------------------------------------------
[State -3, Activate AI]
type = VarSet
triggerall = var(59) != 1
trigger1 = (command = "CPU_1") || (command = "CPU_2")
trigger2 = (command = "CPU_3") || (command = "CPU_4")
trigger3 = (command = "CPU_5") || (command = "CPU_6")
trigger4 = (command = "CPU_7") || (command = "CPU_8")
trigger5 = (command = "CPU_9") || (command = "CPU_10")
trigger6 = (command = "CPU_11") || (command = "CPU_12")
trigger7 = (command = "CPU_13") || (command = "CPU_14")
trigger8 = (command = "CPU_15") || (command = "CPU_16")
trigger9 = (command = "CPU_17") || (command = "CPU_18")
trigger10 = (command = "CPU_19") || (command = "CPU_20")
trigger11 = (command = "CPU_21") || (command = "CPU_22")
trigger12 = (command = "CPU_23") || (command = "CPU_24")
trigger13 = (command = "CPU_25") || (command = "CPU_26")
trigger14 = (command = "CPU_27") || (command = "CPU_28")
trigger15 = (command = "CPU_29") || (command = "CPU_30")
trigger16 = (command = "CPU_31") || (command = "CPU_32")
trigger17 = (command = "CPU_33") || (command = "CPU_34")
trigger18 = (command = "CPU_35") || (command = "CPU_36")
trigger19 = (command = "CPU_37") || (command = "CPU_38")
trigger20 = (command = "CPU_39") || (command = "CPU_40")
trigger21 = (command = "CPU_41") || (command = "CPU_42")
trigger22 = (command = "CPU_43") || (command = "CPU_44")
trigger23 = (command = "CPU_45") || (command = "CPU_46")
trigger24 = (command = "CPU_47") || (command = "CPU_48")
trigger25 = (command = "CPU_49") || (command = "CPU_50")
var(59) = 1

[State -3, AI Condition Reset]
type = VarSet
triggerall = var(58) != 0
trigger1 = roundstate != 2
trigger2 = MoveType != A
var(58) = 0


; --------------------- (Misc State -3 stuff) ------------------------
[State -3, Win Sound]
type = PlaySnd
triggerall = !var(59)
trigger1 = (stateno = [181, 183]) && (time = 1)
value = 180, 0
volume = 255
channel = 1
persistent = 0

[State -3, Wall Hit Sound]
type = PlaySnd
triggerall = !NumExplod(9049)
triggerall = Enemy, BackEdgeDist < 5
trigger1 = (enemy, stateno = 5030) && (time = 1)
trigger2 = (enemy, stateno = 5050) && (time = 1)
trigger3 = enemy, stateno = 5020
trigger4 = (enemy, stateno = 6402) && (time = 1)
trigger5 = (enemy, stateno = 6030) && (time = 1)
trigger6 = (enemy, stateno = 6300) && (time = 1)
trigger7 = (enemy, stateno = 45434) && (time = 1)
trigger8 = (enemy, stateno = 45435) && (time = 1)
trigger9 = (enemy, stateno = 45436) && (time = 1)
trigger10 = (enemy, stateno = 5051) && (time = 1)
value = 53,0
volume = 100
ignorehitpause = 1
persistent = 0

[State -3, Wall Hit Spark]
type = Explod
triggerall = !NumExplod(9049)
triggerall = Enemy, BackEdgeDist < 5
trigger1 = (enemy, stateno = 5030) && (time = 1)
trigger2 = (enemy, stateno = 5050) && (time = 1)
trigger3 = enemy, stateno = 5020
trigger4 = (enemy, stateno = 6402) && (time = 1)
trigger5 = (enemy, stateno = 6030) && (time = 1)
trigger6 = (enemy, stateno = 6300) && (time = 1)
trigger7 = (enemy, stateno = 45434) && (time = 1)
trigger8 = (enemy, stateno = 45435) && (time = 1)
trigger9 = (enemy, stateno = 45436) && (time = 1)
anim = 7
ID = 9049
pos = 0, -60
postype = p2
bindtime = 1
facing = -1
removetime = -2
scale = 0.5, 0.5
sprpriority = 4
ownpal = 1
ignorehitpause = 1
persistent = 0

; ============= (Master System Helper [Thanks to Messatsu]) =============
[State -3, System Helper]
type = Helper
trigger1 = !Numhelper(1337000000)
stateno = 1337000000
ID = 1337000000
name = "Master System Helper"
ownpal = 1

; ============================ (TAG SYSTEM) =============================
; Run into the screen (tagged in)
[State -3, enter the screen]
type = ChangeState
triggerall = var(30)      		; Partner TAG mode activated
triggerall = NumPartner
triggerall = stateno = 4512		; Player waiting outside the screen
trigger1 = partner, stateno = 4510      ; Partner leaving the screen
trigger1 = Life		                ; And you're alive
value = 4500

; Enter and do a Hyper (Tag attack)
[State -3, enter the screen]
type = ChangeState
triggerall = var(30)      		; Partner TAG mode activated
triggerall = NumPartner
triggerall = stateno = 4512		; Player waiting outside the screen
trigger1 = partner, stateno = 4600      ; Partner doing his Hyper Attack
trigger1 = Life		                ; And you're alive
value = 4601

; Enter and help partner (Assist)
[State -3, enter the screen]
type = ChangeState
triggerall = var(30)      		       ; Partner TAG mode activated
triggerall = NumPartner
triggerall = stateno = 4512		       ; Player waiting outside the screen
triggerall = Life	                       ; And you're alive
trigger1 = partner, stateno = 4700             ; Partner doing his taunt
;------------------------------------------------------------------------
;Special case for Beximus Chars with tag enabled
trigger2 = partner, AuthorName = "Beximus"
trigger2 = partner, stateno = 4900
;------------------------------------------------------------------------
trigger3 = (partner, MoveType = A) && (partner, statetype != A)
trigger3 = (command = "y") && (command = "b")  ; Assist command performed
trigger3 = partner, stateno = [200, 399]       ; During standing attacks
trigger4 = (partner, MoveType = A) && (partner, statetype != A)
trigger4 = (command = "y") && (command = "b")  ; Assist command performed
trigger4 = partner, stateno = [400, 599]       ; During crouching attacks
value = 4701
ignorehitpause = 1

; Enter and help partner (Partner Counter)
[State -3, enter the screen]
type = ChangeState
triggerall = var(30)      		; Partner TAG mode activated
triggerall = NumPartner
triggerall = stateno = 4512		; Player waiting outside the screen
trigger1 = partner, stateno = 4800      ; Partner going out
trigger1 = partner, time >= 3
trigger1 = Life		                ; And you're alive
value = 4801

; Jump into the screen (partner was KOed)
[State -3, enter the screen]
type = ChangeState
triggerall = var(30)      		; Partner TAG mode activated
triggerall = NumPartner
triggerall = StateNo = 4512             ; Player waiting outside the screen
trigger1 = !(Partner, Life)             ; Partner dead
trigger1 = (partner, stateno = 5150)
trigger1 = Life                         ; And you're alive
trigger2 = roundstate >= 3              ; the match is over
trigger2 = Win || LoseTime || WinTime || DrawGame
value = 4520

[State -3, wait out of the stage]
type = ChangeState
triggerall = NumPartner
trigger1 = var(30) = [2, 5]                ; just performed team attack or assist attack
trigger1 = RoundState = 2                  ; currently fighting
trigger1 = Life && Partner, Life	   ; And you're alive
trigger1 = (stateno != [1000,4000]) && (stateno != [4500,4999])
trigger1 = stateno != [5000, 5899]
value = 4511

; Delayed Hyper combo System States
; ---------------------------------
[State -3, Delayed Hyper Combo (upper_pp)]
type = ChangeState
triggerall = NumPartner
triggerall = var(30)
triggerall = stateno = 4512
triggerall = partner, life
triggerall = partner, stateno = [1000, 1001]
triggerall = partner, var(31) = [1, 2]
triggerall = partner, time >= 2
trigger1 = command ="upper_pp"
value = 4650

[State -3, Delayed Hyper Combo (QCF_pp)]
type = ChangeState
triggerall = NumPartner
triggerall = var(30)
triggerall = stateno = 4512
triggerall = partner, life
triggerall = partner, stateno = [1050, 1051]
triggerall = partner, var(31) = [1, 2]
triggerall = partner, time >= 2
trigger1 = command = "QCF_pp"
value = 4651

[State -3, Delayed Hyper Combo (QCF_kk)]
type = ChangeState
triggerall = NumPartner
triggerall = var(30)
triggerall = stateno = 4512
triggerall = partner, life
triggerall = partner, stateno = [1070, 1076]
triggerall = partner, var(31) = [1, 2]
triggerall = partner, time >= 2
trigger1 = command = "QCF_kk"
value = 4652
