[Data]
life = 2000
attack = 100
defence = 100
juggle = 15
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           ;Horizontal scaling factor.
yscale = 1           ;Vertical scaling factor.
ground.back = 15     ;Player width (back, ground)
ground.front = 16    ;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)

[Velocity]
walk.fwd  = 2.4      ;Walk forward
walk.back = -2.2     ;Walk backward
run.fwd  = 5.6, 0    ;Run forward (x, y)
run.back = -4.5,-3.8 ;Hop backward (x, y)
jump.neu = 0,-9.4    ;Neutral jumping velocity (x, y)
jump.back = -3.55    ;Jump back Speed (x, y)
jump.fwd = 3.5       ;Jump forward Speed (x, y)
runjump.back = -2.55,-9.1 ;Running jump speeds (opt)
runjump.fwd = 4,-9.1      ;.
airjump.neu = 0,-9.1      ;.
airjump.back = -3.55      ;Air jump speeds (opt)
airjump.fwd = 3.5         ;.

[Movement]
airjump.num = 0      ;Number of air jumps allowed (opt)
airjump.height = 35  ;Minimum distance from ground before you can air jump (opt)
yaccel = .44         ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching

;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

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


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

;[State 180, Randomizer]
;type = VarRandom
;trigger1 = time = 0
;v = 1
;range = 0, 120

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

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

;[Statedef 181]
;type = S
;ctrl = 0
;anim = 181

;[State 181, suono]
;type = PlaySnd
;trigger1 = animelem = 2
;value = 1000,5

;[State 181, 2] 
;type = AssertSpecial
;trigger1 = animelemtime(3) < 90
;flag = roundnotover

;[Statedef 182]
;type = S
;ctrl = 0
;anim = 182

;[State 182, 3]
;type = PlaySnd
;trigger1 = animelem = 3
;value = 0,1

;[State 182, 2] 
;type = AssertSpecial
;trigger1 = animelemtime(3) < 90
;flag = roundnotover

;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 191, jagger]
type = Changestate
trigger1 = p2name = "jagger"
value = 188

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

[State 190, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 3]
type = PlaySnd
trigger1 = animelem = 4
value = 1000,9

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

[State 190, 3]
type = PlaySnd
trigger1 = animelem = 2
value = 1000,12
pan = 0

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

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

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

[State 190, 3]
type = PlaySnd
trigger1 = animelem = 6
value = 0,8
volume = 200

[state 188, statua]
type = helper
trigger1 = time = 0
helpertype = normal
pos = -55,0
postype = p1
stateno = 189
name = "statua"

[State 188, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

[statedef 189]
type = S
ctrl = 0
velset = 0,0
anim = 189

[State 189, 1]
type = AssertSpecial
trigger1 = time >= 120
flag = invisible

[State 189, 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 189, 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 189, 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 189, 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 189, 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 189, 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 189, 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 189, 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 189, 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 189, 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 189, 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 189, 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 189, 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 189, 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 600, 3]
type = PlaySnd
trigger1 = animelem = 3
value = 1000,7

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


;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 200                       ;Change animation (Def: no change)
poweradd = 20                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set layering priority to 2 (in front)

[State 200, fatto]
type = Varset
trigger1 = animelem = 2 && p2MoveType = H
v = 26
value = var(26) + 1

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 20, 0                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 8, 8                 ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = -10, -95               ;X-offset for the "hit spark" rel. to p2,
hitsound = 5, 0                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 12             ;Time opponent is in hit state
ground.velocity = -4             ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3           ;X-velocity at which opponent is pushed,
air.hittime = 12                 ;Time before opponent regains control in air

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

[State 200, 7]
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, reset]
type = Varset
trigger1 = animelem = 2;
v = 26
value = 0

[State 205]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = random > 500
value = 1000, 0

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

[State 205, 3.5]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Medium
damage    = 20
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-90
hitsound   =  s0, 7
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 = 1000, 3

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

[State 215, 2.5]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Medium
damage    = 70,10
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-87
hitsound   =  s0, 7
guardsound = 6, 0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
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
value = 0, 1

[State 230, 2]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Light
damage    = 20
guardflag = MA
pausetime = 12,12
sparkno = 0
sparkxy = -10,-20
hitsound   = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 12
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 = 1000, 0

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

[State 235, 2.5]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Medium
damage    = 20
guardflag = MA
pausetime = 12,12
sparkno = 0
sparkxy = 0,-79
hitsound   =  s0, 6
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 = 2,0
anim = 240
sprpriority = 2

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

[State 215]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 700
value = 1000, 3

[State 240, 2]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Medium
damage    = 60,10
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = 0,-95
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
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 = 1000, 3

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

[State 245, 2.5]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Medium
damage    = 70,10
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-72
hitsound   =  s0, 9
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 = Time = 1
value = 0, 1

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 20
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkno = 0
sparkxy = -10,-55
hitsound   = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 12
ground.velocity = -6;-4
air.velocity = -1.5,-3

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

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

;---------------------------------------------------------------------------
;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 = Time = 1
value = 0, 2

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

;This is the first hit, triggered on the 3rd element of animation.
[State 410, 2]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage    = 60,10
animtype  = Medium
hitflag = MAF
guardflag = M
pausetime = 12,12
sparkno = 1
sparkxy = -10,-55
hitsound   = s0,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4
air.velocity = -3,-4

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

;---------------------------------------------------------------------------
;Crouching strong kick
; CNS difficulty: easy
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 440
sprpriority = 2

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

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

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

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

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

[State 430]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 1000, 3

