;===========================================================================
;Megaman XR Template By ChAoTiC.  Heavily Edited From The MVC EOH Template
;Coded By Redhot, Acey, and a host of others.  With some Codes from Vyn and Kong. Thanks
;===========================================================================
[Data]
life = 1000
attack = 130
defence = 100
fall.defence_up = 50
liedown.time = 50
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 555
IntPersistIndex = 60
FloatPersistIndex = 40

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

[Velocity]
walk.fwd = 3.6
walk.back = -2.7
run.fwd = 6
run.back = -8,-3
jump.neu = 0,-8.5
jump.back = -3.7
jump.fwd = 3.2
runjump.fwd = 4.4
runjump.back = -4.4
airjump.neu = 0, -5.9
airjump.fwd = 2.5
airjump.back = -2.55

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

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

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

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

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

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

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

;================================================================ DASH FWD

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

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

[State 100, New Dash start fx]
type = Explod
trigger1 = !time
ID = 6088
anim = 6088
postype = p1
pos = 10,0
bindtime = 1
removetime = -2
vel = 0, 0
ownpal = 1
sprpriority = 5
removeongethit = 0

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

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


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


[State 0, VelSet]
type = Veladd
trigger1 = time = 23
x = -2
y = 0
;ignorehitpause =
;persistent =


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





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

;============================================================== DASH BACK

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

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

[State 100, New Dash start fx]
type = Explod
trigger1 = !time
ID = 6088
anim = 6088
postype = p1
pos = 0,0
bindtime = 1
facing = -1
removetime = -2
vel = 0, 0
ownpal = 1
sprpriority = 5
removeongethit = 0

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

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


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

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

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

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


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

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

[Statedef 180]
type = S

[State 190, 3]
type = ChangeState
triggerall = MatchOver
trigger1 = enemy,name = "Rockman" || enemy,name = "Rock"
trigger2 = enemy,name = "Mega Man" || enemy,name = "Megaman" || enemy,name = "Mega"
value = 181

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

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

[State 180, 2]
type = ChangeState
trigger1 = Var(1) = [201,400]
value = 182


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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 18,random%3
channel = 0

[State 0, PlaySnd]
type = PlaySnd
triggerall = time = 0 && MatchOver
trigger1 = enemy,name = "Rockman" || enemy,name = "Rock"
trigger2 = enemy,name = "Mega Man" || enemy,name = "Megaman" || enemy,name = "Mega"
value = 18,5
channel = 0

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

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 10
value = 18,3+random%2
channel = 0

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

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

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

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

[Statedef 190]
type = S

[State 190, Life is Empty]
type = LifeSet
trigger1 = TeamSide = 2
value = 1

[State 190, 3]
type = ChangeState
trigger1 = enemy,name = "Rockman" || enemy,name = "Rock"
trigger2 = enemy,name = "Mega Man" || enemy,name = "Megaman" || enemy,name = "Mega"
value = 19001

[State 190, 3]
type = ChangeState
trigger1 = enemy,name = "Dr. Wily" || enemy,name = "Dr.Wily" || enemy,name = "Wily"
trigger2 = enemy,name = "Dr Wily" || enemy,name = "DrWily" || enemy,name = "Wiley"
trigger3 = enemy,name = "Wily RMM" || enemy,name = "Doctor Wily" || enemy,name = "Wahwee"
value = 19002

[State 190, 2]
type = ChangeState
trigger1 = !time
value = 191 + random%2



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

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

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




