; Falco constants.

[Data]
life = 2000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 0
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1
yscale = 1
ground.back = 15
ground.front = 16
air.back = 12
air.front = 12
height = 60
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = -5, -90
mid.pos = -5, -60
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd  = 2.8
walk.back = -2.6
run.fwd  = 4.6, 0
run.back = -4.5,-3.8
jump.neu = 0,-10.0
jump.back = -2.55
jump.fwd = 2.5
runjump.back = -2.55,-8.1
runjump.fwd = 4,-9
airjump.neu = 0,-9
airjump.back = -2.55
airjump.fwd = 2.5

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

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

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

[State 100, 5]
type = PlaySnd
trigger1 = Animelem = 1
value = 9000,1
volume = -100

[State 100, Super B]
type = AfterImage
trigger1 = time = 1
trigger1 = var(16) = 0
time = 15
length = 15
PalBright   = 50,  60,  0
timegap = 1
framegap = 2
Trans = Add1

[State 100, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(1) >= 0
trigger1 = var(16) = 0
time = 10

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

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

[State 100, 4]
type = ChangeState
trigger1 = command != "holdfwd"
trigger2 = p2bodydist X < 5
value = 0

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Lose vs Raoul
[Statedef 170]
type    = L
movetype= H
physics = N
ctrl = 0
anim = 170;5120
velset = 0,0

[State 170, lightfx]
type = Explod
trigger1 = animelem = 1
anim = 9297
pos = 0,0
sprpriority = 5
ontop = 1

[State 170, fx]
type = Explod
trigger1 = animelem = 13
anim = 9170
pos = 0,0
sprpriority = 4
ontop = 1

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

[State 170, cambio]
type = Pause
trigger1 = animtime = 0
time = 20

[State 170, cambio]
type = Changeanim
trigger1 = animtime = 0
persistent = 0 ;new
value = 170

[State 170, Suono]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = anim = 170
value = 4000,7
volume = 0

[State 170, Suono]
type = PlaySnd
trigger1 = animelem = 5
trigger1 = anim = 170
value = 9000,1
volume = 120

[State 170, sangue]
type = Explod
trigger1 = animelem = 5
trigger1 = anim = 170
anim = F10
pos = 1,-50
ontop = 1

[State 170, cambio]
type = Changeanim
trigger1 = animtime = 0
trigger1 = anim = 170
value = 170

[State 170, 2] 
type = AssertSpecial
trigger1 = time < 200
;trigger1 = animelemtime(20) < 15
flag = roundnotover

[State 170, 2] 
type = null
;type = ChangeState
trigger1 = animelemtime(20) > 15
trigger1 = !alive
value = 5150

;---------------------------------------------------------------------------
; Lose by time over
[Statedef 175]
type = S
ctrl = 0
anim = 175
velset = 0,0

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

;---------------------------------------------------------------------------
; Win state decider
[Statedef 180]
type = S

[State 180, Randomizer]
type = VarRandom
trigger1 = time = 0
v = 10
range = 0, 60

; oscuro
[State 180, 1]
type = ChangeState
trigger1 = var(10) <= 30
value = 181

; Risata
[State 180, 1]
type = ChangeState
trigger1 = var(10) > 30
value = 182

;---------------------------------------------------------------------------
; Win pose 1 - Oscuro
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 181, suono]
type = PlaySnd
trigger1 = time = 0
value = 4000,12

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

;---------------------------------------------------------------------------
; Win pose 2 - Risata
[Statedef 182]
type = S
ctrl = 0
anim = 180
velset = 0,0

[State 182, suono]
type = PlaySnd
trigger1 = animelem = 5
value = 4000,12

[State 182, energia]
type = null
;type = Explod
trigger1 = time = 0
anim = 197
ID = 197
pos = 1,3
removetime = -1

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

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

[State 190, cambio]
type = changestate
trigger1 = p2name = "kenshiro"
value = 192

[State 190, Suono]
type = PlaySnd
trigger1 = animelem = 5
value = 191,1
volume = 100

[State 190, mantello]
type = helper
trigger1 = animelem = 8
helpertype = normal
pos = 0,0
postype = p1
name = "mantello2"
stateno = 198

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

; Mantello -----------------------------------------------------------------------
[Statedef 198]
type = S
velset = 0,0
anim = 198
sprpriority = -5

[State 198, 1]
type = AssertSpecial
trigger1 = time >= 60
flag = invisible

[State 198, 2]
type = AfterImage
trigger1 = Time = [59,61]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 130,130,130
trans = add

[State 198, 2]
type = AfterImage
trigger1 = Time = [62,64]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 110,110,110
trans = add

[State 198, 2]
type = AfterImage
trigger1 = Time = [65,67]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 90,90,90
trans = add

[State 198, 2]
type = AfterImage
trigger1 = Time = [68,70]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 70,70,70
trans = add

[State 198, 2]
type = AfterImage
trigger1 = Time = [71,73]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 50,50,50
trans = add

[State 198, 2]
type = AfterImage
trigger1 = Time = [74,76]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 30,30,30
trans = add

[State 198, 2]
type = AfterImage
trigger1 = Time > 76
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 10,10,10
trans = add

[State 198, 1]
type = Destroyself
trigger1 = Animtime = 0

; Intro vs Kenshiro --------------------------------------------------------

[Statedef 192]
type = S
ctrl = 0
velset = 0,0
anim = 192

[State 192, suono]
type = PlaySnd
trigger1 = animelem = 3
value = 210, 1
volume = -100

[State 192, cade]
type = PlaySnd
trigger1 = animelem = 5
value = 4000,12
volume = -50

[State 192, bart]
type = helper
trigger1 = time = 0
helpertype = normal
pos = 45,-40
postype = p1
name = "bart"
stateno = 193

[State 192, mantello]
type = helper
trigger1 = animelem = 8
helpertype = normal
pos = 0,0
postype = p1
name = "mantello1"
stateno = 199

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

; Bart ---------------------------------------------------------------------

[Statedef 193]
type = S
ctrl = 0
velset = 0,0
anim = 193

[State 193, Bind 11]
type = Bindtoparent
trigger1 = AnimElem = 1
pos = 45, -40

[State 193, Bind 11]
type = Bindtoparent
trigger1 = AnimElem = 2
pos = 55, -25

[State 193, Bind 11]
type = Bindtoparent
trigger1 = AnimElem = 3
pos = 65, -10

[State 193, Bind 11]
type = Bindtoparent
trigger1 = AnimElem = 4
pos = 75, 0

[State 193, Bind 11]
type = Bindtoparent
trigger1 = AnimElem = 5
pos = 100, 10

[State 193, cade]
type = PlaySnd
trigger1 = animelem = 5
value = 210, 2
volume = -50