[State 430, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 20
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = 0
sparkxy = -10,-8
hitsound   = s0,6;5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 12
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

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

;---------------------------------------------------------------------------
;Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 600
sprpriority = 2

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

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

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

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

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

[State 215]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 1000, 3

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

;---------------------------------------------------------------------------
;Jump UP Light Punch
[Statedef 605]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 605
sprpriority = 2

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

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

[State 605, 3]
type = CtrlSet
trigger1 = Time = 17
value = 1

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

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

[State 215]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 1000, 3

[State 614, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 70,10
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = 1
sparkxy = -10,-30
hitsound   = 5,3
guardsound = 6,0
animtype = Medium
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -3,-4


;---------------------------------------------------------------------------
;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 = Time = 1
value = 0, 1

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

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

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

[State 215]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 1000, 3

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

;---------------------------------------------------------------------------
;JUMP UP KICK medio
[Statedef 635]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 30
ctrl = 0
anim = 635

[State 635, 3]
type = PlaySnd
trigger1 = Time = 1
value = 0,1

[State 635, 1]
type = HitDef
trigger1 = time = 0
attr = A, NA
damage    = 30
getpower  = 50
givepower = 30
guardflag = HA
priority = 5
animtype = medium
pausetime = 10, 12
sparkxy = -15,-30
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4
air.velocity = -3, 3

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


;---------------------------------------------------------------------------
;JUMP UP KICK forte
[Statedef 645]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 30
ctrl = 0
anim = 645

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

[State 215]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = random > 500
value = 1000, 3

[State 645, 1]
type = HitDef
trigger1 = time = 0
attr = A, NA
damage    = 70,10
getpower  = 50
givepower = 30
guardflag = HA
priority = 5
animtype = hard
pausetime = 10, 12
sparkxy = -15,-30
hitsound   = 5,3
guardsound = 6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -4
air.velocity = -3, 3

[State 645, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
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, scuro]
type = PalFX
trigger1 = animelem = 2
time = 20
add = -15,-15,-15

[State 700, 2]
type = PlaySnd
trigger1 = Time = 0
value = 0,1
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
trigger1 = var(19) = 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   = S0,9
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


;---------------------------------------------------------------------------
;Throw

[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

;---------------------------------------------------------------------------
;Throwing the opponent

[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = 0, 5

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 2

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 2
pos = 50, -20

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 3
pos = 60, -25

[State 810, Bind 12]
type = TargetBind
trigger1 = AnimElem = 5
pos = 60, -25

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

[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 Throw

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

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

;---------------------------------------------------------------------------
;Thrown into the air

[Statedef 821]
type    = A
movetype= H
physics = N
velset = -20
poweradd = 40

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = 0.2

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

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

[State 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 = 2000,2
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, fine]
type = ChangeState
trigger1 = command != "hold_s"
trigger1 = var(0) = 0
trigger2 = var(20) >= 200
trigger2 = var(0) = 1
value = 0

;-----------------------------------------------------------------------
;-----------------------------------------------------------------------
; Super Mosse
;-----------------------------------------------------------------------
;-----------------------------------------------------------------------

;Cento Calci Light
[Statedef 1050]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
velset = 0
anim = 1050

[State 1050, Blink]
type = PalFX
trigger1 = Time = 0
trigger1 = var(19) = 0
time = 70
add = 32,16,0
sinadd = 64,32,5,3

[State 1050, Voce Cento calci]
type = PlaySnd
trigger1 = Animelem = 1
value = 1000,4
channel = 10
volume = -50

[State 1050, fineatata]
type = Stopsnd
trigger1 = animelem = 18
channel = 10

[State 1050, uatta]
type = PlaySnd
trigger1 = animelem = 21 && movehit
value = 1000,3

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

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

[State 1050, 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
attr = S, SA
damage    = 5,1
animtype  = hard
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 6,6
sparkno = 10
sparkxy = -7,-80
hitsound   = S0,6
guardsound = 6,0
ground.type = high
ground.slidetime = 14
ground.hittime  = 15
ground.velocity = 0,-0.5
air.velocity = 0,-0.5
guard.velocity = -1

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

[State 1050,hit nero]
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
ignorehitpause = 1
value = 0, 0, 0
time = 1
under = 1
supermove = 1

[State 1050,hit bianco]
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
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1
supermove = 1

[State 1050,1]
type = PlaySnd
trigger1 = animelem = 21
value = 0,2
volume = -100

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

;Cento Calci Hard
[Statedef 1000]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
velset = 0
anim = 1000

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

[State 1000, Voce Cento calci]
type = PlaySnd
trigger1 = Animelem = 1
value = 1000,4
channel = 10

[State 1000, fineatata]
type = Stopsnd
trigger1 = animelem = 25
channel = 10

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

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

[State 1000, uatta]
type = PlaySnd
trigger1 = animelem = 28 && movehit
value = 1000,3

[State 1000, 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
attr = S, SA
damage    = 9,3
animtype  = hard
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 6,6
sparkno = 10
sparkxy = -7,-80
hitsound   = S0,6
guardsound = 6,0
ground.type = high
ground.slidetime = 4
ground.hittime  = 5
ground.velocity = 0,-0.5
air.velocity = 0,-0.5
guard.velocity = -1

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


[State 1000,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
ignorehitpause = 1
value = 0, 0, 0
time = 1
under = 1
supermove = 1

[State 1000,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
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1
supermove = 1

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

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

[State 1000, tremor]
type = EnvShake
triggerall = movehit = 1
trigger1 = animelem = 28
persistent = 0
time = 20
ampl = -7
freq = 100
phase = 10

[State 1000,1]
type = PlaySnd
trigger1 = animelem = 28
value = 0,2
volume = -50

[State 1000, 4]
type = ChangeState
trigger1 = animtime = 0
value = 990
ctrl = 1

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

[State 1100, Blink]
type = PalFX
trigger1 = Time = 0
trigger1 = var(19) = 0
time = 70
add = 32,16,0
sinadd = 64,32,5,3

[State 1100, Voce Cento calci]
type = PlaySnd
trigger1 = Animelem = 1
value = 1000,4
channel = 10
volume = -50

[State 1100, fineatata]
type = Stopsnd
trigger1 = animelem = 19
channel = 10

[State 1100, uatta]
type = PlaySnd
trigger1 = animelem = 22 && movehit
value = 1000,3

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

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

[State 1100, 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
trigger16 = animelem = 17
trigger17 = animelem = 18
trigger18 = animelem = 19
attr = S, SA
damage    = 5,2
animtype  = hard
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 6,6
sparkno = 10
sparkxy = -7,-90
hitsound   = S0,6
guardsound = 6,0
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 1150, 2]
type = HitDef
triggerall = movehit
trigger1 = animelem = 22
attr = S, NA
damage    = 20,5
animtype  = diagup
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 3,9
sparkno = 12
sparkxy = -20,-90
hitsound   = S0,3
guardsound = 6,0
ground.type = high
ground.slidetime = 2
ground.hittime  = 35
air.velocity = -7,-7
ground.velocity = -5,-9
fall = 1

[State 1100,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
trigger16 = animelem = 17
trigger17 = animelem = 18
trigger18 = animelem = 19
ignorehitpause = 1
value = 0, 0, 0
time = 1
under = 1
supermove = 1

[State 1100,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
trigger16 = animelem = 17
trigger17 = animelem = 18
trigger18 = animelem = 19
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1
supermove = 1

[State 1100,1]
type = PlaySnd
trigger1 = animelem = 22
value = 0,2
volume = -100


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

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

[State 1150, Blink]
type = PalFX
trigger1 = Time = 0
trigger1 = var(19) = 0
time = 70
add = 32,16,0
sinadd = 64,32,5,3

[State 1150, Voce Cento calci]
type = PlaySnd
trigger1 = Animelem = 1
value = 1000,4
channel = 10

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

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

[State 1150, fineatata]
type = Stopsnd
trigger1 = animelem = 27
channel = 10

[State 1150, uatta]
type = PlaySnd
trigger1 = animelem = 30 && movehit
value = 1000,3

[State 1150, 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
attr = S, SA
damage    = 9,3
animtype  = hard
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 6,6
sparkno = 10
sparkxy = -7,-90
hitsound   = S0,6
guardsound = 6,0
ground.type = high
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = 0,-0.5
air.velocity = 0,-0.5
guard.velocity = -1

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

[State 1150,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
ignorehitpause = 1
value = 0, 0, 0
time = 1
under = 1
supermove = 1

[State 1150,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
ignorehitpause = 1
value = 255, 255, 255
time = 1
under = 1
supermove = 1

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

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

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

[State 1150,1]
type = PlaySnd
trigger1 = animelem = 30
value = 0,2
volume = -50

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

; Distruzione dell'universo ******************************************************************************

[Statedef 1200]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 6                      
velset = 0,0                     
ctrl = 0                                
anim = 1201

[State 1200, Voce distruzione]
type = PlaySnd
trigger1 = time = 0
value = 2000,0
volume = 50

[State 1200, 40]
type = Explod
trigger1 = Time = 12
anim = 1211
sprpriority = 5
Postype = P1
pos = -25,-90
ownpal = 1
ID = 1201

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

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

[State 1200, 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 1200, faccia]
type = Explod
trigger1 = time = 0
anim = 10000
postype = back
facing = 1
pos = -40,0
scale = 1,1 ;0.8,0.8
supermove = 1
removetime = 44
sprpriority = 0
ownpal = 1

[State 1200, Super B]
type = AfterImage
trigger1 = AnimElem = 1
trans = add
time = 2

[State 1200, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

[State 1200, Respiro]
type = PlaySnd
Trigger1 = time = 0
value = 1000,13
volume = 0

[State 3050, Super D]
type = NotHitBy
trigger1 = AnimElem = 1
value = , NA, SA, AT
time = 26

[State 1200, 40]
type = pause
trigger1 = Time = 13
time = 5

[State 1200, 40]
type = Explod
trigger1 = Time = 16
anim = 1211
sprpriority = 5
Postype = P1
pos = -8,-120
ownpal = 1
ID = 1202

[State 1200, 40]
type = pause
trigger1 = Time = 17
time = 5

[State 1200, 40]
type = Explod
trigger1 = Time = 20
anim = 1211
sprpriority = 5
Postype = P1
pos = 30,-105
ownpal = 1
ID = 1203

[State 1200, 40]
type = pause
trigger1 = Time = 21
time = 5

[State 1200, 40]
type = Explod
trigger1 = Time = 24
anim = 1211
sprpriority = 5
Postype = P1
pos = 20,-80
ownpal = 1
ID = 1204

[State 1200, 40]
type = pause
trigger1 = Time = 25
time = 5

[State 1200, 40]
type = Explod
trigger1 = Time = 28
anim = 1211
sprpriority = 5
Postype = P1
pos = 10,-60
ownpal = 1
ID = 1205

[State 1200, 40]
type = pause
trigger1 = Time = 29
time = 5

[State 1200, 40]
type = Explod
trigger1 = Time = 32
anim = 1211
sprpriority = 5
Postype = P1
pos = 10,-40
ownpal = 1
ID = 1206

[State 1200, 40]
type = pause
trigger1 = Time = 33
time = 5

[State 1200, 40]
type = Explod
trigger1 = Time = 36
anim = 1211
sprpriority = 5
Postype = P1
pos = 20,-20
ownpal = 1
ID = 1207

[State 1200, 40]
type = pause
trigger1 = Time = 37
time = 5

[State 1200, 39]
type = RemoveExplod
trigger1 = Time = 62
ID = 1201

[State 1200, 39]
type = RemoveExplod
trigger1 = Time = 62
ID = 1202

[State 1200, 39]
type = RemoveExplod
trigger1 = Time = 62
ID = 1203

[State 1200, 39]
type = RemoveExplod
trigger1 = Time = 62
ID = 1204

[State 1200, 39]
type = RemoveExplod
trigger1 = Time = 62
ID = 1205

[State 1200, 39]
type = RemoveExplod
trigger1 = Time = 62
ID = 1206

[State 1200, 39]
type = RemoveExplod
trigger1 = Time = 62
ID = 1207

; to put the attack in combo
[State 1200, passaggio]
type =  pause
trigger1 = Animelem = 1 && p2MoveType = H;
time = 9
movetime = 9

[State 1200, 1]
type = AssertSpecial
trigger1 = Time = [0,600]
flag = nomusic
flag2 = nofg
flag3 = timerfreeze

[State 1200, 30]
type = ChangeState
trigger1 = time = 600
Value = 1201
ctrl = 1 

[State 1200, 37]
type = EnvColor 
Trigger1 = Time = 0
Value = 0,0,0
time = 600
Under = 1

[State 1200, Lampo1]
type = EnvColor
Trigger1 = Time = 110
Value = 255,255,0
time = 3
Under = 0

[State 1200, Tuono1]
type = PlaySnd
Trigger1 = time = 108
value = 1000,10
volume = -50

[State 1200, Nero]
type = EnvColor
Trigger1 = Time = 113
Value = 0,0,0
time = 47
Under = 1

[State 1200, Tuono2]
type = PlaySnd
Trigger1 = time = 158
value = 1000,10
volume = 0

[State 1200, Lampo2]
type = EnvColor
Trigger1 = Time = 160
Value = 255,255,0
time = 3
Under = 0

[State 1200, Nero]
type = EnvColor
Trigger1 = Time = 163
Value = 0,0,0
time = 17
Under = 1

[State 1200, Lampo3]
type = EnvColor
Trigger1 = Time = 180
Value = 255,255,0
time = 10
Under = 0

[State 1200, Tuono3]
type = PlaySnd
Trigger1 = time = 188
value = 1000,10
volume = 150

[State 1200, Nero]
type = EnvColor
Trigger1 = Time = 190
Value = 0,0,0
time = 430
Under = 1

[State 1200, Tempesta]
type = PlaySnd
Trigger1 = time = 325
value = 1000,11
volume = 200

[State 1200, 39]
type = RemoveExplod
trigger1 = Time = 300
Id = 998

[State 1200, 40]
type = Explod
trigger1 = Time = 300
anim = 999
sprpriority = -5
Postype = Right
pos = -312,0
ownpal = 1
id = 999

[State 1200, 41]
type = RemoveExplod
trigger1 = Time = 500
Id = 999

[State 1200, 42]
type = Explod
trigger1 = Time = 500
anim = 998
sprpriority = -5
Postype = Right
pos = -312,0
Vel = 0,-2.24
ownpal = 1
id = 1000

[State 1200, 43]
type = RemoveExplod
trigger1 = Time = 600
Id = 1000

; distruzione dell'universo parziale

[Statedef 1201]
type    = S
movetype= A
physics = S
poweradd= -3000
ctrl = 0
velset = 0
anim = 1200

[State 1201, voce tecnica]
type = PlaySnd
trigger1 = Time = 0 ;&& var(1)
value = 2000,0
volume = 50

[State 1201, Super A]
type = SuperPause
trigger1 = time = 0 ;&& var(1)
anim = -1
sound = 20, 0
time = 40

[State 1201, Super D]
type = EnvColor
trigger1 = time = 0  ;&& var(1)
value = 0,0,0
under = 1
time = 44

; to put the attack in combo
[State 1200, passaggio]
type =  pause
trigger1 = Animelem = 1 && p2MoveType = H;
time = 9
movetime = 9

[State 1201, Super B]
type = Explod
trigger1 = time = 0 ;&& var(1)
anim = F160
postype = back
pos = 0,0
bindtime = 1
supermove = 1
sprpriority = -1
ontop = 0
ownpal = 1

[State 1201, faccia]
type = Explod
trigger1 = time = 0 ;&& var(1)
anim = 10000
postype = back
facing = 1
pos = -40,0
scale = 1,1;0.8,0.8
supermove = 1
removetime = 44
sprpriority = 0
ownpal = 1

[State 1201, Super B]
type = AfterImage
trigger1 = AnimElem = 1 ;&& Var(1)
trans = add
time = 2

[State 1201, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(1) >= 0  ;&& Var(1)
time = 2

[State 1201, Super D]
type = NotHitBy
trigger1 = AnimElem = 1 ;&& Var(1)
value = , NA, SA, AT
time = 26

[State 1201, fatto]
type = Varset
trigger1 = animelem = 2
v = 1
value = var(1) + 1

[State 1201, Voce]
type = PlaySnd
Trigger1 = time = 0
value = 1000,12
volume = 0

[State 1201, Effetto fireball]
type = PlaySnd
Trigger1 = animelem = 12
value = 1000,15
volume = 0

[State 1201, stelle]
type = Projectile
trigger1 = animelem = 12
projanim = 1210
projid = 1200
id = 1200
projremove = 0
velocity = 6.5
velmul = 1.001, 0
offset = 20,-90
damage = 700,400
attr = S, HA
animtype = hard
hitflag = MAFD
guardflag = MA
hitsound = S1000,16
pausetime = 1,20
sparkno = 12
sparkxy = 50,0
guardsound = 6,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 80
ground.velocity = -15,-3
air.velocity = -15,-3
air.juggle = 3
yaccel = 0.8
fall=1
fall.recover = 0

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

; custom state
[Statedef 1202]
type = S
movetype = H
physics = S
ctrl = 0

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

[State 1202, fermo]
type = PosSet
trigger1 = time = 0
y = 0

[State 1202, ok]
type = ChangeAnim2
trigger1 = time = 0
value = 1202


[State 1202, 2]
type = ctrlset
trigger1 = Animtime = 0
value = 1

[State 1202, 1]
type = SelfState
Trigger1 = AnimTime = 0
value = 0

; custom state
[Statedef 1207]
type = S
movetype = H
physics = S
ctrl = 0

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

[State 1207, fermo]
type = PosSet
trigger1 = time = 0
y = 0

;[State 1207, ok]
;type = ChangeAnim2
;trigger1 = time = 5000
;value = 5008


; Trottola di hokuto *********************************************************************************

[Statedef 1300]
type    = S
movetype= A
physics = S
anim = 1300
ctrl = 0
sprpriority = 1

[State 1300, Nuvoletta]
type = MakeDust
trigger1 = time % 5 = 0
pos = 0,0
spacing = 1

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

[State 1300, Voce Cento calci]
type = PlaySnd
trigger1 = time = 0
value = 1000,4
channel = 10
volume = -50

[State 1300, fineatata]
type = Stopsnd
trigger1 = time = 200
channel = 10

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

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

;[State 1300, moveback]
;type = VelSet
;trigger1 = 1
;y = -0.1

[State 1300, 2]
type = HitDef
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
attr = S, SA
damage    = 5,1
animtype  = hard
hitflag = MA
guardflag = MA
pausetime = 1,1
sparkno = 10
sparkxy = -7,-80
;hitsound   = s0,6
guardsound = 192, 1
ground.type = high
ground.slidetime = 14
ground.hittime  = 15
ground.velocity = 0,-0.5
air.velocity = 0,-0.5
guard.velocity = -1

[State 1300, 2]
type = HitDef
trigger1 = time = 198
attr = S, SA
damage    = 50,10
animtype  = hard
hitflag = MAFD
guardflag = MAFD
sparkxy = -7,-80
sparkno = 12
hitsound   = s0,9
guardsound = 192, 1
ground.type = trip
ground.slidetime = 14
ground.hittime  = 15
ground.velocity = -7,-8
air.velocity = -7,-8
guard.velocity = -1
fall = 1
yaccel = 0.5
fall.recover = 0

[State 1300, uatta]
type = PlaySnd
trigger1 = time = 200 && movehit
value = 1000,3

[State 1300,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = time = 198
ignorehitpause = 1
value = 0, 0, 0
time = 10
under = 1
supermove = 1

[State 1300,1]
type = Envcolor
triggerall = movehit = 1
trigger1 = time = 198
ignorehitpause = 1
value = 255, 255, 255
time = 10
under = 1
supermove = 1

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

[State 1300, 6]
type = ChangeState
trigger1 = Time = 200
value = 52
ctrl = 0


; Calcio del drago volante *********************************************************************************

[Statedef 1400]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 1400, fermo]
type = Pause
trigger1 = time = 0
time = 5

[State 1400, Super B]
type = AfterImage
trigger1 = AnimElem = 1
trans = add
time = 2

; to put the attack in combo
[State 1400, passaggio]
type =  pause
trigger1 = Animelem = 1 && p2MoveType = H;
time = 9
movetime = 9

[State 1400, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

[State 1400, uatuu]
type = PlaySnd
trigger1 = time = 2
value = 1000,8
channel = 25
pan = 1

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

[State 1400, 4]
type = VelSet
trigger1 = AnimTime = 0
x = 10
y = -9

[State 1400, Nuvoletta]
type = MakeDust
trigger1 = animelem = 1
trigger2 = animelem = 2
pos = 0,0
pos2 = 5,0
spacing = 1

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

[State 1400, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 1401
ctrl = 0

;---------------------------------------------------------------------------
; Jump Up colpo
[Statedef 1401]
type    = A
movetype= A
physics = A
anim = 1400
ctrl = 0

[State 1401, 2]
type =AfterImage
trigger1 = time = 0
time = 40
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 1401, colpi]
type = HitDef
trigger1 = time = 0
attr = S, HA
animtype = diagup
guardflag = MAFD
pausetime = 30,30
damage = 100,10
hitsound   = S0,6
guardsound = 6, 0
sparkno = 12
sparkxy = 10,0
ground.type = high
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -12,-15
air.velocity = -12,-15
guard.velocity = -6
envshake.time = 20
envshake.freq = 90
envshake.ampl = -7
yaccel = 0.5
fall = 1
fall.recover = 1
fall.damage = 40

[State 1401, colore]
type = null;BGPalFX
trigger1 = movehit
time = 1
color = 200
invertall = 1
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Jump Land
[Statedef 1402]
type    = S
physics = S
ctrl = 0
anim = 47

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

[State 1402, 2]
type = PosSet
trigger1 = Time = 0
y = 0

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

;*********************************************************************************************************
; Colpo a libera energia *********************************************************************************

[Statedef 1500]
type    = S
movetype= A
physics = S
poweradd= -2000
ctrl = 0
velset = 0
anim = 1500

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

[State 1200, Super D]
type = EnvColor
trigger1 = time = 0
value = 0,0,0
under = 1
time = 40

[State 1200, Super B]
type = Explod
trigger1 = time = 0
anim = F150
postype = p1
pos = -320,-340
bindtime = 1
supermove = 1
sprpriority = -1
ontop = 0
ownpal = 1

[State 1200, Super C]
type = Explod
trigger1 = time = 0
anim = F155
postype = p1
pos = 0,-80
bindtime = 1
supermove = 1
sprpriority = 2
ontop = 1
ownpal = 1

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 1
trans = add
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

[State 1500, 1]
type = PlaySnd
trigger1 = Time = 0
value = 2000,1
volume = 100

[State 3050, Super D]
type = NotHitBy
trigger1 = AnimElem = 1
value = , NA, SA, AT
time = 26

;[State 1500, colore]
;type = palfx
;trigger1 = animelem = 3
;trigger1 = var(19) = 0
;time = 30
;add = 0,0,92
;mul = 256,256,256
;sinadd = 0,0,0,1
;invertall = 0
;color = 256

[State 1500, coloresfondo]
type = bgpalfx
trigger1 = animelem = 3
time = 15
add = 0,0,92
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 1500, vibro]
type = EnvShake
trigger1 = time = 27
time = 20
freq = 180
ampl = 5
phase = 90

[State 1500, vibro]
type = EnvShake
trigger1 = time = 47
time = 20
freq = 220
ampl = 5
phase = 90


[State 1500, Effetto fireball]
type = Explod
Trigger1 = animelem = 3
anim = 1511
pos = 40,-90
postype = p1
removetime = 32


[State 1500, Effetto fireball]
type = PlaySnd
Trigger1 = animelem = 2
value = 1000,17
volume = 0

; to put the attack in combo
[State 210, passaggio]
type =  pause
trigger1 = Animelem = 2 && p2MoveType = H;
time = 9
movetime = 9

[State 1500, Projectile]
type = Projectile
trigger1 = animelem = 5
hitflag = MAF
guardflag = MA
projanim = 1510
projremove = 0
projremovetime = 30
projid = 1500
id = 1500
sprpriority = 2
postype = p1
offset = 25,-90
velocity = 0,0
projhits = 1;45
numhits = 1;25
projmisstime = 5
pausetime = 0,15
attr = S, SP
animtype = diagup
damage = 600,150
sparkxy = ceil (p2dist x) - 50, 0
guard.velocity = -7
guard.slidetime = 3
guard.hittime = 3
ground.slidetime = 23
ground.hittime = 23
ground.velocity = -18,-1
air.velocity = -18,-1
fall = 1
fall.recover = 0
yaccel = 0.8
palfx.time = 25
palfx.add = -255,1,195
palfx.sinadd = 30,30,0,10
palfx.mul = 297,389,389
palfx.color = 256
palfx.invertall = 1

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

; Colpo a libera energia per combo *********************************************************************************

[Statedef 1501]
type    = S
movetype= A
physics = S
poweradd= -2000
ctrl = 0
velset = 0
anim = 1501

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

[State 1200, Super D]
type = EnvColor
trigger1 = time = 0
value = 0,0,0
under = 1
time = 40

[State 1200, Super B]
type = Explod
trigger1 = time = 0
anim = F150
postype = p1
pos = -320,-340
bindtime = 1
supermove = 1
sprpriority = -1
ontop = 0
ownpal = 1

[State 1200, Super C]
type = Explod
trigger1 = time = 0
anim = F155
postype = p1
pos = 0,-80
bindtime = 1
supermove = 1
sprpriority = 2
ontop = 1
ownpal = 1

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 1
trans = add
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

[State 1501, 1]
type = PlaySnd
trigger1 = Time = 0
value = 2000,1
volume = 100

[State 3050, Super D]
type = NotHitBy
trigger1 = AnimElem = 1
value = , NA, SA, AT
time = 26

;[State 1501, colore]
;type = palfx
;trigger1 = animelem = 3
;trigger1 = var(19) = 0
;time = 30
;add = 0,0,92
;mul = 256,256,256
;sinadd = 0,0,0,1
;invertall = 0
;color = 256

[State 1501, coloresfondo]
type = bgpalfx
trigger1 = animelem = 3
time = 15
add = 0,0,92
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 1501, vibro]
type = EnvShake
trigger1 = time = 27
time = 20
freq = 180
ampl = 5
phase = 90

[State 1501, vibro]
type = EnvShake
trigger1 = time = 47
time = 20
freq = 220
ampl = 5
phase = 90


[State 1501, Effetto fireball]
type = Explod
Trigger1 = animelem = 3
anim = 1511
pos = 40,-90
postype = p1
removetime = 32


[State 1501, Effetto fireball]
type = PlaySnd
Trigger1 = animelem = 2
value = 1000,17
volume = 0

[State 1501, Projectile]
type = Projectile
trigger1 = animelem = 2
hitflag = MAF
guardflag = MA
projanim = 1510
projremove = 0
projremovetime = 30
projid = 1501
id = 1501
sprpriority = 2
postype = p1
offset = 25,-90
velocity = 0,0
projhits = 45
numhits = 25
projmisstime = 5
pausetime = 0,15
attr = S, SP
animtype = diagup
damage = 150,45
sparkxy = ceil (p2dist x) - 50, 0
guard.velocity = -7
guard.slidetime = 3
guard.hittime = 3
ground.slidetime = 23
ground.hittime = 23
ground.velocity = -18,-1
air.velocity = -18,-1
fall = 1
fall.recover = 0
yaccel = 0.8
palfx.time = 25
palfx.add = -255,1,195
palfx.sinadd = 30,30,0,10
palfx.mul = 297,389,389
palfx.color = 256
palfx.invertall = 1

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


; Fireball debole ********************************************************************************************

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

[State 1600, suono]
type = PlaySnd
trigger1 = time = 0
value = 1000, 6
channel = 2

[State 1600, Effetto fireball]
type = PlaySnd
Trigger1 = animelem = 8
value = 1000,15
volume = 0

[State 1600, coloresfondo]
type = bgpalfx
trigger1 = animelem = 8
time = 5
add = 0,0,92
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

;[State 1600, Blink]
;type = PalFX
;trigger1 = Time = 0
;trigger1 = var(19) = 0
;time = 20
;add = 32,16,0
;sinadd = 64,32,5,3

[State 1600, 2]
type = HitDef
trigger1 = animelem = 7
trigger2 = animelem = 8
trigger3 = animelem = 9
attr = S, SA
damage    = 20,2
animtype  = light
removetime = 30
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 6,6
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 1600, 5]
type = Projectile
trigger1 = animelem = 8
ProjAnim = 1610
Projhitanim = 1611
ProjStageBound = 80
ProjEdgeBound = 80
projremovetime = 20
ProjID = 1600
;ProjShadow = 0,50,100
offset = 90, -100
velocity = 3, 0
velmul = 1.001, 0
attr = S, SP
damage    = 60,6
animtype  = Hard
guardflag = MA
pausetime = 8,8
hitsound   = S0,6
guardsound = 192, 1
ground.type = low
ground.slidetime = 18
ground.hittime  = 38
ground.velocity = -3,-6
air.type = Low
air.velocity = -2,-6
forcestand = 1
fall.recover = 0
air.recover = 0
air.juggle = 15
palfx.time = 25
palfx.add = -255,1,195
palfx.sinadd = 30,30,0,10
palfx.mul = 297,389,389
palfx.color = 256
palfx.invertall = 1

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

; Fireball forte ********************************************************************************************

[Statedef 1650]
type    = S
movetype= A
physics = S
poweradd= 100
ctrl = 0
anim = 1600
velset = 0,0
sprpriority = 2

[State 1650, suono]
type = PlaySnd
trigger1 = time = 0
value = 1000, 6
channel = 2

[State 1650, Effetto fireball]
type = PlaySnd
Trigger1 = animelem = 8
value = 1000,15
volume = 0

[State 1650, coloresfondo]
type = bgpalfx
trigger1 = animelem = 8
time = 5
add = 0,0,92
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

;[State 1650, Blink]
;type = PalFX
;trigger1 = Time = 0
;trigger1 = var(19) = 0
;time = 20
;add = 32,16,0
;sinadd = 64,32,5,3

[State 1650, 2]
type = HitDef
trigger1 = animelem = 7
trigger2 = animelem = 8
trigger3 = animelem = 9
attr = S, SA
damage    = 40,4
animtype  = light
getpower  = 10
givepower = 8
hitflag = MA
guardflag = MA
pausetime = 6,6
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 1650, 5]
type = Projectile
trigger1 = animelem = 8
ProjAnim = 1610
Projhitanim = 1611
ProjStageBound = 80
ProjEdgeBound = 80
projremovetime = 10
ProjID = 1600
;ProjShadow = 0,50,100
offset = 80, -100
velocity = 5, 0
velmul = 1.001, 0
attr = S, SP
damage    = 100,10
animtype  = Hard
guardflag = MA
pausetime = 8,8
hitsound   = S0,6
guardsound = 192, 1
ground.type = low
ground.slidetime = 18
ground.hittime  = 38
ground.velocity = -3,-6
air.type = Low
air.velocity = -2,-6
forcestand = 1
fall.recover = 0
air.recover = 0
air.juggle = 15
palfx.time = 25
palfx.add = -255,1,195
palfx.sinadd = 30,30,0,10
palfx.mul = 297,389,389
palfx.color = 256
palfx.invertall = 1

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

; Trasmigrazione satori******************************************************************************************

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

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

[State 1700, Super D]
type = EnvColor
trigger1 = time = 0
value = 0,0,0
under = 1
time = 40

[State 1700, Super B]
type = Explod
trigger1 = time = 0
anim = F150
postype = p1
pos = -320,-360
bindtime = 1
supermove = 1
sprpriority = -1
ontop = 0
ownpal = 1

[State 1700, Super C]
type = Explod
trigger1 = time = 0
anim = F155
postype = p1
pos = 0,-100
bindtime = 1
supermove = 1
sprpriority = 2
ontop = 1
ownpal = 1

[State 1700, Super B]
type = AfterImage
trigger1 = AnimElem = 1
trans = add
time = 2

[State 1700, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

[State 1700, Super D]
type = NotHitBy
trigger1 = AnimElem = 1
value = , NA, SA, AT
time = 26

[State 1700, passaggio]
type = HitDef
trigger1 = Animelem = 1
attr = S,HA
damage = 1
guardflag = -1
animtype = light
ground.type = High
sparkno = -1
kill = 0
P2StateNo = 1702

[State 1700, colore]
type = Envcolor
trigger1 = time = 8
value = 0,0,0
time = 105
under = 1

[State 1700, colore]
type = Envcolor
trigger1 = time = 1
value = 255,255,255
time = 7
under = 0

[State 1700, Super B]
type = PlaySnd
trigger1 = Time = 1
value = 1000,14

[State 1700, lampo snd]
type = PlaySnd
trigger1 = Time = 8
value = 1000,15
volume = -100  

[State 1700, shin]
type = explod
trigger1 = time = 5
anim = 1703
pos = -120,0
postype = p1
removetime = 100
ownpal = 1
sprpriority = -3

[State 1700, rey]
type = explod
trigger1 = time = 5
anim = 1700
pos = -50,0
postype = p1
removetime = 100
ownpal = 1

[State 1700, ryuga]
type = explod
trigger1 = time = 5
anim = 1701
pos = -180,-5
postype = p1
removetime = 100
ownpal = 1

[State 1700, sauzer]
type = explod
trigger1 = time = 5
anim = 1702
pos = -70,0
postype = p1
removetime = 100
ownpal = 1

[State 1700, shu]
type = explod
trigger1 = time = 5
anim = 1704
pos = -90,0
postype = p1
removetime = 100
ownpal = 1

[State 1700, toky]
type = explod
trigger1 = time = 5
anim = 1705
pos = -150,0
postype = p1
removetime = 100
ownpal = 1

[State 1700, colore]
type = Envcolor
trigger1 = time = 105
value = 255,255,255
time = 17
under = 0

[State 1700, altro]
type = ChangeState
trigger1 = time = 105
value = 1701
ctrl = 1


[Statedef 1701]
type    = S
movetype= H
physics = S
ctrl = 1

[State 1701, effetto]
type = PlaySnd
trigger1 = time = 0
value = 1000,18
loop = 1
volume = 255
channel = 16

[State 1701, var]
type = VarSet
trigger1 = 1
v =  16
value = 1

[State 1701, 0]
type = AfterImage
trigger1 = time = 0
time = 1000
length = 20 ;60
palbright = 30, 30, 30
palcontrast = 120, 120, 220
palpostbright = 0,0,100;0, 0, 0
paladd = 5,5,15 ;10,10,25
palmul = 1,1,1 ;.65,.65,.75
timegap = 2 ;5
framegap = 4
trans = none

;[State 1701, palette]
;type = PalFX
;trigger1 = Time = 0
;time = 1050 
;add = 0, 0, 100
;mul = 256, 256, 256
;sinadd = 20, 20, 10, 10
;invertall = 0 ;1

[State 1701, 2]
type = NotHitBy
value = SCA
time = 1000
trigger1 = time = 0

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

[Statedef 1702]
type    = S
movetype= H
physics = S
ctrl = 0
anim = 0

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

[State 1702, fermo]
type = PosSet
trigger1 = time = 0
y = 0

[State 1702, via]
type = SelfState
trigger1 = time = 100
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; 1-2-3 parte 1

[Statedef 1800]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 10,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 1800                      ;Change animation (Def: no change)
poweradd = 20                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set layering priority to 2 (in front)

[State 1800, 1]
type = HitDef
trigger1 = animelem = 4
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 20, 0                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 28, 28                 ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = -10, -95               ;X-offset for the "hit spark" rel. to p2,
hitsound = 5, 0                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 12             ;Time opponent is in hit state
ground.velocity = -4             ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3           ;X-velocity at which opponent is pushed,
air.hittime = 12                 ;Time before opponent regains control in air

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

[State 1800, 2nd Attack]
type = ChangeState
triggerall = command = "1-2-3"
triggerall = Animelem = 4, > 1 && Animelem = 5, <= 11
triggerall = ifelse(movecontact, hitpausetime <= 3, 1)
trigger1 = command = "1-2-3"
ignorehitpause
value = 1805
ctrl = 0

[State 1800, 2nd Attack AI]
type = ChangeState
triggerall = var(50) = 1
triggerall = Animelem = 4, > 1 && Animelem = 5, <= 11
triggerall = ifelse(movecontact, hitpausetime <= 3, 1)
trigger1 = random < 500
ignorehitpause
value = 1805
ctrl = 0

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

;---------------------------------------------------------------------------
; 1-2-3 parte2

[Statedef 1805]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 1805                      ;Change animation (Def: no change)
poweradd = 20                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set layering priority to 2 (in front)

[State 1805, 1]
type = HitDef
trigger1 = animelem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 40, 0                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 28, 28               ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = -10, -95               ;X-offset for the "hit spark" rel. to p2,
hitsound = 5, 0                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 12             ;Time opponent is in hit state
ground.velocity = -4             ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3           ;X-velocity at which opponent is pushed,
air.hittime = 12                 ;Time before opponent regains control in air

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

[State 1805, 3 Attack]
type = ChangeState
triggerall = command = "1-2-3"
triggerall = Animelem = 3, > 1 && Animelem = 4, <= 11
triggerall = ifelse(movecontact, hitpausetime <= 3, 1)
trigger1 = command = "1-2-3"
ignorehitpause
value = 1810
ctrl = 0

[State 1805, 3 Attack AI]
type = ChangeState
triggerall = var(50) = 1
triggerall = Animelem = 3, > 1 && Animelem = 4, <= 11
triggerall = ifelse(movecontact, hitpausetime <= 3, 1)
trigger1 = random < 500
ignorehitpause
value = 1810
ctrl = 0

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

;---------------------------------------------------------------------------
; 1-2-3 parte3

[Statedef 1810]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 1810                      ;Change animation (Def: no change)
poweradd = 20                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set layering priority to 2 (in front)

[State 1810, 1]
type = HitDef
trigger1 = animelem = 3
trigger2 = animelem = 4
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 50, 10                  ;Damage that move inflicts, guard damage
animtype = Hard
hitflag = MAFD
guardflag = MAFD                 ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 38, 38               ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = -10, -95               ;X-offset for the "hit spark" rel. to p2,
hitsound = 5, 0                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 15            ;Time that the opponent slides back
ground.hittime  = 20             ;Time opponent is in hit state
ground.velocity = -6,-4          ;Velocity at which opponent is pushed
airguard.velocity = -3,-4        ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -3,-4           ;X-velocity at which opponent is pushed,
air.hittime = 12                 ;Time before opponent regains control in air
fall = 1
fall.recover = 1

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

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

; *******************************************************************************************************
; 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, aura]
type = null;Explod
trigger1 = 1
trigger1 = time > 0
anim = 3110
pos = 0,0
postype = p1
sprpriority = 1
ontop = 1
ownpal = 1

[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 = -2,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 = 3
trigger2 = animelem = 7
trigger3 = animelem = 10
trigger4 = animelem = 14
attr = S, HA
animtype = Hard
hitflag = MAFD
guardflag = MAFD
damage = 120,30
hitsound   = S0,9
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, Voce atatata]
type = PlaySnd
trigger1 = animelem = 15
value = 1000,4
channel = 10
volume = -50

[State 6001, fineatata]
type = Stopsnd
trigger1 = animelem = 33
channel = 10

[State 6001, 1]
type = HitDef
trigger1 = animelem = 16
trigger2 = animelem = 17
trigger3 = animelem = 18
trigger4 = animelem = 19
trigger5 = animelem = 20
trigger6 = animelem = 21
trigger7 = animelem = 22
trigger8 = animelem = 23
trigger9 = animelem = 24
trigger10 = animelem = 25
trigger11 = animelem = 26
trigger12 = animelem = 27
trigger13 = animelem = 28
trigger14 = animelem = 29
trigger15 = animelem = 30
trigger16 = animelem = 31
trigger17 = animelem = 32
trigger18 = animelem = 33
attr = S, HA
animtype = Hard
hitflag = MAFD
guardflag = MAFD
damage = 45,5
hitsound   = S0,5
guardsound = 6, 0
pausetime = 3,3
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 = 36
attr = S, HA
animtype = up
hitflag = MAFD
guardflag = MAFD
numhits = 3
damage = 150,15
pausetime = 60,10
hitsound   = S0,10
guardsound = 6, 0
sparkno = 12
sparkxy = -40,-80
ground.type = trip
ground.slidetime = 15
ground.hittime = 40
ground.velocity = -6,-14
air.velocity = -3,-4
guard.velocity = -6
fall.damage = 50
p2stateno = 3670
fall = 1
yaccel = 0.5
fall.recover = 0
envshake.time = 70
envshake.freq = 150
envshake.ampl = 20

[State 6001, Voce ata!]
type = PlaySnd
trigger1 = animelem = 36
value = 1000,3
volume = -50

[State 6001,1]
type = Envcolor
trigger1 = animelem = 3
trigger2 = animelem = 7
trigger3 = animelem = 10
trigger4 = animelem = 14
ignorehitpause = 1
value = 255, 0, 0
time = 5
under = 0
supermove = 1

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

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



; *******************************************************************************************************
; Distruzione Finale *********************************************************************************
[Statedef 7000]
type    = S
movetype= A
physics = S
poweradd= -3000
ctrl = 0
velset = 0
anim = 7000

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

[State 7000, Super D]
type = EnvColor
trigger1 = time = 0
value = 0,0,0
under = 1
time = 40

[State 7000, Super B]
type = Explod
trigger1 = time = 0
anim = F150
postype = p1
pos = -310,-340
bindtime = 1
supermove = 1
sprpriority = -1
ontop = 0
ownpal = 1

[State 7000, Super C]
type = Explod
trigger1 = time = 0
anim = F155
postype = p1
pos = 10,-80
bindtime = 1
supermove = 1
sprpriority = 2
ontop = 1
ownpal = 1

[state 7000,suono]
type = playsnd
trigger1 = time = 0
value = 1000,6
volume = 255

[state 7000,suono]
type = playsnd
trigger1 = time = 5
value = 1000,9
volume = 150

[state 7000,biguomo]
type = explod
trigger1 = time >= 10
anim = 7001
pos = 0,0
postype = p1
removetime=113
sprpriority = 0
supermove = 1
bindtime = -1
persistent = 0

[state 7000]
type = envshake
trigger1 = time = 10
time = 134
freq = 60
ampl = -4
phase = 30

[State 7000, colore]
type = Envcolor
trigger1 = time = 74
value = 255,255,255
time = 15
under = 1

[State 7000, colore]
type = Envcolor
trigger1 = time = 90
value = 255,255,255
time = 5
under = 0

[State 7000, 3]
type = BGPalfx
trigger1 = time = 10
invertall = 1
supermove = 1
time = 150
add = 0,-255,-255
sinadd = 400,400,400,145

[State 7000,morte]
type = hitdef
trigger1 = time = 80
attr = S, HA
damage = 3000
getpower = 0
animtype = hard
hitflag = MAFD
guardflag = -1
priority = 3,hit
pausetime = 1,2
sparkxy = -10, 0
guardsound = 6,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 80
ground.velocity = -3,-25  
air.velocity = -2,-12.5
air.juggle = 3
yaccel = 0.8
fall=1
fall.recover = 0
kill=0

[state 7000, cambia]
type = changeanim
trigger1 = time >= 115
ctrl = 0
value = 5080

[state 7000, cambia]
type = changestate
trigger1 = time >= 124
ctrl = 1
value = 5080

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

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

[State 3670, 1]
type = ChangeAnim2
trigger1 = Time >= 0
value = 3670

[State 3670, 2]
type = ForceFeedback
trigger1 = Time = 0
time = 15
waveform = sinesquare
ampl = 135

[State 3670, 3]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 3671

;--------------------------------------------------------------------------
; hit1
[Statedef 3671]
type    = A
movetype= H
physics = N

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

[State 3671, angle 1]
type = AngleSet
Trigger1 = Time = 0
value = 90

[State 3671, angle 2]
type = AngleDraw
Trigger1 = AnimElem = 3, >= 0
Trigger1 = AnimElem = 4, < 0

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

[State 3671, 3]
type = VelAdd
trigger1 = Time >= 0
y = .4

[State 3671, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3672

;-------------------------------
; second hit
[Statedef 3672]
type    = L
movetype= H
physics = N

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

[State 3672, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 3672

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

[State 3672, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3672, 3]
type = VelMul
trigger1 = Time = 0
x = .75

[State 3672, 4]
type = GameMakeAnim
trigger1 = Time = 1
value = 60
pos = 0, 0
under = 1

[State 3672, 5]
type = PlaySnd
trigger1 = Time = 1
value = F7, 0 ;Hit ground

[State 3672, 5]
type = HitFallDamage
trigger1 = Time = 1

[State 3672, 6]
type = PosFreeze
trigger1 = AnimElem = 2, < 0

[State 3672, 4]
type = VelSet
trigger1 = AnimElem = 2
y = -5

[State 3672, 5]
type = VelAdd
trigger1 = AnimElem = 2, > 0
y = .47

[State 3672, 6]
type = SelfState
trigger1 = AnimElem = 2, > 0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5110 ;HIT_LIE


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

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -2]

[State -2, colpito]
type = VarSet
v = 7
trigger1 = StateNo = 1500
value = 1

[State -2, finesatori]
type = StopSnd
trigger1 = var(19) = 1000
trigger2 = var(19) = 0
channel = 16

[State -2, varsatori]
type = VarSet
trigger1 = var(19) != 1000
trigger1 = var(19) >= 1
v = 16
value = var(19) + 1

[State -2, varsatori end]
type = VarSet
trigger1 = var(19) = 1000
trigger2 = var(19) = 1
v = 16
value = 0

[State -2, colpito]
type = VarSet
v = 9
trigger1 = Projhit1200=1
value = 1

[State -2, hit]
type = StopSnd
trigger1 = ProjHit1600 = 1
channel = 2

[State -2, potenza]
type = AttackMulSet
trigger1 = var(19) >= 1 
value = 1.5
ignorehitpause = 0
persistent = 1

[State -2, potenza]
type = AttackMulSet
trigger1 = var(19) = 0
value = 1
ignorehitpause = 0
persistent = 1

;Colpo a libera energia

[State -2, Blocco]
type = SuperPause
trigger1 = win && !Var(6) && Var(7)
anim = -1
darken = 1
time = 25

[State -2, Back raggio]
type = Envcolor
trigger1 = win && !Var(6) && Var(7)
value = 0,0,0
time = 25
under = 1

[State -2, name]
type = Explod
trigger1 = win && !Var(6) && Var(7)
anim = F201
pos = 80,0
postype = left
bindtime = -1
supermove = 0 ;1
removetime = 1
ontop = 1
ownpal = 1

[State -2, name]
type = Explod
trigger1 = win && !Var(6) && Var(7)
anim = F301
pos = 20,50
postype = left
bindtime = -1
supermove = 0 ;1
removetime = 1
ontop = 1
ownpal = 1

[State -2, namevarset]
type = VarSet
v = 6
trigger1 = win
value = 1

;Tecnica della distruzione dell'Universo

[State -2, Blocco]
type = SuperPause
trigger1 = win && !Var(8) && Var(9)
anim = -1
darken = 1
time = 25

[State -2, Back raggio]
type = Envcolor
trigger1 = win && !Var(8) && Var(9)
value = 0,0,0
time = 25
under = 1

[State -2, name]
type = Explod
trigger1 = win && !Var(8) && Var(9)
anim = F202
pos = 70,0
postype = left
bindtime = -1
supermove = 0 ;1
removetime = 1
ontop = 1
ownpal = 1

[State -2, name ITA]
type = Explod
trigger1 = win && !Var(8) && Var(9)
anim = F302
pos = 0,50
postype = left
bindtime = -1
supermove = 0 ;1
removetime = 1
ontop = 1
ownpal = 1

[State -2, namevarset]
type = VarSet
v = 8
trigger1 = win
value = 1

;Trasmigrazione attraverso Satori

[State -2, Blocco]
type = SuperPause
trigger1 = win && var(19)
anim = -1
darken = 1
time = 25
persistent = 0

[State -2, Back raggio]
type = Envcolor
trigger1 = win && var(19)
value = 0,0,0
time = 25
under = 1
persistent = 0

[State -2, name]
type = Explod
trigger1 = win && var(19)
anim = F200
pos = 70,0
postype = left
bindtime = -1
supermove = 0 ;1
removetime = 1
ontop = 1
ownpal = 1
persistent = 0

[State -2, name]
type = Explod
trigger1 = win && var(19)
anim = F300
pos = 0,50
postype = left
bindtime = -1
supermove = 0 ;1
removetime = 1
ontop = 1
ownpal = 1
persistent = 0

[State -2, varsatori end]
type = VarSet
trigger1 = var(19) && Win
v = 16
value = 0


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

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


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


;[State -2, vs]
;type = varset
;triggerall = var(19)=1 && stateno = 920
;trigger1 = time = 1
;var(19) = 0



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

[Statedef -3]

;This controller plays a sound everytime Ken 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 = 100, 0

[State -3, Corsa]
type = PlaySnd
trigger1 = animelem = 2
value = 100,1
channel = 3

[State -3, Jump Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 50 ;Jump
volume = -50
value = 100, 3

[state -3, corsa]
type = Stopsnd
trigger1 = stateno != 100
channel = 3

[state -3, back]
type = Playsnd
trigger1 = stateno = 105
trigger1 = time = 5
value = 100,2
volume = -30

[State -3, fineatata]
type = Stopsnd
trigger1 = stateno != 920
trigger1 = stateno != 1000
trigger1 = stateno != 1100
trigger1 = stateno != 1050
trigger1 = stateno != 1150
trigger1 = stateno != 1300
trigger1 = stateno != 6001
channel = 10

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

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


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