[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 10
value = 190,0
volume = 0
channel = 2
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

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


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 300
value = 19,1
channel = 0


[State 190, ChangeState]
type = ChangeState
trigger1 = anim !=190 && AnimTime = 0
value = 199

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


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

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


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 80
value = 19,0
channel = 0


[State 190, ChangeState]
type = ChangeState
trigger1 = time = 150
value = 199

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[State 195, Voice]
type = PlaySnd
trigger1 = !Time
value = 19,2
channel = 0

[State 195, bling]
type = Explod
trigger1 =  animelem = 6
anim =  6009
ID =   6009
pos = 31,-77
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = .7,.7
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 1
;ignorehitpause =
;persistent =

[State 195, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = 195,0
volumescale = 50

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

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

;---------------------------------------------
;Megaman Intro
[Statedef 19001]
type = S
movetype = I
physics = N
ctrl = 0
anim = 197
velset = 0,0
spriority = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 190,0
channel = 2

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time <=316
flag = invisible

[State 0, PalFX]
type = PalFX
trigger1 = time = 316
time = 86
add = 100,100,100
mul = 256,256,256
sinadd = 150,150,150,50
invertall = 0
color = 256
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1 =time = 300
anim = 1991
ID =1991
pos = 10,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1.2,1
sprpriority = 1
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 300
value = 190,2
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 300
value = 190,3
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =



[State 0, Explod]
type = Explod
trigger1 =time = 300
anim = 1992
ID =1992
pos = 10,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = .8,.8
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 494
value = 8600,0
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =


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


[State 0, bling]
type = Explod
trigger1 = anim = 198 &&  animelem = 9
anim =  6009
ID =   6009
pos = 31,-77
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = .7,.7
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 1
;ignorehitpause =
;persistent =

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 198 &&  animelem = 9
value = 190,4
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 420
value = 19,4
channel = 0

 [State 0, ChangeState]
type = ChangeState
trigger1 = anim = 198 && !animtime
value = 199
ctrl = 0


;---------------------------------------------------------------------------------------------
;Dr. Wily Intro
[Statedef 19002]
type = S
movetype = I
physics = N
ctrl = 0
anim = 193
velset = 0,0
spriority = 0


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

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


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 200
value = 19,3
channel = 0


[State 190, ChangeState]
type = ChangeState
trigger1 = time = 300
value = 199

;-----------------------------------------------
; NEW Move around before match
[Statedef 199]
type = S
physics =S
sprpriority = 0
Anim = 0

[State 190, Lifebar Sound]
type = PlaySnd
value = 5678,0
trigger1 = TeamSide = 2
trigger1 = time = 0
channel = 5

[State -2, Stop Lifebar sound]
type = StopSnd
trigger1 = time = 90
channel = 5

[State 190, LifeBar]
type = LifeAdd
trigger1 = TeamSide = 2
trigger1 = Time < 260
value = 10

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

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

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

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



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

;---------------------------------------------------------------------------
; Standing Light Punch
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 200
poweradd = 15
sprpriority = 2

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

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


[State 200, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20, random%3
channel = 0


[State 200, hit]
type=hitdef
trigger1=anim=200
attr=S,NA
damage=30,0
animtype=Light
guardflag=M
hitflag=MAF
priority=2,Hit
pausetime=6,6
sparkno = s7771
guard.sparkno=s6767
sparkxy = var(42):=-10, var(43):=-45	;X-offset for the "hit spark" rel. to p2,
hitsound = s8000,0			;Sound to play on hit
guardsound = 6,0
ground.type = High
air.type = High
ground.slidetime=10
ground.hittime=10
air.hittime=12
ground.velocity=ifelse((prevstateno=200 || prevstateno = 230 || prevstateno = 430 || prevstateno = 400),-6,-3),0
air.velocity = -4, -5.25
airguard.velocity = -4,-1
ground.cornerpush.veloff=ifelse((prevstateno=200 || prevstateno = 230 || prevstateno = 430 || prevstateno = 400),-9,-5);,0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
air.cornerpush.veloff=0
yaccel=.5
persistent=0
getpower=0


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

;---------------------------------------------------------------------------
; Standing Medium Punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 210
poweradd = 35
sprpriority = 2

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

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

[State 200, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,3+random%3
channel = 0


[State 210, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S,NA
damage = 25,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-75
guard.sparkno = s6767
hitsound = S8000,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

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

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Standing Heavy Punch
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 220
poweradd = 55
sprpriority = 2

[State 210, Width]
type = Width
trigger1 = (AnimElemTime (3) >= 0) && (AnimElemTime (6) < 0)
value = 25,0

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

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

[State 220, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,6+random%3
channel = 0


[State 220, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S,NA
damage = 35,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 20,14
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-45
guard.sparkno = s6767
hitsound = S8000,2
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 15
ground.velocity = -10
air.type = Low
air.hittime = 18
air.velocity = -6,-7
envshake.time = 7
envshake.ampl = 4




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

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------------------------
;Standing light kick
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 230
poweradd = 15
sprpriority = 2

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

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

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


[State 230, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20, random%3
channel = 0


[State 230, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 6,6
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-35
guard.sparkno = s6767
hitsound = S8000,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,-5

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

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

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

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


[State 240, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,3+random%3
channel = 0


[State 240, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-45
guard.sparkno = s6767
hitsound = S8000,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,-5

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

;---------------------------------------------------------------------------------------------
;---------------------------------------------------------------------------------------------
;Standing strong Kick
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 250
poweradd = 55
sprpriority = 2

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

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


[State 250, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,6+random%3
channel = 0


[State 250, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S,NA
damage = 55,1
animtype = Up
air.animtype = Up
fall.animtype = Up
guardflag = MA
hitflag = MA
priority = 4, Hit
pausetime = 9,9
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-85
guard.sparkno = s6767
hitsound = s8000,5
guardsound = 6,0
ground.type = High
ground.slidetime = 13
ground.hittime = 100
ground.velocity = 0,-11;-12.7
air.type = Low
air.hittime = 25
air.velocity = 0,-11;-12.7
fall.recover = 1
envshake.time = 7
envshake.ampl = 4

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

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


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

[State 250, ChangeState]
type = ChangeState
trigger1 = movehit && var(20) = 1
value = 7000
ctrl = 0
ignorehitpause = 1

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

[State 210, Width]
type = Width
trigger1 = AnimElem = 2
value = 15,0

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

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

[State 400, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20, random%3
channel = 0

[State 400, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 7,7
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-25
guard.sparkno = s6767
hitsound = S8000,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching medium punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 410
poweradd = 35
sprpriority = 2

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

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

[State 410, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,3+random%3
channel = 0

[State 410, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-75
guard.sparkno = s6767
hitsound = S8000,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching strong punch
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 420
poweradd = 55
sprpriority = 2

[State 210, Width]
type = Width
trigger1 = (AnimElemTime (2) >= 0) && (AnimElemTime (5) < 0)
value = 30,0

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

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

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

[State 420, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,6+random%3
channel = 0


[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = C,NA
damage = 40,1
animtype = Medium
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-35
guard.sparkno = s6767
hitsound = S8000,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0
envshake.time = 7
envshake.ampl = 4


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

;---------------------------------------------------------------------------------------------
;Crouching light kick
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 430
poweradd = 15
sprpriority = 2

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

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

[State 430, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20, random%3
channel = 0

[State 430, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 15,1
animtype = Light
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 7,7
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-15
guard.sparkno = s6767
hitsound = S8000,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

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

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

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

[State 440, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,3+random%3
channel = 0

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 35,1
animtype = Medium
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-15
guard.sparkno = s6767
hitsound = S8000,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching strong kick
[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 450
poweradd = 55
sprpriority = 2


[State 0, VelSet]
type = VelSet
trigger1 = prevstateno  = 1200 && time = 1
x = 0
y = 0
;ignorehitpause =
;persistent =


[State 0, PosSet]
type = PosSet
trigger1 = prevstateno  = 1200 && time = 1
y = 0
ignorehitpause = 1
persistent = 0


[State 450, VelMul, corrida]
type = Velset
trigger1 = animelem = 2
x = ifelse(var(25)= 1,5,ifelse(var(25)=2,10,15))

[State 450, VelMul, corrida]
type = Velset
trigger1 = animelem = 3
x = 1

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

[State 450, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,6+random%3
channel = 0

[State 450, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 45,1
animtype = back
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-15
guard.sparkno = s6767
hitsound = S8000,5
guardsound = 6,0
ground.type = trip
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -2,-2
air.type = low
air.hittime = 5
air.velocity = -7,3
fall = 1
envshake.time = 7
envshake.ampl = 4

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

;---------------------------------------------------------------------------------------------
;Jumping light punch
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 600
poweradd = 15
sprpriority = 2

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

[State 600, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20, random%3
channel = 0

[State 600, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = A,NA
damage = 15,1
animtype = Light
guardflag = H
hitflag = MAF
priority = 4, Hit
pausetime = 7,7
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-45
guard.sparkno = s6767
hitsound = S8000,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -6
air.fall = 0
air.velocity =  0, -5

[State 600, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
Ctrl = 1


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

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

[State 610, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,3+random%3
channel = 0

[State 610, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = A,NA
damage = 35,1
animtype = medium
guardflag = H
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-45
guard.sparkno = s6767
hitsound = S8000,1
guardsound = 6,0
ground.type = High
ground.slidetime = 25
ground.hittime  = 20
ground.velocity = -8
air.fall = 0
air.velocity =  0, -5

[State 610, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
Ctrl = 1

;---------------------------------------------------------------------------------------------
;Jumping strong punch
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 620
poweradd = 55
sprpriority = 2

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

[State 620, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,6+random%3
channel = 0

[State 630, HitDef]
type = HitDef
triggerall = anim = 620
trigger1 = AnimElem = 3
attr = A,NA
damage = 40,1
animtype = Light
guardflag = H
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-25
guard.sparkno = s6767
hitsound = S8000,2
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.fall = 1
air.velocity =  -3, 5
air.hittime = 25
envshake.time = 7
envshake.ampl = 4

[State 0, Helper]
type = null
trigger1 =  animelem = 3
helpertype = normal ;player
name = "Green Blast"
ID =   700
stateno = 700
pos = 60,-75
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
size.xscale =.8
size.yscale =.8

[State 620, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
Ctrl = 1

;---------------------------------------------------------------------------------------------
;Jumping light kick
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 630
poweradd = 15
sprpriority = 2

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

[State 630, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20, random%3
channel = 0

[State 630, HitDef]
type = HitDef
triggerall = anim = 630
trigger1 = AnimElem = 3
attr = A,NA
damage = 15,1
animtype = Light
guardflag = H
hitflag = MAF
priority = 4, Hit
pausetime = 7,7
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-45
guard.sparkno = s6767
hitsound = S8000,3
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.fall = 0
air.velocity =  0, -5
air.hittime = 25

[State 630, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
Ctrl = 1

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

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

[State 640, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,3+random%3
channel = 0

[State 640, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = A,NA
damage = 35,1
animtype = Medium
guardflag = H
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-55
guard.sparkno = s6767
hitsound = S8000,4
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.fall = 0
air.velocity =  0, -5
air.hittime = 25

[State 640, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
Ctrl = 1

;---------------------------------------------------------------------------------------------
;Jumping strong kick
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 650
poweradd = 55
sprpriority = 2


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

[State 650, Voice]
type = PlaySnd
trigger1 = AnimElem = 1 && Random < 500
value = 20,6+random%3
channel = 0

[State 650, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = A,NA
damage = 45,1
animtype = Heavy
guardflag = H
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7771
sparkxy = var(42):=-10, var(43):=-35
guard.sparkno = s6767
hitsound = S8000,5
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -12,10
air.fall = 1
air.hittime = 25
envshake.time = 7
envshake.ampl = 4

[State 650, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
Ctrl = 1
;=========================================================


;----------------------------
;dodge forward
[Statedef 700]
type = S
physics = N
movetype= I
anim = 700
ctrl = 0
velset = 0,0
sprpriority = -1

[State 700, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1100,1
volume = 255
channel = -1

[State 700, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 700, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 6.6

[State 700, Velocity]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 700, HitBy]
type = HitBy
trigger1 = time <= 20
value = SCA;, NT,ST,HT

[State 700, Push]
type = PlayerPush
trigger1 = AnimElemTime(2) > 0
value = 0

[State 700, AfterImage]
type = Afterimage
trigger1 = AnimElem = 3
time = 15
length = 10
FrameGap = 5
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 700, StateChange]
type = Changestate
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-----------------------------
;dodge backwards
[Statedef 701]
type = S
physics = N
movetype= I
anim = 701
ctrl = 0
velset = 0,0
sprpriority = -1

[State 700, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1100,1
volume = 255
channel = -1

[State 700, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 700, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = -6.6

[State 700, Velocity]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 700, HitBy]
type = HitBy
trigger1 = time <= 20
value = SCA;, NT,ST,HT

[State 700, Push]
type = PlayerPush
trigger1 = AnimElemTime(2) > 0
value = 0

[State 700, AfterImage]
type = Afterimage
trigger1 = AnimElem = 3
time = 15
length = 10
FrameGap = 5
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 700, StateChange]
type = Changestate
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-----------------------------
;dodge stand
[Statedef 730]
type = S
physics = S
movetype = I
anim = 730
ctrl = 0
velset = 0,0

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


[State 730, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S3,0
volume = 0
channel = -1
;freqmul = 2.0

[State 730, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 730, Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 730, HitBy]
type = HitBy
trigger1 = 1
value = SCA, NT,ST,HT

[State 730, AfterImage]
type = Afterimage
trigger1 = AnimElem = 1
time = 26
length = 10
FrameGap = 6
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 730, CtrlSet]
type = CtrlSet
trigger1 = animelem >= 4
value = 1

[State 730, StateChange]
type = Changestate
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;=================================================
 ;Hyper Blast Helper.
[Statedef 750]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 6004
sprpriority = 5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S750,0
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 1261, Spark]
type=helper
trigger1= movehit=1 && numtarget && numhelper(8000) <=1
trigger1= !(target,hitshakeover)
helpertype=normal
stateno=8022
ID=8000
name="Spark"
postype=p2
pos= 5,-45;(target,const(size.ground.front) -1) * (target,facing) * (-facing), floor(pos y-target,pos y)
ownpal=1
size.xscale=.9
size.yscale=1
pausemovetime=65535
supermovetime=65535
ignorehitpause=1


[State 0, HitDef]
type = HitDef
trigger1 =  animelem = 4
trigger2 =  animelem = 6
trigger3 =  animelem = 8
trigger4 =  animelem = 10
trigger5 =  animelem = 12
trigger6 =  animelem = 14
trigger7 =  animelem = 16
trigger8 =  animelem = 18
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = back         ;light,medium,hard,back,up,diagup
air.animtype = hard
fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 15,5
pausetime = 0,10
;guard.pause,0
sparkno = s7772
guard.sparkno = s6003
sparkxy = var(42):=-10, var(43):=0
hitsound = s8000,2
guardsound = 0,0
ground.type = Low      ;Low,Trip,None
;air.type = High
ground.slidetime = 10
;guard.slide = 0
ground.hittime = 5
;guard.hit = 0
air.hittime = 20
;guard.ctrl  = 0
;guard.dist = 320
fall = 1
ground.velocity = -10,-10
;guard.velocity = 0
air.velocity = -10,-10
ground.cornerpush.veloff = 0

[State 0, TargetVelAdd]
type = TargetVelAdd
trigger1 = movehit
x = -30
y = 0
ID = -1
;ignorehitpause =
;persistent =


[State 0, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0
;ignorehitpause =
;persistent =
;-----------------------------------------
;Throw 1
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

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

[State 800, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NT
hitflag = MA-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse (command = "holdback",-1,1)
p2facing = -1
p1stateno = 810
p2stateno = 815
guard.dist = 0
fall.xvelocity = 3
fall.yvelocity = -4
fall = ifelse(PalNo > 6, 0, 1)
fall.recover = 1
fall.damage = 80
down.bounce = -1
kill = 1
fall.envshake.time = 8
;fall.envshake.freq = 0
;fall.envshake.ampl = 0
;fall.envshake.phase = 0
;ignorehitpause =
;persistent =




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

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

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

[State 800, Voice]
type = PlaySnd
trigger1 = AnimElem = 3
value = 20,9
channel = 0

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 1
pos = -50,-40


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

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

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 4
pos = 15,-50


[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 5
pos = 25,-50


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


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

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

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

[State 801, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------------------
[Statedef 815]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority= 3


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

[State 815, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 820
;------------------------------------------------------
[Statedef 816]
type    = A
movetype= H
physics = N
velset = 3,-8
poweradd = 50

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value =  fvar(30)
;scale =  (winmugen only)
;ignorehitpause =
;persistent =


[State 0, AngleSet]
type = AngleSet
trigger1 = time = 0
value = 0
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
fv = 30    ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State 0, VarAdd]
type = VarAdd
trigger1 = 1
fv = 30    ;fv =
value = -25
;ignorehitpause =
;persistent =



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


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

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

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

;---------------------------------------------------------------------------------------------
[Statedef 901]
type=A
physics=N
movetype=A
ctrl=0
sprpriority=4
movehitpersist=1

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

[State 1261, freeze]
type=posfreeze
trigger1= 1
value=1

[State 1261, Spark]
type=helper
trigger1= movehit=1 && numtarget
trigger1= !(target,hitshakeover)
helpertype=normal
stateno=8022
ID=8000
name="Spark"
postype=p1
pos= 5,0;(target,const(size.ground.front) -1) * (target,facing) * (-facing), floor(pos y-target,pos y)
ownpal=1
size.xscale=.5
size.yscale=.6
pausemovetime=65535
supermovetime=65535
ignorehitpause=1


[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 10
;ignorehitpause =
;persistent =



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

;---------------------------------------------------------------------------------------------
;Buster Shot
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 1
poweradd = 0
anim = ifelse (var(16)=0,1000,1001)
ctrl = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = !time && Pos Y =0
anim = 16012
ID = 16012
pos = -30,10
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = -0.2,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 30
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(16)=1
statetype = A      ;S,A,C,L
movetype = A        ;I,A,H
;ignorehitpause =
;persistent =

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(16) = 1
physics = N         ;A,C,S,N

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 6012
ID = 6012
pos = 35,-45
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = .7,.7
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =


[State 0, Helper]
type = Helper
trigger1 = animelem = 3
helpertype = normal ;player
name = "green Blast"
ID =  1001
stateno =   1001
pos = 60,-45
postype = p1    ;p2,front,back,left,right
size.xscale = 1
size.yscale = 1
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove



[State 0, VelSet]
type = VelSet
triggerall = var(16)=0
trigger1 = animelem = 4
x = ifelse (var(25)=4,-2,ifelse (var(25)=5,-6,-9 ))

[State 0, VelSet]
type = VelSet
triggerall =var(16) = 1
trigger1 = animelem = 3
x = -.4
y = ifelse(vel y >=0,.4,-.4)

[State 0, VelSet]
type = VelSet
triggerall =var(16) = 0 && anim = 1001
trigger1 = animelem = 3
x = -.4
y = ifelse(vel y >=0,.4,-.4)

[State 1000, Fim]
type = ChangeState
trigger1 = AnimTime = 0
value =  ifelse (var(16)=1,50,0)
ctrl = 1

;----------------------------------------------
;Green Blast Helper.
[Statedef 1001]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 6013
sprpriority = 5
;ignorehitpause =
;persistent =


[State 1001, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256

[State 0, AfterImage]
type =null
trigger1 = time = 0
time = 70
length = 3
palcolor = 256
palinvertall = 0
palbright =0,150,0
palcontrast = 120,220,120
palpostbright = 0,255,0
paladd = 10,150,25
palmul = .65,.65,.75
timegap = 2
framegap = 2
;trans = addalpha
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 =  time = 1
x = ifelse (parent,var(25)=4,.01,ifelse (parent,var(25)=5,.04,1 ))
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time
v = 1    ;fv = 10
value = time
;ignorehitpause =
;persistent =

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = .02*var(1)
;ignorehitpause =
;persistent =


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


[State 1201, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,NP,SP,HP
stateno=901
ignorehitpause=1

[State 1055,hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  time = 1
value = S700,0
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "GreenLight"
ID = 1002
stateno = 1002
pos = -50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
size.xscale =.2
size.yscale =.2
ignorehitpause = 1
;persistent =

[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "Red Light"
ID = 1003
stateno = 1003
pos = -50,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
size.xscale =.2
size.yscale =.2
ignorehitpause = 1
;persistent =



[State 1261, Spark]
type=null
trigger1= movehit=1 && numtarget && numhelper(8000) <=1
trigger1= !(target,hitshakeover)
helpertype=normal
stateno=8022
ID=8000
name="Spark"
postype=p2
pos= 5,-45;(target,const(size.ground.front) -1) * (target,facing) * (-facing), floor(pos y-target,pos y)
ownpal=1
size.xscale=.5
size.yscale=.6
pausemovetime=65535
supermovetime=65535
ignorehitpause=1


[State 0, HitDef]
type = HitDef
trigger1 =  time = 0
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = hard
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 70,10
pausetime = 0,4
;guard.pause,0
sparkno = s7772
guard.sparkno = s6003
sparkxy = var(42):=-10, var(43):=0
hitsound = s8000,2
guardsound = 0,0
;air.type = High
ground.slidetime = 10
;guard.slide = 0
ground.hittime = 5
;guard.hit = 0
air.hittime = 20
;guard.ctrl  = 0
;guard.dist = 320
;yaccel = 0.5
ground.velocity =-4,-2
;guard.velocity = 0
air.velocity = -10,-5
ground.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 7




[State 0, DestroySelf]
type = changestate
trigger1 =  time > 120
trigger2 = movehit
trigger3 = moveguarded
value = 901
;ignorehitpause =
;persistent =

;------------------------------
;Green Light
[Statedef 1002]
type    = S
movetype= A
physics = N
juggle  = 0
ctrl = 0
anim = 8020
sprpriority = 5

[State 1001, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256



[State 9000, VarSet]
type = VarSet
trigger1 = Time = 0 ;Adjust as you wish.
fv = 0
value = 0


[State 9000, VarAdd]
type = VarAdd
trigger1 = Time > 0 ;Adjust as you wish.
fv = 0
value = FVar(1)

[State 9000, VarSet]
type = VarSet
trigger1 = Time = 0 ;Adjust as you wish.
fv = 1
value = IfElse((Time/180)%2,-.2,.2)


[State 0, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
time = 1
pos  = -20*sin(Time*(pi/30)),30*cos(Time*(pi/30))


[State 9000, VarSet]
type = VarSet
trigger1 = 1
fv = 2
value = -.5

;This is the X stretch of the move.
[State 9000, VarSet]
type = VarSet
trigger1 = 1
fv = 3
value = 0



 [State 0, DestroySelf]
type =Destroyself
trigger1 = parent,stateno != 1001
trigger2 = time >=300
;ignorehitpause =
;persistent =

;--------------------
;Red Light
[Statedef 1003]
type    = S
movetype= A
physics = N
juggle  = 0
ctrl = 0
anim = 8024
sprpriority = 5

[State 1001, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256



[State 9000, VarSet]
type = VarSet
trigger1 = Time = 0 ;Adjust as you wish.
fv = 0
value = 0


[State 9000, VarAdd]
type = VarAdd
trigger1 = Time > 0 ;Adjust as you wish.
fv = 0
value = FVar(1)

[State 9000, VarSet]
type = VarSet
trigger1 = Time = 0 ;Adjust as you wish.
fv = 1
value = IfElse((Time/180)%2,-.2,.2)


[State 0, BindToParent]
type = BindToParent
trigger1 = 1
facing = 1
time = 1
pos  = -20*sin(Time*(pi/30)),-30*cos(Time*(pi/30))


[State 9000, VarSet]
type = VarSet
trigger1 = 1
fv = 2
value = -.5

;This is the X stretch of the move.
[State 9000, VarSet]
type = VarSet
trigger1 = 1
fv = 3
value = 0



 [State 0, DestroySelf]
type =Destroyself
trigger1 = parent,stateno != 1001;stateno = 901
trigger2 = time >=300
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------------------------
;Shield-Ryuken
[Statedef 1100]
type    = S
movetype= A
physics = S
juggle  = 5
velset = 0,0
poweradd = 0
anim = 1100
ctrl = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = !time && Pos Y =0
anim = 16011
ID = 16011
pos = 30,10
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0.2,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 30
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0


[State 0, sound]
type = PlaySnd
trigger1 = anim = 1100 && animelem = 3
value = 1000,1

[State 0, voice]
type = PlaySnd
trigger1 = anim = 1100 && animelem = 3
value = 15,random%2
channel = 0

[State 0, Blue Fire]
type = Explod
trigger1 = ((animelem = 4)&&(anim=1100)&&(Var(25) = 5))
anim =  6006
ID = 6006
pos = 24,-118
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = 0.5,0.5
sprpriority = 0
ontop = 1
removeongethit = 1


[State 0, Blue Fire]
type = Explod
trigger1 = ((animelem = 4)&&(anim=1100)&&(Var(25) = 6))
anim =  6006
ID = 6006
pos = 24,-118
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = 1,1
sprpriority = 10
ontop = 0
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = Vel Y <0 && time%4=0 &&(Var(25) = 6)
anim = 6015
ID = 6015
pos = 24,-118
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,6
accel = -0.15,0.25
random = 40,20
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = ifelse(random<500,-1,15)
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 0, VelSet]
type = VelSet
trigger1 = ((animelem = 4)&&(anim=1100))
x = ifelse (var(25)=4,2,ifelse (var(25)=5,3,5 ))
y = ifelse (var(25)=4,-6,ifelse (var(25)=5,-7,-9 ))
;ignorehitpause =
;persistent =


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

[State 0, HitDef]
type = HitDef
trigger1 = (var(25)=4)&&(animelem = 4)
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
;affectteam = E          ;B,E,F
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = diagup
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage =  ifelse ((animelem = 4),60,30),7
pausetime = ifelse ((animelem = 4),5,10),ifelse ((animelem = 4),5,20)
sparkno = s7772
sparkxy = var(42):=-40, var(43):=-65
hitsound = s8000,2
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 12
ground.hittime = 12
air.hittime = 20
ground.velocity = -4,-4
air.velocity = -3,-10
sprpriority = 1
fall = 1;ifelse ((var(25) = 4),0,1)
numhits = 1
persistent = 1
envshake.time = 10
envshake.ampl = 7

[State 0, HitDef]
type = HitDef
trigger1 = (var(25)=5)&&(animelem = 3)
trigger2 = (var(25)=5)&&(animelem = 4)
trigger3 = (var(25)=6)&&(animelem = 2)
trigger4 = (var(25)=6)&&(animelem = 3)
trigger5 = (var(25)=6)&&(animelem = 4)
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
;affectteam = E          ;B,E,F
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = diagup
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage =  ifelse ((animelem = 4),60,30),7
pausetime = ifelse ((animelem = 4),5,10),ifelse ((animelem = 4),5,20)
sparkno = s7772
sparkxy = var(42):=-40, var(43):=-65
hitsound = s8000,2
ground.type = High      ;Low,Trip,None
air.type = High
ground.slidetime = 12
ground.hittime = 12
air.hittime = 20
ground.velocity = -4,ifelse(var(25)=4,0,ifelse (var(25)=5,-7,-9 ))
air.velocity = -3,-10
sprpriority = 1
fall = ifelse ((var(25) = 4),0,1)
numhits = 1
persistent = 1
envshake.time = 10
envshake.ampl = 7

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 4
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = A         ;A,C,S,N
;ignorehitpause =
;persistent =

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


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

;---------------------------------------------------------------------------------------------
;Roll & Slide
[Statedef 1200]
type    = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = 1200
ctrl = 0
sprpriority = 2

[State 0, Explod]
type = Explod
trigger1 = !time && Pos Y =0
anim = 16012
ID = 16012
pos = -30,10
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = -0.2,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 30
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0


[State 0, AfterImage]
type = AfterImage
trigger1 = animelem = 2
time = 30
length = 5
palcolor = 256
palinvertall = 0
palbright = 50,50,50
palcontrast = 120,120,180
palpostbright = 55,55,55
paladd = 255,50,50
palmul = .60,.60,.60
timegap = 2
framegap = 1
;ignorehitpause =
;persistent =

[State 0, StateTypeSet]
type = StateTypeSet
triggerall =var(16)=1
trigger1 = movehit
trigger2 = moveguarded
trigger3 = movecontact
trigger4 = var(16)=1
statetype = A      ;S,A,C,L
movetype = A        ;I,A,H
physics = A         ;A,C,S,N
ignorehitpause =  1
persistent = 1

[State 0, voice]
type = playsnd
trigger1 = animelem = 1
value = 3000,2
channel = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2
x = ifelse(var(25)= 1,-3,ifelse(var(25)=2,-6,-9))
y = ifelse(var(25)= 1,-5,ifelse(var(25)=2,-7,-7))
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time
v = 1    ;fv = 10
value = time
;ignorehitpause =
;persistent =

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = .05*var(1)
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 =movecontact
trigger2 = movehit
trigger3 = moveguarded
x = -2
y = -3
;ignorehitpause =
;persistent =



[State 250, HitDef]
type = HitDef
trigger1 = animelem >=2
attr = S,SA
damage = 55,1
animtype = back
air.animtype = Up
fall.animtype = Up
guardflag = MAF
hitflag = MAFH
priority = 4, Hit
pausetime = 2,14
sparkno = s7770
sparkxy = var(42):=-10, var(43):=-40
guard.sparkno = s6767
hitsound = s8000,5
guardsound = 6,0
ground.type = low
ground.slidetime = 13
ground.hittime = 30
ground.velocity = -5,0
air.type = low
air.hittime = 30
air.velocity = -4,-5.3
fall.recover = 1
;air.juggle = 1
air.fall = 1
envshake.time = 10
envshake.ampl = 7


[State 1020, End]
type = ChangeState
trigger1 = time >= 50
trigger2 = movehit&& time>=20
value = 50
ctrl = 0
;---------------------------------------------------------------------------------------------
;Shield Charge
[Statedef 1300]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 1300
juggle  = 5

[State 0, Explod]
type = Explod
trigger1 = !time && Pos Y =0
anim = 16012
ID = 16012
pos = -30,10
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = -0.2,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 30
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(16)=1
statetype = A      ;S,A,C,L
movetype = A        ;I,A,H
;ignorehitpause =
;persistent =



[State 0, sound]
type = PlaySnd
trigger1 = anim = 1300 && animelem = 2
value = 1100,1

[State 0, voice]
type = PlaySnd
trigger1 = anim = 1300 && animelem = 2
value = 15,2+random%2
channel = 0


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

[State 0, Explod]
type = Explod
trigger1 = Vel X >0 && time%8=0
anim = 6015
ID = 6015
pos = 30,-40
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = -8,0
accel = 0,0
random = 30,30
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 10
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1

[State 0, Explod]
type = Explod
trigger1 = ((anim = 1300)&&(animelem = 2))
anim = 1301
ID = 1301
pos = -20,-35
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
supermove
pausemove
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause =1
persistent = 1



[State 0, HitDef]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 30,7
pausetime = 3,10
;guard.pause,0
sparkno = s7772
sparkxy = var(42):=-40, var(43):=-40
hitsound = s8000,2
guardsound = s8500,0
ground.type = High      ;Low,Trip,None
;air.type = High
ground.slide = 20
;guard.slide = 0
ground.hit = 20
;guard.hit = 0
air.hittime = 20
ground.velocity = -5,-2
air.velocity = -5,0
sprpriority = 1
p1getp2facing = 0
fall = 0
fall.yvelocity = -4.5
fall.recover = 1
fall.recovertime = 4
fall.damage = 0
down.bounce = 0
envshake.time = 10
envshake.ampl = 7



[State 0, VelSet]
type = VelSet
trigger1 = ((anim = 1300)&&(animelem = 2))
x = ifelse (var(25)=4,3,ifelse (var(25)=5,5,9 ))
y = 0
;ignorehitpause =
;persistent =


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =  time = 20 && var(16) !=1
value = 101
;elem = 1
;ignorehitpause =
;persistent =


[State 0, VelSet]
type = VelSet
trigger1 = ((anim = 101)&&(animelem= 1))
trigger2 = ((var(16)=1)&&(time = 18))
x = 1
y = 0
;ignorehitpause =
;persistent =


[State 1003, 5]
type = ChangeState
trigger1 = time = 30
value = 0
ctrl = 1

[State 1003, 5]
type = ChangeState
trigger1 = var(16) = 1 && vel x = 1
value = 50
ctrl = 1

;-----------------------------------------------------------------------
;Skull Shield
[Statedef 1400]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 1400
juggle  = 5

[State 0, Explod]
type = Explod
trigger1 = !time && Pos Y =0
anim = 16012
ID = 16012
pos = -30,10
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = -0.2,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 30
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0


[State 0, Helper]
type = Helper
trigger1 = animelem=4
helpertype = normal ;player
name = "SkullShield"
ID =1401
stateno =1401
pos = 0,-45
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale = 1
size.yscale = 1
supermove =999999
pausemove =999999
persistent =1


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

;-------------------------------------------------------------------------
;Skull Shield Helper
[Statedef 1401]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 1401
sprpriority = 3

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
facing = 0
pos = 10,-35
;ignorehitpause =
;persistent =


[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value =  fvar(30)
;scale =  (winmugen only)
;ignorehitpause =
;persistent =


[State 0, AngleSet]
type = AngleSet
trigger1 = time = 0
value = 0
;ignorehitpause =
;persistent =

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
fv = 30    ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State 0, VarAdd]
type = VarAdd
trigger1 = 1
fv = 30    ;fv =
value = -5
;ignorehitpause =
;persistent =

[State 0, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 10,0
pausetime = 3,10
;guard.pause,0
sparkno = s7772
sparkxy = 10,-40
hitsound = s8000,2
guardsound = s8500,0
ground.type = High      ;Low,Trip,None
;air.type = High
ground.slide = 20
;guard.slide = 0
ground.hit = 20
;guard.hit = 0
air.hittime = 20
ground.velocity = -5,-2
air.velocity = -5,0
sprpriority = 1
p1getp2facing = 0
fall = 0
fall.yvelocity = -4.5
fall.recover = 1
fall.recovertime = 4
fall.damage = 0
down.bounce = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = hitcount >= 5
;ignorehitpause =
;persistent =


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

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

[State 0, voice]
type = PlaySnd
trigger1 = time = 60
value = 20,9
volume = 0
channel = 0

[State 0, sound]
type = PlaySnd
trigger1 = time = 70
value = 190,2

[State 0, sound]
type = PlaySnd
trigger1 = time = 70
value = 750,0

[State 0, StateTypeSet]
type = statetypeset
trigger1 = Var(16)=1
statetype = A       ;S,A,C,L

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


[State 3000, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(1) = 0
Time = 75
pos = 9999,-9951
sound = 8889,0
poweradd = -1000
movetime = 75

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG
ignorehitpause = 1


[State 1500, HyperBg]
type = explod;for eoh
trigger1 =  time = 42
anim = 750 ;right side 0,0
id = 750
postype=left
pos = 0,0
scale = 1,1
sprpriority = -2
bindtime = -1
removetime = -1
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999


[State 3000, Hyper Explode]
type = Explod
trigger1 = time = 15;AnimElem = 1
anim = 4532
postype = p1
pos = 45,-85
ownpal = 1
sprpriority = 5
supermovetime = 40

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

[State 3100, Ground Flash]
type = Explod
trigger1 = time = 15
anim = 6666
ID = 8400
postype = P1
pos = -40,-20
sprpriority = 3
removetime = -2
ownpal = 1
supermovetime = 40
scale = .5,.5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 2000&&time = 60
value = 2001
;elem = 1
;ignorehitpause =
;persistent =

[State 210, Width]
type = Width
trigger1 = anim = 2001 && (AnimElemTime (3) >= 0)
value = 30,0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = pos y < -2
statetype = A       ;S,A,C,L
physics = N         ;A,C,S,N
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1 = anim = 2001 && animelem = 3
anim = 6004
ID =  6004
pos = 20,-56
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 999
pausemove = 999
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1
;ignorehitpause =
;persistent =


[State 0, HitDef]
type = HitDef
triggerall = Time > 75 && numexplod(6004) = 1
trigger1 =  animelem = 4
trigger2 =  animelem = 6
attr = S,HP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = back         ;light,medium,hard,back,up,diagup
air.animtype = hard
fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 40,5
pausetime = 0,10
sparkno = s7773
guard.sparkno = s6767
sparkxy = var(42):=-10, var(43):=-45
hitsound = s8000,2
guardsound = 6,0
ground.type = High      ;Low,Trip,None
;air.type = High
ground.slidetime = 10
;guard.slide = 0
ground.hittime = 5
;guard.hit = 0
air.hittime = 20
fall = 1
ground.velocity = -10,-7
air.velocity = -10,-7
ground.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 7

[State 0, TargetVelAdd]
type = TargetVelAdd
trigger1 = movehit
x = ifelse(target, facing = facing, 20, -20)
y = 0
ID = -1
;ignorehitpause =
;persistent =

[State 0, Hyper Combo Finish]
type = PlaySnd
triggerall = !p2life
trigger1 = numexplod(8290) = 0
value = S9999,6
volume = 0
channel = -1
freqmul = 1.0
loop = 0
pan = 0
persistent = 0

[State 0, StateTypeSet]
type = statetypeset
trigger1 = Time = 106
movetype = I

[State 3000, End]
type = ChangeState
trigger1 = anim = 2001 && time= 130
value = 50
ctrl = 1

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

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

[State 100, Dash fx 2]
type = Explod
trigger1 = Time > 50
trigger1 = (time % 4) = 0
ID = 42
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -3.8, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 0, StateTypeSet]
type = statetypeset
trigger1 = Var(16)=1
statetype = A       ;S,A,C,L

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


[State 3100, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(1) = 0
Time = 60
pos = 9999,-9951
sound = 8889,0
poweradd = -1000
movetime = 55

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG


[State 1500, HyperBg]
type = explod;for eoh
trigger1 = time = 42
anim = 750 ;right side 0,0
id = 751
postype=left
pos = 0,0
scale = 1,1
sprpriority = -2
bindtime = -1
removetime = -1
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999

[State 3100, Hyper Explode]
type = Explod
trigger1 = time = 15
anim = 4532
postype = p1
pos = 45,-85
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 0, Explod]
type = Explod
trigger1 = Vel X >0 && time%3=0 && Anim !=101
anim = 6015
ID = 6015
pos = 30,-40
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = -8,0
accel = 0,0
random = 30,30
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 20
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause =1


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

[State 0, Explod]
type = Explod
triggerall = Pos Y = 0 && Anim !=101
trigger1 = Time > 50 && Time%4=0
anim = 6088
ID = 6088
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = -4,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 10
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause = 1
;trans = 
;persistent =
;supermove = 0
;pausemove = 0



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

[State 0, voice]
type = PlaySnd
trigger1 = anim = 1300 && animelem = 1
value = 15,4+random%2
channel = 0

[State 0, sound]
type = PlaySnd
trigger1 = anim = 1300 && animelem = 2
value = 8889,2


[State 0, HitDef]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = Hard          ;light,medium,hard,back,up,diagup
air.animtype = up
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 40,2
pausetime = 5,10
;guard.pause,0
sparkno = s7773
guard.sparkno = s6767
sparkxy = var(42):=-40, var(43):=-40
hitsound = s8000,2
guardsound = s8500,0
ground.type = High      ;Low,Trip,None
;air.type = High
ground.slide = 0
;guard.slide = 0
ground.hit = 0
;guard.hit = 0
air.hittime = 20
ground.velocity = -1,-.5
air.velocity = -4,-4
p1getp2facing = 0
fall = 1
fall.recover = 0
down.bounce = 0
envshake.time = 10
envshake.ampl = 7


[State 0, Explod]
type = Explod
trigger1 =   animelem = 2
anim = 6005
ID =   6005
pos = 60,-45
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = .5,.7
sprpriority = 10
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
ignorehitpause = 1
;persistent =

[State 0, VelSet]
type = velSet
trigger1 = animelem = 3 && anim = 1300
X = 12
;ignorehitpause =
;persistent =

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =  time = 100 && pos y = 0
value =101
;elem = 1
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = velSet
trigger1 = animelem = 1 && anim = 101
trigger1 = pos y = 0
X = 1    ;fv = 10
;ignorehitpause =
;persistent =


[State 0, Hyper Combo Finish]
type = PlaySnd
triggerall = !p2life
trigger1 = numexplod(8290) = 0
value = S9999,6
volume = 0
channel = -1
freqmul = 1.0
loop = 0
pan = 0
persistent = 0

[State 3100, End]
type = ChangeState
trigger1 = time = 120
value = 50
ctrl = 1

;---------------------------------------------------------------------------------------------
;Breakman Sonata
[Statedef 3200]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 0
anim = 3200
ctrl = 0
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG
ignorehitpause = 1


[State 3200, Sound]
type = PlaySnd
trigger1 = Time = 12
value = 190,0



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

[State 3000, assertspecial]
type = assertspecial
trigger1 = 1
flag = Nomusic
ignorehitpause = 1

[State 3000, assertspecial]
type = assertspecial
trigger1 =1
flag = unguardable

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3200 && animelem = 3
value = S500,0
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 3100, SuperPause]
type = SuperPause
trigger1 = anim = 3200 && animelem = 3
Time = 60
pos = 99999,99999
sound = s8889,0
poweradd = -3000
movetime = 59
persistent = 0

[State 1500, HyperBg]
type = explod;for eoh
trigger1 = time = 42
anim = 750 ;right side 0,0
id = 752
postype=left
pos = 0,0
scale = 1,1
sprpriority = -2
bindtime = -1
removetime = -1
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999



[State 3100, Hyper Bling]
type = Explod
trigger1 = Time = 30
anim = 6009
postype = p1
pos = -15,-55
ownpal = 1
sprpriority = 5
supermovetime = 40



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 50
value = 100

[State 0, AfterImage]
type = AfterImage
triggerall =  anim = 3200
trigger1 = time > 0
time = 90
length = 20
palcolor = 256
palinvertall = 0
palbright = 0,30,30
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
persistent =  1
paladd = 0,100,0
palmul = 0,120,0
sinadd = 0,110,0,10
invertall = 0


[State 0, VelSet]
type = VelSet
trigger1 =  anim = 100
x = 30
persistent =  1

[State 0, HitDef]
type = HitDef
trigger1 = anim = 100&&animelem = 1
trigger2 = anim = 100&&animelem = 2
trigger3 = anim = 100&&animelem = 3
trigger4 = anim = 100&&animelem = 4
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
pausetime = 10,9999999
animtype = hard
snap = 10,0
kill = 0
hitsound = s8000,2
sparkno = s7773
guard.sparkno = s6767
envshake.time = 10
envshake.ampl = 7
sparkno = s7773
guard.sparkno = s6767
sparkxy = 0,-50
p1stateno = 3205

[State 0, ChangeState]
type = null;ChangeState
triggerall = NumTarget && moveHit
trigger1 = target, IsHelper
;trigger1 = movehit
value = 105
ctrl = 0
ignorehitpause = 1


[State 0, ChangeAnim]
type = ChangeAnim
triggerall = NumTarget
;trigger1 = target, !IsHelper
trigger1 =  anim = 100 && movehit
value = 3000
;elem = 1
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 =  anim = 3000 & animelem = 1
x = 0

[State 0, VelSet]
type = VelSet
trigger1 =  anim = 3000 & animelem = 20
x = 20

[State 0, VelSet]
type = VelSet
trigger1 =  anim = 3000 & animelem = 43
x = -25

[State 3100, Sound]
type = PlaySnd
trigger1 = anim = 3000 && animelem = 2
trigger2 = anim = 3000 && animelem = 5
trigger3 = anim = 3100 && animelem = 3
value = 3000,0




[State 0, HitDef]
type = HitDef
trigger1 = anim = 3000 && animelem = 3
trigger2 = anim = 3000 && animelem = 8
trigger3 = anim = 3000 && animelem = 13
trigger4 = anim = 3000 && animelem = 30
trigger5 = anim = 3000 && animelem = 39
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 30,0
hitsound = s8000,2
pausetime = 20,80
;guard.pause,0
sparkno = s7773
guard.sparkno = s6767
sparkxy = 0,-50
ground.type = High      ;Low,Trip,None
ground.hittime = 20
ground.velocity = 0,0
kill = 0
air.velocity = 0,0
sprpriority = 1
fall = 0
fall.recover = 0
;ignorehitpause =
persistent =  1
envshake.time = 10
envshake.ampl = 7

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = hitcount = 12 && anim = 3000
value = 3100
;elem = 1
;ignorehitpause =
;persistent =

[State 0, SuperPause]
type = null;SuperPause
trigger1 = anim =3100 && animtime = 1
time =50
darken = 1
p2defmul = 0
poweradd = 0
unhittable = 1
persistent =  0
pos = 20,-70

[State 0, HitDef]
type = HitDef
trigger1 = anim = 3000 && animelem = 49
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = Back          ;light,medium,hard,back,up,diagup
air.animtype = light
fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 113,0
pausetime = 0,20
hitsound = s8000,2
;guard.pause,0
sparkno = s7773
guard.sparkno = s6767
sparkxy = 0,-40
ground.type = High      ;Low,Trip,None
ground.hittime = 20
ground.velocity = -1,-4
yaccel = .1
air.velocity = 0,0
ground.cornerpush.veloff =0
kill = 1
sprpriority = 1
fall = 1
fall.recover = 0
;ignorehitpause =
persistent =  1
envshake.time = 10
envshake.ampl = 7

[State 0, VelSet]
type = VelSet
trigger1 =  anim = 3000 && animelem = 59
x = -.2
y = -.2
persistent = 0


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3000 && animelem = 61
physics = N         ;A,C,S,N
;ignorehitpause =
persistent = 0


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3000 && animelem = 67
value = 3201
;elem = 1
;ignorehitpause =
;persistent =


[State 0, Helper]
type = Helper
trigger1 = anim = 3201 && animelem=1
trigger2 = anim = 3201 && animelem = 4
helpertype = normal ;player
name = "FinalBlast"
ID =3201
stateno =3201
pos = 45,-55
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale = .7
size.yscale = .6
supermove =999999
pausemove =999999
persistent =1


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



[State 0, Explod]
type = Explod
trigger1 = anim = 3100 & animelem = 1
anim = 6008
ID =   6008
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = 0
ontop = 1
ownpal = 1
removeongethit = 0
ignorehitpause = 0
;persistent =


[State 0, voice]
type = PlaySnd
trigger1 = time = 0
value = 20,9
channel = 0

[State 0, voice]
type = PlaySnd
trigger1 = anim = 3000 && animelem = 2
trigger2 = anim = 3000 && animelem = 7
trigger3 = anim = 3000 && animelem = 12
value = 20,random%3
channel = 0

[State 0, voice]
type = PlaySnd
trigger1 = anim = 3000 && animelem = 27
trigger2 = anim = 3000 && animelem = 35
value = 20,3+random%3
channel = 0

[State 0, voice]
type = PlaySnd
trigger1 = anim = 3000 && animelem = 48
value = 20,6+random%3
channel = 0

[State 0, voice]
type = PlaySnd
trigger1 = anim = 3201
value = 15,6
channel = 0
persistent = 0

[State 0, sound]
type = PlaySnd
trigger1 = anim = 3000 && animelem = 2
trigger2 = anim = 3000 && animelem = 7
trigger3 = anim = 3000 && animelem = 12
trigger4 = anim = 3000 && animelem = 27
trigger5 = anim = 3000 && animelem = 35
trigger6 = anim = 3000 && animelem = 48
value = 8400,1

[State 0, Hyper Combo Finish]
type = PlaySnd
triggerall = !p2life
trigger1 = numexplod(8290) = 0
value = S9999,6
volume = 0
channel = -1
freqmul = 1.0
loop = 0
pan = 0
persistent = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 400
trigger2 = anim = 100 && time > 120
value =  50
ctrl = 1
;anim =
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------------------------
;Breakman Sonata hit
[Statedef 3205]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 0
anim = 3200
ctrl = 0
sprpriority = 2

[State 1500, HyperBg]
type = explod;for eoh
trigger1 = !time
anim = 750 ;right side 0,0
id = 752
postype=left
pos = 0,0
scale = 1,1
sprpriority = -2
bindtime = -1
removetime = -1
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999

[State 3000, assertspecial]
type = assertspecial
trigger1 = 1
flag = Nomusic
ignorehitpause = 1

[State 3000, assertspecial]
type = assertspecial
trigger1 =1
flag = unguardable

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3200 && animelem = 3
value = S500,0
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 50
value = 100

[State 0, AfterImage]
type = AfterImage
triggerall =  anim = 3200
trigger1 = time > 0
time = 90
length = 20
palcolor = 256
palinvertall = 0
palbright = 0,30,30
timegap = 1
framegap = 1
trans = add
ignorehitpause = 1
persistent =  1
paladd = 0,100,0
palmul = 0,120,0
sinadd = 0,110,0,10
invertall = 0


[State 0, VelSet]
type = VelSet
trigger1 =  anim = 100
x = 30
persistent =  1

[State 0, HitDef]
type = HitDef
trigger1 = anim = 100&&animelem = 1
trigger2 = anim = 100&&animelem = 2
trigger3 = anim = 100&&animelem = 3
trigger4 = anim = 100&&animelem = 4
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
pausetime = 10,9999999
animtype = hard
snap = 10,0
kill = 0
hitsound = s8000,2
sparkno = s7773
guard.sparkno = s6767
envshake.time = 10
envshake.ampl = 7
sparkno = s7773
guard.sparkno = s6767
sparkxy = 0,-50

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =  anim = 100 && movehit
value = 3000
;elem = 1
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 =  anim = 3000 & animelem = 1
x = 0

[State 0, VelSet]
type = VelSet
trigger1 =  anim = 3000 & animelem = 20
x = 20

[State 0, VelSet]
type = VelSet
trigger1 =  anim = 3000 & animelem = 43
x = -25

[State 3100, Sound]
type = PlaySnd
trigger1 = anim = 3000 && animelem = 2
trigger2 = anim = 3000 && animelem = 5
trigger3 = anim = 3100 && animelem = 3
value = 3000,0




[State 0, HitDef]
type = HitDef
trigger1 = anim = 3000 && animelem = 3
trigger2 = anim = 3000 && animelem = 8
trigger3 = anim = 3000 && animelem = 13
trigger4 = anim = 3000 && animelem = 30
trigger5 = anim = 3000 && animelem = 39
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 30,0
hitsound = s8000,2
pausetime = 20,80
;guard.pause,0
sparkno = s7773
guard.sparkno = s6767
sparkxy = 0,-50
ground.type = High      ;Low,Trip,None
ground.hittime = 20
ground.velocity = 0,0
kill = 0
air.velocity = 0,0
sprpriority = 1
fall = 0
fall.recover = 0
;ignorehitpause =
persistent =  1
envshake.time = 10
envshake.ampl = 7

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = hitcount = 12 && anim = 3000
value = 3100

[State 0, HitDef]
type = HitDef
trigger1 = anim = 3000 && animelem = 49
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = Back          ;light,medium,hard,back,up,diagup
air.animtype = light
fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 113,0
pausetime = 0,20
hitsound = s8000,2
;guard.pause,0
sparkno = s7773
guard.sparkno = s6767
sparkxy = 0,-40
ground.type = High      ;Low,Trip,None
ground.hittime = 20
ground.velocity = -1,-4
yaccel = .1
air.velocity = 0,0
ground.cornerpush.veloff =0
kill = 1
sprpriority = 1
fall = 1
fall.recover = 0
;ignorehitpause =
persistent =  1
envshake.time = 10
envshake.ampl = 7

[State 0, VelSet]
type = VelSet
trigger1 =  anim = 3000 && animelem = 59
x = -.2
y = -.2
persistent = 0


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 3000 && animelem = 61
physics = N         ;A,C,S,N
;ignorehitpause =
persistent = 0


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 3000 && animelem = 67
value = 3201
;elem = 1
;ignorehitpause =
;persistent =


[State 0, Helper]
type = Helper
trigger1 = anim = 3201 && animelem=1
trigger2 = anim = 3201 && animelem = 4
helpertype = normal ;player
name = "FinalBlast"
ID =3201
stateno =3201
pos = 45,-55
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale = .7
size.yscale = .6
supermove =999999
pausemove =999999
persistent =1


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



[State 0, Explod]
type = Explod
trigger1 = anim = 3100 & animelem = 1
anim = 6008
ID =   6008
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1
sprpriority = 0
ontop = 1
ownpal = 1
removeongethit = 0
ignorehitpause = 0
;persistent =


[State 0, voice]
type = PlaySnd
trigger1 = time = 0
value = 20,9
channel = 0

[State 0, voice]
type = PlaySnd
trigger1 = anim = 3000 && animelem = 2
trigger2 = anim = 3000 && animelem = 7
trigger3 = anim = 3000 && animelem = 12
value = 20,random%3
channel = 0

[State 0, voice]
type = PlaySnd
trigger1 = anim = 3000 && animelem = 27
trigger2 = anim = 3000 && animelem = 35
value = 20,3+random%3
channel = 0

[State 0, voice]
type = PlaySnd
trigger1 = anim = 3000 && animelem = 48
value = 20,6+random%3
channel = 0

[State 0, voice]
type = PlaySnd
trigger1 = anim = 3201
value = 15,6
channel = 0
persistent = 0

[State 0, sound]
type = PlaySnd
trigger1 = anim = 3000 && animelem = 2
trigger2 = anim = 3000 && animelem = 7
trigger3 = anim = 3000 && animelem = 12
trigger4 = anim = 3000 && animelem = 27
trigger5 = anim = 3000 && animelem = 35
trigger6 = anim = 3000 && animelem = 48
value = 8400,1

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 400
trigger2 = anim = 100 && time > 120
value =  50
ctrl = 1

;----------------------------------------------
[Statedef 3201]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 6002
sprpriority = 5



[State 1001, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256

[State 0, AfterImage]
type =null
trigger1 = time = 0
time = 70
length = 3
palcolor = 256
palinvertall = 0
palbright =0,150,0
palcontrast = 120,220,120
palpostbright = 0,255,0
paladd = 10,150,25
palmul = .65,.65,.75
timegap = 2
framegap = 2
trans = addalpha
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 =  time = 1
x = 5
;ignorehitpause =
;persistent =

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


[State 1201, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,NP,SP,HP
stateno=901
ignorehitpause=1

[State 1055,hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  time = 1
value = S700,0
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "GreenLight"
ID = 1002
stateno = 1002
pos = 10,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
size.xscale =.3
size.yscale =.3
ignorehitpause = 1
;persistent =

[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "Red Light"
ID = 1003
stateno = 1003
pos = 10,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
size.xscale =.3
size.yscale =.3
ignorehitpause = 1
;persistent =



[State 1261, Spark]
type=null;helper
trigger1= movehit=1 && numtarget && numhelper(8000) <=1
trigger1= !(target,hitshakeover)
helpertype=normal
stateno=8022
ID=8000
name="Spark"
postype=p2
pos= 5,-45;(target,const(size.ground.front) -1) * (target,facing) * (-facing), floor(pos y-target,pos y)
ownpal=1
size.xscale=.5
size.yscale=.6
pausemovetime=65535
supermovetime=65535
ignorehitpause=1


[State 0, HitDef]
type = HitDef
trigger1 =  animelem = 1
trigger2 =  animelem = 2
trigger3 =  animelem = 3
trigger4 =  animelem = 4
trigger5 =  animelem = 5
trigger6 =  animelem = 6
trigger7 =  animelem = 7
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
getpower = 0,0
givepower = 0,0
;affectteam = E          ;B,E,F
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = hard
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 16,2
pausetime = 4,6
;guard.pause,0
sparkno = s7773
guard.sparkno = s6767
sparkxy = var(42):=-10, var(43):=0
hitsound = s8000,2
guardsound = 0,0
;air.type = High
ground.slidetime = 10
;guard.slide = 0
ground.hittime = 5
;guard.hit = 0
air.hittime = 20
;guard.ctrl  = 0
;guard.dist = 320
;yaccel = 0.5
ground.velocity = ifelse(hitcount>3,-4,0),0
;guard.velocity = 0
air.velocity = -2,-2
ground.cornerpush.veloff = 0
envshake.time = 10
envshake.ampl = 7




[State 0, DestroySelf]
type = changestate
trigger1 =  time > 120
trigger2 = movecontact
trigger3 = moveguarded
value = 901
;ignorehitpause =
;persistent =
;------------------------------------------------------------------------

;---------------------------------------------------------------------------------------------
;Breakman Sonata NEW
[Statedef 3210]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = -3000
anim = 3210
ctrl = 0
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3200, Sound]
type = PlaySnd
trigger1 = Time = 12
value = 190,0

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

[State 3000, assertspecial]
type = assertspecial
trigger1 = 1
flag = Nomusic
ignorehitpause = 1

[State 3000, assertspecial]
type = assertspecial
trigger1 =1
flag = unguardable

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3200 && animelem = 3
value = S500,0
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 3100, SuperPause]
type = SuperPause
trigger1 = anim = 3200 && animelem = 3
Time = 60
pos = 99999,99999
sound = s8889,0
poweradd = -3000
movetime = 59
persistent = 0

[State 1500, HyperBg]
type = explod;for eoh
trigger1 = time = 42
anim = 750 ;right side 0,0
id = 752
postype=left
pos = 0,0
scale = 1,1
sprpriority = -2
bindtime = -1
removetime = -1
removeongethit = 1
supermovetime = 99999999
pausemovetime = 99999999

[State 3100, Hyper Bling]
type = Explod
trigger1 = Time = 30
anim = 6009
postype = p1
pos = -15,-55
ownpal = 1
sprpriority = 5
supermovetime = 40

[State 0, HitDef]
type = HitDef
trigger1 = !time
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
pausetime = 10,9999999
animtype = hard
snap = 10,0
kill = 0
hitsound = s8000,2
sparkno = s7773
guard.sparkno = s6767
envshake.time = 10
envshake.ampl = 7
sparkno = s7773
guard.sparkno = s6767
sparkxy = 0,-50
forcestand = 1
snap = 40,0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = 30

[State 0, ChangeState]
type = ChangeState
triggerall = NumTarget && moveHit
trigger1 = target, IsHelper
value = 105
ctrl = 0
ignorehitpause = 1

[State 0, ChangeState]
type = ChangeState
triggerall = NumTarget && moveHit
trigger1 = MoveHit
value = 3205
ctrl = 0
ignorehitpause = 1


[State 0, ChangeState]
type = ChangeState
trigger1 = time = 400
trigger2 = anim = 100 && time > 120
value =  50
ctrl = 1


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[State 7001, explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 9006
postype = p1
pos = 0, 20
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 2, 2
 
[State 7001, Variavelzinha muito útil]
type = VarSet
trigger1 = Time = 0
v = 12
value = 1

[State 0, animação]
type = ChangeAnim
trigger1 = Vel y > -2
persistent = 0
value = 44

;---------------------------------------------------------------------------------------------
;Super Jump
[Statedef 7002]
type    = A
physics = A
ctrl = 1

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

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



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


;---------------------------------------------------------------------------
;Guard Push (Stand)
[Statedef 6300]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 123
sprpriority = 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

;---Blue Spark---
[Statedef 8020]
type=A
anim=8020
velset=0,0
sprpriority=5

[State 8010, assert]
type=assertspecial
trigger1= 1
flag=noshadow

[State 8010, angle]
type=angleset
trigger1= !time
value=15*(random%24)

[State 8010, scale]
type=angledraw
trigger1= time<11
scale= 1+(time*.20), 1.3-(time*.12)

[State 8010, scale]
type=angledraw
trigger1= time>=11
scale=0,0

[State 8010, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256

[State 8030, Circle]
type=explod
trigger1= !time
anim=8012
ID=8012
postype=p1
removetime=10
sprpriority=4
pausemovetime=-1
supermovetime=-1

[State 8030, Circle Scale]
type=modifyexplod
trigger1= numexplod(8012)
ID=8012
scale=.15+(.03*time),.15+(.03*time)
trans=addalpha
alpha=ceil(256-25.6*time),256

[State 8010, Center]
type=explod
trigger1= time = 1
anim=7772
ID=8209
postype=p1
facing= ifelse(random<500, -1, 1)
vfacing=ifelse(random<500, -1, 1)
scale=.75,.75
sprpriority=5
pausemovetime=-1
supermovetime=-1

[State 8010, Particles]
type=explod
trigger1= time<=4
trigger1= random<(1000.0/numhelper(8000))
anim=8021
ID=8021
postype=p1
vel= -10+(random/50.0), -10+(random/50.0)
scale= .4 + (random/5000.0), .4 + (random/5000.0)
sprpriority=5
pausemovetime=-1
supermovetime=-1

[State 8010, Particles Scale]
type=modifyexplod
trigger1= numexplod(8021)
ID=8021
trans=addalpha
alpha=256-16*time,256

[State 8010, end]
type=removeexplod
trigger1= time>=15

[State 8010, end]
type=destroyself
trigger1= time>=15

;---------------------------------------------------------------------------
;---Green Spark---
[Statedef 8022]
type=A
anim=8022
velset=0,0
sprpriority=5

[State 8010, assert]
type=assertspecial
trigger1= 1
flag=noshadow

[State 8010, angle]
type=angleset
trigger1= !time
value=15*(random%24)

[State 8010, scale]
type=angledraw
trigger1= time<11
scale= 1+(time*.20), 1.3-(time*.12)

[State 8010, scale]
type=angledraw
trigger1= time>=11
scale=0,0

[State 8010, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256

[State 8030, Circle]
type=explod
trigger1= !time
anim=8012
ID=8012
postype=p1
removetime=10
sprpriority=4
pausemovetime=-1
supermovetime=-1

[State 8030, Circle Scale]
type=modifyexplod
trigger1= numexplod(8012)
ID=8012
scale=.15+(.03*time),.15+(.03*time)
trans=addalpha
alpha=ceil(256-25.6*time),256

[State 8010, Center]
type=explod
trigger1= time = 1
anim=8209
ID=8209
postype=p1
facing= ifelse(random<500, -1, 1)
vfacing=ifelse(random<500, -1, 1)
scale=.75,.75
sprpriority=5
pausemovetime=-1
supermovetime=-1

[State 8010, Particles]
type=explod
trigger1= time<=4
trigger1= random<(1000.0/numhelper(8000))
anim=8021
ID=8021
postype=p1
vel= -10+(random/50.0), -10+(random/50.0)
scale= .4 + (random/5000.0), .4 + (random/5000.0)
sprpriority=5
pausemovetime=-1
supermovetime=-1

[State 8010, Particles Scale]
type=modifyexplod
trigger1= numexplod(8021)
ID=8021
trans=addalpha
alpha=256-16*time,256

[State 8010, end]
type=removeexplod
trigger1= time>=15

[State 8010, end]
type=destroyself
trigger1= time>=15

;---------------------------------------------------------------------------
;---Red Spark---
[Statedef 8024]
type=A
anim=8024
velset=0,0
sprpriority=5

[State 8010, assert]
type=assertspecial
trigger1= 1
flag=noshadow

[State 8010, angle]
type=angleset
trigger1= !time
value=15*(random%24)

[State 8010, scale]
type=angledraw
trigger1= time<11
scale= 1+(time*.20), 1.3-(time*.12)

[State 8010, scale]
type=angledraw
trigger1= time>=11
scale=0,0

[State 8010, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256

[State 8030, Circle]
type=explod
trigger1= !time
anim=8012
ID=8012
postype=p1
removetime=10
sprpriority=4
pausemovetime=-1
supermovetime=-1

[State 8030, Circle Scale]
type=modifyexplod
trigger1= numexplod(8012)
ID=8012
scale=.15+(.03*time),.15+(.03*time)
trans=addalpha
alpha=ceil(256-25.6*time),256

[State 8010, Center]
type=explod
trigger1= time = 1
anim=8209
ID=8209
postype=p1
facing= ifelse(random<500, -1, 1)
vfacing=ifelse(random<500, -1, 1)
scale=.75,.75
sprpriority=5
pausemovetime=-1
supermovetime=-1

[State 8010, Particles]
type=explod
trigger1= time<=4
trigger1= random<(1000.0/numhelper(8000))
anim=8021
ID=8021
postype=p1
vel= -10+(random/50.0), -10+(random/50.0)
scale= .4 + (random/5000.0), .4 + (random/5000.0)
sprpriority=5
pausemovetime=-1
supermovetime=-1

[State 8010, Particles Scale]
type=modifyexplod
trigger1= numexplod(8021)
ID=8021
trans=addalpha
alpha=256-16*time,256

[State 8010, end]
type=removeexplod
trigger1= time>=15

[State 8010, end]
type=destroyself
trigger1= time>=15

;---------------------------------------------------------------------------
;---Purple Spark---
[Statedef 8026]
type=A
anim=8026
velset=0,0
sprpriority=5

[State 8010, assert]
type=assertspecial
trigger1= 1
flag=noshadow

[State 8010, angle]
type=angleset
trigger1= !time
value=15*(random%24)

[State 8010, scale]
type=angledraw
trigger1= time<11
scale= 1+(time*.20), 1.3-(time*.12)

[State 8010, scale]
type=angledraw
trigger1= time>=11
scale=0,0

[State 8010, trans]
type=trans
trigger1= 1
trans=addalpha
alpha=256,256

[State 8030, Circle]
type=explod
trigger1= !time
anim=8012
ID=8012
postype=p1
removetime=10
sprpriority=4
pausemovetime=-1
supermovetime=-1

[State 8030, Circle Scale]
type=modifyexplod
trigger1= numexplod(8012)
ID=8012
scale=.15+(.03*time),.15+(.03*time)
trans=addalpha
alpha=ceil(256-25.6*time),256

[State 8010, Center]
type=explod
trigger1= time = 1
anim=8209
ID=8209
postype=p1
facing= ifelse(random<500, -1, 1)
vfacing=ifelse(random<500, -1, 1)
scale=.75,.75
sprpriority=5
pausemovetime=-1
supermovetime=-1

[State 8010, Particles]
type=explod
trigger1= time<=4
trigger1= random<(1000.0/numhelper(8000))
anim=8021
ID=8021
postype=p1
vel= -10+(random/50.0), -10+(random/50.0)
scale= .4 + (random/5000.0), .4 + (random/5000.0)
sprpriority=5
pausemovetime=-1
supermovetime=-1

[State 8010, Particles Scale]
type=modifyexplod
trigger1= numexplod(8021)
ID=8021
trans=addalpha
alpha=256-16*time,256

[State 8010, end]
type=removeexplod
trigger1= time>=15

[State 8010, end]
type=destroyself
trigger1= time>=15

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

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

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

;-------------------------------------------
; Ffffffinish!!
[StateDef 30000]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 0

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

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1


[State 9999, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = f30000,0
ignorehitpause = 1

[State 0, BGPalFX]
type = BGPalFX
trigger1 = Time<15
time = 1
add = -100,-100,-100
color = 0

[State 8400: AllPalFX]
type = AllPalFX
trigger1 = Time<20 && time%4=0
time = 1
add = 255,255,255

[State 9999, Short Pause]
type = Pause
trigger1 = Time = 1
time = 30
movetime = 15
ignorehitpause = 1


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

[State -2, Starting Lifebar]
type = LifeAdd
triggerall = stateno = 0
trigger1 = prevstateno = [190, 194]
trigger2 = prevstateno = [196, 199]
Value = 1001

[State 0, Stop Whistle]
type = StopSnd
trigger1 = roundstate = 2
channel = 2

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 36    ;fv = 10
value = ceil(enemynear,screenpos x)
;ignorehitpause =
;persistent =

[State -2, Stop Lifebar sound]
type = StopSnd
triggerall = stateno = 0
trigger1 = prevstateno = [190, 194]
trigger2 = prevstateno = [196, 199]
channel = 5

[State -2, Starting Lifebar]
type = LifeAdd
triggerall = stateno = 0
trigger1 = prevstateno = [190, 194]
trigger2 = prevstateno = [196, 199]
Value = 1001


[State -2, Hyper Combo Finish]
type = Explod
triggerall = !p2life && numexplod(9200) = 0
trigger1 = stateno = 3000
trigger2 = stateno = 3100
trigger3 = stateno = 3200
anim = 754
ID = 9200
pos = ifelse(facing = -1,-1,0),-1
sprpriority = -1
postype = left
bindtime = -1
removetime = -2
removeongethit = 1
facing = 1
supermovetime = 99999999
pausemovetime = 99999999
shadow = 68,68,68
ownpal = 1
persistent = 0
ignorehitpause = 1

[State -2, HitPause]
type=varset
trigger1= movecontact!=1
var(46)=gametime+2

[State -2, HitSparks]
type=null;helper
;triggerall = p2movetype = H;[5000,5999]
trigger1= var(46)=gametime
trigger1= movehit=1 && numenemy
trigger1= var(40)=8020 || var(40)=8022 || var(40)=8024 || var(40)=8026 || var(40)=8030
trigger1 = stateno !=3302
;trigger1 = stateno !=[1700,1703]
helpertype=normal
stateno=var(40)
ID=8000
name="Spark"
postype=p2
pos= (enemynear,const(size.ground.front) + var(42)) * (enemynear,facing) * (-facing), floor(pos y-enemynear,pos y) + var(43)
facing= ifelse((enemynear,facing = facing), 1, -1)
ownpal=1
size.xscale=.45
size.yscale=.55
pausemovetime=65535
supermovetime=65535
ignorehitpause=1

[State -2, Reset]
type=varrangeset
trigger1= movetype=I
trigger2= movetype=H && time
;trigger3 = var(40) !=-1
first=40
last=46
value=-1
ignorehitpause=1

[State -2, HitPause]
type=varadd
trigger1= var(46)>0
var(46)=-1
ignorehitpause=1

[State 0, PosSet]
type = PosSet
trigger1 = pos y >5 && stateno = 1000
trigger2 = pos y >5 && prevstateno = 1000
trigger3 = pos y >5 && stateno = 1300
trigger4 = pos y >5 && prevstateno = 1300
y = 0

;ignorehitpause =
;persistent =


[State -2, DisplayToClipboard]
type = DisplayToClipboard
trigger1 =1
text = "var(36) = %d  and Var(16)= %d - Var(25)= %d"
params = var(36),Var(16),Var(25)
;ignorehitpause =
;persistent =


[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = Stateno != 3000
id = 750
;ignorehitpause =
;persistent =


[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = Stateno != 3100
id = 751
;ignorehitpause =
;persistent =


[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = Stateno != [3200,3210]
id = 752
;ignorehitpause =
;persistent =

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = Stateno != 3200
trigger2 = anim = 3100
trigger3 = hitcount = 12
id = 6007
;ignorehitpause =
;persistent =



[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = anim = 101
trigger2 = ((pos y <= -1)&&(time = 18))
trigger3 = Stateno != 1300
id = 1301
;ignorehitpause =
;persistent =


[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = anim != 1300
trigger2 = stateno !=3100
id = 6005
;ignorehitpause =
;persistent =

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = anim != 1100
trigger2 = stateno !=1100
id = 6006
;ignorehitpause =
;persistent =

[State -2, VarSet]
type = VarSet
trigger1 = Pos y <0
v = 16    ;fv = 10
value = 1
;ignorehitpause =
;persistent =

[State -2, VarSet]
type = VarSet
trigger1 = Pos y >=0
v = 16    ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State -2, VarSet]
type = VarSet
trigger1 = command = "a"
v = 25    ;fv = 10
value = 1
;ignorehitpause =
;persistent =

[State -2, VarSet]
type = VarSet
trigger1 = command = "b"
v = 25    ;fv = 10
value = 2
;ignorehitpause =
;persistent =

[State -2, VarSet]
type = VarSet
trigger1 = command = "c"
v = 25    ;fv = 10
value = 3
;ignorehitpause =
;persistent =

[State -2, VarSet]
type = VarSet
trigger1 = command = "x"
v = 25    ;fv = 10
value = 4
;ignorehitpause =
;persistent =

[State -2, VarSet]
type = VarSet
trigger1 = command = "y"
v = 25    ;fv = 10
value = 5
;ignorehitpause =
;persistent =

[State -2, VarSet]
type = VarSet
trigger1 = command = "z"
v = 25    ;fv = 10
value = 6
;ignorehitpause =
;persistent =

[State -2, VarSet]
type = VarSet
trigger1 = command != "holdup"
v = 20    ;fv = 10
value = 0
;ignorehitpause =
;persistent =

[State -2, VarSet]
type = VarSet
trigger1 = command = "holdup"
v = 20    ;fv = 10
value = 1
;ignorehitpause =
;persistent =


[State -2, Damage based on hits]
type=varset
trigger1= numenemy
fvar(12)= enemynear,gethitvar(hitcount)
ignorehitpause=1

[State -2, Reset var when the opponent recovers]
type=varset
trigger1= numenemy
trigger1= (enemynear,movetype!=H)
trigger2= !numenemy
fvar(12)=1

[State -2, Dampener]
type=varset
trigger1=1
fvar(10)= ifelse(fvar(12)=0, 1, ifelse(fvar(12)=1, .9, .8**fvar(12)))
ignorehitpause=1


[State -2, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1

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

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

; ----------------------------------------------------------------------
[State -2, NoHitBy]
Type = NotHitBy
trigger1 = (NumHelper(9985) = 1) && (NumHelper(9986) = 1)
trigger1 = Time = 0
value = SCA
Time = 30

[State -2, PalFX]
type = PalFX
trigger1 = (NumHelper(9985) = 1) && (NumHelper(9986) = 1)
time = 1
add = 0, 0, 256
mul = 256,256,256
persistent = 0

; ----------------------------------------------------------------------
[State -2, PosAdd]
type = PosAdd
trigger1 = Stateno = [5030, 5040]
trigger1 = (anim = 5040) && (AnimElem = 1, < 2)
y = -20
persistent = 0

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

; Remove Explods Section ==============================================
; Remove Special BG if ------------------------------------------------
; State != 3100:
[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 3100
id = 9052

; Combo Messages and Score control =====================================

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[Statedef -3]

[State -3, Fffffinish!!]
type = Helper
triggerall = NumHelper(30000)=0
trigger1 = Winko
helpertype = normal
name = "Finish"
ID = 30000
stateno = 30000
ownpal = 1
ignorehitpause = 1
supermovetime = 9999
pausemovetime = 9999



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

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

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

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

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

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

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

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


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

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

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

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

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8900

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

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

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8998

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

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

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8997

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

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

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8999

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

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

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

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


[State -3, GetHit Snd]
type = playsnd
triggerall = alive && time = 1
triggerall = stateno = 5000 || stateno = 5010
trigger1 = gethitvar(animtype) >= 2 && random < 500
trigger2 = gethitvar(animtype) = 1 && random < 375
trigger3 = gethitvar(animtype) = 0 && random < (250 * (AIlevel ** 2 / 64.0))
value = 11, 1+(random % 6)
channel = 0
ignorehitpause = 1

[State -3, GetHit Snd]
type = playsnd
triggerall = alive && time = 1
trigger1 = (stateno = 5000 || stateno = 5010) && numenemy
trigger1 = gethitvar(fall) || (enemynear, hitdefattr = SCA, SA, HA)
trigger2 = (stateno = 5020 || stateno = 5070 || stateno = 5080)
trigger3 = (stateno = 5050 || stateno = 5100) && (prevstateno != [5000, 5199])
value = 11, 1+(random % 6)
channel = 0
ignorehitpause = 1