[State 193, 1]
type = AssertSpecial
trigger1 = time >= 135
flag = invisible

[State 193, 2]
type = AfterImage
trigger1 = Time = [120,123]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 250,250,250
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time = [124,126]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 230,230,230
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time = [127,129]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 210,210,210
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time = [130,132]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 190,190,190
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time = [133,135]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 170,170,170
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time = [136,138]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 150,150,150
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time = [139,141]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 130,130,130
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time = [142,144]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 110,110,110
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time = [145,147]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 90,90,90
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time = [148,150]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 70,70,70
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time = [151,153]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 50,50,50
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time = [154,156]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 30,30,30
trans = add

[State 193, 2]
type = AfterImage
trigger1 = Time > 156
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 10,10,10
trans = add

[State 193, 1]
type = Destroyself
trigger1 = Animtime = 0

; Mantello VS Kenshiro -----------------------------------------------------------------------
[Statedef 199]
type = S
velset = 0,0
anim = 199
sprpriority = -5

[State 199, 1]
type = AssertSpecial
trigger1 = time >= 60
flag = invisible

[State 199, 2]
type = AfterImage
trigger1 = Time = [59,61]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 130,130,130
trans = add

[State 199, 2]
type = AfterImage
trigger1 = Time = [62,64]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 110,110,110
trans = add

[State 199, 2]
type = AfterImage
trigger1 = Time = [65,67]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 90,90,90
trans = add

[State 199, 2]
type = AfterImage
trigger1 = Time = [68,70]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 70,70,70
trans = add

[State 199, 2]
type = AfterImage
trigger1 = Time = [71,73]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 50,50,50
trans = add

[State 199, 2]
type = AfterImage
trigger1 = Time = [74,76]
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 30,30,30
trans = add

[State 199, 2]
type = AfterImage
trigger1 = Time > 76
time = 5
framegap = 1
length = 2
paladd = 0, 0, 0
palmul = .55,.55,.55
palcontrast = 10,10,10
trans = add

[State 199, 1]
type = Destroyself
trigger1 = Animtime = 0


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

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

[State 10, Suono]
type = PlaySnd
trigger1 = time = 2
value = 4000,7
volume = 120

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


;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S                     
movetype= A                      
physics = S                      
juggle  = 1                      
;Commonly-used controllers:
velset = 0,0                     
ctrl = 0                         
anim = 200                       
poweradd = 20                    
sprpriority = 2                  

[State 200, 2]
type = PlaySnd
trigger1 = Time = 1
value = 210, 1

[State 200, 3.5]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA                     
damage = 20, 0                   
animtype = Light                 
guardflag = MA                   
hitflag = MAF                    
priority = 3, Hit               
pausetime = 8, 8                
sparkno = 0                     
sparkxy = -10, -87              
hitsound = s201, 2                 
guardsound = 6, 0
ground.type = High               
ground.slidetime = 15            
ground.hittime  = 22             
ground.velocity = -4             
airguard.velocity = -1.9,-.8     
air.type = High                  
air.velocity = -1.4,-3           
air.hittime = 12          


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


; Standing light punch (close)
[Statedef 205]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 205
sprpriority = 3

[State 205]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 205, 2]
type = PlaySnd
trigger1 = Time = 2
value = 210, 1

[State 205, 3.5]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 20
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-87
hitsound = s201, 2
guardsound = 6, 0
ground.type = High
ground.slidetime = 22
ground.hittime  = 25
ground.velocity = -5.5
air.velocity = -2.5,-4

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

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

; Standing strong punch(close)
[Statedef 215]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 215
sprpriority = 3

[State 215]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 215, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 240, 2

[State 215, 2.5]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
animtype  = medium
damage    = 70,10
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-87
hitsound   =  s301, 4
guardsound = 6, 0
ground.type = High
ground.slidetime = 22
ground.hittime  = 30
ground.velocity = -5.5
air.velocity = -2.5,-4

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

;---------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
;juggle  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = 301,3

[State 230, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
attr = S, NA
animtype  = Medium
damage    = 10
guardflag = MA
pausetime = 12,12
sparkno = 0
sparkxy = -10,-79
hitsound = s201, 2
guardsound = 6, 0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 22
ground.velocity = -5
air.velocity = -2.5,-3.5

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

;---------------------------------------------------------------------------
; Standing light kick(close)
; CNS difficulty: easy
[Statedef 235]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 235
sprpriority = 2

[State 235, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 235, 1]
type = PlaySnd
trigger1 = Time = 2
value = 301,3

[State 235, 2.5]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 20
guardflag = MA
pausetime = 12,12
sparkno = 0
sparkxy = 0,-79
hitsound = s201, 2
guardsound = 6, 0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = -5
air.velocity = -2.5,-3.5

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

;---------------------------------------------------------------------------
; Standing strong kick
; CNS difficulty: easy
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 240, 1]
type = PlaySnd
trigger1 = Time = 2
value = 210, 1

[State 240, 2.5]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
attr = S, NA
animtype  = Medium
damage    = 30,5
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-100
hitsound   =  s301, 4
guardsound = 6, 0
ground.type = Low
ground.slidetime = 22
ground.hittime  = 25
ground.velocity = -6
air.velocity = -2.2,-3.2

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



; Standing strong kick(close)
; CNS difficulty: easy
[Statedef 245]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 245
sprpriority = 2

[State 245, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 245, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 210,1

[State 245, 2.5]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
attr = S, NA
animtype  = Medium
damage    = 35,5
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-72
hitsound   =  s301, 4
guardsound = 6, 0
ground.type = Low
ground.slidetime = 22
ground.hittime  = 25
ground.velocity = -6
air.velocity = -2.2,-3.2

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


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

[State 400, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 210, 1

[State 400, 2.5]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 20
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkno = 0
sparkxy = -10,-52
hitsound = s201, 2
guardsound = 6, 0
ground.type = Low
ground.slidetime = 14
ground.hittime  = 22
ground.velocity = -4
air.velocity = -1.5,-3

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

;---------------------------------------------------------------------------
;Crouching strong punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 410
sprpriority = 2

[State 410, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 410, 1]
type = PlaySnd
trigger1 = Time = 1
value = 240, 2

[State 410, 2.5]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
attr = C, NA
damage    = 60,10
animtype  = Medium
hitflag = MAF
guardflag = M
pausetime = 12,12
sparkno = 1
sparkxy = -10,-55
hitsound   =  s301, 4
guardsound = 6, 0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -4
air.velocity = -3,-4

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


;Crouching light kick

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

[State 430, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 430, 1]
type = PlaySnd
trigger1 = Time = 1
value = 301, 3

[State 430, 2.5]
type = HitDef
trigger1 = animelem = 3
attr = C, NA
damage    = 20
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = 0
sparkxy = -10,-8
hitsound = s201, 2
guardsound = 6, 0
ground.type = Low
ground.slidetime = 14
ground.hittime  = 22
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

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



;---------------------------------------------------------------------------
;Crouch Strong Kick
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 70
ctrl = 0
anim = 440
sprpriority = 2

[State 440, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 440, 2]
type = PlaySnd
trigger1 = Time = 2
value = 240, 2

[State 440, 3.5]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
attr = C, NA
damage    = 60,10
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = 1
sparkxy = -5,-10
hitsound   =  s301, 4
guardsound = 6, 0
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 25
ground.velocity = -1.5,-2
air.velocity = -1.2,-3
guard.velocity = -5
fall = 1


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

;---------------------------------------------------------------------------
;Jump Light Punch UP

[Statedef 605]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 605
sprpriority = 2

[State 605, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 605, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 210, 1

[State 605, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 20
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = 0
sparkxy = -10,-30
hitsound = s201, 2
guardsound = 6, 0
ground.type = High
ground.slidetime = 25
ground.hittime  = 28
ground.velocity = -4
air.velocity = -1.3,-3

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

;---------------------------------------------------------------------------
;Jump Light Punch FB

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

[State 600, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 600, 1]
type = PlaySnd
trigger1 = Time = 1
value = 210, 1

[State 600, 2.5]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 20
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = 0
sparkxy = -10,-30
hitsound = s201, 2
guardsound = 6, 0
ground.type = High
ground.slidetime = 25
ground.hittime  = 35
ground.velocity = -4
air.velocity = -1.3,-3

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

;---------------------------------------------------------------------------
;Jump Strong Punch

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

[State 615, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 615, 2]
type = PlaySnd
trigger1 = Time = 2
value = 240, 2

[State 615, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage = 70,10
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = 1
sparkxy = -10,-30
hitsound   =  s301, 4
guardsound = 6, 0
animtype = medium
ground.type = High
ground.slidetime = 27
ground.hittime  = 37
ground.velocity = -5
air.velocity = -3,-4

;---------------------------------------------------------------------------
;Jump Strong Punch FB
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 610
sprpriority = 2

[State 610, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 240, 2

[State 610, 3]
type = HitDef
trigger1 = AnimElem = 3
attr = A, NA
damage = 60,10
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = 1
sparkxy = -10,-30
hitsound   =  s301, 4
guardsound = 6, 0
animtype = Med
ground.type = High
ground.slidetime = 27
ground.hittime  = 37
ground.velocity = -5
air.velocity = -3,-4

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

;---------------------------------------------------------------------------
;Jump Strong Punch

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

[State 635, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 635, 2]
type = PlaySnd
trigger1 = Time = 2
value = 240, 2

[State 635, 3.5]
type = HitDef
trigger1 = AnimElem = 1
attr = A, NA
damage = 70,10
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = 1
sparkxy = -10,-30
hitsound   =  s301, 4
guardsound = 6, 0
animtype = Med
ground.type = High
ground.slidetime = 27
ground.hittime  = 37
ground.velocity = -5
air.velocity = -3,-4

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


;---------------------------------------------------------------------------
;Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 20
ctrl = 0
anim = 630
sprpriority = 2

[State 630, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 630, 1]
type = PlaySnd
trigger1 = Time = 1
value = 301, 3

[State 630, 2.5]
type = HitDef
trigger1 = AnimElem = 1
attr = A, NA
damage = 30
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = 1
sparkxy = -5,-30
hitsound = s201, 2
guardsound = 6, 0
ground.type = High
ground.slidetime = 26
ground.hittime  = 26
ground.velocity = -4
air.velocity = -2,-3

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

;---------------------------------------------------------------------------
;Jump Strong Kick Up
; CNS difficulty: easy
[Statedef 645]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 645
sprpriority = 2

[State 645, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 645, 2]
type = PlaySnd
trigger1 = Time = 2
value = 301, 3

[State 645, 3.5]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 70,10
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = 1
sparkxy = -10,-30
hitsound   =  s301, 4
guardsound = 6, 0
animtype = Med
ground.type = High
ground.slidetime = 27
ground.hittime  = 37
ground.velocity = -5
air.velocity = -3,-4

;---------------------------------------------------------------------------
;Jump Strong Kick FB
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 640
sprpriority = 2

[State 640, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 5, 0

[State 640, 2]
type = PlaySnd
trigger1 = Time = 2
value = 240, 2

[State 640, 3]
type = HitDef
trigger1 = AnimElem = 1
attr = A, NA
damage = 60,10
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = 1
sparkxy = -10,-30
hitsound   =  s301, 4
guardsound = 6, 0
animtype = Med
ground.type = High
ground.slidetime = 27
ground.hittime  = 37
ground.velocity = -5
air.velocity = -3,-4

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

;----------------------------------------
; Dodge
[Statedef 700]
type = S
movetype = I
physics = S
velset = 0
anim = 700
ctrl = 0

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

[State 700, 2]
type = PlaySnd
trigger1 = Time = 0
value = 5,0
volume = -50

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

; Respinta

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

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

[State 750, Blink]
type = PalFX
trigger1 = Time = 0
time = 40
add = 32,16,0
sinadd = 64,32,5,3

[State 750, colpo]
type = hitdef
trigger1 = animelem = 3
attr = A, NA
damage    = 20
getpower  = 50
givepower = 30
guardflag = HA
priority = 5
animtype = Low
pausetime = 10, 12
sparkxy = -10,-51
hitsound   = S301,4
guardsound = 6,0
ground.type = trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4,-6
air.velocity = -4, -6
fall = 1

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

; Scivolata ----------------------------------------------------------------------------------------------
[Statedef 790]
type = S
movetype = I
physics = N
velset = 0,0
ctrl = 0
movetime = 0
anim = 790

[State 790, 1]
type = SprPriority
trigger1 = Time = 0
value = -2

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

[State 790, 1]
type = VelSet
trigger1 = AnimElem = 3
x = 0

[State 790, 0]
type = PlayerPush
trigger1 = 1
value = 0

[State 790, 1]
type = VelSet
trigger1 = AnimElem = 1
x = 6

[State 790, 2]
type =AfterImage
trigger1 = time = 0
time = 2
timeGap  = 1
frameGap = 2
length = 8
trans = add1
palBright   =   0,  0,  0
palContrast = 128,128,128
palAdd      =   0,  0,  0
palMul      =   1,  1,  1

[State 790, 2]
type = AfterImageTime
trigger1 = AnimElem = 3, < 0
time = 2

[State 790, 0]
type = Turn
trigger1 = AnimElem = 3
trigger1 = P2Dist X < 0

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

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

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
sprpriority = 1       ;Draw in front of p2
p1stateno = 810       ;On success, KFM changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

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

;---------------------------------------------------------------------------
;Kung Fu Throw - Throwing the opponent
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 210, 2

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 4
value = 210, 1

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 1
pos = 80, -10

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 2
pos = 70, 0

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 3
pos = 50, 10

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 4
pos = 10, -30

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 5
pos = -60, 0

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -80

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 5
value = 821

[State 810, Pos 15]
type = PosAdd
trigger1 = AnimElem = 5
x = -10

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

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
[Statedef 820]
type    = A
movetype= H
physics = N

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

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw - thrown into the air
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 5,5
poweradd = 40

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

;Carica Power BAR ******************************************************************************************

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

[State 196, rand]
type = VarRandom
trigger1 = time%20 = 0
v = 20
range = 0,1000

[State 196, energia]
type = Explod
triggerall = time = 0
trigger1 = var(0) = 0
trigger2 = var(20) <= 200
trigger2 = var(0) = 1
anim = 197
ID = 197
pos = -2,0
removetime = -1

[State 196, suono]
type = PlaySnd
trigger1 = time = 0
value = 4000,10
channel = 2
loop = 1
pan = 1

[State 196, premuto]
type = PowerAdd
trigger1 = command = "hold_s"
trigger1 = var(0) = 0
trigger2 = var(0) = 1
trigger2 = var(20) <= 200
value = 8

[State 196, trema]
type = EnvShake
trigger1 = time%5 = 0
time = 5
freq = 60
ampl = -2

;[State 196, colore]
;type = PalFX
;trigger1 = time%10 = 0
;time = 5
;add = 255,255,0
;mul = 120,120,256
;sinadd = 370,300,0

[State 196, fine]
type = ChangeState
trigger1 = command != "hold_s"
trigger1 = var(0) = 0
trigger2 = var(20) >= 200
trigger2 = var(0) = 1
value = 0


;-----------------------------------------------------------------------
;Fireball debole
[Statedef 1300]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
velset = 0
anim = 1300

[State 1300, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 4000,8

[State 1300, lightfx]
type = Explod
trigger1 = animelem = 5
anim = 1304
pos = 0,0
sprpriority = 4
ontop = 1
id = 1300

[State 1300, Blink]
type = null
;type = PalFX
trigger1 = Time = 0
time = 30
add = 32,16,0
sinadd = 64,32,5,3

[State 1300, 2]
type = Projectile
trigger1 = AnimElem = 11
projanim = 1301
;projhitanim = 1310
projremovetime = 20
projid = 1300
offset = 110, -100
velocity = 3.0, 0
attr = S, SP
damage    = 70,7
animtype = hard
guardflag = MA
pausetime = 0,9
sparkxy = 10, 0
hitsound   = S10,2
guardsound = 6, 0
ground.type = Low
ground.slidetime = 14
ground.hittime  = 20
ground.velocity = -8
air.animtype = Back
air.velocity = -2.5,-5
air.juggle = 3
sparkno = -1
guard.sparkno = -1
palfx.time = 25
palfx.add = 256,21,-176
palfx.sinadd = 30,30,0,10
palfx.mul = 246,245,0
palfx.color = 256
palfx.invertall = 1

[State 1300, 2]
type = HitDef
trigger1 = animelem = 10
trigger2 = animelem = 11
attr = S, SA
damage    = 20,2
animtype  = light
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 9,9
sparkno = 10
sparkxy = -10,-80
hitsound   = S10,2
guardsound = 6, 0
ground.type = high
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -4
air.velocity = -1.3,-3

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

;-----------------------------------------------------------------------
;Fireball forte
[Statedef 1350]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
velset = 0
anim = 1300

[State 1350, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 4000,8

[State 1350, lightfx]
type = Explod
trigger1 = animelem = 5
anim = 1304
pos = 0,0
sprpriority = 4
ontop = 1
id = 1300

[State 1350, Blink]
type = PalFX
trigger1 = Time = 0
time = 10;30
add = 32,16,0
sinadd = 64,32,5,3

[State 1350, 2]
type = Projectile
trigger1 = AnimElem = 11
projanim = 1301
;projhitanim = 1310
projremovetime = 10
projid = 1300
offset = 110, -100
velocity = 6.0, 0
attr = S, SP
damage    = 70,7
animtype = hard
guardflag = MA
pausetime = 0,9
sparkxy = 10, 0
hitsound   = S10,2
guardsound = 6, 0
ground.type = Low
ground.slidetime = 14
ground.hittime  = 20
ground.velocity = -8
air.animtype = Back
air.velocity = -2.5,-5
air.juggle = 3
sparkno = -1
guard.sparkno = -1
palfx.time = 25
palfx.add = 256,21,-176
palfx.sinadd = 30,30,0,10
palfx.mul = 246,245,0
palfx.color = 256
palfx.invertall = 1

[State 1350, 2]
type = HitDef
trigger1 = animelem = 10
trigger2 = animelem = 11
attr = S, SA
damage    = 20,2
animtype  = light
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 9,9
sparkno = 10
sparkxy = -10,-80
hitsound   = S10,2
guardsound = 6, 0
ground.type = high
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -4
air.velocity = -1.3,-3

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

;-----------------------------------------------------------
;Cento Calci deboli
[Statedef 1400]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
velset = 0
anim = 1400

[State 1000, Blink]
type = PalFX
trigger1 = Time = 0
time = 70
add = 32,16,0
sinadd = 64,32,5,3

[State 1400, Randomizer]
type = VarRandom
trigger1 = time = 0
v = 5
range = 0, 120

[State 1400, Voce Cento calci]
type = PlaySnd
trigger1 = Animelem = 1
trigger1 = var(5) < 30
value = 4000,3
abspan = 10
volume = -50

[State 1400, 2]
type = HitDef
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
trigger5 = animelem = 6
trigger6 = animelem = 7
trigger7 = animelem = 8
trigger8 = animelem = 9
trigger9 = animelem = 10
trigger10 = animelem = 11
trigger11 = animelem = 12
trigger12 = animelem = 13
trigger13 = animelem = 14
trigger14 = animelem = 15
trigger15 = animelem = 16
attr = S, SA
damage    = 10,1
animtype  = hard
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 3,3
sparkno = 10
sparkxy = -10,-80
hitsound   = s201,2
guardsound = 6, 0
ground.type = high
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -0.3,-0.3
air.velocity = -0.3,-0.3

[State 1400, 3]
type = HitDef
trigger1 = AnimElem = 17
attr = S, SA
damage    = 20,2
animtype  = up
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 9,9
sparkxy = -10,-80
sparkno = 12
guardsound = 6, 0
ground.type = low
ground.slidetime = 4
ground.hittime  = 55
ground.velocity = -8,-1
air.velocity = -8,-3
fall = 1
fall.recover = 1

[State 1400,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = animelem = 17
ignorehitpause = 1
value = 0, 0, 0
time = 10
under = 1
supermove = 1

[State 1400,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = animelem = 17
ignorehitpause = 1
value = 255, 255, 255
time = 10
under = 1
supermove = 1

[State 1400, energia]
type = Explod
trigger1 = animelem[1,2] = 1
anim = 1410
pos = 0, 0
postype = p1
supermove = 1
ontop = 1

[State 1400,1]
type = PlaySnd
triggerall = movehit = 1
trigger1 = animelem = 17
value = F5,4
volume = -50

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

;-----------------------------------------------------------
;Cento Calci forti
[Statedef 1450]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
velset = 0
anim = 1400

[State 1450, Randomizer]
type = VarRandom
trigger1 = time = 0
v = 5
range = 0, 120

[State 1450, Voce Cento calci]
type = PlaySnd
trigger1 = Animelem = 1
trigger1 = var(5) < 30
value = 4000,3
abspan = 10
volume = -50

[State 1450, Blink]
type = PalFX
trigger1 = Time = 0
time = 70
add = 32,16,0
sinadd = 64,32,5,3

[State 1450, 2]
type = HitDef
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
trigger5 = animelem = 6
trigger6 = animelem = 7
trigger7 = animelem = 8
trigger8 = animelem = 9
trigger9 = animelem = 10
trigger10 = animelem = 11
trigger11 = animelem = 12
trigger12 = animelem = 13
trigger13 = animelem = 14
trigger14 = animelem = 15
trigger15 = animelem = 16
hitsound   = s201,2
guardsound = 6, 0
attr = S, SA
damage    = 20,2
animtype  = hard
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 5,5
sparkno = 10
sparkxy = -10,-80
ground.type = high
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -0.5,-0.5
air.velocity = -0.5,-0.5

[State 1450, 3]
type = HitDef
trigger1 = AnimElem = 17
attr = S, SA
damage    = 40,4
animtype  = up
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 9,9
sparkxy = -10,-80
sparkno = 12
guardsound = 6, 0
ground.type = high
ground.slidetime = 4
ground.hittime  = 55
ground.velocity = -5,-25
air.velocity = -5,-25
fall = 1
fall.recover = 0
yaccel = 1.2
fall.damage = 20

[State 1450,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
trigger5 = animelem = 6
trigger6 = animelem = 7
trigger7 = animelem = 8
trigger8 = animelem = 9
trigger9 = animelem = 10
trigger10 = animelem = 11
trigger11 = animelem = 12
trigger12 = animelem = 13
trigger13 = animelem = 14
trigger14 = animelem = 15
trigger15 = animelem = 16
ignorehitpause = 1
value = 0, 0, 0
time = 1
under = 1
supermove = 1

[State 1450,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
trigger5 = animelem = 6
trigger6 = animelem = 7
trigger7 = animelem = 8
trigger8 = animelem = 9
trigger9 = animelem = 10
trigger10 = animelem = 11
trigger11 = animelem = 12
trigger12 = animelem = 13
trigger13 = animelem = 14
trigger14 = animelem = 15
trigger15 = animelem = 16
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1
supermove = 1

[State 1450,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = animelem = 17
ignorehitpause = 1
value = 0, 0, 0
time = 10
under = 1
supermove = 1

[State 1450,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = animelem = 17
ignorehitpause = 1
value = 255, 255, 255
time = 10
under = 1
supermove = 1

[State 1450, tremor]
type = EnvShake
triggerall = movehit = 1
trigger1 = animelem = 17
persistent = 0
time = 30
ampl = -7
freq = 120
phase = 10

[State 1450, energia]
type = Explod
trigger1 = animelem[1,2] = 1
anim = 1410
pos = 0, 0
postype = p1
supermove = 1
ontop = 1

[State 1450,1]
type = PlaySnd
triggerall = movehit = 1
trigger1 = animelem = 17
value = F5,4
volume = 100

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

;Cento Pugni Light **************************************************************************
[Statedef 1600]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
velset = 0
anim = 1600
juggle = 15

;[State 1600, Blink]
;type = PalFX
;trigger1 = Time = 0
;time = 90
;add = 32,16,0
;sinadd = 64,32,5,3

[State 1600, voce]
type = PlaySnd
trigger1 = time = 0
value = 4000,11
pan = -20
channel = 3

[State 1600, fine voce]
type = StopSnd
trigger1 = animelem = 24
channel = 3

[State 1600, final]
type = PlaySnd
trigger1 = animelem = 26 && movehit
value = 301,4

[State 1600, pugno finale]
type = VelSet
trigger1 = animelem = 24
x = 8

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

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

[State 1600, 2]
type = HitDef
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
attr = S, SA
damage    = 4,2
animtype  = hard
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MAFD
pausetime = 5,5
sparkxy = -7,-90
sparkno = 10
hitsound   = S10,2
guardsound = 192, 1
ground.type = high
ground.slidetime = 14
ground.hittime  = 15
ground.velocity = 0,-0.5
air.velocity = 0,-0.5
air.hittime = 5
guard.velocity = -1

[State 1600, 2]
type = HitDef
triggerall = movehit 
trigger1 = animelem = 26
attr = S, SA
damage    = 10,2
animtype  = diagup
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 9,9
sparkxy = -7,-90
sparkno = 12
hitsound   = S0,3
guardsound = 192, 1
ground.type = high
ground.slidetime = 2
ground.hittime  = 5
air.velocity = -7,-7
ground.velocity = -5,-9
fall = 1


[State 1600,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
ignorehitpause = 1
value = 0, 0, 0
time = 1
under = 1
supermove = 1

[State 1600,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1
supermove = 1

[State 1600,1]
type = PlaySnd
triggerall = movehit = 1
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
value = 210,2
volume = -50

[State 1600,1]
type = PlaySnd
triggerall = movehit = 0
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
value = f6,0
volume = -100

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

;Cento Pugni Hard *****************************************************************************************
[Statedef 1650]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
velset = 0
anim = 1650

;[State 1650, Blink]
;type = PalFX
;trigger1 = Time = 0
;time = 120
;add = 32,16,0
;sinadd = 64,32,5,3

[State 1650, voce]
type = PlaySnd
trigger1 = time = 0
value = 4000,11
pan = -20
channel = 3

[State 1650, fine voce]
type = StopSnd
trigger1 = animelem = 40
channel = 3

[State 1650, pugno finale]
type = VelSet
trigger1 = animelem = 38
x = 8

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

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

[State 1650, final]
type = PlaySnd
trigger1 = animelem = 40 && movehit
value = f5,4

[State 1650, 2]
type = HitDef
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
trigger24 = animelem = 24
trigger25 = Animelem = 25
trigger26 = Animelem = 26
trigger27 = Animelem = 27
trigger28 = Animelem = 28
trigger29 = Animelem = 29
trigger30 = Animelem = 30
trigger31 = Animelem = 31
trigger32 = Animelem = 32
trigger33 = Animelem = 33
trigger34 = Animelem = 34
trigger35 = Animelem = 35
trigger36 = Animelem = 36
trigger37 = Animelem = 37
attr = S, SA
damage    = 7,3
animtype  = hard
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MAFD
pausetime = 3,3
sparkxy = -7,-90
sparkno = 10
hitsound   = S10,2
guardsound = 192, 1
ground.type = high
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = 0,-0.5
air.velocity = 0,-0.5
guard.velocity = -1

[State 1650, 2]
type = HitDef
triggerall = movehit 
trigger1 = Animelem = 40
attr = S, SA
damage    = 20,5
animtype  = Diagup
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 9,9
sparkxy = -7,-90
sparkno = 12
hitsound   = S0,3
guardsound = 192, 1
ground.type = high
ground.slidetime = 2
ground.hittime  = 5
air.velocity = -7,-7
ground.velocity = -5,-9
fall = 1
yaccel = 0.4
fall.recover = 0

[State 1650,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
trigger24 = animelem = 24
trigger25 = Animelem = 25
trigger26 = Animelem = 26
trigger27 = Animelem = 27
trigger28 = Animelem = 28
trigger29 = Animelem = 29
trigger30 = Animelem = 30
trigger31 = Animelem = 31
trigger32 = Animelem = 32
trigger33 = Animelem = 33
trigger34 = Animelem = 34
trigger35 = Animelem = 35
trigger36 = Animelem = 36
trigger37 = Animelem = 37
ignorehitpause = 1
value = 0, 0, 0
time = 1
under = 1
supermove = 1

[State 1650,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
trigger24 = animelem = 24
trigger25 = Animelem = 25
trigger26 = Animelem = 26
trigger27 = Animelem = 27
trigger28 = Animelem = 28
trigger29 = Animelem = 29
trigger30 = Animelem = 30
trigger31 = Animelem = 31
trigger32 = Animelem = 32
trigger33 = Animelem = 33
trigger34 = Animelem = 34
trigger35 = Animelem = 35
trigger36 = Animelem = 36
trigger37 = Animelem = 37
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1
supermove = 1

[State 1650,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = animelem = 40
ignorehitpause = 1
value = 0, 0, 0
time = 10
under = 1
supermove = 1

[State 1650,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = Animelem = 40
ignorehitpause = 1
value = 255, 255, 255
time = 10
under = 1
supermove = 1

[State 1650, tremor]
type = EnvShake
triggerall = movehit = 1
trigger1 = Animelem = 40
persistent = 0
time = 20
ampl = -7
freq = 100
phase = 10

[State 1650,1]
type = PlaySnd
triggerall = movehit = 1
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
trigger24 = animelem = 24
trigger25 = Animelem = 25
trigger26 = Animelem = 26
trigger27 = Animelem = 27
trigger28 = Animelem = 28
trigger29 = Animelem = 29
trigger30 = Animelem = 30
trigger31 = Animelem = 31
trigger32 = Animelem = 32
trigger33 = Animelem = 33
trigger34 = Animelem = 34
trigger35 = Animelem = 35
trigger36 = Animelem = 36
trigger37 = Animelem = 37
value = 210,2

[State 1650,1]
type = PlaySnd
triggerall = movehit = 0
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
trigger24 = animelem = 24
trigger25 = Animelem = 25
trigger26 = Animelem = 26
trigger27 = Animelem = 27
trigger28 = Animelem = 28
trigger29 = Animelem = 29
trigger30 = Animelem = 30
trigger31 = Animelem = 31
trigger32 = Animelem = 32
trigger33 = Animelem = 33
trigger34 = Animelem = 34
trigger35 = Animelem = 35
trigger36 = Animelem = 36
trigger37 = Animelem = 37
value = f6,0
volume = -50

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

;Hyper salto debole *****************************************************************************************
[Statedef 1700]
type    = A
movetype= A
physics = A
juggle = 3
anim = 1700
velset = 12,-10
ctrl = 0

[State 1700, snd]
type = PlaySnd
trigger1 = time = 0
value = 240,2

[state 1700,2]
type = ChangeState
trigger1 = P2dist X <= 5
value = 1701

[statedef 1701]
type    = A
movetype= A
physics = N
juggle = 3
velset = 0, 0
anim = 1701

[State 1701, 3]
type = HitDef
trigger1 = animelem = 1
attr = A, SA
damage    = 150,15
guardflag = MA
hitflag = MAFD
priority = 4
pausetime = 2,19
sparkno = 3
sparkxy = -10, 0
hitsound   = 5,3
guardsound = s6,0
animtype = hard
ground.type = High
ground.slidetime = 47
ground.hittime  = 47
ground.velocity = 5
guard.velocity = 5
air.velocity = -3,-4
forcestand = 1

[state 1701,2]
type = veladd
trigger1 = time > 0
y = .5

[state 1701,2]
type = velset
trigger1 = movecontact = 1
y = 0

[state 1701,2]
type = changestate
trigger1 = movecontact = 1
value = 1702

[state 1701,2]
type = changestate
trigger1 = Pos Y >= -17
trigger1 = Vel Y > 0
value = 52

[statedef 1702]
type    = A
movetype= A
physics = N
juggle = 3
velset = 0, 0
anim = 1702

[State 1702, Blink]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[state 1702,1]
type = turn
trigger1 = animelem = 2

[state 1702,2]
type = VelSet
trigger1 = time = 19
x = 4
y = -6

[state 1702,4]
type = veladd
trigger1 = time > 18
x = .1

[state 1702,5]
type = Gravity
trigger1 = time > 18

[state 1702,6]
type = changestate
trigger1 = Pos Y >= -17
trigger1 = Vel Y > 0
value = 52

;Hyper salto forte *****************************************************************************************
[Statedef 1750]
type    = A
movetype= A
physics = A
juggle = 3
anim = 1700
velset = 12,-10
ctrl = 0

[State 1700, snd]
type = PlaySnd
trigger1 = time = 0
value = 240,2

[state 1750,2]
type = ChangeState
trigger1 = P2dist X <= 5
value = 1751

[statedef 1751]
type    = A
movetype= A
physics = N
juggle = 3
velset = 0, 0
anim = 1701

[State 1751, 3]
type = HitDef
trigger1 = animelem = 1
attr = A, SA
damage    = 250,25
guardflag = MA
hitflag = MAFD
priority = 4
pausetime = 4,29
sparkno = 3
sparkxy = -10, 0
hitsound   = 5,4
guardsound = s6,0
animtype = hard
ground.type = high
ground.slidetime = 47
ground.hittime  = 47
ground.velocity = 5
guard.velocity = 5
air.velocity = -3,-4
forcestand = 1
envshake.time = 20
envshake.freq = 90
envshake.ampl = 4
envshake.phase = 90

[state 1751,2]
type = veladd
trigger1 = time > 0
y = .5

[state 1751,2]
type = velset
trigger1 = movecontact = 1
y = 0

[state 1751,2]
type = changestate
trigger1 = movecontact = 1
value = 1702

[state 1751,2]
type = changestate
trigger1 = Pos Y >= -17
trigger1 = Vel Y > 0
value = 52

; Berserk ************************************************************************************************

[Statedef 6000]
type    = S
movetype= A
physics = S
poweradd= -3000
ctrl = 0
anim = 6000
velset = 0,0
sprpriority = 2

[State 6000, Super A]
type = SuperPause
trigger1 = time = 0
time = 44
anim = -1
sound = 20, 0

[State 6000, Super D]
type = EnvColor
trigger1 = time = 0
value = 0,0,0
under = 1
time = 44

[State 6000, Super B]
type = Explod
trigger1 = time = 0
anim = F160
postype = back
pos = 0,0
bindtime = 1
supermove = 1
sprpriority = -1
ontop = 0
ownpal = 1

[State 6000, faccia]
type = Explod
trigger1 = time = 0
anim = 10000
postype = back
facing = 1
pos = 0,0
scale = 0.8,0.8
supermove = 1
removetime = 44
sprpriority = 0
ownpal = 1

[State 6000, 2]
type = velset
trigger1 = Time > 0
x = 12

[State 6000, Nuvoletta]
type = MakeDust
trigger1 = 1
trigger1 = time > 0
pos = 0,0
pos2 = -2,0
spacing = 1

[State 6000, 2]
type = AfterImage
trigger1 = time = 0
time = 200
length = 10
trans = add1
framegap = 2
timegap = 1
palBright   =   0,  0,  0
palContrast = 128,128,128
palAdd      =   0,  0,  0
palMul      =   1,  1,  1

[State 6000, 1]
type = HitDef
trigger1 = time > 0
attr = S, HA
animtype = Hard
guardflag = MAFD
pausetime = 0,20
hitsound   = S0,6
guardsound = 6, 0
sparkno = 12
sparkxy = -40,-80
ground.type = High
ground.slidetime = 15
ground.hittime = 40
ground.velocity = -6
air.velocity = -3,-4
guard.velocity = -6
p1stateno= 6001
kill = 0

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

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

[State 6001, fineombra]
type = AfterImageTime
trigger1 = time = 0
time = 0

[State 6001, fondo]
type = BGPalFX
trigger1 = 1
time = 1
color = 0
invertall = 1
ignorehitpause = 1

[State 6001, 1]
type = HitDef
trigger1 = animelem = 4
trigger2 = animelem = 8
trigger3 = animelem = 10
trigger4 = animelem = 17
trigger5 = animelem = 38
attr = S, HA
animtype = Hard
hitflag = MAFD
guardflag = MAFD
damage = 150,4
hitsound   = 5, 3
guardsound = 6, 0
pausetime = 25,25
sparkno = 12
sparkxy = -20,-80
ground.type = High
ground.slidetime = 15
ground.hittime = 40
ground.velocity = 0
air.velocity = 0,-1
guard.velocity = -1
envshake.time = 25
envshake.freq = 120
envshake.ampl = 6

[State 6001, 1]
type = HitDef
trigger1 = animelem = 24
attr = S, HA
animtype = hard
hitflag = MAFD
guardflag = MAFD
numhits = 3
damage = 100,10
pausetime = 20,10
hitsound   = 5, 4
guardsound = 6, 0
sparkno = 12
sparkxy = -40,-80
ground.type = low
ground.slidetime = 150
ground.hittime = 150
ground.velocity = -26,0
air.velocity = -26,0
guard.velocity = -6
;ground.velocity = -6,-14
;air.velocity = -6,-14
;guard.velocity = -6
;fall.damage = 50
;fall = 1
;yaccel = 0.5
;fall.recover = 0
envshake.time = 30
envshake.freq = 150
envshake.ampl = 20

[State 6001, Voce colpo]
type = PlaySnd
trigger1 = animelem = 37
value = 4000,8
volume = -50

[State 6001, luce]
type = Projectile
trigger1 = animtime%15 = 0
trigger1 = animelem = 38, >= 0
projanim = 1301
;projhitanim = 1310
projid = 1300
offset = 110, -100
velocity = 6.0, 0
attr = S, SP
damage    = 100,20
animtype = hard
guardflag = MA
pausetime = 0,9
sparkxy = 10, 0
hitsound   = S10,2
guardsound = 6, 0
ground.type = Low
ground.slidetime = 14
ground.hittime  = 20
ground.velocity = -8
air.animtype = Back
air.velocity = -2.5,-5
air.juggle = 3
sparkno = -1
guard.sparkno = -1
palfx.time = 25
palfx.add = 256,21,-176
palfx.sinadd = 30,30,0,10
palfx.mul = 246,245,0
palfx.color = 256
palfx.invertall = 1

[State 6001, luce]
type = Projectile
trigger1 = animelemtime(38) = 65
projanim = 1301
;projhitanim = 1310
projid = 1300
offset = 110, -100
velocity = 6.0, 0
attr = S, SP
damage    = 100,20
animtype = hard
guardflag = MA
pausetime = 0,9
sparkxy = 10, 0
hitsound   = S10,2
guardsound = 6, 0
ground.type = trip
ground.slidetime = 14
sparkno = -1
guard.sparkno = -1
ground.velocity = -6,-14
air.velocity = -6,-14
guard.velocity = -6
fall.damage = 50
fall = 1
yaccel = 0.5
fall.recover = 0
palfx.time = 25
palfx.add = 256,21,-176
palfx.sinadd = 30,30,0,10
palfx.mul = 246,245,0
palfx.color = 256
palfx.invertall = 1

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

; *******************************************************************************************************


;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------
[Statedef -2]

[State -2, colpito]
type = VarSet
v = 8
trigger1 = projhit1000 = 1
value = 1

[State -2, colpito2]
type = VarSet
v = 9
trigger1 = stateno = 1200
value = 1

[State -2, colpito2]
type = VarSet
v = 11
trigger1 = projhit1100 = 1
value = 1

;mano d'oro ***************************************************************************************

[State -2, Blocco manodoro]
type = SuperPause
trigger1 = win && !var(7)&& Var(8)
anim = -1
darken = 1
time = 40

[State -2, Back manodoro]
type = Envcolor
trigger1 = win && !var(7)&& Var(8)
value = 0,0,0
time = 40
under = 1

[State -2, Nome manodoro]
type = Explod
trigger1 = win && !var(7) && var(8)
id = 1000
anim = F203
pos = 65,0
postype = left
bindtime = -1
supermove = 0;1
removetime = 1
ontop = 1
ownpal = 1

[State -2, Nome manodoro ITA]
type = Explod
trigger1 = win && !var(7) && var(8)
id = 1000
anim = F303
pos = 5,50
postype = left
bindtime = -1
supermove = 0;1
removetime = 1
ontop = 1
ownpal = 1

[state -2,var]
type = varset
trigger1 = win
v = 7
value = 1

;calotta di ghiaccio

[State -2, Blocco]
type = SuperPause
trigger1 = var(9) && Win && !var(6)
anim = -1
darken = 1
time = 40

[State -2, Back calotta]
type = Envcolor
trigger1 = var(9) && Win && !var(6)
value = 0,0,0
time = 40
under = 1

[State -2, Nome calotta]
type = Explod
trigger1 = Win && !var(6) && var(9)
anim = F205
pos = 70,0
postype = left
bindtime = -1
supermove = 0 ;1
removetime = 1
ontop = 1
ownpal = 1

[State -2, Nome calotta ITA]
type = Explod
trigger1 = Win && !var(6) && var(9)
anim = F305
pos = 30,50
postype = left
bindtime = -1
supermove = 0 ;1
removetime = 1
ontop = 1
ownpal = 1

[state -2,var]
type = varset
trigger1 = win
v = 6
value = 1

;Trottola circolare

[State -2, Blocco]
type = SuperPause
trigger1 = var(11) && Win && !var(4)
anim = -1
darken = 1
time = 40

[State -2, Back trottola]
type = Envcolor
trigger1 = var(11) && Win && !var(4)
value = 0,0,0
time = 40
under = 1

[State -2, Nome trottola]
type = Explod
trigger1 = Win && !var(4) && var(11)
anim = F204
pos = 90,0
postype = left
bindtime = -1
supermove = 0
removetime = 1
ontop = 1
ownpal = 1

[State -2, Nome trottola ITA]
type = Explod
trigger1 = Win && !var(4) && var(11)
anim = F304
pos = 20,50
postype = left
bindtime = -1
supermove = 0
removetime = 1
ontop = 1
ownpal = 1


[state -2,var]
type = varset
trigger1 = win
v = 4
value = 1


;**************************************************************************************************
;**************************************************************************************************
;**************************************************************************************************

[State -2, effetto]
type = Explod
trigger1 = projhit1000 = 1
ignorehitpause = 1
sprpriority = 4
anim = 1010
pos = 20,0
postype = p2

[State -2, effetto1100]
type = Explod
trigger1 = projhit1100 = 1
ignorehitpause = 1
sprpriority = 4
anim = 2500
pos = 0,-100
postype = p2

[State -2, FireB]
type = null
;type = Explod
trigger1 = projhit1300 = 1
trigger2 = projhit1400 = 1
trigger3 = movehit
trigger3 = stateno = (1700,1752)
ignorehitpause = 1
anim = 1311
postype = p2
pos = -10,-50
random = 50,30
bindtime = -1
sprpriority = 2
ownpal = 1

[State -2, FireA]
type = null
;type = Explod
trigger1 = projhit1300 = 1
trigger2 = projhit1400 = 1
trigger3 = movehit
trigger3 = stateno = (1750,1752)
ignorehitpause = 1
anim = 1311
postype = p2
pos = 20,-80
random = 50,30
bindtime = -1
sprpriority = 2
ownpal = 1


[State -2,1]
type = Envcolor
trigger1 = projhit1000 = 1
ignorehitpause = 1
value = 0, 0, 0
time = 10
under = 1
supermove = 1

[State -2,1]
type = Envcolor
trigger1 = projhit1000 = 1
ignorehitpause = 1
value = 255, 255, 0
time = 10
under = 1
supermove = 1

[State -2, tremor]
type = EnvShake
trigger1 = projhit1000 = 1
persistent = 0
time = 30
ampl = -7
freq = 100
phase = 10

[State -2, carica end]
type = RemoveExplod
trigger1 = stateno != 196
trigger1 = stateno != 182
ID = 197

[State -2, finesuono]
type = StopSnd
trigger1 = stateno != 196
channel = 2

[State -2, fine fireball]
type = RemoveExplod
trigger1 = stateno != 1300
trigger1 = stateno != 1350
ID = 1300

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


[Statedef -3]

;This controller plays a sound everytime KFM lands from a jump, or
;from his back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 192, 1
volume = -50

; Play sound when jumping
[State -3, 1.1]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 50
trigger2 = stateno = 105
value = 191,1
volume = -50
persistent = 0

[State -3, noncolpito]
type = VarSet
v = 8
trigger1 = !win
value = 0

[State -3, noncolpito2]
type = VarSet
v = 9
trigger1 = !win
value = 0

[State -3, noncolpito3]
type = VarSet
v = 11
trigger1 = !win
value = 0

[State -3, display]
type = DisplayToClipboard
trigger1 = 1
text = "Dist x: %f"
params = p2dist x

;---------------------------------------------------------------------------
; parry variables 31 (S), 32 (C), 33 (A)
;---------------------------------------------------------------------------
; to avoid multiple press the variable is not reset! :)

; stand parry
[State -1, SetVar31]
type = Varset
v = 31
trigger1 = command = "parryS"
value = ifelse((var(31) >= 5), 0, (var(31) + 1))
ctrl = 1

[State -1, IncreaseVar31]
type = Varset
v = 31
trigger1 = var(31) < 5
value = var(31) + 1
ctrl = 1

; crouch parry 32
[State -1, SetVar32]
type = Varset
v = 32
trigger1 = command = "parryC"
value = ifelse((var(32) >= 5), 0, (var(32) + 1))
ctrl = 1

[State -1, IncreaseVar32]
type = Varset
v = 32
trigger1 = var(32) < 5
value = var(32) + 1
ctrl = 1

; air parry
[State -1, SetVar33]
type = Varset
v = 33
trigger1 = command = "parryA"
value = ifelse((var(33) >= 5), 0, (var(33) + 1))
ctrl = 1

[State -1, IncreaseVar33]
type = Varset
v = 33
trigger1 = var(33) < 5
value = var(33) + 1
ctrl = 1

;----------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S

[State 5900, 0]
type = VarRangeset
first = 1
last =  10
value = 0
trigger1 = roundno = 1
; Sets these values to zero, indicating the names of the moves haven't been
; displayed yet

[State 5900, 1] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190
