[Data]
life=1000			;Amount of life to start with
attack=100		;attack power (more is stronger)
defence=100		;defensive power (more is stronger)
fall.defence_up=0	;Percentage to increase defense everytime player is knocked down
liedown.time=15
airjuggle=15		;Number of points for juggling
sparkno=2			;Default hit spark number for HitDefs
guard.sparkno=40	;Default guard spark number
KO.echo=0			;1 to enable echo on KO
volume=128			;Volume offset (negative for softer)
IntPersistIndex=50	;Variables with this index and above will not have their values
FloatPersistIndex=40  ;reset to 0 between rounds or matches. There are 60 int variables,
;--------------------
[Size] ;Standard Scale
xscale = 1
yscale = 1
ground.back = 24
ground.front = 24
air.back = 20
air.front = 20
;--------------------
 ;Scale 2
;xscale = 0.833333333333333
;yscale = 1;.071428571428571
;ground.back = 20
;ground.front = 20
;air.back = 17
;air.front = 17
;--------------------
 ;Scale 3
;xscale = .95
;yscale = 1.05
;ground.back = 23
;ground.front = 23
;air.back = 19
;air.front = 19
;--------------------
height = 60
;Set the Height to the following based on the character's size:
 ;40 - Small
 ;60 - Standard/Medium
 ;70 - Large
 ;80 - Extra Large
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = 5, -59        ;Approximate position of head
mid.pos = 4, -40         ;Approximate position of midsection

[Velocity]
walk.fwd  = 4.5
walk.back = -3.5
run.fwd  = 8, -3
run.back = -7,-2.5
jump.neu = 0,-9
jump.back = -3.2
jump.fwd = 3.2
runjump.back = -3.5,-9
runjump.fwd = 4.5,-9
airjump.neu = 0,-9
airjump.back = -3.2
airjump.fwd = 3.2

[Movement]
airjump.num = 0      ;Number of air jumps allowed (opt)
airjump.height = 35  ;Minimum distance from ground before you can air jump (opt)
yaccel = .5         ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching
;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...
;---------------------------------------------------------------------------
; LOSE (Time over)
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = S3,26
channel = 5
;---------------------------KO FX--------------------------
[State 170,assertspecial]
type = assertspecial
;triggerall = matchover
trigger1 = time >= 53
flag = invisible
flag2 = noshadow
[State 170, AssertSpecial]
type = AssertSpecial
trigger1 = time < 200
flag = roundnotover
[State 170, PalFx]
type = PalFX
trigger1 = time = [43,44]
add = 50,50,50
time = 1
[State 170, PalFx]
type = PalFX
trigger1 = time = [45,46]
add = 100,100,100
time = 1
[State 170, PalFx]
type = PalFX
trigger1 = time = [47,48]
add = 150,150,150
time = 1
[State 170, PalFx]
type = PalFX
trigger1 = time = [49,50]
add = 200,200,200
time = 1
[State 170, PalFx]
type = PalFX
trigger1 = time = [51,52]
add = 250,250,250
time = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(-5+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0, -2
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(-3+const(size.mid.pos.x)*const(size.xscale)),ceil(-3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1.5, -1.5
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(-5+const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -2, 0
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(-3+const(size.mid.pos.x)*const(size.xscale)),ceil(3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1.5, 1.5
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(5+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0, 2
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(3+const(size.mid.pos.x)*const(size.xscale)),ceil(3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1.5, 1.5
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(5+const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 2, 0
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(3+const(size.mid.pos.x)*const(size.xscale)),ceil(-3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1.5, -1.5
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -0.5, -1
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1, -0.5
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -0.5, 1
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1, 0.5
removetime = 300
removeongethit = 1
[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0.5, 1
removetime = 300
removeongethit = 1

[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1, 0.5
removetime = 300
removeongethit = 1

[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0.5, -1
removetime = 300
removeongethit = 1

[State 170, KO Effect]
type = Explod
trigger1 = time = 53
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1, -0.5
removetime = 300
removeongethit = 1
[state 5150,snd]
type = playsnd
trigger1 = time = 53
value = S5,25
channel = 5
[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; DRAWGAME (Time over)
[Statedef 175]
type = S
ctrl = 0
velset = 0,0
[State 175, 1] ; If no anim, use go to lose state.
type = ChangeState
trigger1 = Time = 0
trigger1 = !SelfAnimExist(175)
value = 170
[State 175, 2]
type = ChangeAnim
trigger1 = Time = 0
value = 175
[State 175, 3]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win state decider
[Statedef 180]
type = S
[State 0, ChangeState]
type = ChangeState
trigger1 = numhelper(8001)
trigger1 = !helper(8001),numexplod(8035)
trigger1 = time>=0
trigger2 = !numhelper(8001)&&time>=0
value = 181+(random%7)
;---------------------------------------------------------------------------
; Win Pose
[Statedef 181]
type = S
ctrl = 0
anim = 180
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = S3,28
channel = 5
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10
value = S5,27
channel = 6
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 300
flag = roundnotover
[State 180, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win Pose
[Statedef 182]
type = S
ctrl = 0
anim = 181 + (random%2)
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S3,27
channel = 5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 300
flag = roundnotover
[State 180, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win Pose
[Statedef 183]
type = S
ctrl = 0
anim = 183
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S3,29
channel = 5
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 8
value = S3,30 + (random%3)
channel = 5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 300
flag = roundnotover
[State 180, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win Pose
[Statedef 184]
type = S
ctrl = 0
anim = 184
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S3,27
channel = 5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 300
flag = roundnotover
[State 180, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win Pose
[Statedef 185]
type = S
ctrl = 0
anim = 185
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 13
value = S3,17
channel = 5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 300
flag = roundnotover
[State 180, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win Pose
[Statedef 186]
type = S
ctrl = 0
[State 0, Helper]
type = Helper
trigger1 = !numhelper(10186)
trigger1 = time = 0
helpertype = normal ;player
name = "Roll"
ID = 10186
stateno = 10186
pos = frontedgedist + 32,0
postype = p1
ownpal = 1
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = numhelper(10186)
trigger1 = helper(10186),rootdist X <= 70
trigger1 = helper(10186),anim = 10187
trigger1 = anim != 186
value = 186
[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 186
trigger1 = animelem = 6
value = S3,27
channel = 5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 300
flag = roundnotover
[State 180, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Win Pose
[Statedef 187]
type = S
ctrl = 0
[State 0, Helper]
type = Helper
trigger1 = !numhelper(12000)
helpertype = normal ;player
name = "Eddie"
ID = 12000
stateno = 12000
facing = -1
pos = frontedgedist + 32,0
postype = p1
ownpal = 1
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = numhelper(12000)
trigger1 = helper(12000),rootdist X <= 90
trigger1 = helper(12000),anim = 12180
trigger1 = anim != 186
value = 186
[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 186
trigger1 = animelem = 6
value = S3,27
channel = 5
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time < 300
flag = roundnotover
[State 180, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;-------------------------------------------------------------------------------
[StateDef 10186]
movetype=I
ctrl = 0
anim = 10186
[State 0, Turn]
type = Turn
triggerall = anim = 10186
trigger1 = time = 0
[State 0, VelSet]
type = VelSet
trigger1 = anim != 10186
x = 0
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = anim = 10186
x = 3.5
[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = rootdist X <= 70
trigger1 = anim != 10187
value = 10187
elem = 7
[State 0, Helper]
type = Helper
trigger1 = !numhelper(10189)
trigger1 = time = 0
helpertype = normal ;player
name = "flowers"
ID = 10189
stateno = 10189
pos = 0,0
ownpal = 0
;------------------------------------------------
[StateDef 10189]
movetype=I
ctrl = 0
anim = 10189
sprpriority=2
[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = 0,0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = anim
elem = parent,animelemno(0)
;---------------------------------------------------------------------------
; Introduction
[Statedef 190]
type = S
ctrl = 0
anim = 190
velset = 0,0
[State 0, Start With Tornado Hold]
type=VarSet
trigger1=Time=0
var(50)=1
[State 190, 1] ;Freeze animation until PreIntro is over
type = ChangeState
trigger1 = RoundState = 0
value = 191;+(random%2)
[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 22
;---------------------------------------------------------------------------
; Introduction
[Statedef 191]
type = A
physics=N
ctrl = 0
anim = 190;+(random%2)
velset = 0,0
[State 0, Summon Rush]
type=Helper
trigger1=!numhelper(10000)
helpertype=normal ;player
name="Rush"
ID=10000
stateno=10190
pos=-45,0
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = time > 0
flag = Intro
flag2 = noshadow
[State 0, PosSet]
type=PosSet
trigger1=Time=0
y=-210
[State 0, VelSet]
type=VelSet
trigger1=1
y=10
[State 0, ScreenBound]
type=ScreenBound
trigger1=1
value=1
movecamera=1,0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S5,27
channel = 6
[State 190, 4]
type = ChangeState
trigger1 = Pos Y >= Ceil(-Vel Y)
trigger1 = Vel Y >= 0
value = 194
;---------------------------------------------------------------------------
; Introduction
[Statedef 192]
type = A
physics=N
ctrl = 0
anim = 190;+(random%2)
velset = 0,0
[State 0, Summon Rush]
type=Helper
trigger1=!numhelper(10000)
trigger1=time=144
helpertype=normal ;player
name="Rush"
ID=10000
stateno=10190
pos=-45,0
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = noshadow
[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = time < 144
flag = invisible
[State 0, PosSet]
type=PosSet
trigger1=Time=0
y=-210
[State 0, VelSet]
type=VelSet
trigger1=time=144
y=10
[State 0, ScreenBound]
type=ScreenBound
trigger1=1
value=1
movecamera=1,0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=15
value = S199,0
channel = 8
[State 0, Explod]
type=Explod
trigger1=time=15
anim=199
ID=199
postype=left
bindtime=-1
removetime=-2
sprpriority=10
ownpal=1
removeongethit=1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=144
value = S199,1
channel = 6
[State 190, 4]
type = ChangeState
trigger1 = Pos Y >= Ceil(-Vel Y)
trigger1 = Vel Y >= 0
value = 194
;---------------------------------------------------------------------------
[Statedef 194]
type = S
ctrl = 0
anim = ifelse(prevstateno=192, 192, 191)
velset = 0,0
[State 0, PosSet]
type = PosSet
trigger1 = Time = 0
y = 0
[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
[State 190, PlaySnd]
type=PlaySnd
trigger1=AnimElem=4
value=S3,25
channel=5
[State 0, PalFX]
type=PalFX
trigger1=anim=191
trigger1=animelemtime(2)<0
time=2
add=255,255,255
[State 0, PalFX]
type=PalFX
trigger1=anim=191
trigger1=animelemtime(2)>=0&&animelemtime(3)<0
time=2
add=255-((time-32)*17),255-((time-32)*17),255-((time-32)*17)
[State 0, Explod]
type=Explod
trigger1=anim=191
trigger1=Time=0&&!NumExplod(190)
anim=194
ID=190
pos=Ceil(-2*const(size.xscale)),Ceil(-22*const(size.yscale))
postype=p1  ;p2,front,back,left,right
bindtime=-1
removetime=-2
scale=const(size.xscale),const(size.yscale)
sprpriority=2
ownpal=1
removeongethit=1
[State 0, PalFX]
type=PalFX
trigger1=anim=192
trigger1=animelemtime(2)<0
time=2
add=255,255,255
[State 0, PalFX]
type=PalFX
trigger1=anim=192
trigger1=animelemtime(2)>=0&&animelemtime(3)<0
time=2
add=255-((time-96)*17),255-((time-96)*17),255-((time-96)*17)
[State 0, Explod]
type=Explod
trigger1=anim=192
trigger1=Time=0&&!NumExplod(190)
anim=194
ID=190
pos=Ceil(-2*const(size.xscale)),Ceil(-22*const(size.yscale))
postype=p1  ;p2,front,back,left,right
bindtime=-1
removetime=90
scale=const(size.xscale),const(size.yscale)
sprpriority=2
ownpal=1
removeongethit=1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time <= ifelse(anim=192, 90, 30)
trigger1 = (time%11)=1
value = S5,28
channel = 7
[State 192, 2]
type=ChangeState
trigger1=AnimTime=0
value=22
;------------------------------------------------------
;Taunt
;------------------------------------------------------
[StateDef 195]
type=S
movetype=I
physics=S
ctrl=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S3,33
channel = 5
[State 195, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[195,199])
trigger1=Time=0
value=195
;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,109])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
x=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,109])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
;-------------------------------------------------------------------------------
[State 195, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------
; Normals/Basics
;-------------------------------------------------------------------------------
;Standing Jab
;-------------------------------------------------------------------------------
[StateDef 200]
type=S
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,14)
;anim=200
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
;-------------------------------------------------------------------------------
[State 200, VarSet] ;Variable Timer Set
type=VarSet
trigger1=time=0&&(PrevStateNo!=200&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 200, VarAdd]
type=VarAdd ;Variable Timer Add
trigger1=1
var(1)=1
ignorehitpause=1
[State 200, ChangeAnim]
type=ChangeAnim
triggerall=Time=0
trigger1=(anim!=[200,209])
trigger2=prevstateno=200&&prevstateno!=9000
value=200
;-------------------------------------------------------------------------------
[State 200, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 200, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
x=0
[State 200, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 200, VelMul]
type=VelMul
trigger1=1
x=.95
[State 200, Explod]
type=Explod
triggerall=Vel X;(prevstateno=[100,109])
trigger1=AnimElemTime(7)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 200, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(4)>=0
physics=S
;-------------------------------------------------------------------------------
[State 200, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(2)=0
value=S0,0
channel=0
[State 200, 1] ;Jab
type=HitDef
trigger1=!movecontact && var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=20,0
animtype=Light
air.animtype=Back
fall.animtype=Back;Light
guardflag=MA
hitflag=MAFD
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=ceil(-15*const(size.xscale)),ceil(-48*const(size.yscale))
hitsound=S1,4
guardsound=S2,0
ground.type=High
ground.slidetime=11
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),0
air.hittime=18
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=16,14  ;Damage x .8, Damage x .7
givepower=12,8 ;Damage x .6, Damage x .4
yaccel=.8
[State 200, 1] ;Jab
type=HitDef
trigger1=!movecontact && var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=20,0
animtype=Light
air.animtype=Back
fall.animtype=Light
guardflag=MA
hitflag=MAF
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=ceil(-15*const(size.xscale)),ceil(-48*const(size.yscale))
hitsound=S1,4
guardsound=S2,0
ground.type=High
ground.slidetime=11
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),0
air.hittime=18
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=16,14  ;Damage x .8, Damage x .7
givepower=12,8 ;Damage x .6, Damage x .4
yaccel=.8
;-------------------------------------------------------------------------------
;[State 200, HitSpark] ;Alternative Way to use a hitspark
;type=Explod
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;anim=8200+(random%4)
;ID=8200
;pos=-10,-80
;postype=p2
;bindtime=1
;removetime=-2
;supermovetime=9999
;pausemovetime=9999
;ontop=1
;ownpal=1
;ignorehitpause=1
;[State 200, HitSound] ;Alternative way to use Hit Sound
;type=PlaySnd
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;value=S1,0
;channel=1
;ignorehitpause=1
;[State 200, GuardSpark] ;Alternative Way to use a guardspark
;type=Explod
;trigger1=moveguarded=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;anim=8300
;ID=8300
;pos=-10,-80
;postype=p2
;bindtime=1
;removetime=-2
;supermovetime=9999
;pausemovetime=9999
;ontop=1
;ownpal=1
;ignorehitpause=1
;[State 200, GuardSound] ;Alternative way to use Guard Sound
;type=PlaySnd
;trigger1=moveguarded=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;value=S2,0
;channel=1
;ignorehitpause=1
;-------------------------------------------------------------------------------
[State 200, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------
;Standing Strong
;-------------------------------------------------------------------------------
[StateDef 210]
type=S
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,41)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 210, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=210&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 210, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 210, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=7
trigger1=hitpausetime
value=anim
elem=7
ignorehitpause=1
[State 210, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=9
trigger1=hitpausetime
value=anim
elem=9
ignorehitpause=1
[State 210, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[210,219])
trigger1=Time=0
value=210
;-------------------------------------------------------------------------------
[State 210, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 210, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
trigger2=animelem=22
x=0
[State 210, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 210, VelMul]
type=VelMul
trigger1=animelemtime(7)<0
x=.95
[State 210, Explod]
type=Explod
triggerall=Vel X;(prevstateno=[100,109])
trigger1=AnimElemTime(7)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
;-------------------------------------------------------------------------------
[State 210, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S0,1
channel=0
[State 210, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S3,0
channel=5
[State 210, VelSet]
type=VelSet
trigger1=animelem=7
x=6.1*const(size.xscale)
ignorehitpause=1
[State 210, VelMul]
type=VelMul
trigger1=animelemtime(7)>0
x=.77
[State 210, 1] ;Strong
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=11,10
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(ifelse(animelemtime(7)<0, -18, 3)*const(size.xscale)), Ceil(ifelse(animelemtime(7)<0, -51, -94)*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=14
ground.hittime=16
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=-9.1*const(size.xscale),-7
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 210, 1] ;Strong
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=11,10
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(ifelse(animelemtime(7)<0, -18, 3)*const(size.xscale)), Ceil(ifelse(animelemtime(7)<0, -51, -94)*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=14
ground.hittime=16
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=-9.1*const(size.xscale),-7
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 210, end]
type=ChangeState
trigger1=AnimTime=0
value=0
ctrl=1
;-------------------------------------------------------------------------------
;Mega Overhead
;-------------------------------------------------------------------------------
[StateDef 215]
type=S
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,41)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 215, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=215&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 215, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 215, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[215,219])
trigger1=Time=0
value=215
;-------------------------------------------------------------------------------
[State 215, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 215, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||((PrevStateNo=210||PrevStateNo=410)&&Vel X<=6.1*const(size.xscale))
trigger1=Time=0
x=0
[State 215, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 215, VelMul]
type=VelMul
trigger1=1
x=.95
[State 215, Explod]
type=Explod
triggerall=Vel X;(prevstateno=[100,109])
trigger1=AnimElemTime(12)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 215, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(7)>=0
physics=S
;-------------------------------------------------------------------------------
[State 215, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(13)=0
value=S0,1
channel=0
[State 215, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(13)=0
value=S3,2
channel=5
[State 215, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=animelemtime(9)<0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=HA
hitflag=MAFD
priority=3,Hit
pausetime=11,10
;sparkno=S8240+(random%4)
guard.sparkno=S8300
sparkno=-1*(var(40):=8240)**0
sparkxy=var(42):=Ceil(-14*const(size.xscale)), var(43):=Ceil(-50*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=14
ground.hittime=21
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),0
air.hittime=18
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 215, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=animelemtime(9)<0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=HA
hitflag=MAF
priority=3,Hit
pausetime=11,10
;sparkno=S8240+(random%4)
guard.sparkno=S8300
sparkno=-1*(var(40):=8240)**0
sparkxy=var(42):=Ceil(-14*const(size.xscale)), var(43):=Ceil(-50*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=14
ground.hittime=21
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),0
air.hittime=18
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 215, MoveHitReset]
type = MoveHitReset
trigger1=animelemtime(16)=0&&(PrevStateNo!=215&&prevstateno!=9000)
ignorehitpause=1
[State 215, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=animelemtime(16)>=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=HA
hitflag=MAFD
priority=3,Hit
pausetime=11,10
;sparkno=S8240+(random%4)
guard.sparkno=S8300
sparkno=-1*(var(40):=8240)**0
sparkxy=var(42):=Ceil(-14*const(size.xscale)), var(43):=Ceil(-50*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=14
ground.hittime=21
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),0
air.hittime=18
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 215, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=animelemtime(16)>=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=HA
hitflag=MAF
priority=3,Hit
pausetime=11,10
;sparkno=S8240+(random%4)
guard.sparkno=S8300
sparkno=-1*(var(40):=8240)**0
sparkxy=var(42):=Ceil(-14*const(size.xscale)), var(43):=Ceil(-50*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=14
ground.hittime=21
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),0
air.hittime=18
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 215, end]
type=ChangeState
trigger1=AnimTime=0
value=0
ctrl=1
;-------------------------------------------------------------------------------
;Standing Fierce
;-------------------------------------------------------------------------------
[StateDef 220]
type=S
movetype=A
physics=N
juggle=4
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,55)
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 220, ChangeState]
type=ChangeState
trigger1=var(25)>=75
trigger1=Time=0&&(prevstateno!=220&&prevstateno!=9000)
value=1000
[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=220&&prevstateno!=9000)
trigger2=anim=224&&animelem=1
var(1)=0
ignorehitpause=1
[State 220, VarAdd];VarAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 220, VarSet]
type=VarSet
trigger1=time=0&&(prevstateno!=220&&prevstateno!=9000)
var(5)=0
ignorehitpause=1
[State 220, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[220,224])
trigger1=Time=0
value=220
;-------------------------------------------------------------------------------
[State 220, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 220, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||((PrevStateNo=210||PrevStateNo=410)&&Vel X<=6.1*const(size.xscale))
trigger1=Time=0
x=0
[State 220, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 220, VelMul]
type=VelMul
trigger1=1
x=.95
[State 220, Explod]
type=Explod
triggerall=Vel X;(prevstateno=[100,109])
trigger1=AnimElemTime(9)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 220, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(5)>=0
physics=S
;-------------------------------------------------------------------------------
[State 220, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(9)=0&&anim=220
value=S3,3
channel=5
;[State 220, Helper]
;type=Helper
;trigger1=AnimElemTime(9)=0
;helpertype=normal ;player
;name="Mega Shot FX"
;ID=223
;stateno=223
;pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
;postype=p1
;ownpal=1
;size.xscale=const(size.xscale)
;size.yscale=const(size.yscale)
;[State 220, Helper]
;type=Helper
;trigger1=AnimElemTime(9)=0
;helpertype=normal ;player
;name="Mega Shot"
;ID=221
;stateno=221
;pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
;postype=p1
;ownpal=1
;size.xscale=const(size.xscale)
;size.yscale=const(size.yscale)
[State 220, Helper]
type=Helper
trigger1=AnimElemTime(9)=0
helpertype=normal ;player
name="Mega Shot FX"
ID=1007
stateno=1007
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
[State 220, Helper]
type=Helper
trigger1=AnimElemTime(9)=0
helpertype=normal ;player
name="Mega Shot"
ID=221
stateno=1005
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
[State 220, ChangeAnim]
type=null;ChangeAnim
trigger1=(anim=220||anim=224)&&animelemtime(9)>=0&&animelemtime(24)<0
trigger1=command="z" && var(2) < 2
value=224
[State 220, VarSet];VarTimerSet
type=null;VarSet
trigger1=time=0&&(PrevStateNo!=220&&prevstateno!=9000)
v=2
value=0
ignorehitpause=1
[State 220, VarAdd];VarAdd
type=null;VarAdd
trigger1=anim!=220&&animelem=1
v=2
value=1
[State 220,PalFX]
type=palfx
trigger1=var(1)=[7,9]
add=80,144,240
time=1
[State 220,PalFX]
type=palfx
trigger1=var(1)=[10,12]
add=32,112,224
time=1
[State 220,PalFX]
type=palfx
trigger1=var(1)=[13,15]
add=32,32,192
time=1
[State 0,PalFX]
type=palfx
trigger1=var(1)=[16,19]
add=32,32,160
time=1
[State 220, end]
type=ChangeState
trigger1=AnimTime=0
value=0
ctrl=1
;-------------------------------------------------------------------------------
; Mega Buster
;-------------------------------------------------------------------------------
[StateDef 221]
type=A
movetype=A
physics=N
ctrl=0
sprpriority=3
movehitpersist=1
hitcountpersist=1
;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1
[State 0, Dampener]
type=varset
trigger1=1
fvar(10)=ifelse(fvar(12)=0,1,.85**(fvar(12)))
ignorehitpause=1
[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1
[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 221, VarSet] ;Attack Type
type=VarSet
trigger1=time=0&&prevstateno!=221
v=5
value=root,var(5)
ignorehitpause=1
[State 221, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
v=1
value=1
ignorehitpause=1
[State 1050, PlaySnd]
type=PlaySnd
trigger1=Time=0&&PrevStateNo!=221
value=S5,2
channel=10
[State 1050, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=221&&Time=0
value=221
[State 1050, VelSet]
type=VelSet
trigger1=var(1)>1
x=7.5
[State 1050, HitBy]
type=HitBy
trigger1=1
value=SCA,AP
ignorehitpause=1
[State 1050, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP,AA,AT
stateno=222
ignorehitpause=1
[State 221, HitDef]
type=HitDef
triggerall=var(5)=0&&root,var(13)=0
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=34,0;97,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),-0.90999619584
airguard.velocity=-5.625*root,const(size.xscale),-0.90999619584
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-5.625*const(size.xscale),-7
down.hittime=20
getpower=78,69
givepower=59,39
[State 221, HitDef]
type=HitDef
triggerall=var(5)=1&&root,var(13)=0 ;Low
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=34,0;97,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),-0.90999619584
airguard.velocity=-5.625*root,const(size.xscale),-0.90999619584
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-5.625*const(size.xscale),-7
down.hittime=20
getpower=78,69
givepower=59,39
[State 221, HitDef]
type=HitDef
triggerall=var(5)>=2&&root,var(13)=0 ;Air
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=34,0;97,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-12.75*root,const(size.xscale),5.625
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-6
down.hittime=20
air.fall=root,hitcount>=2 + hitcount;(root,prevstateno = [600,649])
getpower=78,69
givepower=59,39
;-------------------------------------------
[State 221, HitDef]
type=HitDef
triggerall=var(5)=0&&root,var(13)=1
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAF
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=34,0;97,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),-0.90999619584
airguard.velocity=-5.625*root,const(size.xscale),-0.90999619584
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-5.625*const(size.xscale),-7
down.hittime=20
getpower=78,69
givepower=59,39
[State 221, HitDef]
type=HitDef
triggerall=var(5)=1&&root,var(13)=1 ;Low
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,SP
hitflag=MAF
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=97,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),-0.90999619584
airguard.velocity=-5.625*root,const(size.xscale),-0.90999619584
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-5.625*const(size.xscale),-7
down.hittime=20
getpower=78,69
givepower=59,39
[State 221, HitDef]
type=HitDef
triggerall=var(5)>=2&&root,var(13)=1 ;Air
trigger1=Time=0&&!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SP
hitflag=MAF
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=34,0;97,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-12.75*root,const(size.xscale),5.625
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-6
down.hittime=20
air.fall=root,hitcount>=2 + hitcount;(root,prevstateno = [600,649])
getpower=78,69
givepower=59,39
;-------------------------------------------------------------------------------
;[State 1050, EnvShake]
;type = EnvShake
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;time=12
;ampl=4
;ignorehitpause=1
[State 1050, HitSpark] ;Alternative Way to use a hitspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=-10,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1
[State 1050, HitSound] ;Alternative way to use Hit Sound
type=PlaySnd
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S1,5
channel=1
ignorehitpause=1
[State 1050, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=-10,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1
[State 1050, GuardSound] ;Alternative way to use Guard Sound
type=PlaySnd
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S2,0
channel=2
ignorehitpause=1
[State 0, VarSet]
type = ParentVarSet
triggerall=Parent,var(12)
trigger1=movehit
var(11)=1
ignorehitpause=1
[State 0, VarSet]
type = ParentVarSet
;triggerall=Parent,Var(12)
;trigger1=Parent,prevstateno=600||Parent,prevstateno=610||Parent,prevstateno=630||Parent,prevstateno=640||Parent,prevstateno=620
trigger1=parent,hitcount>=2;Parent,var(11)=1
trigger1=movehit
var(12)=1
ignorehitpause=1
[State 9500, Flying Screen Helper]
type=Helper
trigger1=root,Var(12)=1&&parent,hitcount>=2
trigger1=movehit=1&&Numtarget
trigger1=Target,Time<=0&&Target,Movetype=H
trigger1=!NumHelper(9500)
helpertype=normal ;player
name="Flying Screen Effect"
ID=9500
stateno=9500
pos=0,0
postype=p2
ownpal=0
ignorehitpause=1
size.ground.back=0
size.ground.front=0
size.air.back=0
size.air.front=0
[State 650, MvC2 KnockDown]
type=TargetState
triggerall=root,Var(12)>0&&parent,hitcount>=2;(root,prevstateno=600||root,prevstateno=610||root,prevstateno=630||root,prevstateno=640||root,prevstateno=620)
trigger1=MoveHit&&NumTarget
trigger1=Target,Stateno=5020
trigger1=Target,Time<=0&&P2MoveType=H
value=5021
ignorehitpause=1
[State -2, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget && parent,hitcount<2
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
trigger2=root,var(11)&&root,statetype!=A
trigger3=!root,var(11)
value=5025
ignorehitpause=1
;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1
;-------------------------------------------------------------------------------
[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=3309
ID=224
postype=p1
bindtime=1
vel=-4,0
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1
[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=3309
ID=224
postype=p1
bindtime=1
vel=-5,(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1
[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=3309
ID=224
postype=p1
bindtime=1
vel=-5,-(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 221, end]
type=ChangeState
trigger1=MoveContact||MoveReversed ;Attack Connects
trigger2=FrontEdgeBodyDist <= -120 ;Projectile goes front offscreen by 120 pixels
value=222
;-------------------------------------------------------------------------------
; Mega Buster Shot Hit/Guarded
;-------------------------------------------------------------------------------
[StateDef 222]
ctrl=0
anim=222
sprpriority=3
velset=0,0
movehitpersist=1
hitcountpersist=1
[State 1051, end]
type=DestroySelf
trigger1=Time>=27
;-------------------------------------------------------------------------------
; Mega Buster Shot FX
;-------------------------------------------------------------------------------
[StateDef 223]
ctrl=0
anim=223
sprpriority=3
[State 223, BindToRoot]
type=BindToRoot
trigger1=root,statetype=S
time=2
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
ignorehitpause=1
[State 223, BindToRoot]
type=BindToRoot
trigger1=root,statetype=C
time=2
pos=ceil(24*const(size.xscale)),Ceil(-34*const(size.yscale))
ignorehitpause=1
[State 223, end]
type=DestroySelf
trigger1=AnimTime=0
trigger2=(root,stateno!=[220,224]) && (root,stateno!=[420,424]) && (root,stateno!=[620,624])
trigger3=root,movetype=H && root,stateno!=9000
;-------------------------------------------------------------------------------
;Standing Fierce (Alt)
;-------------------------------------------------------------------------------
[StateDef 225]
type=S
movetype=A
physics=N
juggle=4
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,55)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 225, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=225&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 225, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 225, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=12
trigger1=hitpausetime
value=anim
elem=12
ignorehitpause=1
[State 225, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[225,229])
trigger1=Time=0
value=225
;-------------------------------------------------------------------------------
[State 225, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 225, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||((PrevStateNo=210||PrevStateNo=410)&&Vel X<=6.1*const(size.xscale))
trigger1=Time=0
x=0
[State 225, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 225, VelMul]
type=VelMul
trigger1=1
x=.95
[State 225, Explod]
type=Explod
triggerall=Vel X;(prevstateno=[100,109])
trigger1=AnimElemTime(12)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 225, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(6)>=0
physics=S
;-------------------------------------------------------------------------------
[State 225, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(7)=0
value=S0,1
channel=0
[State 225, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(7)=0
value=S3,2
channel=5
[State 225, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=83,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=13,12
sparkno=S8250+(random%4)
guard.sparkno=S8300
sparkxy=Ceil(-14*const(size.xscale)), Ceil(-50*const(size.yscale))
hitsound=S1,10
guardsound=S2,0
ground.type=High
ground.slidetime=14
ground.hittime=21
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),-0.90999619584
air.type=High
air.velocity=-5.625*const(size.xscale),0
air.hittime=21
down.velocity=-5.625*const(size.xscale),-7
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 225, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=83,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=13,12
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-14*const(size.xscale)), Ceil(-50*const(size.yscale))
hitsound=S1,10
guardsound=S2,0
ground.type=High
ground.slidetime=14
ground.hittime=21
ground.velocity=-9.1*const(size.xscale)
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),-0.90999619584
air.type=High
air.velocity=-5.625*const(size.xscale),0
air.hittime=21
down.velocity=-5.625*const(size.xscale),-7
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 225, end]
type=ChangeState
trigger1=AnimTime=0
value=0
ctrl=1
;-------------------------------------------------------------------------------
;Standing Short
;-------------------------------------------------------------------------------
[StateDef 230]
type=S
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,14)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 230, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=230&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 230, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 230, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[230,239])
trigger1=Time=0
value=230
;-------------------------------------------------------------------------------
[State 230, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 230, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
x=0
[State 230, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 230, VelMul]
type=VelMul
trigger1=1
x=.95
[State 230, Explod]
type=Explod
triggerall=Vel X;(prevstateno=[100,109])
trigger1=AnimElemTime(7)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 230, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(4)>=0
physics=S
;-------------------------------------------------------------------------------
[State 230, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(2)=0
value=S0,0
channel=0
[State 230, 1] ;Short
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=20,0
animtype=Light
air.animtype=Back
fall.animtype=Light
guardflag=MA
hitflag=MAFD
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-15*const(size.xscale)), Ceil(-40*const(size.yscale))
hitsound=S1,7
guardsound=S2,0
ground.type=low
ground.slidetime=9
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),0
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=16,14  ;Damage x .8, Damage x .7
givepower=12,8 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=8
;envshake.ampl=2
[State 230, 1] ;Short
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=20,0
animtype=Light
air.animtype=Back
fall.animtype=Light
guardflag=MA
hitflag=MAF
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-15*const(size.xscale)), Ceil(-40*const(size.yscale))
hitsound=S1,7
guardsound=S2,0
ground.type=low
ground.slidetime=9
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),0
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=16,14  ;Damage x .8, Damage x .7
givepower=12,8 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=8
;envshake.ampl=2
[State 230, end]
type=ChangeState
trigger1=AnimTime=0
value=0
ctrl=1
;-------------------------------------------------------------------------------
;Standing Forward
;-------------------------------------------------------------------------------
[StateDef 240]
type=S
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,41)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 240, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=240&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 240, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 240, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=11
trigger1=hitpausetime
value=anim
elem=11
ignorehitpause=1
[State 240, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[240,249])
trigger1=Time=0
value=240
;-------------------------------------------------------------------------------
[State 240, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 240, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
x=0
[State 240, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 240, VelMul]
type=VelMul
trigger1=1
x=.95
[State 240, Explod]
type=Explod
triggerall=Vel X;(prevstateno=[100,109])
trigger1=AnimElemTime(11)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 240, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(6)>=0
physics=S
;-------------------------------------------------------------------------------
[State 240, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(8)=0
value=S0,1
channel=0
[State 240, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(8)=0
value=S3,1
channel=5
[State 240, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=11,10
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-22*const(size.xscale)), Ceil(-49*const(size.yscale))
hitsound=S1,8
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),-3.5
air.hittime=17
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 240, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=11,10
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-22*const(size.xscale)), Ceil(-49*const(size.yscale))
hitsound=S1,8
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),-3.5
air.hittime=17
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 240, PosAdd]
type=PosAdd
trigger1=AnimElem=8&&PrevStateNo!=240
x=Ceil(31*const(size.xscale))
[State 240, end]
type=ChangeState
trigger1=AnimTime=0
value=0
ctrl=1
;-------------------------------------------------------------------------------
;Standing Round House
;-------------------------------------------------------------------------------
[StateDef 250]
type=S
movetype=A
physics=N
juggle=4
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,55)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 250, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=250&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 250, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 250, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=9
trigger1=hitpausetime
value=anim
elem=9
ignorehitpause=1
[State 250, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=10
trigger1=hitpausetime
value=anim
elem=10
ignorehitpause=1
[State 250, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=14
trigger1=hitpausetime
value=anim
elem=14
ignorehitpause=1
[State 250, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[250,259])
trigger1=Time=0
value=250
;-------------------------------------------------------------------------------
[State 250, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 250, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||((PrevStateNo=210||PrevStateNo=410)&&Vel X<=6.1*const(size.xscale))
trigger1=Time=0
x=0
[State 250, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 250, VelMul]
type=VelMul
trigger1=1
x=.95
[State 250, Explod]
type=Explod
triggerall=Vel X;(prevstateno=[100,109])
trigger1=AnimElemTime(10)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 250, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(5)>=0
physics=S
;-------------------------------------------------------------------------------
[State 250, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(8)=0
value=S0,2
channel=0
[State 250, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(8)=0
value=S3,3
channel=5
[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=83,0
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=13,12
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=ceil(-11*const(size.xscale)),ceil(-71*const(size.yscale))
;sparkno=-1*(var(40):=8240)**0
;sparkxy=var(42):=Ceil(-11*const(size.xscale)), var(43):=Ceil(-71*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=Low
ground.slidetime=19
ground.hittime=20
ground.velocity=0*const(size.xscale),-17.5 ;-18*const(size.xscale),-12.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),-0.90999619584
air.type=Low
air.velocity=0*const(size.xscale),-17.5
air.hittime=28
down.velocity=-9.1*const(size.xscale),-8
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4
[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=83,0
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=13,12
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=ceil(-11*const(size.xscale)),ceil(-71*const(size.yscale))
;sparkno=-1*(var(40):=8240)**0
;sparkxy=var(42):=Ceil(-11*const(size.xscale)), var(43):=Ceil(-71*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=Low
ground.slidetime=19
ground.hittime=20
ground.velocity=0*const(size.xscale),-17.5 ;-12.75*const(size.xscale),0
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),-0.90999619584
air.type=Low
air.velocity=0*const(size.xscale),-17.5
air.hittime=28
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4
[State 420, Explod] ;Launcher Spark 1
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8009
ID=8009
pos=ceil(42*const(size.xscale)),ceil(-71*const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=5
ownpal=1
ignorehitpause=1
[State 250, end]
type=ChangeState
trigger1=AnimTime=0
value=0
ctrl=1
;-------------------------------------------------------------------------------
;Side + Roundhouse Kick
;-------------------------------------------------------------------------------
[StateDef 255]
type=S
movetype=A
physics=N
juggle=4
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,41)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 255, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=255&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 255, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 255, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=12
trigger1=hitpausetime
value=anim
elem=12
ignorehitpause=1
[State 255, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[255,259])
trigger1=Time=0
value=255
;-------------------------------------------------------------------------------
[State 255, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 255, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||((PrevStateNo=210||PrevStateNo=410)&&Vel X<=6.1*const(size.xscale))
trigger1=Time=0
x=0
[State 255, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 255, VelMul]
type=VelMul
trigger1=1
x=.95
[State 255, Explod]
type=Explod
triggerall=Vel X;(prevstateno=[100,109])
trigger1=AnimElemTime(12)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 255, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(7)>=0
physics=S
;-------------------------------------------------------------------------------
[State 255, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(9)=0
value=S0,1
channel=0
[State 255, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(9)=0
value=S3,1
channel=5
[State 255, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=83,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=13,12
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-22*const(size.xscale)), Ceil(-49*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=21
ground.velocity=-15*const(size.xscale),-12.5
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=-15*const(size.xscale),-12.5
air.hittime=21
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
fall=1
;envshake.time=9
;envshake.ampl=3
[State 255, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=83,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=13,12
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-22*const(size.xscale)), Ceil(-49*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=21
ground.velocity=-15*const(size.xscale),-12.5
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=-15*const(size.xscale),-12.5
air.hittime=21
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
fall=1
;envshake.time=9
;envshake.ampl=3
[State 255, PosAdd]
type=PosAdd
trigger1=AnimElem=3&&prevstateno!=255
x=Ceil(10 * const(size.xscale))
[State 255, PosAdd]
type=PosAdd
trigger1=AnimElem=5&&prevstateno!=255
x=Ceil(10 * const(size.xscale))
[State 255, PosAdd]
type=PosAdd
trigger1=AnimElem=8&&prevstateno!=255
x=Ceil(11 * const(size.xscale))
[State 255, VarSet]
type = VarSet
trigger1=movehit&&var(12)!=5
trigger1=numtarget
trigger1=target,hitfall
var(12)=5
ignorehitpause=1
[State 255, MvC2 KnockDown]
type=TargetState
trigger1=Var(12)=1 || var(12) = 5
trigger1=MoveHit&&NumTarget
;trigger1=Target,Stateno=5020 || Target,hitfall
trigger1=Target,Time<=0&&target,MoveType=H
value=5021
ignorehitpause=1
[State 255, Flying Screen Helper]
type=Helper
trigger1=Var(12)=1 || var(12) = 5
trigger1=movehit=1&&Numtarget
trigger1=Target,Time<=0&&Target,Movetype=H
trigger1=!NumHelper(9500)
helpertype=normal ;player
name="Flying Screen Effect"
ID=9500
stateno=9500
pos=0,0
postype=p2
ownpal=0
ignorehitpause=1
size.ground.back=0
size.ground.front=0
size.air.back=0
size.air.front=0
[State 255, end]
type=ChangeState
trigger1=AnimTime=0
value=0
ctrl=1
;-------------------------------------------------------------------------------
;Crouching Jab
;-------------------------------------------------------------------------------
[StateDef 400]
type=C
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,14)
;anim=400
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 400, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=400&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 400, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 400, ChangeAnim]
type=ChangeAnim
triggerall=Time=0
trigger1=(anim!=[400,409])
trigger2=prevstateno=400&&prevstateno!=9000
value=400
;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||(Vel X<1 && Vel X > -1)
trigger1=Time=0
x=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelMul]
type=VelMul
trigger1=1
x=.95
[State 0, Explod]
type=Explod
triggerall=Vel X ;(prevstateno=10)
trigger1=AnimElemTime(7)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(4)>=0
physics=C
;-------------------------------------------------------------------------------
[State 400, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(2)=0
value=S0,0
channel=0
[State 400, 1] ;Jab
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,NA
damage=27,0
animtype=Light
air.animtype=Back
fall.animtype=Light
guardflag=MA
hitflag=MAFD
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-16*const(size.xscale)), Ceil(-32*const(size.yscale))
hitsound=S1,4
guardsound=S2,0
ground.type=Low
ground.slidetime=9
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),0
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=21,18  ;Damage x .8, Damage x .7
givepower=16,10 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=8
;envshake.ampl=2
[State 400, 1] ;Jab
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,NA
damage=27,0
animtype=Light
air.animtype=Back
fall.animtype=Light
guardflag=MA
hitflag=MAF
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-16*const(size.xscale)), Ceil(-32*const(size.yscale))
hitsound=S1,4
guardsound=S2,0
ground.type=Low
ground.slidetime=9
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),0
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=21,18  ;Damage x .8, Damage x .7
givepower=16,10 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=8
;envshake.ampl=2
;-------------------------------------------------------------------------------
;[State 200, HitSpark] ;Alternative Way to use a hitspark
;type=Explod
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;anim=8200+(random%4)
;ID=8200
;pos=-10,-80
;postype=p2
;bindtime=1
;removetime=-2
;supermovetime=9999
;pausemovetime=9999
;ontop=1
;ownpal=1
;ignorehitpause=1
;[State 200, HitSound] ;Alternative way to use Hit Sound
;type=PlaySnd
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;value=S1,0
;channel=1
;ignorehitpause=1
;[State 200, GuardSpark] ;Alternative Way to use a guardspark
;type=Explod
;trigger1=moveguarded=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;anim=8300
;ID=8300
;pos=-10,-80
;postype=p2
;bindtime=1
;removetime=-2
;supermovetime=9999
;pausemovetime=9999
;ontop=1
;ownpal=1
;ignorehitpause=1
;[State 200, GuardSound] ;Alternative way to use Guard Sound
;type=PlaySnd
;trigger1=moveguarded=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;value=S2,0
;channel=1
;ignorehitpause=1
;-------------------------------------------------------------------------------
[State 400, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;-------------------------------------------------------------------------------
;Crouching Strong
;-------------------------------------------------------------------------------
[StateDef 410]
type=C
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,41)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 410, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=410&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 410, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 410, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=7
trigger1=hitpausetime
value=anim
elem=7
ignorehitpause=1
[State 410, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=9
trigger1=hitpausetime
value=anim
elem=9
ignorehitpause=1
[State 410, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[410,419])
trigger1=Time=0
value=410
;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||(Vel X<1 && Vel X > -1)
trigger1=Time=0
trigger2=animelem=22
x=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelMul]
type=VelMul
trigger1=animelemtime(7)<0
x=.95
[State 0, Explod]
type=Explod
triggerall=Vel X ;(prevstateno=10)
trigger1=AnimElemTime(7)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
;-------------------------------------------------------------------------------
[State 410, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S0,1
channel=0
[State 410, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S3,0
channel=5
[State 410, VelSet]
type=VelSet
trigger1=animelem=7
x=6.1 * const(size.xscale)
ignorehitpause=1
[State 410, VelMul]
type=VelMul
trigger1=animelemtime(7)>0
x=.77
[State 410, 1] ;Strong
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=11,10
sparkno=S8240+(random%4)
guard.sparkno=S8300
sparkxy=Ceil(ifelse(animelemtime(7)<0, -18, 3)*const(size.xscale)),Ceil(ifelse(animelemtime(7)<0, -44, -87)*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-9.1*const(size.xscale),-7
air.hittime=17
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 410, 1] ;Strong
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=11,10
sparkno=S8240+(random%4)
guard.sparkno=S8300
sparkxy=Ceil(ifelse(animelemtime(7)<0, -18, 3)*const(size.xscale)),Ceil(ifelse(animelemtime(7)<0, -44, -87)*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-9.1*const(size.xscale),-7
air.hittime=17
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 410, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;-------------------------------------------------------------------------------
;Crouching Strong Alt
;-------------------------------------------------------------------------------
[StateDef 415]
type=C
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,41)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 415, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=415&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 415, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 415, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=7
trigger1=hitpausetime
value=anim
elem=7
ignorehitpause=1
[State 415, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=9
trigger1=hitpausetime
value=anim
elem=9
ignorehitpause=1
[State 415, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[410,419])
trigger1=Time=0
value=415
;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||(Vel X<1 && Vel X > -1)
trigger1=Time=0
trigger2=animelem=22
x=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelMul]
type=VelMul
trigger1=animelemtime(7)<0
x=.95
[State 0, Explod]
type=Explod
triggerall=Vel X ;(prevstateno=10)
trigger1=AnimElemTime(7)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
;-------------------------------------------------------------------------------
[State 415, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S0,1
channel=0
[State 415, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S3,0
channel=5
[State 415, 1] ;Strong
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=11,10
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-16*const(size.xscale)), Ceil(-32*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),7
air.hittime=17
down.velocity=-5.625*const(size.xscale),0;,-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 415, 1] ;Strong
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,NA
damage=48,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=11,10
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-16*const(size.xscale)), Ceil(-32*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),7
air.hittime=17
down.velocity=-5.625*const(size.xscale),0;,-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=38,33  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 415, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;-------------------------------------------------------------------------------
;Crouching Fierce
;-------------------------------------------------------------------------------
[StateDef 420]
type=C
movetype=A
physics=N
juggle=4
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,55)
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 0, ChangeState]
type=ChangeState
trigger1=var(25)>=75
trigger1=Time=0&&(prevstateno!=420&&prevstateno!=9000)
value=1001
[State 420, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=420&&prevstateno!=9000)
trigger2=anim=424&&animelem=1
var(1)=0
ignorehitpause=1
[State 420, VarAdd];VarAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 420, VarSet]
type=VarSet
trigger1=time=0&&(prevstateno!=420&&prevstateno!=9000)
var(5)=1
ignorehitpause=1
[State 420, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[420,424])
trigger1=Time=0
value=420
;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||((PrevStateNo=210||PrevStateNo=410)&&Vel X<=6.1*const(size.xscale))||(Vel X<1 && Vel X > -1)
trigger1=Time=0
x=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelMul]
type=VelMul
trigger1=1
x=.95
[State 0, Explod]
type=Explod
triggerall=Vel X ;(prevstateno=10)
trigger1=AnimElemTime(9)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(5)>=0
physics=C
;-------------------------------------------------------------------------------
[State 420, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(9)=0
value=S0,2
channel=0
[State 420, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(9)=0
value=S3,3
channel=5
[State 420, Helper]
type=Helper
trigger1=AnimElemTime(9)=0
helpertype=normal ;player
name="Mega Shot FX"
ID=1007
stateno=1007
pos=ceil(24*const(size.xscale)),Ceil(-34*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
[State 420, Helper]
type=Helper
trigger1=AnimElemTime(9)=0
helpertype=normal ;player
name="Mega Shot"
ID=421
stateno=1005
pos=ceil(24*const(size.xscale)),Ceil(-34*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
;[State 420, Helper]
;type=Helper
;trigger1=AnimElemTime(9)=0
;helpertype=normal ;player
;name="Mega Shot FX"
;ID=223
;stateno=223
;pos=ceil(24*const(size.xscale)),Ceil(-34*const(size.yscale))
;postype=p1
;ownpal=1
;size.xscale=const(size.xscale)
;size.yscale=const(size.yscale)
;[State 420, Helper]
;type=Helper
;trigger1=AnimElemTime(9)=0
;helpertype=normal ;player
;name="Mega Shot"
;ID=221
;stateno=221
;pos=ceil(24*const(size.xscale)),Ceil(-34*const(size.yscale))
;postype=p1
;ownpal=1
;size.xscale=const(size.xscale)
;size.yscale=const(size.yscale)
[State 420, ChangeAnim]
type=null;ChangeAnim
trigger1=(anim=420||anim=424)&&animelemtime(9)>=0&&animelemtime(24)<0
trigger1=command="z" && var(2) < 2
value=424
[State 420, VarSet];VarTimerSet
type=null;VarSet
trigger1=time=0&&(PrevStateNo!=420&&prevstateno!=9000)
v=2
value=0
ignorehitpause=1
[State 420, VarAdd];VarAdd
type=null;VarAdd
trigger1=anim!=420&&animelem=1
v=2
value=1
[State 0,PalFX]
type = palfx
trigger1 = var(1) = [7,9]
add = 80,144,240
time = 1
[State 0,PalFX]
type = palfx
trigger1 = var(1) = [10,12]
add = 32,112,224
time = 1
[State 0,PalFX]
type = palfx
trigger1 = var(1) = [13,15]
add = 32,32,192
time = 1
[State 0,PalFX]
type = palfx
trigger1 = var(1) = [16,19]
add = 32,32,160
time = 1
[State 420, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;-------------------------------------------------------------------------------
;Crouching Fierce (Alt)
;-------------------------------------------------------------------------------
[StateDef 425]
type=C
movetype=A
physics=N
juggle=4
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,55)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 425, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=425&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 425, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 425, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=10
trigger1=hitpausetime
value=anim
elem=10
ignorehitpause=1
[State 425, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[425,429])
trigger1=Time=0
value=425
;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||((PrevStateNo=210||PrevStateNo=410)&&Vel X<=6.1*const(size.xscale))||(Vel X<1 && Vel X > -1)
trigger1=Time=0
x=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelMul]
type=VelMul
trigger1=1
x=.95
[State 0, Explod]
type=Explod
triggerall=Vel X ;(prevstateno=10)
trigger1=AnimElemTime(12)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(6)>=0
physics=C
;-------------------------------------------------------------------------------
[State 425, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(7)=0
value=S0,1
channel=0
[State 425, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(7)=0
value=S3,2
channel=5
[State 425, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,NA
damage=83,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=13,12
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-18*const(size.xscale)), Ceil(-36*const(size.yscale))
hitsound=S1,10
guardsound=S2,0
ground.type=Low
ground.slidetime=18
ground.hittime=24
ground.velocity=-12.75*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-7
air.hittime=24
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 425, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,NA
damage=83,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=13,12
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-18*const(size.xscale)), Ceil(-36*const(size.yscale))
hitsound=S1,10
guardsound=S2,0
ground.type=Low
ground.slidetime=18
ground.hittime=24
ground.velocity=-12.75*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-7
air.hittime=24
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 425, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;-------------------------------------------------------------------------------
;Crouching Short
;-------------------------------------------------------------------------------
[StateDef 430]
type=C
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,14)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 430, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=430&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 430, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 430, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[430,439])
trigger1=Time=0
value=430
;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||(Vel X<1 && Vel X > -1)
trigger1=Time=0
x=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelMul]
type=VelMul
trigger1=1
x=.95
[State 0, Explod]
type=Explod
triggerall=Vel X ;(prevstateno=10)
trigger1=AnimElemTime(9)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(5)>=0
physics=C
;-------------------------------------------------------------------------------
[State 430, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(2)=0
value=S0,0
channel=0
[State 430, 1] ;Short
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,NA
damage=27,0
animtype=Light
air.animtype=Back
fall.animtype=Light
guardflag=LA
hitflag=MAFD
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-14*const(size.xscale)), Ceil(-7*const(size.yscale))
hitsound=S1,7
guardsound=S2,0
ground.type=low
ground.slidetime=9
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),0
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=21,18  ;Damage x .8, Damage x .7
givepower=16,10 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=8
;envshake.ampl=2
[State 430, 1] ;Short
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,NA
damage=27,0
animtype=Light
air.animtype=Back
fall.animtype=Light
guardflag=LA
hitflag=MAF
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-14*const(size.xscale)), Ceil(-7*const(size.yscale))
hitsound=S1,7
guardsound=S2,0
ground.type=low
ground.slidetime=9
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),0
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=21,18  ;Damage x .8, Damage x .7
givepower=16,10 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=8
;envshake.ampl=2
[State 430, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;-------------------------------------------------------------------------------
;Crouching Forward
;-------------------------------------------------------------------------------
[StateDef 440]
type=C
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,41)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 440, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=440&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 440, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 440, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=8
trigger1=hitpausetime
value=anim
elem=8
ignorehitpause=1
[State 440, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[440,449])
trigger1=Time=0
value=440
;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])||(Vel X<1 && Vel X > -1)
trigger1=Time=0
x=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelMul]
type=VelMul
trigger1=1
x=.95
[State 0, Explod]
type=Explod
triggerall=Vel X ;(prevstateno=10)
trigger1=AnimElemTime(9)<0
trigger1=Var(1) % 2 = 0
anim=8001
ID=8001
pos=0,0
postype=p1
bindtime=1
vel=-Vel X,0
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=const(size.xscale),const(size.yscale)
sprpriority=3
ownpal=1
removeongethit=1
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=AnimElemTime(5)>=0
physics=C
;-------------------------------------------------------------------------------
[State 440, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(8)=0
value=S0,1
channel=0
[State 440, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,NA
damage=55,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=LA
hitflag=MAFD
priority=3,Hit
pausetime=11,10
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-8*const(size.xscale)), Ceil(-10*const(size.yscale))
hitsound=S1,8
guardsound=S2,0
ground.type=Low
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),0
air.hittime=17
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=44,38  ;Damage x .8, Damage x .7
givepower=33,22 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 440, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,NA
damage=55,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=LA
hitflag=MAF
priority=3,Hit
pausetime=11,10
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-8*const(size.xscale)), Ceil(-10*const(size.yscale))
hitsound=S1,8
guardsound=S2,0
ground.type=Low
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),0
air.hittime=17
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=44,38  ;Damage x .8, Damage x .7
givepower=33,22 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 440, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;-------------------------------------------------------------------------------
;Crouching Round House
;-------------------------------------------------------------------------------
[StateDef 450]
type=C
movetype=A
physics=N
juggle=4
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,55)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 450, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=450&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 250, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 450, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[450,459])
trigger1=Time=0
value=450
;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,12])||(PrevStateNo=[20,99])||((PrevStateNo=210||PrevStateNo=410)&&Vel X<=6.1*const(size.xscale))||(Vel X<1 && Vel X > -1)
trigger1=Time=0
x=0
[State 0, VelSet]
type=VelSet
trigger1=(PrevStateNo=[0,111])||(PrevStateNo=[0,12])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
;-------------------------------------------------------------------------------
[State 450, VelSet]
type=VelSet
trigger1=animelem=8
x=7.89755 * const(size.xscale)
ignorehitpause=1
[State 450, VelMul]
type=VelMul
trigger1=animelemtime(21)>0
x=0.8412825991399586200714111328125
[State 450, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(8)=0
value=S5,0
channel=0
[State 450, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(8)=0
value=S3,3
channel=5
[State 450, 1] ;Trip
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,NA
damage=90,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=LA
hitflag=MAFD
priority=4,Hit
pausetime=13,12
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-8*const(size.xscale)), Ceil(-10*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=Trip
ground.slidetime=19
ground.hittime=20
ground.velocity=0,-6;-12.75*const(size.xscale)
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=-12.75*const(size.xscale),-1.695
air.hittime=28
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
air.fall=1
fall.recover=0
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=72,63  ;Damage x .8, Damage x .7
givepower=54,54 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4
[State 450, 1] ;Trip
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,NA
damage=90,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=LA
hitflag=MAF
priority=4,Hit
pausetime=13,12
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-8*const(size.xscale)), Ceil(-10*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=Trip
ground.slidetime=19
ground.hittime=20
ground.velocity=0,-6;-12.75*const(size.xscale)
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=-12.75*const(size.xscale),-1.695
air.hittime=28
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
air.fall=1
fall.recover=0
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=72,63  ;Damage x .8, Damage x .7
givepower=54,54 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4
[State 220, Helper]
type=Helper
trigger1=AnimElemTime(7)=0
helpertype=normal ;player
name="Dust FX"
ID=7505
stateno=7505
pos=0,0
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
[State 450, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;-------------------------------------------------------------------------------
;Jumping Jab
;-------------------------------------------------------------------------------
[StateDef 600]
type=A
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,14)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000 && var(11),1,0)
[State 600, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[600,609])
trigger1=Time=0
value=600
[State 600, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(2)=0
value=S0,0
channel=0
[State 600, 1] ;Jab
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=27,0
animtype=Light
air.animtype=Back
fall.animtype=Light
guardflag=MA
hitflag=MAFD
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-14*const(size.xscale)), Ceil(-62*const(size.yscale))
hitsound=S1,4
guardsound=S2,0
ground.type=High
ground.slidetime=11
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=0,-8.225
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=21,18  ;Damage x .8, Damage x .7
givepower=16,10 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=8
;envshake.ampl=2
[State 600, 1] ;Jab
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=27,0
animtype=Light
air.animtype=Back
fall.animtype=Light
guardflag=MA
hitflag=MAF
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-14*const(size.xscale)), Ceil(-62*const(size.yscale))
hitsound=S1,4
guardsound=S2,0
ground.type=High
ground.slidetime=11
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=0,-8.225
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=21,18  ;Damage x .8, Damage x .7
givepower=16,10 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=8
;envshake.ampl=2
[State 600, StateTypeSet]
type = StateTypeSet
trigger1=AnimTime=0
movetype=I
[State 600, VelAdd]
type = VelAdd
trigger1 = time > 0
y = const(movement.yaccel)
[State 600, end]
type=ChangeState
trigger1=AnimTime=0
value=51
ctrl=ifelse(var(11)&&var(12)!=1,1,0)
[State 600, land]
type=ChangeState
trigger1=pos Y >= floor(-vel y) + ifelse(movecontact, 0, 20)
trigger1=vel Y >= 0
value=52
ctrl=0
;-------------------------------------------------------------------------------
;Jumping Strong
;-------------------------------------------------------------------------------
[StateDef 610]
type=A
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,41)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000 && var(11),1,0)
[State 610, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=610&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 610, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 610, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=5
trigger1=hitpausetime
value=anim
elem=5
ignorehitpause=1
[State 610, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=7
trigger1=hitpausetime
value=anim
elem=7
ignorehitpause=1
[State 610, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[610,619])
trigger1=Time=0
value=610
[State 610, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(4)=0
value=S0,1
channel=0
[State 610, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(4)=0
value=S3,3
channel=5
[State 610, 1] ;Strong
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=41,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=9,8
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(ifelse(animelemtime(7)<0, -7, -1)*const(size.xscale)),Ceil(ifelse(animelemtime(7)<0, -70, -86)*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=14
ground.hittime=16
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=0,-8.225
air.hittime=16
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 610, 1] ;Strong
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=41,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=9,8
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(ifelse(animelemtime(7)<0, -7, -1)*const(size.xscale)),Ceil(ifelse(animelemtime(7)<0, -70, -86)*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=14
ground.hittime=16
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=0,-8.225
air.hittime=16
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 610, StateTypeSet]
type = StateTypeSet
trigger1=AnimTime=0
movetype=I
[State 610, VelAdd]
type = VelAdd
trigger1 = time > 0
y = const(movement.yaccel)
[State 610, end]
type=ChangeState
trigger1=AnimTime=0
value=51
ctrl=ifelse(var(11)&&var(12)!=1,1,0)
[State 610, land]
type=ChangeState
trigger1=pos Y >= floor(-vel y) + ifelse(movecontact, 0, 20)
trigger1=vel Y >= 0
value=52
ctrl=0
;-------------------------------------------------------------------------------
;Jumping Fierce
;-------------------------------------------------------------------------------
[StateDef 620]
type=A
movetype=A
physics=N
juggle=4
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,55)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000 && var(11),1,0)
[State 0, ChangeState]
type=ChangeState
trigger1=var(25)>=75
trigger1=Time=0&&(prevstateno!=620&&prevstateno!=9000)
value=1002
[State 620, VarSet]
type=VarSet
trigger1=time=0&&(prevstateno!=620&&prevstateno!=9000)
var(5)=2
ignorehitpause=1
[State 620, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[620,624])
trigger1=Time=0
value=620
[State 620, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(11)=0&&anim=620
trigger2=AnimElemTime(9)=0&&anim=624
value=S0,2
channel=0
[State 610, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(11)=0&&anim=620
trigger2=AnimElemTime(9)=0&&anim=624
value=S3,0
channel=5
;[State 220, Helper]
;type=Helper
;trigger1=AnimElemTime(11)=0&&anim=620
;trigger2=AnimElemTime(9)=0&&anim=624
;helpertype=normal ;player
;name="Mega Shot FX"
;ID=223
;stateno=223
;pos=ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
;postype=p1
;ownpal=1
;size.xscale=const(size.xscale)
;size.yscale=const(size.yscale)
;[State 220, Helper]
;type=Helper
;trigger1=AnimElemTime(11)=0&&anim=620
;trigger2=AnimElemTime(9)=0&&anim=624
;helpertype=normal ;player
;name="Mega Shot"
;ID=221
;stateno=221
;pos=ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
;postype=p1
;ownpal=1
;size.xscale=const(size.xscale)
;size.yscale=const(size.yscale)
[State 220, Helper]
type=Helper
trigger1=AnimElemTime(11)=0&&anim=620
trigger2=AnimElemTime(9)=0&&anim=624
helpertype=normal ;player
name="Mega Shot FX"
ID=1007
stateno=1007
pos=ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
[State 220, Helper]
type=Helper
trigger1=AnimElemTime(11)=0&&anim=620
trigger2=AnimElemTime(9)=0&&anim=624
helpertype=normal ;player
name="Mega Shot"
ID=621
stateno=1005
pos=ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
[State 220, ChangeAnim]
type=null;ChangeAnim
triggerall=command="z" && var(2) < 2
trigger1=(anim=620)&&animelemtime(11)>=0&&animelemtime(26)<0
trigger2=(anim=624)&&animelemtime(9)>=0&&animelemtime(24)<0
value=624
[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=620&&prevstateno!=9000)
v=2
value=0
ignorehitpause=1
[State 220, VarAdd];VarAdd
type=VarAdd
trigger1=anim!=620&&animelem=1
v=2
value=1
[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=620&&prevstateno!=9000)
trigger2=anim=624&&animelem=1
var(1)=0
ignorehitpause=1
[State 220, VarAdd];VarAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 0,PalFX]
type = palfx
triggerall = anim = 624
trigger1 = var(1) = [7,9]
add = 80,144,240
time = 1
[State 0,PalFX]
type = palfx
triggerall = anim = 624
trigger1 = var(1) = [10,12]
add = 32,112,224
time = 1
[State 0,PalFX]
type = palfx
triggerall = anim = 624
trigger1 = var(1) = [13,15]
add = 32,32,192
time = 1
[State 0,PalFX]
type = palfx
triggerall = anim = 624
trigger1 = var(1) = [16,19]
add = 32,32,160
time = 1
[State 0,PalFX]
type = palfx
triggerall = anim = 620
trigger1 = var(1) = [9,11]
add = 80,144,240
time = 1
[State 0,PalFX]
type = palfx
triggerall = anim = 620
trigger1 = var(1) = [12,14]
add = 32,112,224
time = 1
[State 0,PalFX]
type = palfx
triggerall = anim = 620
trigger1 = var(1) = [15,17]
add = 32,32,192
time = 1
[State 0,PalFX]
type = palfx
triggerall = anim = 620
trigger1 = var(1) = [18,21]
add = 32,32,160
time = 1
[State 620, StateTypeSet]
type = StateTypeSet
trigger1=AnimTime=0
movetype=I
[State 620, VelAdd]
type = VelAdd
trigger1 = time > 0
y = const(movement.yaccel)
[State 620, end]
type=ChangeState
trigger1=AnimTime=0
value=51
ctrl=ifelse(var(11)&&var(12)!=1,1,0)
[State 620, land]
type=ChangeState
trigger1=!numhelper(221)
trigger1=pos Y >= floor(-vel y) + 20 && vel Y >= 0
trigger2=numhelper(221)
trigger2=pos Y >= floor(-vel y) + ifelse(helper(221),movecontact, 0, 20) && vel Y >= 0
value=52
ctrl=0
;-------------------------------------------------------------------------------
;Jumping Fierce Alt
;-------------------------------------------------------------------------------
[StateDef 625]
type=A
movetype=A
physics=N
juggle=4
ctrl=0
sprpriority=2
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000 && var(11),1,0)
[State 625, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=625&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 625, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 625, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=11;8
trigger1=hitpausetime
value=anim
elem=11;8
ignorehitpause=1
[State 625, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[625,629])
trigger1=Time=0
value=625
[State 625, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S0,2
channel=0
[State 610, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S3,2
channel=5
[State 240, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=83,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=13,12
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-12*const(size.xscale)), Ceil(-29*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=16
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=0,9;-9.1*const(size.xscale),9
air.hittime=28
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
air.fall= var(16)>=2;(prevstateno = [600,649])
fall.recover=0
;envshake.time=12
;envshake.ampl=4
[State 240, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=83,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=13,12
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-12*const(size.xscale)), Ceil(-29*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=16
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=0,9;-9.1*const(size.xscale),9
air.hittime=28
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
air.fall= var(16)>=2;(prevstateno = [600,649])
fall.recover=0
;envshake.time=12
;envshake.ampl=4
[State 0, VarSet]
type = VarSet
triggerall=var(12)
trigger1=movehit
var(11)=1
ignorehitpause=1
[State 0, VarSet]
type = VarSet
;triggerall=Parent,Var(12)
;trigger1=Parent,prevstateno=600||Parent,prevstateno=610||Parent,prevstateno=630||Parent,prevstateno=640||Parent,prevstateno=620
trigger1=var(16)>=3;Parent,var(11)=1
trigger1=movehit&&var(12)!=1
trigger1=target,statetype=A
var(12)=1
ignorehitpause=1
[State 9500, Flying Screen Helper]
type=Helper
trigger1=Var(12)=1
trigger1=movehit=1&&Numtarget
trigger1=Target,Time<=0&&Target,Movetype=H
trigger1=!NumHelper(9500)
helpertype=normal ;player
name="Flying Screen Effect"
ID=9500
stateno=9500
pos=0,0
postype=p2
ownpal=0
ignorehitpause=1
size.ground.back=0
size.ground.front=0
size.air.back=0
size.air.front=0
[State 650, MvC2 KnockDown]
type=TargetState
triggerall=Var(12)>0&&var(16)>=3;(root,prevstateno=600||root,prevstateno=610||root,prevstateno=630||root,prevstateno=640||root,prevstateno=620)
trigger1=MoveHit&&NumTarget
trigger1=Target,Stateno=5020
trigger1=Target,Time<=0&&target,MoveType=H
value=5021
ignorehitpause=1
[State 625, StateTypeSet]
type = StateTypeSet
trigger1=AnimTime=0
movetype=I
[State 625, VelAdd]
type = VelAdd
trigger1 = time > 0
y = const(movement.yaccel)
[State 625, end]
type=ChangeState
trigger1=AnimTime=0
value=51
ctrl=ifelse(var(11)&&var(12)!=1,1,0)
[State 625, land]
type=ChangeState
trigger1=pos Y >= floor(-vel y) + ifelse(movecontact, 0, 20)
trigger1=vel Y >= 0
value=52
ctrl=0
;-------------------------------------------------------------------------------
;Jumping Short
;-------------------------------------------------------------------------------
[StateDef 630]
type=A
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,14)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000 && var(11),1,0)
[State 630, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[630,634])
trigger1=Time=0
value=630
[State 630, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(3)=0
value=S0,0
channel=0
[State 230, 1] ;Short
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=27,0
animtype=Light
air.animtype=Back
fall.animtype=Light
guardflag=MA
hitflag=MAFD
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-10*const(size.xscale)), Ceil(-51*const(size.yscale))
hitsound=S1,7
guardsound=S2,0
ground.type=low
ground.slidetime=9
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=0,-8.225
air.hittime=18
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=21,18  ;Damage x .8, Damage x .7
givepower=16,10 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=8
;envshake.ampl=2
[State 230, 1] ;Short
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=27,0
animtype=Light
air.animtype=Back
fall.animtype=Light
guardflag=MA
hitflag=MAF
priority=2,Hit
pausetime=9,8
sparkno=S8230+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-10*const(size.xscale)), Ceil(-51*const(size.yscale))
hitsound=S1,7
guardsound=S2,0
ground.type=low
ground.slidetime=9
ground.hittime=10
ground.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=Low
air.velocity=0,-8.225
air.hittime=18
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=21,18  ;Damage x .8, Damage x .7
givepower=16,10 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=8
;envshake.ampl=2
[State 630, StateTypeSet]
type = StateTypeSet
trigger1=AnimTime=0
movetype=I
[State 630, VelAdd]
type = VelAdd
trigger1 = time > 0
y = const(movement.yaccel)
[State 630, end]
type=ChangeState
trigger1=AnimTime=0
value=51
ctrl=ifelse(var(11)&&var(12)!=1,1,0)
[State 630, land]
type=ChangeState
trigger1=pos Y >= floor(-vel y) + ifelse(movecontact, 0, 20)
trigger1=vel Y >= 0
value=52
ctrl=0
;-------------------------------------------------------------------------------
;Jumping Forward
;-------------------------------------------------------------------------------
[StateDef 640]
type=A
movetype=A
physics=N
juggle=3
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,41)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000 && var(11),1,0)
[State 640, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=640&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 640, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 640, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=5
trigger1=hitpausetime
value=anim
elem=5
ignorehitpause=1
[State 640, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[640,644])
trigger1=Time=0
value=640
[State 640, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(4)=0
value=S0,1
channel=0
[State 640, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(4)=0
value=S3,2
channel=5
[State 640, 1] ;Strong
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=41,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=11,10
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-9*const(size.xscale)), Ceil(-62*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-3.35*const(size.xscale),-7
air.hittime=14
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 640, 1] ;Strong
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=41,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=11,10
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-9*const(size.xscale)), Ceil(-62*const(size.yscale))
hitsound=S1,5
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-3.35*const(size.xscale),-7
air.hittime=14
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=9
;envshake.ampl=3
[State 640, StateTypeSet]
type = StateTypeSet
trigger1=AnimTime=0
movetype=I
[State 640, VelAdd]
type = VelAdd
trigger1 = time > 0
y = const(movement.yaccel)
[State 640, end]
type=ChangeState
trigger1=AnimTime=0
value=51
ctrl=ifelse(var(11)&&var(12)!=1,1,0)
[State 640, land]
type=ChangeState
trigger1=pos Y >= floor(-vel y) + ifelse(movecontact, 0, 20)
trigger1=vel Y >= 0
value=52
ctrl=0
;-------------------------------------------------------------------------------
;Jumping Round House
;-------------------------------------------------------------------------------
[StateDef 650]
type=A
movetype=A
physics=N
juggle=4
ctrl=0
sprpriority=2
poweradd=ifelse(prevstateno=9000,0,55)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000 && var(11),1,0)
[State 650, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=650&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 650, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 650, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=7
trigger1=hitpausetime
value=anim
elem=7
ignorehitpause=1
[State 650, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[650,659])
trigger1=Time=0
value=650
[State 650, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S0,2
channel=0
[State 650, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S3,1
channel=5
[State 240, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=83,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=13,12
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-12*const(size.xscale)), Ceil(-29*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=16
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=-9.1*const(size.xscale),4
air.hittime=28
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
air.fall=var(16)>=2&&var(12);(prevstateno = [600,649])
fall.recover=0
;envshake.time=12
;envshake.ampl=4
[State 240, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=83,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=13,12
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-12*const(size.xscale)), Ceil(-29*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=16
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=-9.1*const(size.xscale),4
air.hittime=28
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
air.fall=var(16)>=2&&var(12);(prevstateno = [600,649])
fall.recover=0
;envshake.time=12
;envshake.ampl=4
[State 0, VarSet]
type = VarSet
triggerall=var(12)
trigger1=movehit
var(11)=1
ignorehitpause=1
[State 0, VarSet]
type = VarSet
;triggerall=Parent,Var(12)
;trigger1=Parent,prevstateno=600||Parent,prevstateno=610||Parent,prevstateno=630||Parent,prevstateno=640||Parent,prevstateno=620
trigger1=var(16)>=3&&var(12);Parent,var(11)=1
trigger1=movehit&&var(12)!=1
trigger1=target,statetype=A
var(12)=1
ignorehitpause=1
[State 9500, Flying Screen Helper]
type=Helper
trigger1=Var(12)=1
trigger1=movehit=1&&Numtarget
trigger1=Target,Time<=0&&Target,Movetype=H
trigger1=!NumHelper(9500)
helpertype=normal ;player
name="Flying Screen Effect"
ID=9500
stateno=9500
pos=0,0
postype=p2
ownpal=0
ignorehitpause=1
size.ground.back=0
size.ground.front=0
size.air.back=0
size.air.front=0
[State 650, MvC2 KnockDown]
type=TargetState
triggerall=Var(12)>0&&var(16)>=3;(root,prevstateno=600||root,prevstateno=610||root,prevstateno=630||root,prevstateno=640||root,prevstateno=620)
trigger1=MoveHit&&NumTarget
trigger1=Target,Stateno=5020
trigger1=Target,Time<=0&&target,MoveType=H
value=5021
ignorehitpause=1
[State 650, StateTypeSet]
type = StateTypeSet
trigger1=AnimTime=0
movetype=I
[State 650, VelAdd]
type = VelAdd
trigger1 = time > 0
y = const(movement.yaccel)
[State 650, end]
type=ChangeState
trigger1=AnimTime=0
value=51
ctrl=ifelse(var(11)&&var(12)!=1,1,0)
[State 650, land]
type=ChangeState
trigger1=pos Y >= floor(-vel y) + ifelse(movecontact, 0, 20)
trigger1=vel Y >= 0
value=52
ctrl=0
;-------------------------------------------------------------------------------
;Jumping Up Roundhouse
;-------------------------------------------------------------------------------
[StateDef 660]
type=A
movetype=A
physics=N
juggle=4
ctrl=0
sprpriority=2
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000 && var(11),1,0)
[State 625, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=660&&prevstateno!=9000)
var(1)=0
ignorehitpause=1
[State 625, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1
[State 625, ChangeAnim]
type=ChangeAnim
trigger1=movecontact&&var(1)=8
trigger1=hitpausetime
value=anim
elem=8
ignorehitpause=1
[State 625, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[660,669])
trigger1=Time=0
value=660
[State 625, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S0,2
channel=0
[State 610, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0
value=S3,2
channel=5
[State 625, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=83,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=13,12
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-17*const(size.xscale)), Ceil(-57*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-3.25*const(size.xscale),-7
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
air.fall=var(16)>=2
;envshake.time=12
;envshake.ampl=4
[State 625, 1] ;Forward
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,NA
damage=82,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAF
priority=3,Hit
pausetime=13,12
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-17*const(size.xscale)), Ceil(-57*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=High
ground.slidetime=12
ground.hittime=14
ground.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),0
air.type=High
air.velocity=-3.25*const(size.xscale),-7
air.hittime=15
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=66,58  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
air.fall=var(16)>=2
;envshake.time=12
;envshake.ampl=4
[State 0, VarSet]
type = VarSet
triggerall=var(12)
trigger1=movehit
var(11)=1
ignorehitpause=1
[State 0, VarSet]
type = VarSet
;triggerall=Parent,Var(12)
;trigger1=Parent,prevstateno=600||Parent,prevstateno=610||Parent,prevstateno=630||Parent,prevstateno=640||Parent,prevstateno=620
trigger1=var(16)>=3;Parent,var(11)=1
trigger1=movehit&&var(12)!=1
trigger1=target,statetype=A
var(12)=1
ignorehitpause=1
[State 9500, Flying Screen Helper]
type=Helper
trigger1=Var(12)=1
trigger1=movehit=1&&Numtarget
trigger1=Target,Time<=0&&Target,Movetype=H
trigger1=!NumHelper(9500)
helpertype=normal ;player
name="Flying Screen Effect"
ID=9500
stateno=9500
pos=0,0
postype=p2
ownpal=0
ignorehitpause=1
size.ground.back=0
size.ground.front=0
size.air.back=0
size.air.front=0
[State 650, MvC2 KnockDown]
type=TargetState
triggerall=Var(12)>0&&var(16)>=3;(root,prevstateno=600||root,prevstateno=610||root,prevstateno=630||root,prevstateno=640||root,prevstateno=620)
trigger1=MoveHit&&NumTarget
trigger1=Target,Stateno=5020
trigger1=Target,Time<=0&&target,MoveType=H
value=5021
ignorehitpause=1
[State 625, StateTypeSet]
type = StateTypeSet
trigger1=AnimTime=0
movetype=I
[State 660, VelAdd]
type = VelAdd
trigger1 = time > 0
y = const(movement.yaccel)
[State 660, end]
type=ChangeState
trigger1=AnimTime=0
value=51
ctrl=ifelse(var(11)&&var(12)!=1,1,0)
[State 660, land]
type=ChangeState
trigger1=pos Y >= floor(-vel y) + ifelse(movecontact, 0, 20)
trigger1=vel Y >= 0
value=52
ctrl=0
;---------------------------------------------------------------------------
; Wall Cling
[Statedef 700]
type=A
movetype=I
physics=N
ctrl=0
sprpriority=2
poweradd=0
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 300, VarSet]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=700&&PrevStateNo!=9000)
var(21)=1
[State 300, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[700,709])
trigger1=Time=0&&(prevstateno!=700&&prevstateno!=9000)
value=700
[State 0, Turn]
type = Turn
triggerall=anim=700
trigger1 = frontedgebodydist <= 10;frontedgedist = [-10,5]
[State 0, PosSet]
type = PosSet
trigger1 = anim = 700
x = (-160 + const(size.air.back)) * facing
[State 300, VelSet]
type=VelSet
trigger1=time=0&&anim=700
x=0
y=0
[State 0, Landing Sound]
type = PlaySnd
trigger1 = Time=0&&(PrevStateNo!=700&&PrevStateNo!=9000)
value = s1,20
channel = 3
[State 0, VelSet]
type = VelSet
triggerall = anim = 700
trigger1 = animtime=0
x = const(velocity.jump.fwd.x)
y = const(velocity.jump.y)
[State 700, ChangeAnim]
type = ChangeAnim
trigger1 = animtime = 0 && (anim != [54,56])
value = 55
[State 700, VelAdd]
type = VelAdd
trigger1 = anim != 700
y = const(movement.yaccel)
;[State 0, ChangeState]
;type = ChangeState
;trigger1 = animtime=0
;value = 51
;ctrl = 1
[State 0, CtrlSet]
type = CtrlSet
trigger1 = anim = 700 && animtime=0
trigger2 = anim != 700 && (anim = [54,56])
trigger2 =(PrevStateNo!=700&&PrevStateNo!=9000)
value = 1
[State 0, ChangeState]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= floor(-Vel Y)
value = 52
;-------------------------------------------------------------------------------
;Throw (1 Frame)
;-------------------------------------------------------------------------------
[StateDef 800]
type=U
movetype=A
physics=U
ctrl=0
sprpriority=2
;anim=800
;movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=1
;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
triggerall=Statetype!=A
trigger1=(PrevStateNo=[0,109])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelSet]
type=VelSet
triggerall=Statetype!=A
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
x=0
[State 0, VelSet]
type=VelSet
triggerall=Statetype!=A
trigger1=(PrevStateNo=[0,109])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
;-------------------------------------------------------------------------------
[State 800, 1]
type=HitDef
triggerall=statetype=A
trigger1=!movecontact&&p2statetype=A&&(p2stateno != [120,155])
attr=A,NT
hitflag=A-
priority=4,Miss
sparkno=-1
sparkxy=-10,-80
hitsound=S1,20
pausetime=0,0
p1facing = 1;ifelse(command="holdback",1,-1)
p2facing = 1
p1stateno=ifelse(command="holdback",801,802)
p2stateno=ifelse(command="holdback",810,811)
ground.velocity=-9.1*const(size.xscale),9.1
air.velocity=-9.1*const(size.xscale),9.1
ground.hittime=21
air.hittime=21
ground.slidetime=0
ground.cornerpush.veloff=0
guard.dist=0
getpower=0,0
givepower=0,0
fall=1
fall.recover=0
fall.yvelocity=0
fall.xvelocity=0
yaccel=.8
[State 800, 1]
type=HitDef
triggerall=statetype!=A
trigger1=!movecontact&&p2statetype!=A&&(p2stateno != [120,155])
attr=S,NT
hitflag=M-
priority=4,Miss
sparkno=-1
sparkxy=-10,-80
hitsound=S1,20
pausetime=0,0
p1facing = 1;ifelse(command="holdback",1,-1)
p2facing = 1
p1stateno=ifelse(command="holdback",801,802)
p2stateno=ifelse(command="holdback",810,811)
ground.velocity=0,5.625
air.velocity=0,5.625
ground.hittime=21
air.hittime=21
ground.slidetime=0
ground.cornerpush.veloff=0
guard.dist=0
getpower=0,0
givepower=0,0
fall=1
fall.recover=0
fall.yvelocity=0
fall.xvelocity=0
yaccel=.8
[State 800, end]
type=ChangeState
trigger1=Time=1&&!movecontact
value=ifelse(statetype=A, ifelse(command="z",620,610), ifelse(command="z",220,210))
;-------------------------------------------------------------------------------
;Back Throw
[StateDef 801]
type=U
movetype=A
physics=N
ctrl=0
sprpriority=2
poweradd=41
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 0, PosFreeze]
type=PosFreeze
triggerall=statetype=A
trigger1=Time<10
;[State 0, VelMul]
;type=VelMul
;triggerall=statetype=A
;trigger1=Time=0
;x=.15
;y=.15
[State 0, VelAdd]
type=VelAdd
triggerall=statetype=A
trigger1=Time>=10
y=.5
[State 0, PosSet]
type=PosSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
y=0
[State 0, VelSet]
type=VelSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y > 0
x=0
y=0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y >= 0 && StateType!=S
statetype = S
physics = S
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=800
value = 800
[State 0, TargetState]
type=TargetState
trigger1=Time=0&&Numtarget(800)&&PrevStateNo!=801
value=810
[State 0, NotHitBy]
type=NotHitBy
trigger1=animelemtime(7)<0
value=SCA
ignorehitpause=1
[State 0, PlayerPush]
type=PlayerPush
trigger1=animelemtime(7)<0
value=0
ignorehitpause=1
[State 0, Turn]
type=Turn
trigger1=animelem=9
[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Target,Command="z"
value = ifelse(statetype = A, 167, 165)
[State 801, VarSet] ;Set Throw Damage Multiplier
type=null;VarSet
trigger1=Time=0
fvar(11)=.5
[State 801, TargetLifeAdd]
type=TargetLifeAdd
trigger1=AnimElemTime(7)=0
value=Ceil(-111 * (const(data.attack)/100))
[State 800, PowerAdd]
type=PowerAdd
trigger1=AnimElemTime(7)=0
value=Ceil(88 * (const(data.attack)/100))
[State 800, TargetPowerAdd]
type=TargetPowerAdd
triggerall=Numtarget
trigger1=AnimElemTime(7)=0
value=Ceil(66 * (const(data.attack)/100))
[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(2)<0
pos = Ceil(47*const(size.xscale)),Ceil(-8*const(size.xscale))
[State 801, TargetBind2]
type=TargetBind
trigger1=AnimElemTime(2)>=0&&AnimElemTime(3)<0
pos = Ceil(26*const(size.xscale)),Ceil(-18*const(size.xscale))
[State 801, TargetBind3]
type=TargetBind
trigger1=AnimElemTime(3)>=0&&AnimElemTime(4)<0
pos = Ceil(23*const(size.xscale)),Ceil(-21*const(size.xscale))
[State 801, TargetBind4]
type=TargetBind
trigger1=AnimElemTime(4)>=0&&AnimElemTime(5)<0
pos = Ceil(32*const(size.xscale)),Ceil(-73*const(size.xscale))
[State 801, TargetBind5]
type=TargetBind
trigger1=AnimElemTime(5)>=0&&AnimElemTime(6)<0
pos = Ceil(21*const(size.xscale)),Ceil(-101*const(size.xscale))
[State 801, TargetBind6]
type=TargetBind
trigger1=AnimElemTime(6)>=0&&AnimElemTime(7)<0
pos = Ceil(-40*const(size.xscale)),Ceil(-1*const(size.xscale))
[State 0, PlaySnd]
type=PlaySnd
triggerall=Numtarget
trigger1=AnimElemTime(7)=0&&statetype!=A
value=S6000,3
channel=1
[State 0, EnvShake]
type = EnvShake
triggerall=Numtarget
trigger1=AnimElemTime(7)=0&&statetype!=A
time=12
ampl=-4
[State 0, Explod]
type=Explod
triggerall=Numtarget
trigger1=AnimElemTime(7)=0&&statetype!=A
anim=8004
ID=8004
postype=p2
bindtime=1
removetime=-2
scale=1,1
sprpriority=-1
ownpal=1
[State 0, Width]
type = Width
trigger1 = AnimElemTime(6)>=0&&AnimElemTime(7)<0
edge = 0,40
[State 0, Width]
type = Width
trigger1 = AnimElemTime(2)<0
edge = 47,0
[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem=9
x = Ceil(-16*const(size.xscale))
[State 801, end]
type=ChangeState
trigger1=statetype=A&&AnimElem=9
trigger2=AnimTime=0
value=ifelse(statetype=A,51,0)
ctrl=1
;-------------------------------------------------------------------------------
;Front Throw
[StateDef 802]
type=U
movetype=A
physics=N
ctrl=0
sprpriority=2
poweradd=41
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)
[State 0, SprPriority]
type = SprPriority
trigger1 = animelemtime(2)>=0&&animelemtime(5)<0
value = -1
[State 0, SprPriority]
type = SprPriority
trigger1 = animelemtime(5)=0
value = 2
[State 0, PosFreeze]
type=PosFreeze
triggerall=statetype=A
trigger1=Time<10
;[State 0, VelMul]
;type=VelMul
;triggerall=statetype=A
;trigger1=Time=0
;x=.15
;y=.15
[State 0, VelAdd]
type=VelAdd
triggerall=statetype=A
trigger1=Time>=10
y=.5
[State 0, PosSet]
type=PosSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
y=0
[State 0, VelSet]
type=VelSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y > 0
x=0
y=0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y >= 0 && StateType!=S
statetype = S
physics = S
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=801
value = 801
[State 0, TargetState]
type=TargetState
trigger1=Time=0&&Numtarget(800)&&PrevStateNo!=802
value=811
[State 0, NotHitBy]
type=NotHitBy
trigger1=animelemtime(10)<0
value=SCA
ignorehitpause=1
[State 0, PlayerPush]
type=PlayerPush
trigger1=animelemtime(10)<0
value=0
ignorehitpause=1
[State 0, Turn]
type=Turn
trigger1=animelem=4
trigger2=animelem=12
[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Target,Command="z"
value = ifelse(statetype = A, 167, 165)
[State 801, VarSet] ;Set Throw Damage Multiplier
type=null;VarSet
trigger1=Time=0
fvar(11)=.5
[State 801, TargetLifeAdd]
type=TargetLifeAdd
trigger1=AnimElemTime(10)=0
value=Ceil(-111 * (const(data.attack)/100))
[State 800, PowerAdd]
type=PowerAdd
trigger1=AnimElemTime(10)=0
value=Ceil(88 * (const(data.attack)/100))
[State 800, TargetPowerAdd]
type=TargetPowerAdd
triggerall=Numtarget
trigger1=AnimElemTime(10)=0
value=Ceil(66 * (const(data.attack)/100))
[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(2)<0
pos = Ceil(47*const(size.xscale)),Ceil(-8*const(size.xscale))
[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(2)>=0&&animelemtime(3)<0
pos = Ceil(25*const(size.xscale)),Ceil(-8*const(size.xscale))
[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(3)>=0&&animelemtime(4)<0
pos = Ceil(0*const(size.xscale)),Ceil(-8*const(size.xscale))
[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(4)>=0&&animelemtime(5)<0
pos = Ceil(14*const(size.xscale)),Ceil(-8*const(size.xscale))
[State 801, TargetBind2]
type=TargetBind
trigger1=AnimElemTime(5)>=0&&AnimElemTime(6)<0
pos = Ceil(26*const(size.xscale)),Ceil(-18*const(size.xscale))
[State 801, TargetBind3]
type=TargetBind
trigger1=AnimElemTime(6)>=0&&AnimElemTime(7)<0
pos = Ceil(23*const(size.xscale)),Ceil(-21*const(size.xscale))
[State 801, TargetBind4]
type=TargetBind
trigger1=AnimElemTime(7)>=0&&AnimElemTime(8)<0
pos = Ceil(32*const(size.xscale)),Ceil(-73*const(size.xscale))
[State 801, TargetBind5]
type=TargetBind
trigger1=AnimElemTime(8)>=0&&AnimElemTime(9)<0
pos = Ceil(21*const(size.xscale)),Ceil(-101*const(size.xscale))
[State 801, TargetBind6]
type=TargetBind
trigger1=AnimElemTime(9)>=0&&AnimElemTime(10)<0
pos = Ceil(-40*const(size.xscale)),Ceil(-1*const(size.xscale))
[State 0, PlaySnd]
type=PlaySnd
triggerall=Numtarget
trigger1=AnimElemTime(10)=0&&statetype!=A
value=S6000,3
channel=1
[State 0, EnvShake]
type = EnvShake
triggerall=Numtarget
trigger1=AnimElemTime(10)=0&&statetype!=A
time=12
ampl=-4
[State 0, Explod]
type=Explod
triggerall=Numtarget
trigger1=AnimElemTime(10)=0&&statetype!=A
anim=8004
ID=8004
postype=p2
bindtime=1
removetime=-2
scale=1,1
sprpriority=-1
ownpal=1
[State 0, Width]
type = Width
trigger1 = AnimElemTime(9)>=0&&AnimElemTime(10)<0
edge = 0,40
[State 0, Width]
type = Width
trigger1 = AnimElemTime(5)<0
edge = 47,0
[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem=9
x = Ceil(-16*const(size.xscale))
[State 801, end]
type=ChangeState
trigger1=statetype=A&&AnimElem=12
trigger2=AnimTime=0
value=ifelse(statetype=A,51,0)
ctrl=1
;-------------------------------------------------------------------------------
;Throw (1 Frame)
;-------------------------------------------------------------------------------
[StateDef 805]
type=U
movetype=A
physics=U
ctrl=0
sprpriority=2
;anim=800
;movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=1
;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
triggerall=Statetype!=A
trigger1=(PrevStateNo=[0,109])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
[State 0, VelSet]
type=VelSet
triggerall=Statetype!=A
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
x=0
[State 0, VelSet]
type=VelSet
triggerall=Statetype!=A
trigger1=(PrevStateNo=[0,109])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
;-------------------------------------------------------------------------------
[State 800, 1]
type=HitDef
triggerall=statetype=A
trigger1=!movecontact&&p2statetype=A&&(p2stateno != [120,155])
attr=A,NT
hitflag=AF;-
priority=4,Miss
sparkno=-1
sparkxy=-10,-80
hitsound=S1,20
pausetime=0,0
p1facing = 1;ifelse(command="holdback",1,-1)
p2facing = 1
p1stateno=ifelse(command="holdback",806,807)
p2stateno=ifelse(command="holdback",820,821) + ifelse(var(15), 5, 0)
ground.velocity=-9.1*const(size.xscale),-9.1
air.velocity=-9.1*const(size.xscale),-9.1
ground.hittime=21
air.hittime=21
ground.slidetime=0
ground.cornerpush.veloff=0
guard.dist=0
getpower=0,0
givepower=0,0
;fall=1
fall.recover=0
fall.yvelocity=0
fall.xvelocity=0
yaccel=.8

[State 800, 1]
type=HitDef
triggerall=statetype!=A
trigger1=!movecontact&&p2statetype!=A&&(p2stateno != [120,155])
attr=S,NT
hitflag=MAF;-
priority=4,Miss
sparkno=-1
sparkxy=-10,-80
hitsound=S1,20
pausetime=0,0
p1facing = 1;ifelse(command="holdback",1,-1)
p2facing = 1
p1stateno=ifelse(command="holdback",806,807)
p2stateno=ifelse(command="holdback",820,821) + ifelse(var(15), 5, 0)
ground.velocity=-9.1*const(size.xscale),-9.1
air.velocity=-9.1*const(size.xscale),-9.1
ground.hittime=21
air.hittime=21
ground.slidetime=0
ground.cornerpush.veloff=0
guard.dist=0
getpower=0,0
givepower=0,0
;fall=1
fall.recover=0
fall.yvelocity=0
fall.xvelocity=0
yaccel=.8

[State 800, end]
type=ChangeState
trigger1=Time=1&&!movecontact
value=ifelse(statetype=A, ifelse(command="c",650,640), ifelse(command="c",250,240))

;-------------------------------------------------------------------------------
;Wall Bounce Back Throw
[StateDef 806]
type=U
movetype=A
physics=N
ctrl=0
sprpriority=2
poweradd=41
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, PosFreeze]
type=PosFreeze
triggerall=statetype=A
trigger1=Time<10

;[State 0, VelMul]
;type=VelMul
;triggerall=statetype=A
;trigger1=Time=0
;x=.15
;y=.15

[State 0, VelAdd]
type=VelAdd
triggerall=statetype=A
trigger1=Time>=10
y=.5

[State 0, PosSet]
type=PosSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
y=0

[State 0, VelSet]
type=VelSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y > 0
x=0
y=0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y >= 0 && StateType!=S
statetype = S
physics = S

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=800
value = 800

[State 0, TargetState]
type=TargetState
trigger1=Time=0&&Numtarget(800)&&PrevStateNo!=806
value=820

[State 0, NotHitBy]
type=NotHitBy
trigger1=animelemtime(7)<0
value=SCA
ignorehitpause=1

[State 0, PlayerPush]
type=PlayerPush
trigger1=animelemtime(7)<0
value=0
ignorehitpause=1

[State 0, Turn]
type=Turn
trigger1=animelem=9

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Target,Command="z"
value = ifelse(statetype = A, 167, 165)

[State 801, VarSet] ;Set Throw Damage Multiplier
type=null;VarSet
trigger1=Time=0
fvar(11)=.5

[State 801, TargetLifeAdd]
type=TargetLifeAdd
trigger1=AnimElemTime(5)=0
value=Ceil(-111 * (const(data.attack)/100))

[State 800, PowerAdd]
type=PowerAdd
trigger1=AnimElemTime(5)=0
value=Ceil(88 * (const(data.attack)/100))

[State 800, TargetPowerAdd]
type=TargetPowerAdd
triggerall=Numtarget
trigger1=AnimElemTime(5)=0
value=Ceil(66 * (const(data.attack)/100))

[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(2)<0
pos = Ceil(47*const(size.xscale)),Ceil(-8*const(size.xscale))

[State 801, TargetBind2]
type=TargetBind
trigger1=AnimElemTime(2)>=0&&AnimElemTime(3)<0
pos = Ceil(26*const(size.xscale)),Ceil(-18*const(size.xscale))

[State 801, TargetBind3]
type=TargetBind
trigger1=AnimElemTime(3)>=0&&AnimElemTime(4)<0
pos = Ceil(23*const(size.xscale)),Ceil(-21*const(size.xscale))

[State 801, TargetBind4]
type=TargetBind
trigger1=AnimElemTime(4)>=0&&AnimElemTime(5)<0
pos = Ceil(32*const(size.xscale)),Ceil(-73*const(size.xscale))

[State 801, TargetBind5]
type=TargetBind
trigger1=AnimElemTime(5)>=0&&AnimElemTime(6)<0
pos = Ceil(21*const(size.xscale)),Ceil(-101*const(size.xscale))

;[State 801, TargetBind6]
;type=TargetBind
;trigger1=AnimElemTime(6)>=0&&AnimElemTime(7)<0
;pos = Ceil(-40*const(size.xscale)),Ceil(-1*const(size.xscale))

;[State 0, PlaySnd]
;type=PlaySnd
;triggerall=Numtarget
;trigger1=AnimElemTime(7)=0&&statetype!=A
;value=S6000,3
;channel=3

;[State 0, EnvShake]
;type = EnvShake
;triggerall=Numtarget
;trigger1=AnimElemTime(7)=0&&statetype!=A
;time=12
;ampl=-4

;[State 0, Explod]
;type=Explod
;triggerall=Numtarget
;trigger1=AnimElemTime(7)=0&&statetype!=A
;anim=8004
;ID=8004
;postype=p2
;bindtime=1
;removetime=-2
;scale=1,1
;sprpriority=-1
;ownpal=1

[State 0, Width]
type = Width
trigger1 = AnimElemTime(6)>=0&&AnimElemTime(7)<0
edge = 0,40

[State 0, Width]
type = Width
trigger1 = AnimElemTime(2)<0
edge = 47,0

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem=9
x = Ceil(-16*const(size.xscale))

[State 801, end]
type=ChangeState
trigger1=statetype=A&&AnimElem=9
trigger2=AnimTime=0
value=ifelse(statetype=A,51,0)
ctrl=1

;-------------------------------------------------------------------------------
;Wall Bounce Front Throw
[StateDef 807]
type=U
movetype=A
physics=N
ctrl=0
sprpriority=2
poweradd=41
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, SprPriority]
type = SprPriority
trigger1 = animelemtime(2)>=0&&animelemtime(5)<0
value = -1

[State 0, SprPriority]
type = SprPriority
trigger1 = animelemtime(5)=0
value = 2

[State 0, PosFreeze]
type=PosFreeze
triggerall=statetype=A
trigger1=Time<10

;[State 0, VelMul]
;type=VelMul
;triggerall=statetype=A
;trigger1=Time=0
;x=.15
;y=.15

[State 0, VelAdd]
type=VelAdd
triggerall=statetype=A
trigger1=Time>=10
y=.5

[State 0, PosSet]
type=PosSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
y=0

[State 0, VelSet]
type=VelSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y > 0
x=0
y=0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y >= 0 && StateType!=S
statetype = S
physics = S

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=801
value = 801

[State 0, TargetState]
type=TargetState
trigger1=Time=0&&Numtarget(800)&&PrevStateNo!=807
value=821

[State 0, NotHitBy]
type=NotHitBy
trigger1=animelemtime(10)<0
value=SCA
ignorehitpause=1

[State 0, PlayerPush]
type=PlayerPush
trigger1=animelemtime(10)<0
value=0
ignorehitpause=1

[State 0, Turn]
type=Turn
trigger1=animelem=4
trigger2=animelem=12

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Target,Command="z"
value = ifelse(statetype = A, 167, 165)

[State 801, VarSet] ;Set Throw Damage Multiplier
type=null;VarSet
trigger1=Time=0
fvar(11)=.5

[State 801, TargetLifeAdd]
type=TargetLifeAdd
trigger1=AnimElemTime(8)=0
value=Ceil(-111 * (const(data.attack)/100))

[State 800, PowerAdd]
type=PowerAdd
trigger1=AnimElemTime(8)=0
value=Ceil(88 * (const(data.attack)/100))

[State 800, TargetPowerAdd]
type=TargetPowerAdd
triggerall=Numtarget
trigger1=AnimElemTime(8)=0
value=Ceil(66 * (const(data.attack)/100))

[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(2)<0
pos = Ceil(47*const(size.xscale)),Ceil(-8*const(size.xscale))

[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(2)>=0&&animelemtime(3)<0
pos = Ceil(25*const(size.xscale)),Ceil(-8*const(size.xscale))

[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(3)>=0&&animelemtime(4)<0
pos = Ceil(0*const(size.xscale)),Ceil(-8*const(size.xscale))

[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(4)>=0&&animelemtime(5)<0
pos = Ceil(14*const(size.xscale)),Ceil(-8*const(size.xscale))

[State 801, TargetBind2]
type=TargetBind
trigger1=AnimElemTime(5)>=0&&AnimElemTime(6)<0
pos = Ceil(26*const(size.xscale)),Ceil(-18*const(size.xscale))

[State 801, TargetBind3]
type=TargetBind
trigger1=AnimElemTime(6)>=0&&AnimElemTime(7)<0
pos = Ceil(23*const(size.xscale)),Ceil(-21*const(size.xscale))

[State 801, TargetBind4]
type=TargetBind
trigger1=AnimElemTime(7)>=0&&AnimElemTime(8)<0
pos = Ceil(32*const(size.xscale)),Ceil(-73*const(size.xscale))

[State 801, TargetBind5]
type=TargetBind
trigger1=AnimElemTime(8)>=0&&AnimElemTime(9)<0
pos = Ceil(21*const(size.xscale)),Ceil(-101*const(size.xscale))

;[State 801, TargetBind6]
;type=TargetBind
;trigger1=AnimElemTime(9)>=0&&AnimElemTime(10)<0
;pos = Ceil(-40*const(size.xscale)),Ceil(-1*const(size.xscale))

;[State 0, PlaySnd]
;type=PlaySnd
;triggerall=Numtarget
;trigger1=AnimElemTime(10)=0&&statetype!=A
;value=S6000,3
;channel=3

;[State 0, EnvShake]
;type = EnvShake
;triggerall=Numtarget
;trigger1=AnimElemTime(10)=0&&statetype!=A
;time=12
;ampl=-4

;[State 0, Explod]
;type=Explod
;triggerall=Numtarget
;trigger1=AnimElemTime(10)=0&&statetype!=A
;anim=8004
;ID=8004
;postype=p2
;bindtime=1
;removetime=-2
;scale=1,1
;sprpriority=-1
;ownpal=1

[State 0, Width]
type = Width
trigger1 = AnimElemTime(9)>=0&&AnimElemTime(10)<0
edge = 0,40

[State 0, Width]
type = Width
trigger1 = AnimElemTime(5)<0
edge = 47,0

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem=9
x = Ceil(-16*const(size.xscale))

[State 801, end]
type=ChangeState
trigger1=statetype=A&&AnimElem=12
trigger2=AnimTime=0
value=ifelse(statetype=A,51,0)
ctrl=1

;-------------------------------------------------------------------------------
;Back Throw
[StateDef 810]
type = A
movetype=H
physics=N
ctrl = 0
facep2=1

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

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

[State 0, Turn]
type = Turn
trigger1 = AnimTime=0

[State 0, VelSet]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(enemynear,pos Y=0, 0, -5.625 * const(size.xscale))
y = 9.1

[State 810, end]
type = SelfState
trigger1 = AnimTime = 0 && pos Y >= -10
value = 5100

[State 810, end]
type = SelfState
trigger1 = AnimTime = 0 && pos Y < -10
value = 5050

[State 0, PosSet]
type = PosSet
triggerall=Time = [1,10]
trigger1=Command="z"
x = ((Enemynear, Pos X)-(const(size.ground.front)*2)*facing)
y = enemy,pos Y

[State 0, HitFallSet]
type = HitFallSet
triggerall=Time = [1,10]
trigger1=Command="z"
value = 0

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Command="z"
value = ifelse(enemynear,pos Y >= 0, 895, 896)
ctrl=0

[State 0, SelfState]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5040

;-------------------------------------------------------------------------------
;Front Throw
[StateDef 811]
type = U
movetype=H
physics=N
ctrl = 0
facep2=1

[State 810, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 811

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

[State 0, Turn]
type = Turn
trigger1 = AnimTime=0
trigger2 = animelem=4

[State 0, VelSet]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(enemynear,pos Y=0, 0, -5.625 * const(size.xscale))
y = 9.1

[State 810, end]
type = SelfState
trigger1 = AnimTime = 0 && pos Y >= -10
value = 5100

[State 810, end]
type = SelfState
trigger1 = AnimTime = 0 && pos Y < -10
value = 5050

[State 0, PosSet]
type = PosSet
triggerall=Time = [1,10]
trigger1=Command="z"
x = ((Enemynear, Pos X)-(const(size.ground.front)*2)*facing)
y = enemy,pos Y

[State 0, HitFallSet]
type = HitFallSet
triggerall=Time = [1,10]
trigger1=Command="z"
value = 0

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Command="z"
value = ifelse(enemynear,pos Y >= 0, 895, 896)
ctrl=0

[State 0, SelfState]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5040

;-------------------------------------------
;Wall Bounce Back Thrown
[Statedef 820]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority = 0

[State 0, PosSet]
type = PosSet
triggerall=Time = [1,10]
trigger1=Command="z"
x = ((Enemynear, Pos X)-(const(size.ground.front)*2)*facing)
y = enemynear,pos Y

[State 0, HitFallSet]
type = HitFallSet
triggerall=Time = [1,10]
trigger1=Command="z"
value = 0

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Command="z"
value = ifelse(enemynear,pos Y >= 0, 895, 896)
ctrl=0

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

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time < 29
value = SCA

[State 0, Turn]
type = Turn
trigger1 = time = 29

[State 925, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 820

[State 5050, 1]
type = ChangeAnim
trigger1 = selfanimexist(5050)
trigger1 = time = 29
value = 5050

[State 5050, 1]
type = ChangeAnim2
trigger1 = !selfanimexist(5050)
trigger1 = time = 29
value = 820
elem = 6

[State 0, VelSet]
type = VelSet
trigger1 = Time = 29
x = -15
y = -15

[State 0, VelAdd]
type = VelAdd
trigger1 = time > 30
y = .8

[State 0, PosAdd]
type = PosAdd
;triggerall = Vel Y >= 0
trigger1 = Time = 29
x = Ceil(-40*const(size.xscale))
;y = -const(size.mid.pos.y)

[State 0, PosAdd]
type = PosSet
;triggerall = Vel Y >= 0
trigger1 = Time = 29
y = 0 + (enemynear,pos Y)

[State 0, ChangeState]
type = ChangeState
trigger1 = backedgebodydist <= 15
trigger1 = time >= 29
trigger1 = pos Y <= -60
value = 6504;822

[State 0, SelfState]
type = SelfState
triggerall = backedgebodydist > 15
trigger1 = Vel Y >= 0
trigger1 = Time >= 29;Pos Y >= (const(size.mid.pos.y)/2)
value = 5040

;-------------------------------------------
;Wall Bounce Front Thrown
[Statedef 821]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority = 0

[State 0, PosSet]
type = PosSet
triggerall=Time = [1,10]
trigger1=Command="z"
x = ((Enemynear, Pos X)-(const(size.ground.front)*2)*facing)
y = enemynear,pos Y

[State 0, HitFallSet]
type = HitFallSet
triggerall=Time = [1,10]
trigger1=Command="z"
value = 0

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Command="z"
value = ifelse(enemynear,pos Y >= 0, 895, 896)
ctrl=0

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

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time < 29
value = SCA

[State 0, Turn]
type=Turn
trigger1=animelem=4
trigger2=time=29

[State 925, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 821

[State 5050, 1]
type = ChangeAnim
trigger1 = selfanimexist(5050)
trigger1 = time = 29
value = 5050

[State 5050, 1]
type = ChangeAnim2
trigger1 = !selfanimexist(5050)
trigger1 = time = 29
value = 821
elem = 9

[State 0, VelSet]
type = VelSet
trigger1 = Time = 29
x = -15
y = -15

[State 0, VelAdd]
type = VelAdd
trigger1 = time > 29
y = .8

[State 0, PosAdd]
type = PosAdd
;triggerall = Vel Y >= 0
trigger1 = Time = 29
x = Ceil(-40*const(size.xscale))

[State 0, PosAdd]
type = PosSet
;triggerall = Vel Y >= 0
trigger1 = Time = 29
y = 0 + (enemynear,pos Y)

[State 0, ChangeState]
type = ChangeState
trigger1 = backedgebodydist <= 15
trigger1 = time >= 29
trigger1 = pos Y <= -60
value = 6504;822

[State 0, SelfState]
type = SelfState
triggerall = backedgebodydist > 15
trigger1 = Vel Y >= 0
trigger1 = Time >= 29;Pos Y >= (const(size.mid.pos.y)/2)
value = 5040

;-------------------------------------------
;Wall Bounce Hit Wall
[Statedef 822]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority = 0

[State 0, NotHitBy]
type = null;NotHitBy
trigger1 = 1
value = SCA

[State 0, Turn]
type = Turn
trigger1 = Time = 7

[State 925, 1]
type = ChangeAnim2
trigger1 = time = 0
value = ifelse(selfanimexist(5010), 5010, 822)

[State 0, VelSet]
type = VelSet
trigger1 = time = 7
x = -3.25
y = -9

[State 0, Explod]
type = Explod
trigger1 = !time
anim = F72
pos = 0,floor(ScreenPos Y)-50
postype = Back
sprpriority = 3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = F7,2
channel = 4
freqmul = 1.0

[State 0, EnvShake]
type = EnvShake
trigger1 = !time
time = 15
ampl = -5

[State 0, SelfState]
type = SelfState
trigger1 = time = 7
value = 5050

;-------------------------------------------
;Wall Bounce Back Thrown
[Statedef 825]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority = 0

[State 0, PosSet]
type = PosSet
triggerall=Time = [1,10]
trigger1=Command="z"
x = ((Enemynear, Pos X)-(const(size.ground.front)*2)*facing)
y = enemy,pos Y

[State 0, HitFallSet]
type = HitFallSet
triggerall=Time = [1,10]
trigger1=Command="z"
value = 0

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Command="z"
value = ifelse(enemynear,pos Y >= 0, 895, 896)
ctrl=0

[State 925, 1]
type = screenbound
trigger1 = anim=820
trigger1 = time < 29
value = 0
movecamera = 0,0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time < 29
value = SCA

[State 0, Turn]
type = Turn
trigger1 = time = 29

[State 925, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 820

[State 5050, 1]
type = ChangeAnim
trigger1 = selfanimexist(5050)
trigger1 = time = 29
value = 5050

[State 5050, 1]
type = ChangeAnim2
trigger1 = !selfanimexist(5050)
trigger1 = time = 29
value = 820
elem = 6

[State 0, VelSet]
type = VelSet
trigger1 = Time = 29
x = -15
y = -15

[State 0, VelAdd]
type = VelAdd
trigger1 = time > 30
y = .8

[State 0, PosAdd]
type = PosAdd
;triggerall = Vel Y >= 0
trigger1 = Time = 29
x = Ceil(-40*const(size.xscale))
;y = -const(size.mid.pos.y)

[State 0, PosAdd]
type = PosSet
;triggerall = Vel Y >= 0
trigger1 = Time = 29
y = 0 + (enemynear,pos Y)

[State 0, SelfState]
type = SelfState
;triggerall = backedgebodydist > 15
trigger1 = Vel Y >= 0
trigger1 = Time >= 29;Pos Y >= (const(size.mid.pos.y)/2)
value = 5040

;-------------------------------------------
;Wall Bounce Front Thrown
[Statedef 826]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority = 0

[State 0, PosSet]
type = PosSet
triggerall=Time = [1,10]
trigger1=Command="z"
x = ((Enemynear, Pos X)-(const(size.ground.front)*2)*facing)
y = enemy,pos Y

[State 0, HitFallSet]
type = HitFallSet
triggerall=Time = [1,10]
trigger1=Command="z"
value = 0

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Command="z"
value = ifelse(enemynear,pos Y >= 0, 895, 896)
ctrl=0

[State 925, 1]
type = screenbound
trigger1 = anim=821
trigger1 = time < 29
value = 0
movecamera = 0,0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time < 29
value = SCA

[State 0, Turn]
type=Turn
trigger1=animelem=4
trigger2=time=29

[State 925, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 821

[State 5050, 1]
type = ChangeAnim
trigger1 = selfanimexist(5050)
trigger1 = time = 29
value = 5050

[State 5050, 1]
type = ChangeAnim2
trigger1 = !selfanimexist(5050)
trigger1 = time = 29
value = 821
elem = 9

[State 0, VelSet]
type = VelSet
trigger1 = Time = 29
x = -15
y = -15

[State 0, VelAdd]
type = VelAdd
trigger1 = time > 29
y = .8

[State 0, PosAdd]
type = PosAdd
;triggerall = Vel Y >= 0
trigger1 = Time = 29
x = Ceil(-40*const(size.xscale))

[State 0, PosAdd]
type = PosSet
;triggerall = Vel Y >= 0
trigger1 = Time = 29
y = 0 + (enemynear,pos Y)

[State 0, SelfState]
type = SelfState
;triggerall = backedgebodydist > 15
trigger1 = Vel Y >= 0
trigger1 = Time >= 29;Pos Y >= (const(size.mid.pos.y)/2)
value = 5040

;-------------------------------------------------------------------------------
;Ground Bounce Back Throw
[StateDef 830]
type = U
movetype=H
physics=N
ctrl = 0
facep2=1

[State 810, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 830

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

[State 0, PosSet]
type = PosSet
triggerall=Time = [1,10]
trigger1=Command="z"
x = ((Enemynear, Pos X)-(const(size.ground.front)*2)*facing)
y = enemy,pos Y

[State 0, HitFallSet]
type = HitFallSet
triggerall=Time = [1,10]
trigger1=Command="z"
value = 0

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Command="z"
value = ifelse(enemynear,pos Y >= 0, 895, 896)
ctrl=0

[State 0, SelfState]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5040

;-------------------------------------------------------------------------------
;Front Throw
[StateDef 831]
type = U
movetype=H
physics=N
ctrl = 0
facep2=1

[State 810, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 831

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

[State 0, Turn]
type = Turn
trigger1 = animelem=4

[State 0, PosSet]
type = PosSet
triggerall=Time = [1,10]
trigger1=Command="z"
x = ((Enemynear, Pos X)-(const(size.ground.front)*2)*facing)
y = enemy,pos Y

[State 0, HitFallSet]
type = HitFallSet
triggerall=Time = [1,10]
trigger1=Command="z"
value = 0

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Command="z"
value = ifelse(enemynear,pos Y >= 0, 895, 896)
ctrl=0

[State 0, SelfState]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5040

;-------------------------------------------
;Ground Bounce Hit Ground
[Statedef 832]
type = L
movetype = H
physics = N
velset = 0,0
sprpriority = 0

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

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

[State 0, Turn]
type = Turn
trigger1 = Time = 0

[State 925, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 832

[State 0, PosSet]
type = PosSet
trigger1 = time = 5
y = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 5
value = 5105

;-------------------------------------------------------------------------------
;Throw (1 Frame)
;-------------------------------------------------------------------------------
[StateDef 850]
type=U
movetype=A
physics=U
ctrl=0
sprpriority=2
;anim=800
;movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
triggerall=Statetype!=A
trigger1=(PrevStateNo=[0,109])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0

[State 0, VelSet]
type=VelSet
triggerall=Statetype!=A
trigger1=(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
x=0

[State 0, VelSet]
type=VelSet
triggerall=Statetype!=A
trigger1=(PrevStateNo=[0,109])||(PrevStateNo=[0,9])||(PrevStateNo=[20,99])
trigger1=Time=0
y=0
;-------------------------------------------------------------------------------

[State 800, 1]
type=HitDef
triggerall=statetype=A
trigger1=!movecontact&&p2statetype=A&&(p2stateno != [120,155])
attr=A,NT
id=800
hitflag=AF;-
priority=4,Miss
sparkno=-1
sparkxy=-10,-80
hitsound=S1,20
pausetime=0,0
p1facing = 1;ifelse(command="holdback",1,-1)
p2facing = 1
p1stateno=ifelse(command="holdback",851,852)
p2stateno=ifelse(command="holdback",830,831)
ground.velocity=0,-9
air.velocity=0,-9
ground.hittime=21
air.hittime=21
ground.slidetime=0
ground.cornerpush.veloff=0
guard.dist=0
getpower=0,0
givepower=0,0
;fall=1
fall.recover=0
fall.yvelocity=ifelse(!var(14), -15, 0)
fall.xvelocity=0
yaccel=.8

[State 800, 1]
type=HitDef
triggerall=statetype!=A
trigger1=!movecontact&&p2statetype!=A&&(p2stateno != [120,155])
attr=S,NT
id=800
hitflag=M-
priority=4,Miss
sparkno=-1
sparkxy=-10,-80
hitsound=S1,20
pausetime=0,0
p1facing = 1;ifelse(command="holdback",1,-1)
p2facing = 1
p1stateno=ifelse(command="holdback",851,852)
p2stateno=ifelse(command="holdback",830,831)
ground.velocity=0,-9
air.velocity=0,-9
ground.hittime=21
air.hittime=21
ground.slidetime=0
ground.cornerpush.veloff=0
guard.dist=0
getpower=0,0
givepower=0,0
;fall=1
fall.recover=0
fall.yvelocity=ifelse(!var(14), -15, 0)
fall.xvelocity=0
yaccel=.8

[State 800, end]
type=ChangeState
trigger1=Time=1&&!movecontact
value=ifelse(statetype=A, ifelse(command="c",650,640), ifelse(command="c",250,240))

;-------------------------------------------------------------------------------
;Ground Bounce Back Throw
[StateDef 851]
type=A
movetype=A
physics=N
ctrl=0
sprpriority=2
poweradd=41
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, PosFreeze]
type=PosFreeze
triggerall=statetype=A
trigger1=Time<10

;[State 0, VelMul]
;type=VelMul
;triggerall=statetype=A
;trigger1=Time=0
;x=.15
;y=.15

[State 0, VelAdd]
type=VelAdd
triggerall=statetype=A
trigger1=Time>=10
y=.5

[State 0, PosSet]
type=PosSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
y=0

[State 0, VelSet]
type=VelSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y > 0
x=0
y=0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y >= 0 && StateType!=S
statetype = S
physics = S

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=805
value = 805

[State 0, TargetState]
type=TargetState
trigger1=Time=0&&Numtarget(800)&&PrevStateNo!=851
value=830

[State 0, NotHitBy]
type=NotHitBy
trigger1=1
value=SCA
ignorehitpause=1

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

[State 0, Turn]
type=Turn
trigger1=animelem=9

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Target,Command="z"
value = ifelse(statetype = A, 167, 165)

[State 801, VarSet] ;Set Throw Damage Multiplier
type=null;VarSet
trigger1=Time=0
fvar(11)=.5

[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(2)<0
pos = Ceil(47*const(size.xscale)),Ceil(-8*const(size.xscale))

[State 801, TargetBind2]
type=TargetBind
trigger1=AnimElemTime(2)>=0&&AnimElemTime(3)<0
pos = Ceil(26*const(size.xscale)),Ceil(-18*const(size.xscale))

[State 801, TargetBind3]
type=TargetBind
trigger1=AnimElemTime(3)>=0&&AnimElemTime(4)<0
pos = Ceil(23*const(size.xscale)),Ceil(-21*const(size.xscale))

[State 801, TargetBind4]
type=TargetBind
trigger1=AnimElemTime(4)>=0&&AnimElemTime(5)<0
pos = Ceil(32*const(size.xscale)),Ceil(-73*const(size.xscale))

[State 801, TargetBind5]
type=TargetBind
trigger1=AnimElemTime(5)>=0&&AnimElemTime(6)<0
pos = Ceil(21*const(size.xscale)),Ceil(-101*const(size.xscale))

[State 801, TargetBind6]
type=TargetBind
trigger1=AnimElemTime(6)>=0
pos = Ceil(-8*const(size.xscale)),Ceil(-12*const(size.xscale))

[State 0, Width]
type = Width
trigger1 = AnimElemTime(6)>=0;&&AnimElemTime(7)<0
edge = 0,40

[State 0, Width]
type = Width
trigger1 = AnimElemTime(2)<0
edge = 47,0

;[State 801, end]
;type=ChangeState
;trigger1=statetype=A&&AnimElem=9
;trigger2=AnimTime=0
;value=ifelse(statetype=A,51,0)
;ctrl=1

[State 801, end]
type=ChangeState
triggerall=animelemtime(6)>=0
trigger1=pos Y >= floor(-vel Y)
trigger1=Vel Y >= 0
value=853

;-------------------------------------------------------------------------------
;Ground Bounce Front Throw
[StateDef 852]
type=A
movetype=A
physics=N
ctrl=0
sprpriority=2
poweradd=41
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, SprPriority]
type = SprPriority
trigger1 = animelemtime(2)>=0&&animelemtime(5)<0
value = -1

[State 0, SprPriority]
type = SprPriority
trigger1 = animelemtime(5)=0
value = 2

[State 0, PosFreeze]
type=PosFreeze
triggerall=statetype=A
trigger1=Time<10

;[State 0, VelMul]
;type=VelMul
;triggerall=statetype=A
;trigger1=Time=0
;x=.15
;y=.15

[State 0, VelAdd]
type=VelAdd
triggerall=statetype=A
trigger1=Time>=10
y=.5

[State 0, PosSet]
type=PosSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
y=0

[State 0, VelSet]
type=VelSet
triggerall=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y > 0
x=0
y=0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y >= 0 && StateType!=S
statetype = S
physics = S

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=806
value = 806

[State 0, TargetState]
type=TargetState
trigger1=Time=0&&Numtarget(800)&&PrevStateNo!=852
value=831

[State 0, NotHitBy]
type=NotHitBy
trigger1=1
value=SCA
ignorehitpause=1

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

[State 0, Turn]
type=Turn
trigger1=animelem=4
;trigger2=animelem=12

[State 0, ChangeState]
type = ChangeState
triggerall=Time = [1,10]
trigger1=Target,Command="z"
value = ifelse(statetype = A, 167, 165)

[State 801, VarSet] ;Set Throw Damage Multiplier
type=null;VarSet
trigger1=Time=0
fvar(11)=.5

[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(2)<0
pos = Ceil(47*const(size.xscale)),Ceil(-8*const(size.xscale))

[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(2)>=0&&animelemtime(3)<0
pos = Ceil(25*const(size.xscale)),Ceil(-8*const(size.xscale))

[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(3)>=0&&animelemtime(4)<0
pos = Ceil(0*const(size.xscale)),Ceil(-8*const(size.xscale))

[State 801, TargetBind1]
type=TargetBind
trigger1=AnimElemTime(4)>=0&&animelemtime(5)<0
pos = Ceil(14*const(size.xscale)),Ceil(-8*const(size.xscale))

[State 801, TargetBind2]
type=TargetBind
trigger1=AnimElemTime(5)>=0&&AnimElemTime(6)<0
pos = Ceil(26*const(size.xscale)),Ceil(-18*const(size.xscale))

[State 801, TargetBind3]
type=TargetBind
trigger1=AnimElemTime(6)>=0&&AnimElemTime(7)<0
pos = Ceil(23*const(size.xscale)),Ceil(-21*const(size.xscale))

[State 801, TargetBind4]
type=TargetBind
trigger1=AnimElemTime(7)>=0&&AnimElemTime(8)<0
pos = Ceil(32*const(size.xscale)),Ceil(-73*const(size.xscale))

[State 801, TargetBind5]
type=TargetBind
trigger1=AnimElemTime(8)>=0&&AnimElemTime(9)<0
pos = Ceil(21*const(size.xscale)),Ceil(-101*const(size.xscale))

[State 801, TargetBind6]
type=TargetBind
trigger1=AnimElemTime(9)>=0
pos = Ceil(-8*const(size.xscale)),Ceil(-12*const(size.xscale))

[State 0, Width]
type = Width
trigger1 = AnimElemTime(9)>=0;&&AnimElemTime(10)<0
edge = 0,40

[State 0, Width]
type = Width
trigger1 = AnimElemTime(5)<0
edge = 47,0

;[State 801, end]
;type=ChangeState
;trigger1=statetype=A&&AnimElem=12
;trigger2=AnimTime=0
;value=ifelse(statetype=A,51,0)
;ctrl=1

[State 801, end]
type=ChangeState
triggerall=animelemtime(9)>=0
trigger1=pos Y >= floor(-vel Y)
trigger1=Vel Y >= 0
value=853

;-------------------------------------------------------------------------------
;Ground Bounce Throw
[StateDef 853]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
poweradd=0
velset = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=807
value = 807

[State 0, TargetState]
type=TargetState
trigger1=Time=0&&Numtarget(800)&&PrevStateNo!=853
value=832

[State 0, NotHitBy]
type=NotHitBy
trigger1=animelemtime(2)<0
value=SCA
ignorehitpause=1

[State 0, PlayerPush]
type=PlayerPush
trigger1=animelemtime(2)<0
value=0
ignorehitpause=1

[State 0, Turn]
type=Turn
trigger1=animelem=4

[State 801, VarSet] ;Set Throw Damage Multiplier
type=null;VarSet
trigger1=Time=0
fvar(11)=.5

[State 801, TargetLifeAdd]
type=TargetLifeAdd
trigger1=AnimElemTime(1)=0
value=Ceil(-111 * (const(data.attack)/100))

[State 800, PowerAdd]
type=PowerAdd
trigger1=AnimElemTime(1)=0
value=Ceil(88 * (const(data.attack)/100))

[State 800, TargetPowerAdd]
type=TargetPowerAdd
triggerall=Numtarget
trigger1=AnimElemTime(1)=0
value=Ceil(66 * (const(data.attack)/100))

[State 801, TargetBind6]
type=TargetBind
trigger1=AnimElemTime(1)>=0&&AnimElemTime(2)<0
pos = Ceil(-8*const(size.xscale)),Ceil(target,const(size.head.pos.y))

[State 0, PlaySnd]
type=PlaySnd
triggerall=Numtarget
trigger1=AnimElemTime(1)=0&&statetype!=A
value=S6000,3
channel=3

[State 0, EnvShake]
type = EnvShake
triggerall=Numtarget
trigger1=AnimElemTime(1)=0&&statetype!=A
time=12
ampl=-4

[State 0, Explod]
type=Explod
triggerall=Numtarget
trigger1=AnimElemTime(1)=0&&statetype!=A
anim=8004
ID=8004
postype=p2
pos = 0,-Ceil(target,const(size.head.pos.y))
bindtime=1
removetime=-2
scale=1,1
sprpriority=-1
ownpal=1

[State 0, Width]
type = Width
trigger1 = AnimElemTime(2)<0
edge = 0,40

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem=4
x = Ceil(-16*const(size.xscale))

[State 801, end]
type=ChangeState
trigger1=statetype=A&&AnimElem=4
trigger2=AnimTime=0
value=ifelse(statetype=A,51,0)
ctrl=1

;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 895]
type    = S
movetype= H
physics = N
velset = 0,0

[State 0, VelSet]
type = VelSet
trigger1 = Time = 0
x = -5.625 * const(size.xscale)
y = 0

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

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

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0 && Anim != 5005
value = 5005

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= 5
x = .6

[State 5001, 4]
type = VelSet
trigger1 = Time = 10
x = 0

[State 5001, 6]
type = SelfState
trigger1 = Time = 10
value = 0
ctrl = 1

;-------------------------------------------------------------------------------
[StateDef 896]
type=A
movetype=I
physics=N
ctrl = 0

[State 0, VelSet]
type = VelSet
trigger1 = Time = 0
x = -5.625 * const(size.xscale)
y = -8.475

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= 5
x = .6

[State 5001, 4]
type = VelSet
trigger1 = Time = 10
x = 0

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != [5090,5099] ;Not if hit off ground anim
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y > 0 ;ifelse(anim = 5050, 1, 3)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 0, ChangeState]
type=SelfState
trigger1=Time=10
value=5040

[State 0, ChangeState]
type=SelfState
trigger1=Pos Y>=Floor(-Vel Y)
trigger1=Vel Y>0
value=52

;-------------------------------------------------------------------
[StateDef 900]
type=S
movetype=I
physics=N
ctrl = 0

[State 900, VarSet] ;Counter
type=VarSet
trigger1=Time=1
var(29)=12

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

[State 200, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=900&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 200, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

[State 200, ChangeAnim]
type=ChangeAnim
triggerall=(anim!=[900,909])
trigger1=Time=0
value=900

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=900||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=900||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=900||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

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

[State 0, Explod]
type=Explod
trigger1=Time=1
anim=8305
ID=8305
pos=80,-240 + Ceil(-screenpos Y + 240)
postype=p1
bindtime=-1
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=0.833333333333333,1.071428571428571
sprpriority=10
ownpal=1
removeongethit=1
ignorehitpause=1

[State 0, SuperPause]
type=SuperPause
trigger1=Time=0
time=38
anim=-1
sound=-1,0
movetime=38
darken=0
poweradd=-1000
ignorehitpause=1

[State 8000, BGPalFX]
type=BGPalFX
trigger1=time<29
add=-64,-64,-64
time=1
ignorehitpause=1

[State 900, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 1100
ctrl = 0

;-------------------------------------------------------------------
; Charge Buster Stand
[StateDef 1000]
type = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
sprpriority = 2
poweradd=ifelse(prevstateno=9000,0,14)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000,1,0)

[State 0, VarSet]
type=VarSet
trigger1=Time=0&&PrevStateNo!=9000
var(5)=0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=anim!=stateno;&&(anim!=241)
trigger1=time=0
value=stateno

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=1000||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1000||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1000||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 0, Special Spark]
type=Explod
trigger1=AnimElem=2
anim=8006
ID=8006
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ownpal=1
ignorehitpause=1

[State 0, Helper]
type=Helper
trigger1=AnimElemTime(9)=0
helpertype=normal ;player
name="Charged Buster Shot"
ID=1010
stateno=ifelse(var(25)>=240, 1015, 1010)
pos=Ceil(18*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, Helper]
type=Helper
trigger1=AnimElemTime(9)=0
helpertype=normal ;player
name="Buster FX"
ID=1012
stateno=ifelse(var(25)>=240, 1017, 1012)
pos=Ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, PalFX]
type=PalFX
trigger1=animelemtime(8)>=0&&AnimElemTime(11)<0
time=1
add=200,200,200
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(11)>=0&&AnimElemTime(14)<0
time=1
add=160,160,160
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(14)>=0&&AnimElemTime(17)<0
time=1
add=120,120,120
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(17)>=0&&AnimElemTime(20)<0
time=1
add=80,80,80
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(20)>=0&&AnimElemTime(23)<0
time=1
add=40,40,40

[State 0, VarSet]
type=VarSet
triggerall=var(25)
trigger1=AnimElemTime(9)>0
var(25)=0

[State 0, PlaySnd]
type=PlaySnd
trigger1=animelemtime(10)=0
value=S3,4
channel=5

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

;-------------------------------------------------------------------
; Charge Buster Crouch
[StateDef 1001]
type = C
movetype= A
physics = C
juggle  = 0
ctrl = 0
sprpriority = 2
poweradd=ifelse(prevstateno=9000,0,14)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000,1,0)

[State 0, VarSet]
type=VarSet
trigger1=Time=0&&PrevStateNo!=9000
var(5)=1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=anim!=stateno;&&(anim!=241)
trigger1=time=0
value=stateno

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=1001||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1001||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1001||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 0, Special Spark]
type=Explod
trigger1=AnimElem=2
anim=8006
ID=8006
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ownpal=1
ignorehitpause=1

[State 0, Helper]
type=Helper
trigger1=AnimElemTime(8)=0
helpertype=normal ;player
name="Buster Shot"
ID=1010
stateno=ifelse(var(25)>=240, 1015, 1010)
pos=Ceil(18*const(size.xscale)),Ceil(-34*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, Helper]
type=Helper
trigger1=AnimElemTime(8)=0
helpertype=normal ;player
name="Buster FX"
ID=1012
stateno=ifelse(var(25)>=240, 1017, 1012)
pos=Ceil(24*const(size.xscale)),Ceil(-34*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, VarSet]
type=VarSet
triggerall=var(25)
trigger1=AnimElemTime(8)>0
var(25)=0

[State 0, PlaySnd]
type=PlaySnd
trigger1=animelemtime(7)=0
value=S3,4
channel=5

[State 0, PalFX]
type=PalFX
trigger1=animelemtime(7)>=0&&AnimElemTime(10)<0
time=1
add=200,200,200
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(10)>=0&&AnimElemTime(13)<0
time=1
add=160,160,160
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(13)>=0&&AnimElemTime(16)<0
time=1
add=120,120,120
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(16)>=0&&AnimElemTime(19)<0
time=1
add=80,80,80
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(19)>=0&&AnimElemTime(22)<0
time=1
add=40,40,40

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

;-------------------------------------------------------------------
; Charge Buster Air
[StateDef 1002]
type = A
movetype= A
physics = N
juggle  = 0
ctrl = 0
sprpriority = 2
poweradd=ifelse(prevstateno=9000,0,14)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000,1,0)

[State 0, VarSet]
type=VarSet
trigger1=Time=0&&PrevStateNo!=9000
var(5)=2

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=anim!=stateno;&&(anim!=241)
trigger1=time=0
value=stateno

;-------------------------------------------------------------------------------
[State 0, VelSet]
type=VelSet
trigger1=animelemtime(1)=0
x=ifelse(Vel X, Vel X*.025, 0)
y=ifelse(Vel Y < 0, -1, (Vel Y * .025))

[State 0, VelAdd]
type=VelAdd
trigger1=Pos Y < 0 && StateType = A
y = .025

[State 0, PosSet]
type=PosSet
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
y=0

[State 0, VelSet]
type=VelSet
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
y=0
;-------------------------------------------------------------------------------

[State 0, Helper]
type=Helper
trigger1=AnimElemTime(11)=0
helpertype=normal ;player
name="Buster Shot"
ID=1010
stateno=ifelse(var(25)>=240, 1015, 1010)
pos=Ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, Helper]
type=Helper
trigger1=AnimElemTime(11)=0
helpertype=normal ;player
name="Buster FX"
ID=1012
stateno=ifelse(var(25)>=240, 1017, 1012)
pos=Ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, VarSet]
type=VarSet
triggerall=var(25)
trigger1=AnimElemTime(11)>0
var(25)=0

[State 0, PlaySnd]
type=PlaySnd
trigger1=animelemtime(10)=0
value=S3,4
channel=5

[State 0, PalFX]
type=PalFX
trigger1=animelemtime(10)>=0&&AnimElemTime(13)<0
time=1
add=200,200,200
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(13)>=0&&AnimElemTime(16)<0
time=1
add=160,160,160
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(16)>=0&&AnimElemTime(19)<0
time=1
add=120,120,120
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(19)>=0&&AnimElemTime(22)<0
time=1
add=80,80,80
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(22)>=0&&AnimElemTime(25)<0
time=1
add=40,40,40

[State 1000, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
ctrl = var(11)

;-------------------------------------------------------------------------------
; Mega Buster
;-------------------------------------------------------------------------------
[StateDef 1005]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1005, VarSet] ;Attack Type
type=VarSet
trigger1=time=0&&prevstateno!=1005
v=5
value=root,var(5)
ignorehitpause=1

[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
v=1
value=1
ignorehitpause=1

[State 1005, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=1005&&Time=0
value=1005

[State 1005, VelSet]
type=VelSet
trigger1=var(1)>1
x=6*root,const(size.xscale)

[State 1005, HitBy]
type=HitBy
trigger1=1
value=SCA,AP
ignorehitpause=1

[State 1005, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP,AA,AT
stateno=1006
ignorehitpause=1

[State 1005, HitDef]
type=HitDef
triggerall=var(5)=0 && root,var(13)=0
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=98,0
pausetime=1,8
sparkno=-1;S8240+(random%8)
guard.sparkno=-1;S8300
sparkxy=Ceil(-10*const(size.xscale)), Ceil(0*const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),-0.857142857142857
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-6
down.hittime=20
getpower=78,69
givepower=59,39

[State 1005, HitDef]
type=HitDef
triggerall=var(5)=1 && root,var(13)=0 ;Low
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=98,0
pausetime=1,8
sparkno=-1;S8240+(random%8)
guard.sparkno=-1;S8300
sparkxy=Ceil(-10*const(size.xscale)), Ceil(0*const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),-0.857142857142857
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-6
down.hittime=20
getpower=78,69
givepower=59,39

[State 1005, HitDef]
type=HitDef
triggerall=var(5)>=2 && root,var(13)=0;Air
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=140,0
pausetime=1,8
sparkno=-1;S8240+(random%8)
guard.sparkno=-1;S8300
sparkxy=Ceil(-10*const(size.xscale)), Ceil(0*const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),4
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0;ifelse(root,var(11)||root,Var(14),0,-8.225)
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
getpower=112,98
givepower=84,56
air.fall=root,var(16)>=2;(root,prevstateno = [600,649])
;-------------
[State 1005, HitDef]
type=HitDef
triggerall=var(5)=0 && root,var(13)=1
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAF
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=98,0
pausetime=1,8
sparkno=-1;S8240+(random%8)
guard.sparkno=-1;S8300
sparkxy=Ceil(-10*const(size.xscale)), Ceil(0*const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),-0.857142857142857
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-6
down.hittime=20
getpower=78,69
givepower=59,39

[State 1005, HitDef]
type=HitDef
triggerall=var(5)=1 && root,var(13)=1 ;Low
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,SP
hitflag=MAF
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=98,0
pausetime=1,8
sparkno=-1;S8240+(random%8)
guard.sparkno=-1;S8300
sparkxy=Ceil(-10*const(size.xscale)), Ceil(0*const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),-0.857142857142857
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-6
down.hittime=20
getpower=78,69
givepower=59,39

[State 1005, HitDef]
type=HitDef
triggerall=var(5)>=2 && root,var(13)=1;Air
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SP
hitflag=MAF
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=140,0
pausetime=1,8
sparkno=-1;S8240+(random%8)
guard.sparkno=-1;S8300
sparkxy=Ceil(-10*const(size.xscale)), Ceil(0*const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),4
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0;ifelse(root,var(11)||root,Var(14),0,-8.225)
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
getpower=112,98
givepower=84,56
air.fall=root,var(16)>=2;(root,prevstateno = [600,649])

;-------------------------------------------------------------------------------
;[State 1050, EnvShake]
;type = EnvShake
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;time=12
;ampl=4
;ignorehitpause=1

[State -3, VarSet]
type=ParentVarAdd
triggerall=var(5)>=2
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
var(16)=1
ignorehitpause=1

[State 1005, HitSound] ;Alternative way to use Hit Sound
type=PlaySnd
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S1,5
channel=1
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSound] ;Alternative way to use Guard Sound
type=PlaySnd
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 0, VarSet]
type = ParentVarSet
triggerall=Parent,var(12)
trigger1=movehit
var(11)=1
ignorehitpause=1

[State 0, VarSet]
type = ParentVarSet
;triggerall=Parent,Var(12)
;trigger1=Parent,prevstateno=600||Parent,prevstateno=610||Parent,prevstateno=630||Parent,prevstateno=640||Parent,prevstateno=620
trigger1=parent,var(16)>=3&&var(5)>=2;Parent,var(11)=1
trigger1=movehit&&parent,var(12)!=1&&parent,var(12)
trigger1=target,statetype=A
var(12)=1
ignorehitpause=1

[State 9500, Flying Screen Helper]
type=Helper
trigger1=root,Var(12)=1&&parent,var(16)>=3
trigger1=movehit=1&&Numtarget
trigger1=Target,Time<=0&&Target,Movetype=H
trigger1=!NumHelper(9500)
helpertype=normal ;player
name="Flying Screen Effect"
ID=9500
stateno=9500
pos=0,0
postype=p2
ownpal=0
ignorehitpause=1
size.ground.back=0
size.ground.front=0
size.air.back=0
size.air.front=0

[State 650, MvC2 KnockDown]
type=TargetState
triggerall=parent,Var(12)>0&&parent,var(16)>=3;(root,prevstateno=600||root,prevstateno=610||root,prevstateno=630||root,prevstateno=640||root,prevstateno=620)
trigger1=MoveHit&&NumTarget
trigger1=Target,Stateno=5020
trigger1=Target,Time<=0&&target,MoveType=H
value=5021
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
;triggerall=!parent,var(12)
trigger1=MoveHit&&NumTarget
trigger1=Target,Stateno=5020
trigger1=Target,Time<=0&&target,MoveType=H
value=5025
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget ;&& parent,hitcount<2
trigger1=(target,stateno=5080)&&(target,alive);&&(target,hitfall)
trigger1=Target,Time<=0&&target,MoveType=H
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1005, Helper]
type=Helper
triggerall=var(5)!=2
trigger1=Time=0&&PrevStateNo!=1005
helpertype=normal ;player
name="Dust FX"
ID=7505
stateno=7505
pos=0,0
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

;-------------------------------------------------------------------------------
[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1009
ID=1009
postype=p1
bindtime=1
vel=-4,0
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1009
ID=1009
postype=p1
bindtime=1
vel=-5,(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1009
ID=1009
postype=p1
bindtime=1
vel=-5,-(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1
;-------------------------------------------------------------------------------

[State 1005, Trans]
type=null;Trans
trigger1=1
trans=add1
ignorehitpause=1

[State 1005, end]
type=ChangeState
trigger1=MoveContact||MoveReversed ;Attack Connects
trigger2=FrontEdgeBodyDist <= -240 ;Projectile goes front offscreen by 120 pixels
value=1006

;-------------------------------------------------------------------------------
; Mega Buster Shot Hit/Guarded
;-------------------------------------------------------------------------------
[StateDef 1006]
ctrl=0
anim=1006
sprpriority=3
;velset=0,0
movehitpersist=1
hitcountpersist=1

[State 0, VelMul]
type = VelMul
trigger1 = 1
x = .8

[State 1051, end]
type=DestroySelf
trigger1=Time>=27

;-------------------------------------------------------------------------------
; Mega Buster Shot FX
;-------------------------------------------------------------------------------
[StateDef 1007]
ctrl=0
anim=1007
sprpriority=3

[State 1007, BindToRoot]
type=BindToRoot
trigger1=root,statetype=S
time=2
pos=ceil(24*root,const(size.xscale)),Ceil(-46*root,const(size.yscale))
ignorehitpause=1

[State 1007, BindToRoot]
type=BindToRoot
trigger1=root,statetype=C
time=2
pos=ceil(24*root,const(size.xscale)),Ceil(-34*root,const(size.yscale))
ignorehitpause=1

[State 1007, BindToRoot]
type=BindToRoot
trigger1=root,statetype=A
time=2
pos=ceil(29*root,const(size.xscale)),Ceil(-68*root,const(size.yscale))
ignorehitpause=1

[State 1005, PlaySnd]
type=PlaySnd
trigger1=Time=0&&PrevStateNo!=1005
value=S5,3
channel=10

[State 1007, end]
type=DestroySelf
trigger1=AnimTime=0
trigger2=(root,stateno!=[220,224]) && (root,stateno!=[420,424]) && (root,stateno!=[620,624])
trigger3=root,movetype=H && root,stateno!=9000

;---------------------------------------------------------------------------
[StateDef 1010]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
;movehitpersist=1
hitcountpersist=1

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1=1
text="fvar(12) = %f || fvar(10) = %f || var(25) = %d || var(2) = %d"
params=fvar(12),fvar(10), var(25), var(2)
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.17
fvar(10)= .17
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=1010
value = 1010

[State 0, VelSet]
type = VelSet
trigger1 = var(1)>1
x = ifelse((time<=0 && var(2)>1),0.64,7)*root,const(size.xscale)

[State 0, VarSet]
type = VarSet
trigger1 = Time=0&&PrevStateNo!=1010
var(5)=root,var(5)

[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

[State 0, Helper]
type=Helper
triggerall=var(5)!=2
trigger1=!time&&!PrevStateNo
helpertype=normal ;player
name="Dust Trail"
ID=7505
stateno=7505
pos=Ceil(-25*root,const(size.xscale)),Ceil(-Pos Y)
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)
ignorehitpause=1

[State 0, VarSet]
type=VarSet
trigger1=!Time&&!PrevStateNo
var(25)=1+Ceil(root,var(25)/60)

[State 0, Hit Var]
type=VarAdd
trigger1=Time=0
var(2)=1
ignorehitpause=1

[State 1005, HitBy]
type=HitBy
trigger1=1
value=SCA,AP
ignorehitpause=1

[State 1010, HitOverride]
type=hitoverride
trigger1= 1
time=1
attr=SCA,AA,AP,AT
stateno=ifelse(var(2)<var(25), 1010, 1011)
ignorehitpause=1

;--------------------------------
[State 0, HitDef] ;Air
type=HitDef
triggerall=var(5)>=2
trigger1=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
priority=5,Hit
damage=41,2
pausetime=ifelse(var(2)<var(25), 6, 1),5
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale),-8.225
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
air.fall=1
fall.recover=0
yaccel=.8
;--------------------------------
[State 0, HitDef] ;Crouching
type=HitDef
triggerall=var(5)=1
trigger1=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,SP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
priority=5,Hit
damage=41,2
pausetime=ifelse(var(2)<var(25), 6, 1),5
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale)
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
yaccel=.8
;--------------------------------
[State 0, HitDef] ;Standing
type=HitDef
triggerall=var(5)=0
trigger1=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
priority=5,Hit
damage=41,2
pausetime=ifelse(var(2)<var(25), 6, 1),5
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale)
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
yaccel=.8

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1010, ParentVarSet]
type=ParentVarSet
trigger1=PrevStateNo!=1010&&Time=0
var(25)=0
ignorehitpause=1
persistent=0

;-------------------------------------------------------------------------------
[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1014
ID=1014
postype=p1
bindtime=1
vel=-4,0
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1014
ID=1014
postype=p1
bindtime=1
vel=-5,(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1014
ID=1014
postype=p1
bindtime=1
vel=-5,-(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1
;-------------------------------------------------------------------------------

[State 1010, end]
type = ChangeState
trigger1=movecontact
value=ifelse(var(2)<var(25),1010,1011)

[State 1010, end]
type = ChangeState
trigger1=frontedgedist <= -240
value=1011;ifelse(var(20)<=0,1025,1026)
;---------------------------------------------------------------------------;
[StateDef 1011]
type=A
movetype=I
physics=N
juggle=0
ctrl = 0
velset=0,0
sprpriority=3
movehitpersist=1
hitcountpersist=1

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=1011
trigger1=Time=0
value=1011

[State 0, DestroySelf]
type=DestroySelf
trigger1=animelemtime(7)>=0
trigger1=enemynear,movetype!=H

;---------------------------------------------------------------------------
[StateDef 1012]
ctrl=0
anim=1012
sprpriority = 4

[State 0, BindToRoot]
type=BindToRoot
triggerall=Root,StateType=S
trigger1=animelemtime(2)<0
time=2
pos=Ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
ignorehitpause=1

[State 0, BindToRoot]
type=BindToRoot
triggerall=Root,StateType=C
trigger1=animelemtime(2)<0
time=2
pos=Ceil(24*const(size.xscale)),Ceil(-34*const(size.yscale))
ignorehitpause=1

[State 0, BindToRoot]
type=BindToRoot
triggerall=Root,StateType=A
trigger1=animelemtime(2)<0
time=2
pos=Ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
ignorehitpause=1

[State 0, PlaySnd]
type=PlaySnd
trigger1=Time=0
value=S5,3
channel=10

[State 1010, end]
type=DestroySelf
trigger1=AnimTime=0
trigger2=(Root,Stateno!=[1000,1002])
trigger3=Root,MoveType=H&&Root,Stateno!=9000

;---------------------------------------------------------------------------
[StateDef 1015]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
;movehitpersist=1
hitcountpersist=1

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1=1
text="fvar(12) = %f || fvar(10) = %f || var(25) = %d || var(2) = %d"
params=fvar(12),fvar(10), var(25), var(2)
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.17
fvar(10)= .17
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=1015
value = 1015

[State 0, VelSet]
type = VelSet
trigger1 = var(1)>1
x = ifelse((time<=0 && var(2)>1),0.64,7)*root,const(size.xscale)

[State 0, VarSet]
type = VarSet
trigger1 = Time=0&&PrevStateNo!=1015
var(5)=root,var(5)

[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

[State 0, Helper]
type=Helper
triggerall=var(5)!=2
trigger1=!time&&!PrevStateNo
helpertype=normal ;player
name="Dust Trail"
ID=7505
stateno=7505
pos=Ceil(-25*root,const(size.xscale)),Ceil(-Pos Y)
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)
ignorehitpause=1

[State 0, VarSet]
type=VarSet
trigger1=!Time&&!PrevStateNo
var(25)=1+Ceil(root,var(25)/60)

[State 0, Hit Var]
type=VarAdd
trigger1=Time=0
var(2)=1
ignorehitpause=1

[State 1005, HitBy]
type=HitBy
trigger1=1
value=SCA,AP
ignorehitpause=1

[State 1010, HitOverride]
type=hitoverride
trigger1= 1
time=1
attr=SCA,AA,AP,AT
stateno=ifelse(var(2)<var(25), 1015, 1016)
ignorehitpause=1

;--------------------------------
[State 0, HitDef]
type=HitDef
triggerall=var(5)=2
trigger1=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
priority=5,Hit
damage=41,2
pausetime=ifelse(var(2)<var(25), 6, 1),5
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale),-8.225
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
air.fall=1
fall.recover=0
yaccel=.8
;--------------------------------
[State 0, HitDef]
type=HitDef
triggerall=var(5)=1
trigger1=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,SP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
priority=5,Hit
damage=41,2
pausetime=ifelse(var(2)<var(25), 6, 1),5
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale)
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
yaccel=.8
;--------------------------------
[State 0, HitDef]
type=HitDef
triggerall=var(5)=0
trigger1=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
priority=5,Hit
damage=41,2
pausetime=ifelse(var(2)<var(25), 6, 1),5
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale)
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
yaccel=.8

[State 1015, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1015, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1015, ParentVarSet]
type=ParentVarSet
trigger1=PrevStateNo!=1015&&Time=0
var(25)=0
ignorehitpause=1
persistent=0

;-------------------------------------------------------------------------------
[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1019
ID=1019
postype=p1
bindtime=1
vel=-4,0
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1019
ID=1019
postype=p1
bindtime=1
vel=-5,(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1019
ID=1019
postype=p1
bindtime=1
vel=-5,-(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1
;-------------------------------------------------------------------------------

[State 1010, end]
type = ChangeState
trigger1=movecontact
value=ifelse(var(2)<var(25),1015,1016)

[State 1010, end]
type = ChangeState
trigger1=frontedgedist <= -240
value=1016;ifelse(var(20)<=0,1025,1026)
;---------------------------------------------------------------------------;
[StateDef 1016]
type=A
movetype=I
physics=N
juggle=0
ctrl = 0
velset=0,0
sprpriority=3
movehitpersist=1
hitcountpersist=1

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=1016
trigger1=Time=0
value=1016

[State 0, DestroySelf]
type=DestroySelf
trigger1=animelemtime(7)>=0
trigger1=enemynear,movetype!=H

;---------------------------------------------------------------------------
[StateDef 1017]
ctrl=0
anim=1017
sprpriority = 4

[State 0, BindToRoot]
type=BindToRoot
triggerall=Root,StateType=S
trigger1=animelemtime(2)<0
time=2
pos=Ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
ignorehitpause=1

[State 0, BindToRoot]
type=BindToRoot
triggerall=Root,StateType=C
trigger1=animelemtime(2)<0
time=2
pos=Ceil(24*const(size.xscale)),Ceil(-34*const(size.yscale))
ignorehitpause=1

[State 0, BindToRoot]
type=BindToRoot
triggerall=Root,StateType=A
trigger1=animelemtime(2)<0
time=2
pos=Ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
ignorehitpause=1

[State 0, PlaySnd]
type=PlaySnd
trigger1=Time=0
value=S5,4
channel=10

[State 1010, end]
type=DestroySelf
trigger1=AnimTime=0
trigger2=(Root,Stateno!=[1000,1002])
trigger3=Root,MoveType=H&&Root,Stateno!=9000

;-------------------------------
;Charge FX
[Statedef 1050]
type = A
physics = N
anim = 1050
velset = 0,0
sprpriority = 5

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root, statetype = A
facing = ifelse(root,facing = -1, -1, 1)
pos = const(size.mid.pos.x),const(size.head.pos.y)
ignorehitpause = 1

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root, statetype = S
facing = ifelse(root,facing = -1, -1, 1)
pos = const(size.mid.pos.x),const(size.mid.pos.y)
ignorehitpause = 1

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root, statetype = C
facing = ifelse(root,facing = -1, -1, 1)
pos = const(size.mid.pos.x),ceil(const(size.mid.pos.y)/1.5)
ignorehitpause = 1

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root, statetype = L
facing = ifelse(root,facing = -1, -1, 1)
pos =const(size.mid.pos.x),ceil(const(size.mid.pos.y)/4.5)
ignorehitpause = 1

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=(root,var(25)=[75,119])&& anim != 1051
value=1051

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=(root,var(25)=[120,239])&&anim!=1052
value=1052

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=root,var(25)>=240&&anim!=1053
value=1053

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

[State 0, AssertSpecial]
type=AssertSpecial
trigger1=(root,stateno=[1000,1004])||(root,stateno=[3000,3999])
flag=invisible
ignorehitpause = 1

[State 0,destroyself]
type = DestroySelf
trigger1 = root, var(25) = 0
;trigger2 = (root,stateno = [220,221])||(root,stateno = [420,421])||((root,stateno = [620,621])&&(anim!=44))
trigger2 = root,stateno=[1000,1007]
;trigger2 = root, command != "holdx" || root, command = "endx" || root, command = "x"
;trigger2 = root, movetype = H

;-------------------------------------------------------------------------------
; Mega Upper Start
;-------------------------------------------------------------------------------
[StateDef 1100]
type=U
movetype=A
physics=N
juggle=ifelse(var(11),1,5)
ctrl=0
sprpriority=2
;anim=1000
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000,1,0)

[State 1100, Strength Var]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=1100&&PrevStateNo!=9000)
var(5)=ifelse(command="DP_z", 2, ifelse(command="DP_y", 1, 0))

[State 1100, Strength Var]
type=VarSet
trigger1=Time=0&&(PrevStateNo=900&&PrevStateNo!=9000)
var(5)=1

[State 1000, ChangeAnim]
type=ChangeAnim
trigger1=(anim!=1100&&statetype!=A)||(anim!=1109&&statetype=A)
trigger1=Time=0
value=ifelse(statetype=A,1109,1100)

[State 1100, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1100&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1100, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
triggerall=StateType!=A
trigger1=!Time&&(PrevStateNo!=1100||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1100||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1100||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 1000, Special Spark]
type=Explod
triggerall=statetype!=A
trigger1=AnimElemTime(1)=1
anim=8006
ID=8006
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ownpal=1
ignorehitpause=1

[State 0, PosAdd]
type = PosAdd
triggerall=statetype!=A
trigger1 = animelem = 4
x = 8

[State 0, PosAdd]
type = PosAdd
triggerall=statetype!=A
trigger1 = animelem = 6
x = 24

[State 0, Explod]
type=Explod
triggerall = statetype != A
trigger1=AnimTime=0
anim=7501
ID=7501
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=99999
pausemovetime=99999
sprpriority=5
ownpal=1
ignorehitpause=1

[State 1100, end]
type=ChangeState
trigger1=AnimTime=0
value=1101+var(5)

;-------------------------------------------------------------------------------
; Mega Upper Jab Rising
;-------------------------------------------------------------------------------
[StateDef 1101]
type=A
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=1000
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 1101, ChangeAnim]
type=ChangeAnim
triggerall=anim!=1101
trigger1=Time=0
value=1101

[State 1101, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1101&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1101, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
x = 4 - ((var(1)-2)*.4)

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
y = -7.7 + ((var(1)-2)*.5)

[State 0, VelSet]
type = VelSet
trigger1 = Vel X < 1
x = 0

[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=111,13
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=20
ground.velocity=-9.1*const(size.xscale),-20.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-20.5
air.hittime=30
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=111,13
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=20
ground.velocity=-9.1*const(size.xscale),-20.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-20.5
air.hittime=30
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 1100, PlaySnd]
type=PlaySnd
trigger1=animelem=1
value=S3,ifelse(random<500,1,6)
channel=5

[State 1100, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1100, Helper]
type=Helper
trigger1=!numhelper(1150)
helpertype=normal ;player
name="Plasma"
ID=1150
stateno=1150
pos=0,0
postype=p1
ownpal=1
supermovetime=99999
pausemovetime=99999
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 1101, end]
type=ChangeState
trigger1=AnimTime=0
value=1104

;-------------------------------------------------------------------------------
; Mega Upper Strong Rising
;-------------------------------------------------------------------------------
[StateDef 1102]
type=A
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=1000
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 1101, ChangeAnim]
type=ChangeAnim
triggerall=anim!=1102
trigger1=Time=0
value=1102

[State 1101, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1102&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1101, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
x = 8 - ((var(1)-2)*.6)

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
y = -11 + ((var(1)-2)*.6)

[State 0, VelSet]
type = VelSet
trigger1 = Vel X < 1
x = 0

[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=111,13
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=20
ground.velocity=-9.1*const(size.xscale),-22.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-22.5
air.hittime=32
down.velocity=-9.1*const(size.xscale),-8
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=111,13
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=20
ground.velocity=-9.1*const(size.xscale),-22.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-22.5
air.hittime=32
down.velocity=-9.1*const(size.xscale),-8
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 1100, PlaySnd]
type=PlaySnd
trigger1=animelem=1
value=S3,ifelse(random<500,1,6)
channel=5

[State 1100, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1100, Helper]
type=Helper
trigger1=!numhelper(1150)
helpertype=normal ;player
name="Plasma"
ID=1150
stateno=1150
pos=0,0
postype=p1
ownpal=1
supermovetime=99999
pausemovetime=99999
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 1101, end]
type=ChangeState
trigger1=AnimTime=0
value=1104

;-------------------------------------------------------------------------------
; Mega Upper Fierce Rising
;-------------------------------------------------------------------------------
[StateDef 1103]
type=A
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=1000
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 1101, ChangeAnim]
type=ChangeAnim
triggerall=anim!=1103
trigger1=Time=0
value=1103

[State 1101, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1103&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1101, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
x = 8 - ((var(1)-2)*.5)

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
y = -11 + ifelse(animelemtime(8)>=0, ((var(1)-9)*.8), 0);((time-1)*.45)

[State 0, VelSet]
type = VelSet
trigger1 = Vel X < 1
x = 0

[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=111,13
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=20
ground.velocity=-9.1*const(size.xscale),-24.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-24.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=111,13
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=20
ground.velocity=-9.1*const(size.xscale),-22.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-22.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 1100, PlaySnd]
type=PlaySnd
trigger1=animelem=1
value=S3,ifelse(random<500,1,6)
channel=5

[State 1100, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1100, Helper]
type=Helper
trigger1=!numhelper(1150)
helpertype=normal ;player
name="Plasma"
ID=1150
stateno=1150
pos=0,0
postype=p1
ownpal=1
supermovetime=99999
pausemovetime=99999
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 1101, end]
type=ChangeState
trigger1=AnimTime=0
value=1104
;-------------------------------------------------------------------------------
;Mega Upper Falling
;-------------------------------------------------------------------------------
[StateDef 1104]
type=A
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=1000
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 1101, ChangeAnim]
type=ChangeAnim
triggerall=anim!=1104
trigger1=Time=0
value=1104

[State 1101, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1104&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1101, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = 1

[State 0, VelSet]
type = VelSet
trigger1 = time=0&&prevstateno!=1104
x = 0

[State 1101, end]
type=ChangeState
trigger1=Vel Y > 0 && Pos Y >= Floor(-Vel Y)
value=1105

;-------------------------------------------------------------------------------
; Mega Upper Land
;-------------------------------------------------------------------------------
[StateDef 1105]
type=S
movetype=A
physics=N
juggle=ifelse(var(11),1,5)
ctrl=0
sprpriority=2
;anim=1000
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000,1,0)

[State 1000, ChangeAnim]
type=ChangeAnim
trigger1=anim!=1105
trigger1=Time=0
value=1105

[State 1100, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1105&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1100, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=1105||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1105||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1105||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 1100, Explod]
type=Explod
trigger1=animelemtime(2)=0
anim=8003
ID=8003
bindtime=1
removetime=-2
sprpriority=-1
ownpal=1

[State 1100, Landing Sound]
type = PlaySnd
trigger1=animelemtime(2)=0
value = s52,1
channel = 3

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

;-------------------------------------------------------------------------------
; EX Mega Upper Start
;-------------------------------------------------------------------------------
[StateDef 1110]
type=U
movetype=A
physics=N
juggle=ifelse(var(11),1,5)
ctrl=0
sprpriority=2
;anim=1000
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000,1,0)

[State 1100, Strength Var]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=1110&&PrevStateNo!=9000)
var(5)=0;ifelse(command="DP_z", 2, ifelse(command="DP_y", 1, 0))

[State 1000, ChangeAnim]
type=ChangeAnim
trigger1=(anim!=1110&&statetype!=A)||(anim!=1109&&statetype=A)
trigger1=Time=0
value=ifelse(statetype=A,1109,1110)

[State 1100, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1110&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1100, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
triggerall=StateType!=A
trigger1=!Time&&(PrevStateNo!=1110||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1110||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1110||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 1000, Special Spark]
type=Explod
triggerall=statetype!=A
trigger1=AnimElemTime(1)=1
anim=8006
ID=8006
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ownpal=1
ignorehitpause=1

[State 0, PosAdd]
type = PosAdd
triggerall=statetype!=A
trigger1 = animelem = 2
x = 8

[State 0, PosAdd]
type = PosAdd
triggerall=statetype!=A
trigger1 = animelem = 4
x = 24

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

[State 1100, end]
type=ChangeState
trigger1=AnimTime=0
value=ifelse(statetype=A,1114,1111)

;-------------------------------------------------------------------------------
; EX Mega Upper 1
;-------------------------------------------------------------------------------
[StateDef 1111]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=1000
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 1101, VarSet] ;Resett Charge Var
type = VarSet
trigger1 = 1
var(25) = 0

[State 1101, ChangeAnim]
type=ChangeAnim
triggerall=anim!=1111
trigger1=Time=0
value=1111

[State 1100, Strength Var]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=1111&&PrevStateNo!=9000)
var(5)=1

[State 1101, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1111&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1101, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1

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

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
x = 9 - ((var(1)-2)*.5)

[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=27,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-9.1*const(size.xscale);,-20.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-20.5
air.hittime=30
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=27,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-9.1*const(size.xscale),-20.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-20.5
air.hittime=30
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 1100, PlaySnd]
type=PlaySnd
trigger1=animelem=1
value=S3,2
channel=5

[State 1100, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1100, Helper]
type=Helper
trigger1=!numhelper(1150)
helpertype=normal ;player
name="Plasma"
ID=1150
stateno=1150
pos=0,0
postype=p1
ownpal=1
supermovetime=99999
pausemovetime=99999
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 1101, end]
type=ChangeState
trigger1=AnimTime=0
value=1115

;-------------------------------------------------------------------------------
; EX Mega Upper 1
;-------------------------------------------------------------------------------
[StateDef 1112]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=1000
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 1101, VarSet] ;Resett Charge Var
type = VarSet
trigger1 = 1
var(25) = 0

[State 1101, ChangeAnim]
type=ChangeAnim
triggerall=anim!=1112
trigger1=Time=0
value=1112

[State 1100, Strength Var]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=1112&&PrevStateNo!=9000)
var(5)=2

[State 1101, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1112&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1101, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
x = 9 - ((var(1)-2)*.5)

[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=41,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-9.1*const(size.xscale);,-20.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-20.5
air.hittime=30
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=41,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-9.1*const(size.xscale);,-20.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-20.5
air.hittime=30
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 1100, PlaySnd]
type=PlaySnd
trigger1=animelem=1
value=S3,1
channel=5

[State 1100, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1100, Helper]
type=Helper
trigger1=!numhelper(1150)
helpertype=normal ;player
name="Plasma"
ID=1150
stateno=1150
pos=0,0
postype=p1
ownpal=1
supermovetime=99999
pausemovetime=99999
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 1101, end]
type=ChangeState
trigger1=AnimTime=0
value=1115

;-------------------------------------------------------------------------------
; EX Mega Upper Fierce Rising
;-------------------------------------------------------------------------------
[StateDef 1113]
type=A
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=1000
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 1101, VarSet] ;Resett Charge Var
type = VarSet
trigger1 = 1
var(25) = 0

[State 1101, ChangeAnim]
type=ChangeAnim
triggerall=anim!=1113
trigger1=Time=0
value=1113

[State 1101, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1113&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1101, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
x = 9 - ((var(1)-2)*.3)

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
y = -11 + ifelse(animelemtime(8)>=0, ((var(1)-9)*.6), 0);((time-1)*.45)

[State 0, VelSet]
type = VelSet
trigger1 = Vel X < 1
x = 0

[State 0, MoveHitReset]
type=MoveHitReset
trigger1=animelemtime(10)=0
trigger2=animelemtime(20)=0

[State 0, VarSet]
type=VarSet
trigger1=1
var(4)=1

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(10)<0
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-17.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),-17.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(10)<0
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-17.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),-17.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(10)>=0&&animelemtime(20)<0
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-17.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),-17.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(10)>=0&&animelemtime(20)<0
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-17.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),-17.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(20)>=0
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-17.5
guard.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-17.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(20)>=0
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-17.5
guard.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-17.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 1100, PlaySnd]
type=PlaySnd
trigger1=animelem=1
value=S3,6
channel=5

[State 1100, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1100, Helper]
type=Helper
trigger1=!numhelper(1150)
helpertype=normal ;player
name="Plasma"
ID=1150
stateno=1150
pos=0,0
postype=p1
ownpal=1
supermovetime=99999
pausemovetime=99999
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 1101, end]
type=ChangeState
trigger1=AnimTime=0
value=1104

;-------------------------------------------------------------------------------
; EX Air Mega Upper Fierce Rising
;-------------------------------------------------------------------------------
[StateDef 1114]
type=A
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=1000
;movehitpersist=ifelse(prevstateno=9000,1,0)
;hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 1101, VarSet] ;Resett Charge Var
type = VarSet
trigger1 = 1
var(25) = 0

[State 1101, ChangeAnim]
type=ChangeAnim
triggerall=anim!=1113
trigger1=Time=0
value=1113

[State 1101, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1114&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1101, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
x = 9 - ((var(1)-2)*.3)

[State 0, VelSet]
type = VelSet
trigger1=animelemtime(2)>=0
y = -11 + ifelse(animelemtime(8)>=0, ((var(1)-9)*.6), 0);((time-1)*.45)

[State 0, VelSet]
type = VelSet
trigger1 = Vel X < 1
x = 0

[State 0, MoveHitReset]
type=MoveHitReset
trigger1=animelemtime(6)=0
trigger2=animelemtime(12)=0
trigger3=animelemtime(18)=0
trigger4=animelemtime(24)=0

[State 0, VarSet]
type=VarSet
trigger1=1
var(4)=1

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(6)<0
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=27,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-12.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),-12.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(6)<0
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=27,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-12.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),-12.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(6)>=0&&animelemtime(12)<0
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=41,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-12.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),-12.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(6)>=0&&animelemtime(12)<0
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=41,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-12.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),-12.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(12)>=0&&animelemtime(18)<0
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-12.5
guard.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),-12.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(12)>=0&&animelemtime(18)<0
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-12.5
guard.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),-0.90999619584
air.type=Low
air.velocity=-5.625*const(size.xscale),-12.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(18)>=0&&animelemtime(24)<0
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-12.5
guard.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),-12.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(18)>=0&&animelemtime(24)<0
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-12.5
guard.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-5.625*const(size.xscale),-12.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(24)>=0
trigger1=!movecontact&&var(13)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-9.1*const(size.xscale),-17.5
guard.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),0
air.type=Low
air.velocity=-9.1*const(size.xscale),-17.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 250, 1] ;Fierce
type=HitDef
trigger1=animelemtime(24)>=0
trigger1=!movecontact&&var(13)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAF
priority=4,Hit
pausetime=9,8
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=19
ground.hittime=21
ground.velocity=-9.1*const(size.xscale),-17.5
guard.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.5*const(size.xscale),-0.90999619584
air.type=Low
air.velocity=-9.1*const(size.xscale),-17.5
air.hittime=34
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
fall=var(4)
fall.recover=0
ground.cornerpush.veloff=0
getpower=88,77  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 1100, PlaySnd]
type=PlaySnd
trigger1=animelem=1
value=S3,6
channel=5

[State 1100, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1100, Helper]
type=Helper
trigger1=!numhelper(1150)
helpertype=normal ;player
name="Plasma"
ID=1150
stateno=1150
pos=0,0
postype=p1
ownpal=1
supermovetime=99999
pausemovetime=99999
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 1101, end]
type=ChangeState
trigger1=AnimTime=0
value=1104

;-------------------------------------------------------------------------------
; EX Mega Upper Land
;-------------------------------------------------------------------------------
[StateDef 1115]
type=S
movetype=A
physics=N
juggle=ifelse(var(11),1,5)
ctrl=0
sprpriority=2
;anim=1000
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000,1,0)

[State 1101, VarSet] ;Resett Charge Var
type = VarSet
trigger1 = 1
var(25) = 0

[State 1000, ChangeAnim]
type=ChangeAnim
trigger1=anim!=1115
trigger1=Time=0
value=1115

[State 1100, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1115&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1100, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=1115||PrevStateNo!=9000)
y=0

;[State 0, VelSet]
;type=VelSet
;trigger1=!Time&&(PrevStateNo!=1115||PrevStateNo!=9000)
;x=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1115||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 0, VelMul]
type = VelMul
trigger1 =  1
x = .9

;[State 0, VelSet]
;type = VelSet
;trigger1=animelemtime(9)>=0
;x = 0

[State 1100, end]
type=ChangeState
trigger1=AnimTime=0
value=1111+var(5)

;----------------------
[StateDef 1150]
movetype=I
ctrl=0
anim=1150
sprpriority=3

[State 1150, BindToParent]
type=BindToParent
trigger1=1
time=2
ignorehitpause=1

[State 1150, Trans]
type = Trans
trigger1 = 1
trans = add1

[State 1150, VelSet]
type=VelSet
trigger1=1
x=parent,vel X
y=parent,vel Y
ignorehitpause=1

[State 1150, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 0, Explod]
type=Explod
trigger1=(time%3)=0
anim=1151+(random%4)
ID=1150
postype=p1
pos = -10,-80
bindtime=1
vel=-3+(random%5),1+(random%3)
accel=.25,.25
random=40,40
removetime=-2
scale=parent,const(size.xscale),parent,const(size.yscale)
sprpriority=ifelse(random<500,-1,4)
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S5,9
channel = 8

[State 1150, DestroySelf]
type=DestroySelf
trigger1=parent,movetype=H&&stateno!=9000
trigger2=(parent,stateno!=[1101,1103])&&(parent,stateno!=[1111,1114])

;----------------------
; Call Eddie (Weapon get)
[StateDef 1200]
type = S
movetype= I
physics = S
juggle  = 0
ctrl = 0
sprpriority = 2
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

;[State 0, VarSet]
;type=VarSet
;trigger1=Time=0&&PrevStateNo!=1200
;var(5)=ifelse(command="QCB_c", 2, ifelse(command="QCB_b", 1, 0))

[State 0, VarSet]
type=VarSet
trigger1=Time=0&&PrevStateNo!=1200
var(5)=ifelse(command="QCB_z",5,ifelse(command="QCB_y",4,ifelse(command="QCB_x",3,ifelse(command="QCB_c",2,ifelse(command="QCB_b",1,0)))))

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=anim!=stateno;&&(anim!=241)
trigger1=time=0
value=stateno

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=1200||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1200||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1200||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 0, Special Spark]
type=Explod
trigger1=AnimElemTime(2)=0
anim=8006
ID=8006
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
scale=1,1
ownpal=1
ignorehitpause=1

[State 0, Helper]
type=Helper
trigger1=AnimElemTime(10)=0
helpertype=normal ;player
name="Eddie"
ID=12000
stateno=12190
pos=ifelse(FrontEdgeBodyDist<=90,Ceil(-90*const(size.yscale)),Ceil(90*const(size.yscale))),Ceil((-ScreenPos Y)*const(size.yscale));Ceil(-210*const(size.yscale))
postype=p1
facing=ifelse(FrontEdgeBodyDist<=90,1,-1)
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, PlaySnd]
type=PlaySnd
trigger1=animelemtime(7)=0
value=S3,1
channel=5

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

;----------------------
; Weapon Use
[StateDef 1201]
type = U
movetype= A
physics = N
juggle  = 0
ctrl = 0
sprpriority = 2
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, VarSet]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=1201&&PrevStateNo!=9000)
var(5)=ifelse(command="QCF_z",2,ifelse(command="QCF_y", 1, 0))
ignorehitpause=1

[State 0, VarSet]
type=VarSet
triggerall=var(50)=2 ;&& var(25) < 240
trigger1=Time=0&&(PrevStateNo!=1201&&PrevStateNo!=9000)
var(5)=ifelse(!numhelper(1220),0,10)
ignorehitpause=1

[State 0, VarSet]
type=VarSet
trigger1=AnimElemTime(10)=0&&(PrevStateNo!=1201&&PrevStateNo!=9000)
trigger1=var(25)>=240
var(5)=5
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1=AnimElemTime(10)=0&&(PrevStateNo!=1201&&PrevStateNo!=9000)
trigger1=var(25)>=240
var(25) = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=anim!=1201&&anim!=1204;&&(anim!=241)
trigger1=time=0
value=ifelse(statetype = A, 1204, 1201)

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Statetype != A
statetype = S

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
triggerall=Statetype!=A
trigger1=!Time&&(PrevStateNo!=1201||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
triggerall=Statetype!=A
trigger1=!Time&&(PrevStateNo!=1201||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
triggerall=Statetype!=A
trigger1=!Time&&(PrevStateNo!=1201||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 0, VelMul]
type=VelMul
triggerall=statetype=A
trigger1=animelemtime(1)=0
x=.15
y=.15

[State 0, VelAdd]
type=VelAdd
triggerall=statetype=A
trigger1=Pos Y < 0
y = .015

[State 0, VelSet]
type=VelSet
triggerall=statetype=A
trigger1=Pos Y >= Ceil(-Vel Y)
trigger1=Vel Y >= 0
y=0

[State 0, PosSet]
type=PosSet
triggerall=statetype=A
trigger1=Pos Y >= Ceil(-Vel Y)
trigger1=Vel Y >= 0
y=0
;-------------------------------------------------------------------------------

[State 0, Special Spark]
type=Explod
triggerall=statetype!=A
trigger1=AnimElemTime(2)=0
anim=8006
ID=8006
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
scale=1,1
ownpal=1
ignorehitpause=1

[State 0, PlaySnd]
type=PlaySnd
triggerall=var(50)!=2
trigger1=animelemtime(10)=0
value=S3,ifelse(var(50)<3, 7+var(50), 2)
channel=5

[State 0, PlaySnd]
type=PlaySnd
triggerall=var(50)=2
trigger1=animelemtime(10)=0
value=S3,ifelse(!NumHelper(1220),9, ifelse(statetype=A, 0, 2))
channel=5

[State 0, Helper]
type=Helper
triggerall=Var(50)=0
trigger1=AnimElemTime(10)=0
helpertype=normal ;player
name="Rock Ball"
ID=1205
stateno=1204
pos=Ceil(33*const(size.xscale)),Ceil(-44*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
size.ground.back=0
size.ground.front=0

[State 0, Helper]
type=Helper
triggerall=Var(50)=1
trigger1=AnimElemTime(10)=0
helpertype=normal ;player
name="Tornado Hold"
ID=1210
stateno=1210
pos=Ceil(38*const(size.xscale)),Ceil(-40*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, Helper]
type=Helper
triggerall=Var(50)=2 && !NumHelper(1220)
trigger1=AnimElemTime(10)=0
helpertype=normal ;player
name="Leaf Sheild"
ID=1220
stateno=1220
pos=0,0
;pos=Ceil(7*const(size.xscale)),Ceil(-69*const(size.yscale))
;pos=Ceil(31*const(size.xscale)),Ceil(-62*const(size.yscale))
;pos=Ceil(45*const(size.xscale)),Ceil(-41*const(size.yscale))
;pos=Ceil(37*const(size.xscale)),Ceil(-19*const(size.yscale))
;pos=Ceil(10*const(size.xscale)),Ceil(-7*const(size.yscale))
;pos=Ceil(-17*const(size.xscale)),Ceil(-14*const(size.yscale))
;pos=Ceil(-31*const(size.xscale)),Ceil(-35*const(size.yscale))
;pos=Ceil(-23*const(size.xscale)),Ceil(-57*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
size.ground.back=0
size.ground.front=0

[State 1200, end]
type = ChangeState
triggerall = Statetype != A
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 1200, end]
type=ChangeState
triggerall = Statetype = A
trigger1=AnimTime=0
value=51
ctrl=ifelse(var(11),1,0)

;----------------------
; Tornado Hold Use
[StateDef 1202]
type = S
movetype= I
physics = S
juggle  = 0
ctrl = 0
sprpriority = 2
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, VarSet]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=1202&&PrevStateNo!=9000)
var(5)=ifelse(command="QCF_z",2,ifelse(command="QCF_y", 1, 0))
ignorehitpause=1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=anim!=1201;&&(anim!=241)
trigger1=time=0
value=1201

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=1202||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1202||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1202||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 0, Special Spark]
type=Explod
trigger1=AnimElemTime(2)=0
anim=8006
ID=8006
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
scale=1,1
ownpal=1
ignorehitpause=1

[State 0, VarSet]
type=VarSet
trigger1=AnimElemTime(10)=0&&(PrevStateNo!=1202&&PrevStateNo!=9000)
trigger1=var(25)>=240
var(5)=5
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1=AnimElemTime(10)=0&&(PrevStateNo!=1202&&PrevStateNo!=9000)
trigger1=var(25)>=240
var(25) = 0

[State 0, Helper]
type=Helper
triggerall=Var(50)=1
trigger1=AnimElemTime(10)=0
helpertype=normal ;player
name="Tornado Hold"
ID=1210
stateno=1210
pos=Ceil(38*const(size.xscale)),Ceil(-40*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, PlaySnd]
type=PlaySnd
trigger1=animelemtime(8)=0
value=S3,ifelse(var(50)<3, 7+var(50), 2)
channel=5

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

;----------------------
; Leaf Sheild Use/Throw
[StateDef 1203]
type = U
movetype= A
physics = N
juggle  = 0
ctrl = 0
sprpriority = 2
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, VarSet]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=1203&&PrevStateNo!=9000)
var(5)=ifelse(!numhelper(1220),0,10)
ignorehitpause=1

[State 0, VarSet]
type=VarSet
trigger1=AnimElemTime(10)=0&&(PrevStateNo!=1203&&PrevStateNo!=9000)
trigger1=var(25)>=240
var(5)=ifelse(!numhelper(1220),5,10)
ignorehitpause=1

[State 0, VarSet]
type=VarSet
trigger1=AnimElemTime(10)=0&&(PrevStateNo!=1203&&PrevStateNo!=9000)
trigger1=var(25)>=240
var(5)=5
ignorehitpause=1

[State 0, VarSet]
type = VarSet
trigger1=AnimElemTime(10)=0&&(PrevStateNo!=1203&&PrevStateNo!=9000)
trigger1=var(25)>=240
var(25) = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=anim!=1201+statetype=A;&&(anim!=241)
trigger1=time=0
value=1201+statetype=A

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Statetype != A
statetype = S

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
triggerall=Statetype!=A
trigger1=!Time&&(PrevStateNo!=1203||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
triggerall=Statetype!=A
trigger1=!Time&&(PrevStateNo!=1203||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
triggerall=Statetype!=A
trigger1=!Time&&(PrevStateNo!=1203||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 0, VelMul]
type=VelMul
triggerall=statetype=A
trigger1=animelemtime(1)=0
x=.15
y=.15

[State 0, VelAdd]
type=VelAdd
triggerall=statetype=A
trigger1=Pos Y < 0
y = .015

[State 0, VelSet]
type=VelSet
triggerall=statetype=A
trigger1=Pos Y >= Ceil(-Vel Y)
trigger1=Vel Y >= 0
y=0

[State 0, PosSet]
type=PosSet
triggerall=statetype=A
trigger1=Pos Y >= Ceil(-Vel Y)
trigger1=Vel Y >= 0
y=0
;-------------------------------------------------------------------------------

[State 0, Special Spark]
type=Explod
triggerall=statetype!=A
trigger1=AnimElemTime(2)=0
anim=8006
ID=8006
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
scale=1,1
ownpal=1
ignorehitpause=1

[State 0, PlaySnd]
type=PlaySnd
trigger1=animelemtime(10)=0
value=S3,ifelse(!NumHelper(1220),9, ifelse(statetype=A, 0, 2))
channel=5

[State 0, Helper]
type=Helper
triggerall=Var(50)=2 && !NumHelper(1220)
trigger1=AnimElemTime(10)=0
helpertype=normal ;player
name="Leaf Sheild"
ID=1220
stateno=1220
pos=0,0
;pos=Ceil(7*const(size.xscale)),Ceil(-69*const(size.yscale))
;pos=Ceil(31*const(size.xscale)),Ceil(-62*const(size.yscale))
;pos=Ceil(45*const(size.xscale)),Ceil(-41*const(size.yscale))
;pos=Ceil(37*const(size.xscale)),Ceil(-19*const(size.yscale))
;pos=Ceil(10*const(size.xscale)),Ceil(-7*const(size.yscale))
;pos=Ceil(-17*const(size.xscale)),Ceil(-14*const(size.yscale))
;pos=Ceil(-31*const(size.xscale)),Ceil(-35*const(size.yscale))
;pos=Ceil(-23*const(size.xscale)),Ceil(-57*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
size.ground.back=0
size.ground.front=0

[State 1200, end]
type = ChangeState
triggerall = Statetype != A
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 1200, end]
type=ChangeState
triggerall = Statetype = A
trigger1=AnimTime=0
value=51
ctrl=ifelse(var(11),1,0)

;---------------------------------------------------------------------------;
;Rock Ball
[Statedef 1204]
ctrl = 0
anim = 1205
sprpriority=2

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

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

[State 0, VelAdd]
type=VelAdd
triggerall = Pos Y < -10
trigger1=time>1
y=.9

[State 0, PosSet]
type=PosSet
trigger1=Pos Y >= Floor(-Vel Y)-10
trigger1=Vel Y >= 0
y=-10

[State 0, VelSet]
type=VelSet
trigger1=Pos Y >= Floor(-Vel Y)-10
trigger1=Vel Y > 0
x=0
y=0

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=Pos Y >= -10
trigger1=Vel Y >= 0
value=anim
elem=animelemno(0)

[State 0, VarSet]
type=VarSet
trigger1=root,stateno=430||root,stateno=440||root,stateno=425
var(1)=0

[State 0, VarSet]
type=VarSet
trigger1=root,stateno=240||root,stateno=225
var(1)=1

[State 0, VarSet]
type=VarSet
trigger1=root,stateno=250
var(1)=2

[State 0, VarSet]
type=VarSet
trigger1=root,stateno=450
var(1)=3

[State 0, ScreenPos Y Var]
type=VarSet
trigger1=Time=0&&PrevStateNo!=1204
trigger1=root,pos Y >= 0
var(3)=Ceil(root,screenpos Y)

[State 1025, HitSound]
type=playsnd
trigger1=(rootdist X=[-77,30])&&(rootdist y=[0,79])
trigger1=root,stateno=240&&(root,animelemtime(9)>=0&&root,animelemtime(11)<0)
trigger2=(rootdist X=[-98,-16])&&(rootdist y=[0,22])
trigger2=root,stateno=430&&(root,animelemtime(5)>=0&&root,animelemtime(6)<0)
trigger3=(rootdist X=[-89,4])&&(rootdist y=[0,28])
trigger3=root,stateno=440&&(root,animelemtime(7)>=0&&root,animelemtime(13)<0)
trigger4=(rootdist X=[-89,4])&&(rootdist y=[0,28])
trigger4=root,stateno=450&&(root,animelemtime(9)>=0&&root,animelemtime(23)<0)
trigger5=(rootdist X=[-54,-8])&&(rootdist y=[0,98])
trigger5=root,stateno=250&&(root,animelemtime(8)>=0&&root,animelemtime(14)<0)
trigger6=(rootdist X=[-81,-17])&&(rootdist y=[0,68])
trigger6=root,stateno=225&&(root,animelemtime(10)>=0&&root,animelemtime(12)<0)
trigger7=(rootdist X=[-89,4])&&(rootdist y=[0,28])
trigger7=root,stateno=425&&(root,animelemtime(7)>=0&&root,animelemtime(13)<0)
value=S1,9
channel=1
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=(rootdist X=[-77,30])&&(rootdist y=[0,79])
trigger1=root,stateno=240&&(root,animelemtime(9)>=0&&root,animelemtime(11)<0)
trigger2=(rootdist X=[-98,-16])&&(rootdist y=[0,22])
trigger2=root,stateno=430&&(root,animelemtime(5)>=0&&root,animelemtime(6)<0)
trigger3=(rootdist X=[-89,4])&&(rootdist y=[0,28])
trigger3=root,stateno=440&&(root,animelemtime(7)>=0&&root,animelemtime(13)<0)
trigger4=(rootdist X=[-89,4])&&(rootdist y=[0,28])
trigger4=root,stateno=450&&(root,animelemtime(9)>=0&&root,animelemtime(23)<0)
trigger5=(rootdist X=[-54,-8])&&(rootdist y=[0,98])
trigger5=root,stateno=250&&(root,animelemtime(8)>=0&&root,animelemtime(14)<0)
trigger6=(rootdist X=[-81,-17])&&(rootdist y=[0,68])
trigger6=root,stateno=225&&(root,animelemtime(10)>=0&&root,animelemtime(12)<0)
trigger7=(rootdist X=[-89,4])&&(rootdist y=[0,28])
trigger7=root,stateno=425&&(root,animelemtime(7)>=0&&root,animelemtime(13)<0)
anim=8230+(random%8)
ID=8200
pos=-10,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 0, Turn]
type=Turn
trigger1=facing!=root,facing

[State 1290, End]
type=ChangeState
triggerall = Time < 400
trigger1=(rootdist X=[-77,30])&&(rootdist y=[0,79])
trigger1=root,stateno=240&&(root,animelemtime(9)>=0&&root,animelemtime(11)<0)
trigger2=(rootdist X=[-98,-16])&&(rootdist y=[0,22])
trigger2=root,stateno=430&&(root,animelemtime(5)>=0&&root,animelemtime(6)<0)
trigger3=(rootdist X=[-89,4])&&(rootdist y=[0,28])
trigger3=root,stateno=440&&(root,animelemtime(7)>=0&&root,animelemtime(13)<0)
trigger4=(rootdist X=[-89,4])&&(rootdist y=[0,28])
trigger4=root,stateno=450&&(root,animelemtime(9)>=0&&root,animelemtime(23)<0)
trigger5=(rootdist X=[-54,-8])&&(rootdist y=[0,98])
trigger5=root,stateno=250&&(root,animelemtime(8)>=0&&root,animelemtime(14)<0)
trigger6=(rootdist X=[-81,-17])&&(rootdist y=[0,68])
trigger6=root,stateno=225&&(root,animelemtime(10)>=0&&root,animelemtime(12)<0)
trigger7=(rootdist X=[-89,4])&&(rootdist y=[0,28])
trigger7=root,stateno=425&&(root,animelemtime(7)>=0&&root,animelemtime(13)<0)
value=1205

[State 1300, snd]
type = PlaySnd
trigger1 = Time = 400
trigger2 = (NumHelper(1205) > 1) && Helper(1205),Stateno!=1209
trigger2 = Pos Y >= -10
value=S5,13
channel=10
pan=0

[State 1300, explod]
type = Explod
trigger1 = Time = 400
trigger2 = (NumHelper(1205) > 1) && Helper(1205),Stateno!=1209
trigger2 = Pos Y >= -10
anim = 1209
sprpriority = 5

[State 1300, VarSet]
type = VarSet
trigger1 = root,var(5) = 5
trigger1 = time = 0 && prevstateno != 1204
var(5) = 5

[State 0, PalFXWiz]
type = PalFX
triggerall = var(5) = 5
trigger1 = (time%15)=0
time = 15
add = 100,100,100
sinadd = -80,-80,-80,15

[State 1300, destroyself]
type = DestroySelf
trigger1 = Time = 400
trigger2 = (NumHelper(1205) > 1) && Helper(1205),Stateno!=1209
trigger2 = Pos Y >= -10
;---------------------------------------------------------------------------;
[Statedef 1205]
Type=A
MoveType=A
Physics=N
ctrl = 0
;anim = 1205
sprpriority=2
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener Minimum]
type=varset
trigger1=fvar(10)<=.2
fvar(10)=.2
ignorehitpause=1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = 1
value = fvar(10)
ignorehitpause = 1
persistent = 1
;-------------------------------------------------------------------------------
;[State 0, Turn]
;type=Turn
;trigger1=facing!=root,facing

[State 0, NotHitBy]
type=HitBy
trigger1=1
value=SCA,AP,HA

[State 0, VelSet] ;Low
type=VelSet
triggerall=Var(1)=0
trigger1=Time=1&&prevstateno!=1205
x=9
y=-3

[State 0, VelSet]
type=VelSet
triggerall=Var(1)=1 ;Medium
trigger1=Time=1&&prevstateno!=1205
x=7
y=-4

[State 0, VelSet]
type=VelSet
triggerall=Var(1)=2 ;Fierce
trigger1=Time=1&&prevstateno!=1205
x=4
y=-12

[State 0, VelSet] ;Low 2
type=VelSet
triggerall=Var(1)=3
trigger1=Time=1&&prevstateno!=1205
x=12
y=-2

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1= 1
text="FEBD = %d || BEBD = %d || SPY = %f"
params=FrontEdgeBodyDist, BackEdgeBodyDist, ScreenPos Y
ignorehitpause=1

[State 0, MoveHitReset]
type=MoveHitReset
trigger1=Vel X > 0
trigger1=FrontEdgeBodyDist < 0
trigger2=Vel X < 0
trigger2=BackEdgeBodyDist < 0
trigger3=Vel Y<0
trigger3=ScreenPos Y < 11
trigger4=Vel Y>0
trigger4=ScreenPos Y >= var(3)
ignorehitpause=1

[State 0, PlaySnd]
type=PlaySnd
trigger1=Vel X > 0
trigger1=FrontEdgeBodyDist < 0
trigger2=Vel X < 0
trigger2=BackEdgeBodyDist < 0
trigger3=Vel Y<0
trigger3=ScreenPos Y < 11
trigger4=Vel Y>0
trigger4=ScreenPos Y >= var(3)
value=S5,12
channel=10
pan=1
ignorehitpause=1

[State 0, Timer Var]
type=VarAdd
trigger1=Vel X > 0
trigger1=FrontEdgeBodyDist < 0
trigger2=Vel X < 0
trigger2=BackEdgeBodyDist < 0
trigger3=Vel Y<0
trigger3=ScreenPos Y < 11
trigger4=Vel Y>0
trigger4=ScreenPos Y >= var(3)
v=2
value=1

[State 0, VelMul]
type=VelMul
trigger1=Vel X > 0
trigger1=FrontEdgeBodyDist < 0
trigger2=Vel X < 0
trigger2=BackEdgeBodyDist < 0
x=-1

[State 0, VelMul]
type=VelMul
trigger1=Vel Y<0
trigger1=ScreenPos Y < 11
trigger2=Vel Y>0
trigger2=ScreenPos Y >= var(3)
y=-1

[State 0, HitDef]
type=HitDef
triggerall=Vel X > 0
trigger1=!MoveContact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SP
hitflag=MAF
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=69,6
pausetime=2,8
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0
guardsound=S-1,0
ground.type=High
air.type=High
ground.slidetime=14
ground.hittime=15
air.hittime=23
ground.velocity=-9.1*root,const(size.xscale),0
guard.velocity=-9.1*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-2.875
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=45,35
givepower=30,20
yaccel=.8

[State 0, HitDef]
type=HitDef
triggerall=Vel X < 0
trigger1=!MoveContact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SP
hitflag=MAF
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=69,6
pausetime=2,8
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0
guardsound=S-1,0
ground.type=High
air.type=High
ground.slidetime=14
ground.hittime=15
air.hittime=23
ground.velocity=9.1*root,const(size.xscale),0
guard.velocity=9.1*root,const(size.xscale)
air.velocity=5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-2.875
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=45,35
givepower=30,20
yaccel=.8

[State 1025, HitSound]
type=playsnd
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 0, VarSet]
type=VarSet
trigger1=root,stateno=630
var(1)=0

[State 0, VarSet]
type=VarSet
trigger1=root,stateno=640||root,stateno=255
var(1)=1

[State 0, VarSet]
type=VarSet
trigger1=root,stateno=650
var(1)=2

[State 1025, HitSound]
type=playsnd
triggerall=var(2) < ifelse(var(5) >= 5, 8, 4)
trigger1=(rootdist X=[-74,-10])&&(rootdist y=[34,68])
trigger1=root,stateno=630&&(root,animelemtime(3)>=0&&root,animelemtime(17)<0)
trigger2=(rootdist X=[-72,-8])&&(rootdist y=[42,82])
trigger2=root,stateno=640&&(root,animelemtime(4)>=0&&root,animelemtime(15)<0)
trigger3=(rootdist X=[-67,-13])&&(rootdist y=[7,51])
trigger3=root,stateno=650&&(root,animelemtime(6)>=0&&root,animelemtime(16)<0)
trigger4=(rootdist X=[-70,-28])&&(rootdist y=[38,62])
trigger4=root,stateno=255&&(root,animelemtime(10)>=0&&root,animelemtime(20)<0)
value=S1,6
channel=0
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
triggerall=var(2) < ifelse(var(5) >= 5, 8, 4)
trigger1=(rootdist X=[-74,-10])&&(rootdist y=[34,68])
trigger1=root,stateno=630&&(root,animelemtime(3)>=0&&root,animelemtime(17)<0)
trigger2=(rootdist X=[-72,-8])&&(rootdist y=[42,82])
trigger2=root,stateno=640&&(root,animelemtime(4)>=0&&root,animelemtime(15)<0)
trigger3=(rootdist X=[-67,-13])&&(rootdist y=[7,51])
trigger3=root,stateno=650&&(root,animelemtime(6)>=0&&root,animelemtime(16)<0)
trigger4=(rootdist X=[-70,-28])&&(rootdist y=[38,62])
trigger4=root,stateno=255&&(root,animelemtime(10)>=0&&root,animelemtime(20)<0)
anim=8230+(random%8)
ID=8200
pos=-10,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1290, End]
type=ChangeState
triggerall=var(2) < ifelse(var(5) >= 5, 8, 4)
trigger1=(rootdist X=[-74,-10])&&(rootdist y=[34,68])
trigger1=root,stateno=630&&(root,animelemtime(3)>=0&&root,animelemtime(17)<0)
trigger2=(rootdist X=[-72,-8])&&(rootdist y=[42,82])
trigger2=root,stateno=640&&(root,animelemtime(4)>=0&&root,animelemtime(15)<0)
trigger3=(rootdist X=[-67,-13])&&(rootdist y=[7,51])
trigger3=root,stateno=650&&(root,animelemtime(6)>=0&&root,animelemtime(16)<0)
trigger4=(rootdist X=[-70,-28])&&(rootdist y=[38,62])
trigger4=root,stateno=255&&(root,animelemtime(10)>=0&&root,animelemtime(20)<0)
value=1206

[State 0, AfterImage]
type=AfterImage
trigger1=Time=0&&prevstateno!=1205
time=9999
length=22
framegap=2
trans=add1

[State 0, PalFXWiz]
type = PalFX
triggerall = var(5) = 5
trigger1 = (time%15)=0
time = 15
add = 100,100,100
sinadd = -80,-80,-80,15

[State 1200, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AP
stateno=1209
ignorehitpause=1

[State 1200, NotHitBy]
type=NotHitBy
trigger1=1
value=,AA,AT
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1290, End]
type=ChangeState
trigger1=var(2) >= ifelse(var(5) >= 5, 8, 4)
value=1209

;---------------------------------------------------------------------------;
[Statedef 1206]
Type=A
MoveType=A
Physics=N
ctrl = 0
;anim = 1205
sprpriority=2

[State 0, PalFXWiz]
type = PalFX
triggerall = var(5) = 5
trigger1 = (time%15)=0
time = 15
add = 100,100,100
sinadd = -80,-80,-80,15

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener Minimum]
type=varset
trigger1=fvar(10)<=.2
fvar(10)=.2
ignorehitpause=1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = 1
value = fvar(10)
ignorehitpause = 1
persistent = 1
;-------------------------------------------------------------------------------

[State 0, Turn]
type=Turn
trigger1=facing!=root,facing

[State 0, NotHitBy]
type=HitBy
trigger1=1
value=SCA,AP,HA

[State 0, VelSet] ;Low
type=VelSet
triggerall=Var(1)=0
trigger1=Time=0
x=9
y=0

[State 0, VelSet]
type=VelSet
triggerall=Var(1)=1 ;Medium
trigger1=Time=0
x=9
y=-7

[State 0, VelSet]
type=VelSet
triggerall=Var(1)=2 ;Fierce
trigger1=Time=0
x=9
y=7

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1=1
text="RootDist X = %f || RootDist Y = %f"
params=rootdist X, rootdist Y
ignorehitpause=1

[State 0, HitDef]
type=HitDef
triggerall=Vel X > 0
trigger1=!MoveContact
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=69,6
pausetime=2,8
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0
guardsound=S-1,0
ground.type=High
air.type=High
ground.slidetime=14
ground.hittime=15
air.hittime=23
ground.velocity=-9.1*root,const(size.xscale),0
guard.velocity=-9.1*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-2.875
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=50,35
givepower=30,20
yaccel=.8

[State 0, HitDef]
type=HitDef
triggerall=Vel X < 0
trigger1=!MoveContact
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=69,6
pausetime=2,8
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0
guardsound=S-1,0
ground.type=High
air.type=High
ground.slidetime=14
ground.hittime=15
air.hittime=23
ground.velocity=9.1*root,const(size.xscale),0
guard.velocity=9.1*root,const(size.xscale)
air.velocity=5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-2.875
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=50,35
givepower=30,20
yaccel=.8

[State 1025, HitSound]
type=playsnd
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1200, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AP
stateno=1209
ignorehitpause=1

[State 1200, NotHitBy]
type=NotHitBy
trigger1=1
value=,AA,AT
ignorehitpause=1

[State 1290, End]
type=ChangeState
trigger1=Vel X > 0
trigger1=FrontEdgeBodyDist < 0
trigger2=Vel X < 0
trigger2=BackEdgeBodyDist < 0
trigger3=Vel Y<0
trigger3=ScreenPos Y < 11
trigger4=Vel Y>0
trigger4=Pos Y >= Floor(-Vel Y);ScreenPos Y >= var(3)
value=1209

;---------------------------------------------------------------------------;
[Statedef 1209]
movetype=I
ctrl = 0
anim = 1209
sprpriority=2
velset=0,0

[State 0, PlaySnd]
type=PlaySnd
trigger1=Time=0
value=S5,13
channel=10
pan=1

[State 0, AfterImageTime]
type=AfterImageTime
trigger1=Time=0
time=0

[State 1290, End]
type=DestroySelf
trigger1=animtime=0
;---------------------------------------------------------------------------;
[Statedef 1210]
movetype=I
ctrl = 0
anim = 1210
sprpriority=2
velset=0,0

[State 0, VelSet] ;9,13,16
type=VelSet
trigger1=Time=1&&PrevStateNo!=1210
x=ifelse(root,var(5)=2,10,ifelse(root,var(5)=1,8,6))
y=ifelse(root,var(5)=2,-1.25,ifelse(root,var(5)=1,0,2.75))

[State 0, VelAdd]
type=VelAdd
trigger1=time>=1
y=.48

[State 0, VelSet]
type=VelSet
trigger1=FrontEdgeDist<=20
x=0

[State 1290, End]
type=DestroySelf
trigger1=Root,MoveType=H&&PrevStateNo!=9000

[State 0, VarSet]
type=VarSet
trigger1=Time=0
var(5)=0

[State 0, ChangeState]
type=ChangeState
trigger1=Pos Y >= Ceil(-Vel Y)
trigger1=Vel Y >= 0
value=ifelse(root,var(5)>=5, 1216, 1211)
;---------------------------------------------------------------------------;
[Statedef 1211]
type=S
movetype=A
Physics=N
ctrl = 0
;anim = 1211
sprpriority=2
velset=0,0

[State 1211, VarAdd]
type=VarAdd
trigger1=1
var(1)=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.17
fvar(10)= .17
ignorehitpause=1

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

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=Time=0&&Anim!=1211
value=1211

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

[State 0, HitBy]
type=HitBy
trigger1=var(5)<3
value=SCA,AP,HA
ignorehitpause=1

[State 0, NotHitBy]
type=NotHitBy
trigger1=var(5)>=3
value=SCA

[State 0, VarAdd]
type=VarAdd
trigger1=Time=0
var(5)=1

[State 0, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP,AA,AT
stateno=1211

[State 0, PlaySnd]
type=PlaySnd
trigger1=AnimElemTime(3)=0
value=S5,14
channel=10
pan=1

[State 0, HitDef]
type=HitDef
triggerall=var(5)<=3
trigger1=!movecontact && Var(5)<2 || Var(1) % 9 = 0;(Time%8)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SA
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=4,Hit
damage=41,2
pausetime=1,ifelse(var(5)=3, 8, 5)
sparkno=-1
guard.sparkno=-1
sparkxy=0,0
hitsound=S-1,0
guardsound=S-1,0
ground.type=High
air.type=High
ground.slidetime=14
ground.hittime=15
air.hittime=20
ground.velocity=0,-11.45
guard.velocity=-9.1*root,const(size.xscale)
air.velocity=0,-11.45
airguard.velocity=-9.1*root,const(size.xscale),-3.1
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=36,28
givepower=24,16
yaccel=.8

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1025, HitSound]
type=playsnd
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil((p2dist X)-10 * root,const(size.xscale)),Ceil((p2dist Y)+Enemynear,const(size.head.pos.y))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil((p2dist X)-10 * root,const(size.xscale)),Ceil((p2dist Y)+Enemynear,const(size.head.pos.y))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(5)=0
anim=1212
ID=1212
pos=0,Ceil(-8*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=2
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(8)=0
anim=1212
ID=1212
pos=0,Ceil(-72*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=3
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(11)=0
anim=1212
ID=1212
pos=0,Ceil(-136*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=4
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, RemoveExplod]
type=RemoveExplod
trigger1=AnimElemTime(24)=0
trigger2=root,movetype=H&&Root,StateNo!=9000
id=1212

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(24)=0
anim=1213
ID=1212
pos=0,Ceil(-8*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=2
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(24)=0
anim=1213
ID=1212
pos=0,Ceil(-72*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=3
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(24)=0
anim=1213
ID=1212
pos=0,Ceil(-136*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=4
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(2)=0
anim=1214
ID=1214
pos=0,0
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=5
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, RemoveExplod]
type=RemoveExplod
trigger1=AnimElemTime(24)=0
trigger2=root,movetype=H&&Root,StateNo!=9000
id=1214

[State 0, Explod]
type=Explod
trigger1=animelemtime(3)>=0&&animelemtime(24)<0
trigger1=(gametime%2)=0
anim=1215
ID=1215
pos=0,-25
postype=p1
bindtime=1
vel=0,-15
accel=0,-.5
random=100,75
removetime=10
scale=.1,1
sprpriority=ifelse(random<500, -1, 3)
ownpal=0
removeongethit=1

[State 0, RemoveExplod]
type=RemoveExplod
trigger1=AnimElemTime(24)=0
trigger2=root,movetype=H&&Root,StateNo!=9000
id=1215

[State 1210, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

[State 1210, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact && Var(5)<=3
value =1211

[State 1290, End]
type=DestroySelf
trigger1=AnimTime=0
trigger2=root,movetype=H&&Root,StateNo!=9000

;---------------------------------------------------------------------------;
[Statedef 1216]
type=S
movetype=A
Physics=N
ctrl = 0
;anim = 1211
sprpriority=2
velset=0,0

[State 1211, VarAdd]
type=VarAdd
trigger1=1
var(1)=1

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1=1
text="var(5) = %d"
params=var(5)
ignorehitpause=1

[State 0, VelSet]
type = VelSet
trigger1 = var(1) > 1
x = 3
y = 0

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.17
fvar(10)= .17
ignorehitpause=1

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

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=Time=0&&Anim!=1216&&var(5)<=5 && frontedgebodydist > -64
value=1216

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=(Anim!=1211) && (var(5)>5 || frontedgebodydist <= -64)
value=1211
elem=24

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

[State 0, HitBy]
type=HitBy
trigger1=var(5)<=5
value=SCA,AP,HA
ignorehitpause=1

[State 0, NotHitBy]
type=NotHitBy
trigger1=var(5)>5
value=SCA

[State 0, VarAdd]
type=VarAdd
trigger1=Time=0;&&prevstateno=1216
var(5)=1

[State 0, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP,AA,AT
stateno=1216

[State 0, PlaySnd]
type=PlaySnd
trigger1=AnimElemTime(3)>=0 && anim = 1216
trigger1=Var(1) % 15 = 3
value=S5,14
channel=10
pan=1

[State 0, HitDef]
type=HitDef
triggerall=var(5)<=5
trigger1= !movecontact || Var(1) % 9 = 0;(Time%8)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SA
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=4,Hit
damage=41,2
pausetime=1,5;ifelse(var(5)=3, 8, 5)
sparkno=-1
guard.sparkno=-1
sparkxy=0,0
hitsound=S-1,0
guardsound=S-1,0
ground.type=High
air.type=High
ground.slidetime=14
ground.hittime=15
air.hittime=20
ground.velocity=-5.625*root,const(size.xscale),-11.45
guard.velocity=-9.1*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-11.45
airguard.velocity=-9.1*root,const(size.xscale),-3.1
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=36,28
givepower=24,16
yaccel=.8

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1025, HitSound]
type=playsnd
trigger1= movehit && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil((p2dist X) - 10 * root,const(size.xscale)),Ceil((p2dist Y)+Enemynear,const(size.head.pos.y))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil((p2dist X) - 10 * root,const(size.xscale)),Ceil((p2dist Y)+Enemynear,const(size.head.pos.y))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(5)=0
anim=1212
ID=1212
pos=0,Ceil(-8*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=2
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(8)=0
anim=1212
ID=1212
pos=0,Ceil(-72*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=3
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(11)=0
anim=1212
ID=1212
pos=0,Ceil(-136*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=4
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, RemoveExplod]
type=RemoveExplod
trigger1=anim=1211;AnimElemTime(24)=0
trigger2=root,movetype=H&&Root,StateNo!=9000
id=1212

[State 0, Explod]
type=Explod
trigger1=(anim=1211&&AnimElemTime(24)=0)
anim=1213
ID=1212
pos=0,Ceil(-8*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=2
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=(anim=1211&&AnimElemTime(24)=0)
anim=1213
ID=1212
pos=0,Ceil(-72*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=3
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=(anim=1211&&AnimElemTime(24)=0)
anim=1213
ID=1212
pos=0,Ceil(-136*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=4
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=(anim=1216&&AnimElemTime(2)=0)
anim=1214
ID=1214
pos=0,0
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=5
ownpal=0
removeongethit=0
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=animelemtime(3)>=0&&anim=1216;&&animelemtime(24)<0
trigger1=(gametime%2)=0
anim=1215
ID=1215
pos=0,-25
postype=p1
bindtime=1
vel=0,-15
accel=0,-.5
random=100,75
removetime=10
scale=.1,1
sprpriority=ifelse(random<500, -1, 3)
ownpal=0
removeongethit=1

[State 0, RemoveExplod]
type=RemoveExplod
trigger1=(anim=1211&&AnimElemTime(24)>=0)
trigger2=root,movetype=H&&Root,StateNo!=9000
id=1214

[State 1210, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

[State 1210, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

;[State 0, ChangeState]
;type = ChangeState
;trigger1 = movecontact && Var(5)<=5
;value =1216

[State 1290, End]
type=DestroySelf
trigger1=(anim=1211 && animtime=0);AnimTime=0
trigger2=root,movetype=H&&Root,StateNo!=9000

;---------------------------------------------------------------------------;
[StateDef 1220]
movetype= I
ctrl = 0
sprpriority = 5

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(1)=%d || var(2)=%d"
params = var(1), var(2)
ignorehitpause = 1

[State 0, VarSet]
type=VarSet
trigger1=Time=0&&PrevStateNo!=1220
var(3)=0

[State 0, VarSet]
type=VarAdd
trigger1=Var(2)
var(3)=1

[State 0, VarSet]
type=VarSet
triggerall=root,prevstateno!=9000
trigger1=Root,StateNo=1201 && Root,Var(5)=10 && root,var(50)=2
trigger1=Root,AnimElemTime(10)>=0
var(2)=1

[State 0, VarSet]
type = VarSet
triggerall = root,var(5) = 5 && root,var(50)=2
trigger1=Time=0&&PrevStateNo!=1220
trigger2=root,stateno=1201&&root,animelemtime(10)>=0
var(5) = 5

[State 0, VarSet]
type=VarSet
trigger1=Time=0&&PrevStateNo!=1220
trigger2=root,stateno=1201&&root,animelemtime(10)=0&& root,var(50)=2
trigger2=Var(5)=5
var(1)=0

[State 1220, VarAdd]
type=VarAdd
trigger1=1
var(1)=1

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = var(5) = 5
var(25) = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = var(5) = 5
;trigger1 = (time%15)=0
time = 1
add = 192 * ceil(sin(time * .5)),0,0
;sinadd = -80,0,0,10

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = !var(2)
trigger1 = root,statetype=S
statetype = S

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = !var(2)
trigger1 = root,statetype=A
statetype = A

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = !var(2)
trigger1 = root,statetype=C
statetype = C

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = !var(2)
trigger1 = root,statetype=L
statetype = L

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

[State 0, BindToRoot]
type=BindToRoot
trigger1=Var(3)<10
time=2
facing=1
pos=0,0
ignorehitpause=1

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=1
value=root,anim
elem=root,animelemno(0)
ignorehitpause=1

;[State 0, HitOverride]
;type=HitOverride
;trigger1=1
;attr=SCA,AA,AP,AT
;time=-1
;stateno=1221
;ignorehitpause=1

[State 0, HitBy]
type=NotHitBy
trigger1=1
value=SCA;,AA,AP
time=1
ignorehitpause=1

[State 0, Helper1]
type=Helper
trigger1=Time=0
helpertype=normal ;player
name="Leaf 1"
ID=1222
stateno=1222
pos=Ceil(7*root,const(size.xscale)),Ceil(-69*root,const(size.yscale))
;pos=Ceil(31*root,const(size.xscale)),Ceil(-62*root,const(size.yscale))
;pos=Ceil(45*root,const(size.xscale)),Ceil(-41*root,const(size.yscale))
;pos=Ceil(37*root,const(size.xscale)),Ceil(-19*root,const(size.yscale))
;pos=Ceil(10*root,const(size.xscale)),Ceil(-7*root,const(size.yscale))
;pos=Ceil(-17*root,const(size.xscale)),Ceil(-14*root,const(size.yscale))
;pos=Ceil(-31*root,const(size.xscale)),Ceil(-35*root,const(size.yscale))
;pos=Ceil(-23*root,const(size.xscale)),Ceil(-57*root,const(size.yscale))
postype=p1
ownpal = 0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 0, Helper1]
type=Helper
trigger1=Time=0
helpertype=normal ;player
name="Leaf 2"
ID=1222
stateno=1223
pos=Ceil(7*root,const(size.xscale)),Ceil(-69*root,const(size.yscale))
;pos=Ceil(31*root,const(size.xscale)),Ceil(-62*root,const(size.yscale))
;pos=Ceil(45*root,const(size.xscale)),Ceil(-41*root,const(size.yscale))
;pos=Ceil(37*root,const(size.xscale)),Ceil(-19*root,const(size.yscale))
;pos=Ceil(10*root,const(size.xscale)),Ceil(-7*root,const(size.yscale))
;pos=Ceil(-17*root,const(size.xscale)),Ceil(-14*root,const(size.yscale))
;pos=Ceil(-31*root,const(size.xscale)),Ceil(-35*root,const(size.yscale))
;pos=Ceil(-23*root,const(size.xscale)),Ceil(-57*root,const(size.yscale))
postype=p1
ownpal = 0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 0, Helper1]
type=Helper
trigger1=Time=0
helpertype=normal ;player
name="Leaf 3"
ID=1222
stateno=1224
pos=Ceil(7*root,const(size.xscale)),Ceil(-69*root,const(size.yscale))
;pos=Ceil(31*root,const(size.xscale)),Ceil(-62*root,const(size.yscale))
;pos=Ceil(45*root,const(size.xscale)),Ceil(-41*root,const(size.yscale))
;pos=Ceil(37*root,const(size.xscale)),Ceil(-19*root,const(size.yscale))
;pos=Ceil(10*root,const(size.xscale)),Ceil(-7*root,const(size.yscale))
;pos=Ceil(-17*root,const(size.xscale)),Ceil(-14*root,const(size.yscale))
;pos=Ceil(-31*root,const(size.xscale)),Ceil(-35*root,const(size.yscale))
;pos=Ceil(-23*root,const(size.xscale)),Ceil(-57*root,const(size.yscale))
postype=p1
ownpal = 0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 0, Helper1]
type=Helper
trigger1=Time=0
helpertype=normal ;player
name="Leaf 4"
ID=1222
stateno=1225
pos=Ceil(7*root,const(size.xscale)),Ceil(-69*root,const(size.yscale))
;pos=Ceil(31*root,const(size.xscale)),Ceil(-62*root,const(size.yscale))
;pos=Ceil(45*root,const(size.xscale)),Ceil(-41*root,const(size.yscale))
;pos=Ceil(37*root,const(size.xscale)),Ceil(-19*root,const(size.yscale))
;pos=Ceil(10*root,const(size.xscale)),Ceil(-7*root,const(size.yscale))
;pos=Ceil(-17*root,const(size.xscale)),Ceil(-14*root,const(size.yscale))
;pos=Ceil(-31*root,const(size.xscale)),Ceil(-35*root,const(size.yscale))
;pos=Ceil(-23*root,const(size.xscale)),Ceil(-57*root,const(size.yscale))
postype=p1
ownpal = 0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 0, Helper1]
type=Helper
trigger1=Time=0
helpertype=normal ;player
name="Leaf 5"
ID=1222
stateno=1226
pos=Ceil(7*root,const(size.xscale)),Ceil(-69*root,const(size.yscale))
;pos=Ceil(31*root,const(size.xscale)),Ceil(-62*root,const(size.yscale))
;pos=Ceil(45*root,const(size.xscale)),Ceil(-41*root,const(size.yscale))
;pos=Ceil(37*root,const(size.xscale)),Ceil(-19*root,const(size.yscale))
;pos=Ceil(10*root,const(size.xscale)),Ceil(-7*root,const(size.yscale))
;pos=Ceil(-17*root,const(size.xscale)),Ceil(-14*root,const(size.yscale))
;pos=Ceil(-31*root,const(size.xscale)),Ceil(-35*root,const(size.yscale))
;pos=Ceil(-23*root,const(size.xscale)),Ceil(-57*root,const(size.yscale))
postype=p1
ownpal = 0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 0, Helper1]
type=Helper
trigger1=Time=0
helpertype=normal ;player
name="Leaf 6"
ID=1222
stateno=1227
pos=Ceil(7*root,const(size.xscale)),Ceil(-69*root,const(size.yscale))
;pos=Ceil(31*root,const(size.xscale)),Ceil(-62*root,const(size.yscale))
;pos=Ceil(45*root,const(size.xscale)),Ceil(-41*root,const(size.yscale))
;pos=Ceil(37*root,const(size.xscale)),Ceil(-19*root,const(size.yscale))
;pos=Ceil(10*root,const(size.xscale)),Ceil(-7*root,const(size.yscale))
;pos=Ceil(-17*root,const(size.xscale)),Ceil(-14*root,const(size.yscale))
;pos=Ceil(-31*root,const(size.xscale)),Ceil(-35*root,const(size.yscale))
;pos=Ceil(-23*root,const(size.xscale)),Ceil(-57*root,const(size.yscale))
postype=p1
ownpal = 0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 0, Helper1]
type=Helper
trigger1=Time=0
helpertype=normal ;player
name="Leaf 7"
ID=1222
stateno=1228
pos=Ceil(7*root,const(size.xscale)),Ceil(-69*root,const(size.yscale))
;pos=Ceil(31*root,const(size.xscale)),Ceil(-62*root,const(size.yscale))
;pos=Ceil(45*root,const(size.xscale)),Ceil(-41*root,const(size.yscale))
;pos=Ceil(37*root,const(size.xscale)),Ceil(-19*root,const(size.yscale))
;pos=Ceil(10*root,const(size.xscale)),Ceil(-7*root,const(size.yscale))
;pos=Ceil(-17*root,const(size.xscale)),Ceil(-14*root,const(size.yscale))
;pos=Ceil(-31*root,const(size.xscale)),Ceil(-35*root,const(size.yscale))
;pos=Ceil(-23*root,const(size.xscale)),Ceil(-57*root,const(size.yscale))
postype=p1
ownpal = 0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 0, Helper1]
type=Helper
trigger1=Time=0
helpertype=normal ;player
name="Leaf 8"
ID=1229
stateno=1229
pos=Ceil(7*root,const(size.xscale)),Ceil(-69*root,const(size.yscale))
;pos=Ceil(31*root,const(size.xscale)),Ceil(-62*root,const(size.yscale))
;pos=Ceil(45*root,const(size.xscale)),Ceil(-41*root,const(size.yscale))
;pos=Ceil(37*root,const(size.xscale)),Ceil(-19*root,const(size.yscale))
;pos=Ceil(10*root,const(size.xscale)),Ceil(-7*root,const(size.yscale))
;pos=Ceil(-17*root,const(size.xscale)),Ceil(-14*root,const(size.yscale))
;pos=Ceil(-31*root,const(size.xscale)),Ceil(-35*root,const(size.yscale))
;pos=Ceil(-23*root,const(size.xscale)),Ceil(-57*root,const(size.yscale))
postype=p1
ownpal = 0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 0, VelSet]
type = VelSet
trigger1 = Var(3)=10
x = 6

[State 1221, end]
type = DestroySelf
triggerall = Var(2)
trigger1 = FrontEdgeDist<=-120 || BackEdgeDist<=-120

[State 1220, end]
type = DestroySelf
trigger1 = Var(1) > 256 && Var(2)!=1
trigger2 = root,movetype=H && Var(2)!=1
trigger2 = (root,stateno!=[120,159]) && Var(2)!=1
trigger3 = root,stateno=9000 && Var(2)!=1
trigger4 = !Numhelper(1222)
trigger5 = (root,anim=[3000,3002]) || (root,anim=[3100,3102]) || (root,anim=[3200,3201])

[StateDef 1221]
movetype= I
velset = 0,0
ctrl = 0
movehitpersist=1

[State 1221, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = anim
elem = 1
ignorehitpause = 1

[State 1221, VelAdd]
type = VelAdd
trigger1 = Time > 0
y = .2

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

[State 1221, PalFX]
type = PalFX
trigger1 = 1
time = 2
add = 80,80,56
ignorehitpause = 1

[State 1221, AssertSpecial]
type=AssertSpecial
trigger1=(time%3)=1
flag=noshadow
flag2=invisible

[State 1221, end]
type = DestroySelf
trigger1 = Time>=12
;-------------------------------------------------------------------------------
[StateDef 1222]
movetype= I
ctrl = 0
anim = 1220
sprpriority=3

[State 0, VarAdd] ;TimerVar
type=VarAdd
trigger1= Time>0 && (parent,var(3)!=[1,10])
var(1)=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1

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

[State 1222, 1]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=S||(root,stateno=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos(var(1)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.mid.pos.y)+2)+(sin(var(1)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 2]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=A&&(root,stateno!=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.head.pos.x)+3)+(cos(var(1)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.head.pos.y)+2)+(sin(var(1)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 3]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=C
trigger1 = parent,stateno = 1220
pos=(((root,const(size.mid.pos.x)+3)*2)+(cos(var(1)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/2) +(sin(var(1)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 4]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=L
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos(var(1)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/3)+(sin(var(1)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 0, NotHitBy]
type=NotHitBy
trigger1=parent,var(3)=0
value=SCA
ignorehitpause=1

[State 0, HitBy]
type=HitBy
trigger1=parent,var(3)>0
value=SCA,AP
ignorehitpause=1

[State 0, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP
stateno=1221
ignorehitpause=1

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=parent,var(2)
trigger2=parent,var(5) = 5
movetype=A

[State 1225, HitDef]
type=HitDef
trigger1=parent,var(2)
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
trigger2=(parent,var(3)!=[1,10]) && !parent,var(2)
trigger2=parent,var(5) = 5
trigger2=(var(1) % 29) = 0
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=13,2
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*root,const(size.xscale),-8.225
down.hittime=20
getpower=10,9
givepower=7,5

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1220, end]
type=ChangeState
trigger1=!NumHelper(1220)
trigger2=MoveContact && parent,var(2)
value=1221

;-------------------------------------------------------------------------------
[StateDef 1223]
movetype= I
ctrl = 0
anim = 1220
sprpriority=3

[State 0, VarAdd] ;TimerVar
type=VarAdd
trigger1= Time>0 && (parent,var(3)!=[1,10])
var(1)=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1

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

[State 1222, 1]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=S||(root,stateno=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+7)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.mid.pos.y)+2)+(sin((var(1)+7)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 2]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=A&&(root,stateno!=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.head.pos.x)+3)+(cos((var(1)+7)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.head.pos.y)+2)+(sin((var(1)+7)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 3]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=C
trigger1 = parent,stateno = 1220
pos=(((root,const(size.mid.pos.x)+3)*2)+(cos((var(1)+7)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/2) +(sin((var(1)+7)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 4]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=L
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+7)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/3)+(sin((var(1)+7)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 0, NotHitBy]
type=NotHitBy
trigger1=parent,var(3)=0
value=SCA
ignorehitpause=1

[State 0, HitBy]
type=HitBy
trigger1=parent,var(3)>0
value=SCA,AP
ignorehitpause=1

[State 0, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP
stateno=1221
ignorehitpause=1

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=parent,var(2)
trigger2=parent,var(5) = 5
movetype=A

[State 1225, HitDef]
type=HitDef
trigger1=parent,var(2)
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
trigger2=(parent,var(3)!=[1,10]) && !parent,var(2)
trigger2=parent,var(5) = 5
trigger2=(var(1) % 43) = 0
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=13,2
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*root,const(size.xscale),-8.225
down.hittime=20
getpower=10,9
givepower=7,5

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1220, end]
type=ChangeState
trigger1=!NumHelper(1220)
trigger2=MoveContact && parent,var(2)
value=1221

;-------------------------------------------------------------------------------
[StateDef 1224]
movetype= I
ctrl = 0
anim = 1220
sprpriority=3

[State 0, VarAdd] ;TimerVar
type=VarAdd
trigger1= Time>0 && (parent,var(3)!=[1,10])
var(1)=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1

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

[State 1222, 1]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=S||(root,stateno=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+14)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.mid.pos.y)+2)+(sin((var(1)+14)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 2]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=A&&(root,stateno!=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.head.pos.x)+3)+(cos((var(1)+14)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.head.pos.y)+2)+(sin((var(1)+14)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 3]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=C
trigger1 = parent,stateno = 1220
pos=(((root,const(size.mid.pos.x)+3)*2)+(cos((var(1)+14)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/2) +(sin((var(1)+14)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 4]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=L
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+14)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/3)+(sin((var(1)+14)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 0, NotHitBy]
type=NotHitBy
trigger1=parent,var(3)=0
value=SCA
ignorehitpause=1

[State 0, HitBy]
type=HitBy
trigger1=parent,var(3)>0
value=SCA,AP
ignorehitpause=1

[State 0, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP
stateno=1221
ignorehitpause=1

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=parent,var(2)
trigger2=parent,var(5) = 5
movetype=A

[State 1225, HitDef]
type=HitDef
trigger1=parent,var(2)
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
trigger2=(parent,var(3)!=[1,10]) && !parent,var(2)
trigger2=parent,var(5) = 5
trigger2=(var(1) % 57) = 0
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=13,2
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*root,const(size.xscale),-8.225
down.hittime=20
getpower=10,9
givepower=7,5

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1220, end]
type=ChangeState
trigger1=!NumHelper(1220)
trigger2=MoveContact && parent,var(2)
value=1221

;-------------------------------------------------------------------------------
[StateDef 1225]
movetype= I
ctrl = 0
anim = 1220
sprpriority=3

[State 0, VarAdd] ;TimerVar
type=VarAdd
trigger1= Time>0 && (parent,var(3)!=[1,10])
var(1)=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1

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

[State 1222, 1]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=S||(root,stateno=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+21)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.mid.pos.y)+2)+(sin((var(1)+21)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 2]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=A&&(root,stateno!=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.head.pos.x)+3)+(cos((var(1)+21)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.head.pos.y)+2)+(sin((var(1)+21)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 3]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=C
trigger1 = parent,stateno = 1220
pos=(((root,const(size.mid.pos.x)+3)*2)+(cos((var(1)+21)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/2) +(sin((var(1)+21)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 4]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=L
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+21)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/3)+(sin((var(1)+21)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 0, NotHitBy]
type=NotHitBy
trigger1=parent,var(3)=0
value=SCA
ignorehitpause=1

[State 0, HitBy]
type=HitBy
trigger1=parent,var(3)>0
value=SCA,AP
ignorehitpause=1

[State 0, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP
stateno=1221
ignorehitpause=1

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=parent,var(2)
trigger2=parent,var(5) = 5
movetype=A

[State 1225, HitDef]
type=HitDef
trigger1=parent,var(2)
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
trigger2=(parent,var(3)!=[1,10]) && !parent,var(2)
trigger2=parent,var(5) = 5
trigger2=(var(1) % 71) = 0
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=13,2
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*root,const(size.xscale),-8.225
down.hittime=20
getpower=10,9
givepower=7,5

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1220, end]
type=ChangeState
trigger1=!NumHelper(1220)
trigger2=MoveContact && parent,var(2)
value=1221

;-------------------------------------------------------------------------------
[StateDef 1226]
movetype= I
ctrl = 0
anim = 1220
sprpriority=3

[State 0, VarAdd] ;TimerVar
type=VarAdd
trigger1= Time>0 && (parent,var(3)!=[1,10])
var(1)=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1

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

[State 1222, 1]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=S||(root,stateno=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+28)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.mid.pos.y)+2)+(sin((var(1)+28)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 2]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=A&&(root,stateno!=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.head.pos.x)+3)+(cos((var(1)+28)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.head.pos.y)+2)+(sin((var(1)+28)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 3]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=C
trigger1 = parent,stateno = 1220
pos=(((root,const(size.mid.pos.x)+3)*2)+(cos((var(1)+28)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/2) +(sin((var(1)+28)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 4]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=L
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+28)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/3)+(sin((var(1)+28)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 0, NotHitBy]
type=NotHitBy
trigger1=parent,var(3)=0
value=SCA
ignorehitpause=1

[State 0, HitBy]
type=HitBy
trigger1=parent,var(3)>0
value=SCA,AP
ignorehitpause=1

[State 0, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP
stateno=1221
ignorehitpause=1

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=parent,var(2)
trigger2=parent,var(5) = 5
movetype=A

[State 1225, HitDef]
type=HitDef
trigger1=parent,var(2)
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
trigger2=(parent,var(3)!=[1,10]) && !parent,var(2)
trigger2=parent,var(5) = 5
trigger2=(var(1) % 85) = 0
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=13,2
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*root,const(size.xscale),-8.225
down.hittime=20
getpower=10,9
givepower=7,5

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1220, end]
type=ChangeState
trigger1=!NumHelper(1220)
trigger2=MoveContact && parent,var(2)
value=1221

;-------------------------------------------------------------------------------
[StateDef 1227]
movetype= I
ctrl = 0
anim = 1220
sprpriority=3

[State 0, VarAdd] ;TimerVar
type=VarAdd
trigger1= Time>0 && (parent,var(3)!=[1,10])
var(1)=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1

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

[State 1222, 1]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=S||(root,stateno=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+35)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.mid.pos.y)+2)+(sin((var(1)+35)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 2]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=A&&(root,stateno!=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.head.pos.x)+3)+(cos((var(1)+35)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.head.pos.y)+2)+(sin((var(1)+35)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 3]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=C
trigger1 = parent,stateno = 1220
pos=(((root,const(size.mid.pos.x)+3)*2)+(cos((var(1)+35)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/2) +(sin((var(1)+35)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 4]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=L
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+35)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/3)+(sin((var(1)+35)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 0, NotHitBy]
type=NotHitBy
trigger1=parent,var(3)=0
value=SCA
ignorehitpause=1

[State 0, HitBy]
type=HitBy
trigger1=parent,var(3)>0
value=SCA,AP
ignorehitpause=1

[State 0, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP
stateno=1221
ignorehitpause=1

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=parent,var(2)
trigger2=parent,var(5) = 5
movetype=A

[State 1225, HitDef]
type=HitDef
trigger1=parent,var(2)
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
trigger2=(parent,var(3)!=[1,10]) && !parent,var(2)
trigger2=parent,var(5) = 5
trigger2=(var(1) % 99) = 0
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=13,2
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*root,const(size.xscale),-8.225
down.hittime=20
getpower=10,9
givepower=7,5

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1220, end]
type=ChangeState
trigger1=!NumHelper(1220)
trigger2=MoveContact && parent,var(2)
value=1221

;-------------------------------------------------------------------------------
[StateDef 1228]
movetype= I
ctrl = 0
anim = 1220
sprpriority=3

[State 0, VarAdd] ;TimerVar
type=VarAdd
trigger1= Time>0 && (parent,var(3)!=[1,10])
var(1)=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1

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

[State 1222, 1]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=S||(root,stateno=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+42)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.mid.pos.y)+2)+(sin((var(1)+42)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 2]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=A&&(root,stateno!=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.head.pos.x)+3)+(cos((var(1)+42)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.head.pos.y)+2)+(sin((var(1)+42)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 3]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=C
trigger1 = parent,stateno = 1220
pos=(((root,const(size.mid.pos.x)+3)*2)+(cos((var(1)+42)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/2) +(sin((var(1)+42)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 4]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=L
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+42)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/3)+(sin((var(1)+42)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 0, NotHitBy]
type=NotHitBy
trigger1=parent,var(3)=0
value=SCA
ignorehitpause=1

[State 0, HitBy]
type=HitBy
trigger1=parent,var(3)>0
value=SCA,AP
ignorehitpause=1

[State 0, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP
stateno=1221
ignorehitpause=1

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=parent,var(2)
trigger2=parent,var(5) = 5
movetype=A

[State 1225, HitDef]
type=HitDef
trigger1=parent,var(2)
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
trigger2=(parent,var(3)!=[1,10]) && !parent,var(2)
trigger2=parent,var(5) = 5
trigger2=(var(1) % 113) = 0
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=13,2
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*root,const(size.xscale),-8.225
down.hittime=20
getpower=10,9
givepower=7,5

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1220, end]
type=ChangeState
trigger1=!NumHelper(1220)
trigger2=MoveContact && parent,var(2)
value=1221

;-------------------------------------------------------------------------------
[StateDef 1229]
movetype= I
ctrl = 0
anim = 1220
sprpriority=3

[State 0, VarAdd] ;TimerVar
type=VarAdd
trigger1= Time>0 && (parent,var(3)!=[1,10])
var(1)=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1

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

[State 1222, 1]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=S||(root,stateno=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+49)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.mid.pos.y)+2)+(sin((var(1)+49)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 2]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=A&&(root,stateno!=[100,119])
trigger1 = parent,stateno = 1220
pos=((root,const(size.head.pos.x)+3)+(cos((var(1)+49)/27.5*pi)*39))*root,const(size.xscale),((root,const(size.head.pos.y)+2)+(sin((var(1)+49)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 3]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=C
trigger1 = parent,stateno = 1220
pos=(((root,const(size.mid.pos.x)+3)*2)+(cos((var(1)+49)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/2) +(sin((var(1)+49)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 1222, 4]
type=BindToParent
trigger1 = parent,var(3)!=[1,10]
trigger1 = parent,statetype=L
trigger1 = parent,stateno = 1220
pos=((root,const(size.mid.pos.x)+3)+(cos((var(1)+49)/27.5*pi)*39))*root,const(size.xscale),(((root,const(size.mid.pos.y)+2)/3)+(sin((var(1)+49)/27.5*pi)*32))*root,const(size.yscale)
facing=1
time=2
ignorehitpause = 1

[State 0, NotHitBy]
type=NotHitBy
trigger1=parent,var(3)=0
value=SCA
ignorehitpause=1

[State 0, HitBy]
type=HitBy
trigger1=parent,var(3)>0
value=SCA,AP
ignorehitpause=1

[State 0, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP
stateno=1221
ignorehitpause=1

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=parent,var(2)
movetype=A

[State 1225, HitDef]
type=HitDef
trigger1=parent,var(2)
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
trigger2=(parent,var(3)!=[1,10]) && !parent,var(2)
trigger2=parent,var(5) = 5
trigger2=(var(1) % 127) = 0
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Medium
priority=5,Hit
damage=13,2
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*root,const(size.xscale),-8.225
down.hittime=20
getpower=10,9
givepower=7,5

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=ceil(-10 * root,const(size.xscale)), ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1220, end]
type=ChangeState
trigger1=!NumHelper(1220)
trigger2=MoveContact && parent,var(2)
value=1221

;---------------------------------------------------------------------------;
[Statedef 1270]
ctrl = 0
anim = 1270
sprpriority=4

[State 1270, VarSet]
type=VarSet
trigger1=NumHelper(12000) && Time=0 && PrevStateNo!=1270
var(50)=Helper(12000),Var(50)

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "rootdist X = %f || rootdist Y = %f"
params = rootdist x, rootdist Y
ignorehitpause = 1

[State 0, VelSet]
type=VelSet
trigger1=time=1
x=1.75
y=-6

[State 0, VelAdd]
type=VelAdd
triggerall = Pos Y < -10
trigger1=time>0
y=.3

[State 0, VelSet]
type=VelSet
trigger1=Pos Y >= -10
trigger1=Vel Y >= 0
x=0
y=0

[State 0, PosSet]
type=PosSet
trigger1=Pos Y >= -10
trigger1=Vel Y >= 0
y=-10

[State 0, AssertSpecial]
type=AssertSpecial
trigger1=Time>=210
trigger1=(Time%2)=0
flag=noshadow
flag2=invisible

[State 0, Helper]
type=Helper
trigger1=Time=0
helpertype=normal ;player
name="Weapon BG"
ID=1271
stateno=1271
pos=0,0
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)
size.ground.back=Ceil(10*root,const(size.xscale))
size.ground.front=Ceil(10*root,const(size.yscale))

[State 0, Helper]
type=Helper
trigger1=Time=0
helpertype=normal ;player
name="Icon"
ID=1280
stateno=1280
pos=0,0
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)
size.ground.back=Ceil(10*root,const(size.xscale))
size.ground.front=Ceil(10*root,const(size.yscale))

[State 1290, End]
type=Destroyself
trigger1=Time >= 270

[State 1290, End]
type=ChangeState
trigger1=rootdist X = [-30,30]
trigger1=rootdist Y = [0,60]
value=1290

;---------------------------------------------------------------------------;
[Statedef 1271]
ctrl = 0
anim = 1271
sprpriority=1

[State 0, BindToParent]
type=BindToParent
trigger1=1
time=2
ignorehitpause=1

[State 0, AssertSpecial]
type=AssertSpecial
trigger1=Time>=210
trigger1=(Time%2)=0
flag=noshadow
flag2=invisible

[State 1290, End]
type=Destroyself
trigger1=!numhelper(1270)
trigger2=rootdist X = [-30,30]
trigger2=rootdist Y = [0,60]
;---------------------------------------------------------------------------;
[Statedef 1280]
ctrl = 0
anim = 1280+(parent,var(50))
sprpriority=3

[State 0, BindToParent]
type=BindToParent
trigger1=1
time=2
ignorehitpause=1

[State 0, AssertSpecial]
type=AssertSpecial
trigger1=Time>=210
trigger1=(Time%2)=0
flag=noshadow
flag2=invisible

[State 1290, End]
type=Destroyself
trigger1=!numhelper(1270)
trigger2=rootdist X = [-30,30]
trigger2=rootdist Y = [0,60]

;---------------------------------------------------------------------------;
[Statedef 1290]
ctrl = 0
anim=1290+var(50)
sprpriority=2
velset=0,0

[State 0, VarSet]
type=ParentVarSet
trigger1=Time=0
var(50)=Var(50)

[State 0, PlaySnd]
type=PlaySnd
trigger1=Time=0
value=S5,26
channel=8

[State 0, BindToParent]
type=BindToRoot
trigger1=time<60
facing=root,facing
time=1
pos=Ceil(root,const(size.head.pos.x)),Ceil(-30+root,const(size.head.pos.y))
ignorehitpause=1

[State 0, VelSet]
type=VelSet
trigger1=Time=60
x=-15*root,facing

[State 1290, End]
type=Destroyself
trigger1=FrontEdgeDist<=-75 || BackEdgeDist<=-75
trigger2=Time>=180

;-------------------------------------------------------------------
; Lightning Bolt
[StateDef 1700]
type = U
movetype= A
physics = N
juggle  = 0
ctrl = 0
sprpriority = 2
poweradd=ifelse(prevstateno=9000,0,14)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000,1,0)

[State 1100, Strength Var]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=1700&&PrevStateNo!=9000)
var(5)=ifelse(command="QCF_z", 2, ifelse(command="QCF_y", 1, 0))

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=anim!=stateno;&&(anim!=241)
trigger1=time=0
value=stateno

;-------------------------------------------------------------------------------
[State 0, VelSet]
type=VelSet
trigger1=animelemtime(1)=0 && statetype = A
x=ifelse(Vel X, Vel X*.025, 0)
y=ifelse(Vel Y < 0, -1, (Vel Y * .025))

[State 0, VelAdd]
type=VelAdd
trigger1=Pos Y < 0 && StateType = A
y = .025

[State 0, PosSet]
type=PosSet
trigger1=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
trigger2=!Time&&(PrevStateNo!=1700||PrevStateNo!=9000)
trigger2=Statetype!=A
y=0

[State 0, VelSet]
type=VelSet
trigger1=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
trigger2=!Time&&(PrevStateNo!=1700||PrevStateNo!=9000)
trigger2=Statetype!=A
x=0
y=0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1=pos Y >= Floor(-Vel Y) && Vel Y >= 0
statetype = S
physics = S
;-------------------------------------------------------------------------------

[State 0, Special Spark]
type=Explod
trigger1=statetype!=A
trigger1=Time=1
anim=8006
ID=8006
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ownpal=1
ignorehitpause=1

[State 1705, Helper]
type=Helper
trigger1=AnimElemTime(3)=0 && var(5)=0
trigger2=AnimElemTime(8)=0 && var(5)=1
trigger3=AnimElemTime(8)=0 && var(5)=2
helpertype=normal ;player
name="Bolt"
ID=1705
stateno=1705
pos=Ceil((-Pos X*facing) - 120) ,Ceil(-Pos Y)
postype=p1
ownpal=1
size.xscale=const(size.xscale)/2
size.yscale=const(size.yscale)/2

[State 1705, Helper]
type=Helper
trigger1=AnimElemTime(8)=0 && var(5)=0
trigger2=AnimElemTime(3)=0 && var(5)=1
trigger3=AnimElemTime(18)=0 && var(5)=2
helpertype=normal ;player
name="Bolt"
ID=1705
stateno=1705
pos=Ceil((-Pos X*facing) - 40) ,Ceil(-Pos Y)
postype=p1
ownpal=1
size.xscale=const(size.xscale)/2
size.yscale=const(size.yscale)/2

[State 1705, Helper]
type=Helper
trigger1=AnimElemTime(13)=0 && var(5)=0
trigger2=AnimElemTime(18)=0 && var(5)=1
trigger3=AnimElemTime(3)=0 && var(5)=2
helpertype=normal ;player
name="Bolt"
ID=1705
stateno=1705
pos=Ceil((-Pos X*facing) + 40) ,Ceil(-Pos Y)
postype=p1
ownpal=1
size.xscale=const(size.xscale)/2
size.yscale=const(size.yscale)/2

[State 1705, Helper]
type=Helper
trigger1=AnimElemTime(18)=0 && var(5)=0
trigger2=AnimElemTime(13)=0 && var(5)=1
trigger3=AnimElemTime(13)=0 && var(5)=2
helpertype=normal ;player
name="Bolt"
ID=1705
stateno=1705
pos=Ceil((-Pos X*facing) + 120) ,Ceil(-Pos Y)
postype=p1
ownpal=1
size.xscale=const(size.xscale)/2
size.yscale=const(size.yscale)/2

[State 0, PalFX]
type=PalFX
trigger1=animelemtime(1)>0&&AnimElemTime(1)<5
time=1
add=200,200,200
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(1)>=5&&AnimElemTime(1)<9
time=1
add=160,160,160
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(1)>=9&&AnimElemTime(1)<13
time=1
add=120,120,120
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(1)>=13&&AnimElemTime(1)<17
time=1
add=80,80,80
[State 0, PalFX]
type=PalFX
trigger1=animelemtime(1)>=17&&AnimElemTime(1)<22
time=1
add=40,40,40

[State 1000, end]
type = ChangeState
triggerall = statetype != A
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 1000, end]
type = ChangeState
triggerall = statetype = A
trigger1 = AnimTime = 0
value = 51
ctrl = var(11)
;-------------------------------------------------------------------------------
[StateDef 1705]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1005, VarSet] ;Attack Type
type=VarAdd
trigger1=time=0&&prevstateno!=1705
var(5)=1

[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
v=1
value=1
ignorehitpause=1

[State 1005, PlaySnd]
type=PlaySnd
trigger1=Time=0&&PrevStateNo!=1705
value=S5,19
channel=10

[State 1005, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=1705&&Time=0
value=1705

[State 1005, VelSet]
type=PosSet
trigger1=1
y=0

[State 1005, HitBy]
type=HitBy
trigger1=1
value=SCA,AP
ignorehitpause=1

[State 1005, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP,AA,AT
stateno=1705
ignorehitpause=1

[State 1005, HitDef]
type=HitDef
trigger1=!movecontact && prevstateno!=1705
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
priority=5,Hit
damage=69,6
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=var(42):=-10, var(43):=ceil(enemynear,const(size.head.pos.y) + enemynear,pos Y)
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=High     ;Low,Trip,None
air.type=Low
ground.slidetime=21
ground.hittime=32
air.hittime=32
yaccel=.8
ground.velocity=-19.125*root,const(size.xscale),-26.25
air.velocity=-19.125*root,const(size.xscale),-26.25
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
getpower=55,48
givepower=41,27
palfx.time=40
palfx.add = 128,128,0
palfx.mul = 256,256,256
palfx.sinadd = -64,-64,-64,8
palfx.color = 0

[State 0, Explod]
type=Explod
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
anim=7202
ID=7200
pos=enemynear,const(size.mid.pos.x),enemynear,const(size.mid.pos.y)
postype=p2  ;p2,front,back,left,right
facing=ifelse(random<500, 1, -1)
vfacing=ifelse(random<500,1, -1)
bindtime=-1
random=abs(enemynear,const(size.head.pos.y)),abs(enemynear,const(size.head.pos.y))
removetime=-2
scale=1,1
sprpriority=ifelse(random<500,-1,5)
ownpal=0
removeongethit=0
ignorehitpause=1


;-------------------------------------------------------------------------------
;[State 1050, EnvShake]
;type = EnvShake
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;time=12
;ampl=4
;ignorehitpause=1

[State 0, HitSparks]
type=helper
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
helpertype=normal
stateno=8235
ID=8200
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=0
size.xscale=1
size.yscale=1
pausemovetime=65535
supermovetime=65535
ignorehitpause=1

[State 1005, HitSound] ;Alternative way to use Hit Sound
type=PlaySnd
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S1,5
channel=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=-10,ceil(enemynear,const(size.head.pos.y) + enemynear,pos Y)
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSound] ;Alternative way to use Guard Sound
type=PlaySnd
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
trigger1= movehit=1 && numtarget
trigger1=Target,Time<=0&&target,MoveType=H
trigger1=(target,stateno=5020) && (target,alive) && (Target,hitfall)
value=5025
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
trigger1= movehit=1 && numtarget
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
trigger1=Target,Time<=0&&target,MoveType=H
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(3)=0
anim=1706
ID=1706
pos=0,0
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale)/2,root,const(size.yscale)/2
sprpriority=4
ownpal=0
removeongethit=0

[State 0, Explod]
type=Explod
trigger1=AnimElemTime(3)=0
anim=1706
ID=1706
pos=0,0
facing=-1
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale)/2,root,const(size.yscale)/2
sprpriority=4
ownpal=0
removeongethit=0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=AnimTime=0
trigger2=root,movetype=H && root,stateno!=9000
id =1706

[State 1005, end]
type=DestroySelf
trigger1=AnimTime=0
trigger2=root,movetype=H && root,stateno!=9000
;-------------------------------------------------------------------------------
; Tengu Blade
;-------------------------------------------------------------------------------
[StateDef 1800]
type=S
movetype=A
physics=N
juggle=0
ctrl=0
sprpriority=2
;anim=1000
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000,1,0)

[State 1100, Strength Var]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=1800&&PrevStateNo!=9000)
var(5)=ifelse(command="QCF_z", 2, ifelse(command="QCF_y", 1, 0))

[State 1000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=1800;+var(5)
trigger1=Time=0
value=1800;+var(5)

[State 1100, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1800&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1100, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=1800||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1800||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1800||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 1000, Special Spark]
type=Explod
triggerall=statetype!=A
trigger1=AnimElemTime(1)=1
anim=8006
ID=8006
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ownpal=1
ignorehitpause=1

[State 1800, Explod]
type=Explod
trigger1=AnimElem=2
anim=1815
ID=1815
pos=70,0
postype=p1
bindtime=-1
removetime=-2
scale=1,1
sprpriority=3
ownpal=1

[State 1800, Explod]
type=Explod
trigger1=AnimElem=1
anim=1805
ID=1800
pos=0,25
postype=p1
bindtime=-1
removetime=-2
scale=1,1
sprpriority=3
ownpal=1

[State 220, Helper]
type=Helper
trigger1=AnimElemTime(3)=0
helpertype=normal ;player
name="Tengu Blade"
ID=1800
stateno=1810
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 1900, end]
type=ChangeState
trigger1=AnimTime=0 && statetype != A
trigger2=AnimElem=5 && statetype = A
value=ifelse(statetype = A, 51, 0)
ctrl=1

;-------------------------------------------------------------------------------
; Tengu Blade
;-------------------------------------------------------------------------------
[StateDef 1810]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.2
fvar(10)= .2
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1005, VarSet] ;Attack Type
type=VarSet
trigger1=time=0&&prevstateno!=1810
v=5
value=root,var(5)
ignorehitpause=1

[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
v=1
value=1
ignorehitpause=1

[State 1005, PlaySnd]
type=PlaySnd
trigger1=Time=0&&PrevStateNo!=1810
value=S5,3
channel=10

[State 1005, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=1810&&Time=0
value=1810

[State 1005, VelSet]
type=VelSet
trigger1=var(1)>1
x=8*root,const(size.xscale)

[State 1005, HitBy]
type=HitBy
trigger1=1
value=SCA,AP
ignorehitpause=1

[State 1005, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP,AA,AT
stateno=1811
ignorehitpause=1

[State 1005, HitDef]
type=HitDef
triggerall=var(5)=0
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=98,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=var(42):=-10, var(43):=0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),-0.857142857142857
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-6
down.hittime=20
getpower=78,69
givepower=59,39

[State 1005, HitDef]
type=HitDef
triggerall=var(5)=1 ;Low
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=98,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=var(42):=-10, var(43):=0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),-0.857142857142857
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-6
down.hittime=20
getpower=78,69
givepower=59,39

[State 1005, HitDef]
type=HitDef
triggerall=var(5)>=2 ;Air
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Back
priority=5,Hit
damage=140,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=var(42):=-10, var(43):=0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-9.1*root,const(size.xscale)
air.velocity=-9.1*root,const(size.xscale),5.625
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-6
down.hittime=20
getpower=112,98
givepower=84,56
air.fall=root,hitcount>=2 + hitcount;(root,prevstateno = [600,649])

;-------------------------------------------------------------------------------
;[State 1050, EnvShake]
;type = EnvShake
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;time=12
;ampl=4
;ignorehitpause=1

[State 0, HitSparks]
type=helper
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
helpertype=normal
stateno=8235
ID=8200
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=0
size.xscale=1
size.yscale=1
pausemovetime=65535
supermovetime=65535
ignorehitpause=1

[State 1005, HitSound] ;Alternative way to use Hit Sound
type=PlaySnd
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S1,5
channel=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=-10,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSound] ;Alternative way to use Guard Sound
type=PlaySnd
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
trigger2=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5025
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1005, Helper]
type=Helper
triggerall=var(5)!=2
trigger1=Time=0&&PrevStateNo!=1810
helpertype=normal ;player
name="Dust FX"
ID=7505
stateno=7505
pos=0,0
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 1005, end]
type=ChangeState
trigger1=MoveContact||MoveReversed ;Attack Connects
trigger2=FrontEdgeBodyDist <= -240 ;Projectile goes front offscreen by 120 pixels
value=1811

;-------------------------------------------------------------------------------
; Tengu Blade Hit/Guarded
;-------------------------------------------------------------------------------
[StateDef 1811]
ctrl=0
anim=1811
sprpriority=3
velset=0,0
movehitpersist=1
hitcountpersist=1

[State 1051, end]
type=DestroySelf
trigger1=AnimTime=0

;-------------------------------------------------------------------------------
; Tengu Slash
;-------------------------------------------------------------------------------
[StateDef 1850]
type=S
movetype=A
physics=N
juggle=0
ctrl=0
sprpriority=2
;anim=1000
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)
facep2=ifelse(prevstateno!=9000,1,0)

[State 1100, Strength Var]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=1850&&PrevStateNo!=9000)
var(5)=ifelse(command="QCF_c", 2, ifelse(command="QCF_b", 1, 0))

[State 0, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=var(5)>0
var(4)=1
ignorehitpause=1

[State 1000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=1850+var(5)
trigger1=Time=0
value=1850+var(5)

[State 1100, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=1850&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 1100, VarAdd];VarTimerAdd
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=1850||PrevStateNo!=9000)
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1850||PrevStateNo!=9000)
x=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=1850||PrevStateNo!=9000)
y=0
;-------------------------------------------------------------------------------

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 10 * const(size.xscale)

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

[State 0, VelMul]
type = VelMul
trigger1 = AnimElemTime(5)>=0
x = .7

[State 1000, Special Spark]
type=Explod
triggerall=statetype!=A
trigger1=AnimElemTime(1)=1
anim=8006
ID=8006
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ownpal=1
ignorehitpause=1

[State 1000, Dust Effect]
type=Explod
triggerall=statetype!=A
trigger1=animelemtime(2)>=0&&Animelemtime(5)<0
trigger1=(Var(1) % 3 = 0)
anim=8001
ID=8001
pos=0,0
postype=p1
vel=-1,-.25
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=3
ownpal=1

[State 0, PlaySnd]
type=PlaySnd
trigger1=AnimElem=2
value=S3,1
channel=5
ignorehitpause=1

[State 1850, 1] ;Jab
type=HitDef
trigger1=!movecontact && var(5)=0
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SA
damage=105,32
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=2,Hit
pausetime=9,8
;sparkno=S8230+(random%4)
guard.sparkno=S8300
;sparkxy=ceil(-26*const(size.xscale)),ceil(-48*const(size.yscale))
sparkno=-1*(var(40):=8230)**0
sparkxy=var(42):=Ceil(-26*const(size.xscale)), var(43):=Ceil(-48*const(size.yscale))
hitsound=S1,14
guardsound=S2,0
ground.type=High
ground.slidetime=14
ground.hittime=27
ground.velocity=12.75*const(size.xscale)
guard.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),-0.90999619584
air.type=High
air.velocity=5.625*const(size.xscale),-7
air.hittime=27
down.velocity=5.625*const(size.xscale),-7
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
sprpriority=-1
ground.cornerpush.veloff=0
getpower=84,73  ;Damage x .8, Damage x .7
givepower=63,42 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=8
;envshake.ampl=2

[State 1850, 1] ;Jab
type=HitDef
trigger1=!movecontact && var(5)=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SA
damage=105,32
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=2,Hit
pausetime=9,8
;sparkno=S8230+(random%4)
guard.sparkno=S8300
;sparkxy=ceil(-26*const(size.xscale)),ceil(-48*const(size.yscale))
sparkno=-1*(var(40):=8230)**0
sparkxy=var(42):=Ceil(-26*const(size.xscale)), var(43):=Ceil(-48*const(size.yscale))
hitsound=S1,14
guardsound=S2,0
ground.type=High
ground.slidetime=18
ground.hittime=32
ground.velocity=5.625*const(size.xscale),-8.475
guard.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),-0.90999619584
air.type=High
air.velocity=5.625*const(size.xscale),-8.475
air.hittime=32
down.velocity=5.625*const(size.xscale),-7
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
sprpriority=-1
ground.cornerpush.veloff=0
getpower=84,73  ;Damage x .8, Damage x .7
givepower=63,42 ;Damage x .6, Damage x .4
yaccel=.8
fall=1
air.fall=1
;envshake.time=8
;envshake.ampl=2

[State 1850, 1] ;Jab
type=HitDef
trigger1=!movecontact && var(5)=2
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SA
damage=105,32
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=2,Hit
pausetime=9,8
;sparkno=S8230+(random%4)
guard.sparkno=S8300
;sparkxy=ceil(-26*const(size.xscale)),ceil(-48*const(size.yscale))
sparkno=-1*(var(40):=8230)**0
sparkxy=var(42):=Ceil(-26*const(size.xscale)), var(43):=Ceil(-48*const(size.yscale))
hitsound=S1,14
guardsound=S2,0
ground.type=High
ground.slidetime=18
ground.hittime=32
ground.velocity=2.775*const(size.xscale),-8.475
guard.velocity=-5.625*const(size.xscale)
airguard.velocity=-5.625*const(size.xscale),-0.90999619584
air.type=High
air.velocity=2.775*const(size.xscale),-8.475
air.hittime=32
down.velocity=5.625*const(size.xscale),-7
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
sprpriority=-1
ground.cornerpush.veloff=0
getpower=84,73  ;Damage x .8, Damage x .7
givepower=63,42 ;Damage x .6, Damage x .4
yaccel=.8
fall=1
air.fall=1
;envshake.time=8
;envshake.ampl=2

[State 1850, TargetState]
type=TargetState
triggerall=var(5)>=2
trigger1=movehit=1&&numtarget
trigger1=target,movetype=H&&target,time<=0
trigger1=(target,statetype!=L || target, Pos Y)
value=1860
ignorehitpause=1

[State 0, PlayerPush]
type=PlayerPush
trigger1=movehit
trigger1=animelemtime(3)>=0&&Animelemtime(8)<0
value=0
ignorehitpause=1

[State 0, PosSet]
type=PosSet
trigger1=movehit=1&&numtarget
trigger1=target,movetype=H&&target,time<=0
x=Ceil((target,Pos X)+(target,const(size.ground.front)*facing)/3)
ignorehitpause=1

[State 0, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,movetype=H&&target,time<=0
value=255,255,255
time=1
ignorehitpause=1

[State 0, Helper]
type=Helper
trigger1=AnimElem=1
helpertype=normal ;player
name="Tengu Slash FX"
ID=1850
stateno=1855
pos=0,0
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, HitBy]
type=HitBy
trigger1=animelemtime(3)>=0&&animelemtime(4)<0
value=SCA,AA,AT
time=1
ignorehitpause=1

[State 1900, end]
type=ChangeState
trigger1=AnimTime=0
value=0
ctrl=1
;-------------------------------------------------------------------------------
[StateDef 1855]
movetype=I
ctrl=0
anim=1855+root,var(5)
sprpriority=3

[State 0, BindToRoot]
type=BindToRoot
trigger1=1
time=2
pos=0,0
ignorehitpause=1

[State 0, PlaySnd]
type=PlaySnd
trigger1=AnimElem=2
value=S0,12
channel=0

[State 0, PlayerPush]
type=PlayerPush
trigger1=1
value=ifelse(root,movehit,0,1)

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

[State 0, TimerVar]
type=VarAdd
trigger1=!root,hitpausetime
var(1)=1

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=root,hitpausetime
value=1855+(root,var(5))
elem=var(1)
ignorehitpause=1

[State 1855, end]
type=DestroySelf
trigger1=AnimTime=0
trigger2=root,movetype=H && root,stateno!=9000
trigger3=root,stateno!=1850
;-------------------------------------------------------------------------------
[StateDef 1860]
movetype=H
physics=N
ctrl=0
velset=0,0

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=Pos Y >= 0
statetype=S

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=Pos Y < 0
statetype=A

[State 0, HitFallSet]
type=HitFallSet
trigger1=Time=0&&StateType=S
value=0

[State 0, HitFallSet]
type=HitFallSet
trigger1=Time=24
value=1

[State 0, Offset]
type=Offset
trigger1=Time < 24
x=2 * Cos(Time%3=0)

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=Time<=6
trigger2=(Time>=23)
value=5005

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=(Time=[7,12])
trigger2=(Time=[19,22])
value=5006

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=(Time=[13,18])
value=5007

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

[State 1860, end]
type=SelfState
trigger1=Time=24
value=5050

;-------------------------------------------------------------------------------
; Hyper Megaman (Start Up) (Lvl 3)
;-------------------------------------------------------------------------------
[StateDef 3000]
type=U
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3000
trigger1=Time=0
value=3000

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3000||PrevStateNo!=9000)
trigger1=Statetype!=A
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3000||PrevStateNo!=9000)
x=0
y=0

[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=3000&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 220, VarAdd];VarAdd
type=VarAdd
trigger1=1
v=1
value=1

[State 1000, Special Spark]
type=Explod
trigger1=statetype!=A
trigger1=AnimElemTime(2)=0
anim=8006
ID=8006
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ownpal=1
ignorehitpause=1

[State 3000, SuperPause]
type=SuperPause
trigger1=AnimElemTime(17)=0
time=46
anim=-1
movetime=46
darken=0
p2defmul=1
sound=-1,0
poweradd=-3000
unhittable=1

[State 3000, PlaySnd]
type=PlaySnd
trigger1=AnimElemTime(2)=0
value=S3,15+(random%2)
channel=5

;Set/Add Hyper Combo Variable (+1)
;For MAX Supers or Level 3 Supers use VarSet w/ Value = 3 instead of VarAdd
[State 3000, VarAdd]
type=VarSet
trigger1=AnimElemTime(17)=0
v=45
value=3

[State 3000, Hyper Spark]
type=Helper
trigger1=AnimElemTime(17)=0
helpertype=normal
stateno=8000
ID=8000
name="Hyper Spark"
postype=p1
pos=Ceil(29*const(size.xscale)),Ceil(-50*const(size.yscale))
ownpal=1
persistent=0
supermovetime=99999

[State 3000, VarSet] ;Stop Corner Push (optional)
type=VarSet
trigger1=AnimElemTime(17)=0
fvar(5)=0

[State 3000, NotHitBy] ;Change to add invincibility or omit to have none
type=NotHitBy
trigger1=AnimElemTime(17)>=0
value=SCA
time=1

[State 3000, AfterImage] ;PreSet After Images
type = AfterImage
trigger1 = AnimElemTime(17)=0
time = 2
length = 15
framegap = 4
trans = add1 ;"none","add1","sub"
PalContrast = 150,50,70

[State 3000, Hyper background]
type=Helper
triggerall=!Numhelper(8000) ;When Hyper Spark disappears
triggerall=!Numhelper(8001) ;If Hyper Background does not exist
trigger1=animelemtime(17)>=0
helpertype=normal
stateno=8001
ID=8001
name="Hyper Background"
postype=p1
ownpal=1
persistent=0
size.xscale=.5
size.yscale=.5
supermovetime=99999
pausemovetime=99999
ignorehitpause=1

[State 0, Helper]
type=Helper
trigger1=!numhelper(11000)
helpertype=normal ;player
name="Beat"
ID=11000
stateno=11000
pos=(-backedgebodydist) - 32,-120
postype = p1
ownpal = 1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, Helper]
type=Helper
trigger1=!numhelper(12000)
helpertype=normal ;player
name="Eddie"
ID=12000
stateno=12300
pos=(frontedgebodydist) + 32,-120
postype = p1
facing = -1
ownpal = 1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(31)>=0&&animelemtime(34)<0
time=1
add=64,64,64
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(34)>=0&&animelemtime(37)<0
time=1
add=128,128,128
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(37)>=0&&animelemtime(40)<0
time=1
add=192,192,192
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(40)>=0
time=1
add=255,255,255
ignorehitpause=1

[State 3000, end]
type=ChangeState
trigger1=AnimTime=0
value=3001
ctrl=0

;-------------------------------------------------------------------------------
; Hyper Megaman (Hyper) (Lvl 3)
;-------------------------------------------------------------------------------
[StateDef 3001]
type=U
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
;facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 0, Width]
type = Width
trigger1 = animelemtime(4)<0
trigger2 = animelemtime(126)>=0
value = 15,0
ignorehitpause=1

[State 0, Width]
type = Width
trigger1 = animelemtime(4)>=0&&AnimElemTime(8)<0
trigger2 = animelemtime(121)>=0&&AnimElemTime(126)<0
value = 30,0
ignorehitpause=1

[State 0, Width]
type = Width
trigger1 = animelemtime(8)>=0&&AnimElemTime(11)<0
trigger2 = animelemtime(116)>=0&&AnimElemTime(121)<0
value = 45,0
ignorehitpause=1

[State 0, Width]
type = Width
trigger1 = animelemtime(11)>=0&&AnimElemTime(116)<0
value = 60,0
ignorehitpause=1

[State 0, Helper]
type=Helper
trigger1=!numhelper(3004)
trigger1=Time=0
helpertype=normal ;player
name="Invisible Helper"
ID=3004
stateno=3004
pos=0,0
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3001
trigger1=Time=0
value=3001

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3001||PrevStateNo!=9000)
trigger1=Statetype!=A
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3001||PrevStateNo!=9000)
x=0
y=0
;-------------------------------------------------------------------------------

[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=3001&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 220, VarAdd];VarAdd
type=VarAdd
trigger1=1
v=1
value=1

[State 3004, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S5,20
channel = 6

[State 3000, PlaySnd]
type=PlaySnd
trigger1=AnimElem=36
value=S3,14
channel=5

[State 3000, NotHitBy] ;Change to add invincibility or omit to have none
type=NotHitBy
trigger1=AnimElemTime(4)<=0
value=SCA
time=1

[State 200, 1] ;Hit
type=HitDef
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,HA
damage=48,0
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=2,Hit
pausetime=16,15
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-15*const(size.xscale)), Ceil((p2dist Y)-50*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=18
ground.hittime=21
ground.velocity=-2.8125*const(size.xscale),-17.5
guard.velocity=-12.75*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),-0.90999619584
air.type=High
air.velocity=-2.8125*const(size.xscale),-17.5
air.hittime=28
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=0,0  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
fall=1
fall.recover=0
;envshake.time=8
;envshake.ampl=2

[State 3000, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 3000, PalFX]
type=PalFX
trigger1=var(1) = [3,5]
trigger2=var(1) = [33,35]
trigger3=var(1) = [60,62]
trigger4=var(1) = [87,89]
trigger5=var(1) = [114,116]
time=1
add=-96,-80,-64
ignorehitpause=1

[State 3000, PalFX]
type=PalFX
trigger1=var(1) = [6,8]
trigger2=var(1) = [36,38]
trigger3=var(1) = [63,65]
trigger4=var(1) = [90,92]
trigger5=var(1) = [117,119]
time=1
add=-80,-64,-48
ignorehitpause=1

[State 3000, PalFX]
type=PalFX
trigger1=var(1) = [9,11]
trigger2=var(1) = [39,41]
trigger3=var(1) = [66,68]
trigger4=var(1) = [93,95]
trigger5=var(1) = [120,122]
time=1
add=-64,-48,-32
ignorehitpause=1

[State 3000, PalFX]
type=PalFX
trigger1=var(1) = [12,14]
trigger2=var(1) = [42,44]
trigger3=var(1) = [69,71]
trigger4=var(1) = [96,98]
trigger5=var(1) = [123,125]
time=1
add=-48,-32,-16
ignorehitpause=1

[State 3000, PalFX]
type=PalFX
trigger1=var(1) = [18,20]
trigger2=var(1) = [48,50]
trigger3=var(1) = [75,77]
trigger4=var(1) = [102,104]
trigger5=var(1) = [129,131]
time=1
add=0,32,48
ignorehitpause=1

[State 3000, PalFX]
type=PalFX
trigger1=var(1) = [21,23]
trigger2=var(1) = [51,53]
trigger3=var(1) = [78,80]
trigger4=var(1) = [105,107]
time=1
add=32,64,96
ignorehitpause=1

[State 3000, PalFX]
type=PalFX
trigger1=var(1) = [24,26]
trigger2=var(1) = [54,56]
trigger3=var(1) = [81,83]
trigger4=var(1) = [108,110]
time=1
add=64,96,144
ignorehitpause=1

[State 3000, PalFX]
type=PalFX
trigger1=var(1) = [27,29]
trigger2=var(1) = [57,59]
trigger3=var(1) = [84,86]
trigger4=var(1) = [111,113]
time=1
add=96,128,192
ignorehitpause=1

[State 3000, end]
type=ChangeState
;triggerall=statetype!=A
trigger1=AnimTime=0
value=3002

;[State 3000, end]
;type=ChangeState
;triggerall=statetype=A
;trigger1=AnimTime=0
;value=51
;ctrl=var(11)

;-------------------------------------------------------------------------------
; Hyper Megaman End
;-------------------------------------------------------------------------------
[StateDef 3002]
type=U
movetype=I
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3002 && anim != 54
trigger1=Time=0
value=ifelse(statetype = A, 54, 3002)

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3002||PrevStateNo!=9000)
trigger1=Statetype!=A
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3002||PrevStateNo!=9000)
x=0
y=0

[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=3002&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 220, VarAdd];VarAdd
type=VarAdd
trigger1=1
v=1
value=1

;Set/Add Hyper Combo Variable (+1)
;For MAX Supers or Level 3 Supers use VarSet w/ Value = 3 instead of VarAdd
[State 3000, VarAdd]
type=VarSet
trigger1=AnimElemTime(1)=0
v=45
value=0

[State 0, VelSet]
type = VelSet
triggerall = statetype = A
trigger1=time=0&&(PrevStateNo!=3002&&prevstateno!=9000)
x = -2
y = -4

[State 0, VelAdd]
type = VelAdd
trigger1 = statetype = A
y = const(movement.yaccel)

[State 3102, PalFX]
type = PalFX
trigger1 = var(1) < 3
time = 1
add = 255,255,255

[State 3102, PalFX]
type = PalFX
trigger1 = var(1) = [3,5]
time = 1
add = 192,192,192

[State 3102, PalFX]
type = PalFX
trigger1 = var(1) = [6,8]
time = 1
add = 128,128,128

[State 3102, PalFX]
type = PalFX
trigger1 = var(1) = [9,11]
time = 1
add = 64,64,64

[State 3000, end]
type=ChangeState
triggerall=statetype=A
trigger1=Pos Y >= floor(-Vel Y) && Vel Y > 0
value=52

[State 3000, end]
type=ChangeState
triggerall=statetype!=A
trigger1=AnimTime=0
value=0
ctrl=1

[State 3000, end]
type=ChangeState
triggerall=statetype=A
trigger1=Var(1) = 12
value=51
ctrl=var(11)

;-------------------------------------------------------------------------------
; Hyper Megaman (Helper) (Lvl 3)
;-------------------------------------------------------------------------------
[StateDef 3004]
movetype=I
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, BindToRoot]
type=BindToRoot
trigger1=1
time=2
pos=0,0

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

[State 3000, ChangeAnim]
type=ChangeAnim
trigger1=1
value=root,anim
elem=root,animelemno(0)

[State 3000, NotHitBy] ;Change to add invincibility or omit to have none
type=NotHitBy
trigger1=1
value=SCA
time=1

[State 3000, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1

[State 3000, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA
stateno = 3004
ignorehitpause = 1

[State 0, Explod]
type=Explod
trigger1=AnimElem=11
anim=3040
ID=3040
pos=0,0
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=-1
ownpal=0
removeongethit=1
ignorehitpause=0

[State 0, Explod]
type=Explod
trigger1=AnimElem=11
anim=3032
ID=3040
pos=ceil(-119 * root,const(size.xscale)),ceil(-153 * root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=-1
ownpal=0
removeongethit=1
ignorehitpause=0

[State 0, Explod]
type=Explod
trigger1=AnimElem=11
anim=3033
ID=3040
pos=ceil(-111 * root,const(size.xscale)),ceil(-174 * root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=-1
ownpal=0
removeongethit=1
ignorehitpause=0

[State 0, Explod]
type=Explod
trigger1=AnimElem=11
anim=3034
ID=3040
pos=ceil(-75 * root,const(size.xscale)),ceil(-165 * root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=-1
ownpal=0
removeongethit=1
ignorehitpause=0

[State 0, Explod]
type=Explod
trigger1=AnimElem=11
anim=3035
ID=3040
pos=ceil(-35 * root,const(size.xscale)),ceil(-181 * root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=-1
ownpal=0
removeongethit=1
ignorehitpause=0

[State 0, Explod]
type=Explod
trigger1=AnimElem=11
anim=3021
ID=3040
pos=ceil(67 * root,const(size.xscale)),ceil(-159 * root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=-1
ownpal=0
removeongethit=1
ignorehitpause=0

[State 0, Explod]
type=Explod
trigger1=AnimElem=11
anim=3024
ID=3040
pos=ceil(85 * root,const(size.xscale)),ceil(-24 * root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=-1
ownpal=0
removeongethit=1
ignorehitpause=0

[State 0, Explod]
type=Explod
trigger1=AnimElem=11
anim=3025
ID=3040
pos=ceil(83 * root,const(size.xscale)),ceil(-11 * root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=-1
ownpal=0
removeongethit=1
ignorehitpause=0

[State 0, Explod]
type=Explod
trigger1=AnimElem=1
anim=3045
ID=3045
pos=0,Ceil(-40*root,const(size.yscale))
postype=p1
bindtime=-1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
supermovetime=8
pausemovetime=8
sprpriority=4
ownpal=0
removeongethit=1
ignorehitpause=0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=root,movetype=H && Root,stateno!=9000
trigger2=root,stateno!=9000 && root,stateno!=3001
trigger3=animelemtime(32)>=0
id = 3040

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=root,movetype=H && Root,stateno!=9000
trigger2=root,stateno!=9000 && root,stateno!=3001
id = 3045

[State 220, Helper]
type=Helper
trigger1=AnimElem=36
helpertype=normal ;player
name="Laser"
ID=3050
stateno=3050
pos=ceil(110*root,const(size.xscale)),Ceil(-115*root,const(size.yscale))
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 220, Helper]
type=Helper
trigger1=AnimElem=39
trigger2=AnimElem=68
helpertype=normal ;player
name="Rocket 1"
ID=3005
stateno=3005
pos=ceil(-20*root,const(size.xscale)),Ceil(-132*root,const(size.yscale))
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 220, Helper]
type=Helper
trigger1=AnimElem=39
trigger2=AnimElem=68
helpertype=normal ;player
name="Rocket 2"
ID=3006
stateno=3006
pos=ceil(-16*root,const(size.xscale)),Ceil(-129*root,const(size.yscale))
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 220, Helper]
type=Helper
trigger1=AnimElem=39
trigger2=AnimElem=68
helpertype=normal ;player
name="Rocket 3"
ID=3007
stateno=3007
pos=ceil(27*root,const(size.xscale)),Ceil(-135*root,const(size.yscale))
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 220, Helper]
type=Helper
trigger1=AnimElem=39
trigger2=AnimElem=68
helpertype=normal ;player
name="Rocket 4"
ID=3008
stateno=3008
pos=ceil(43*root,const(size.xscale)),Ceil(-130*root,const(size.yscale))
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 220, Helper]
type=Helper
trigger1=AnimElem=68
trigger2=AnimElem=95
helpertype=normal ;player
name="Rush"
ID=3060
stateno=3062
pos=ceil(-36*root,const(size.xscale)),Ceil(-41*root,const(size.yscale))
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 220, Helper]
type=Helper
trigger1=AnimElem=60
trigger2=AnimElem=87
helpertype=normal ;player
name="Beat"
ID=3070
stateno=3072
pos=ceil(-3*root,const(size.xscale)),Ceil(-92*root,const(size.yscale))
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 220, Helper]
type=Helper
trigger1=AnimElem=53
trigger2=AnimElem=78
helpertype=normal ;player
name="Eddie"
ID=3080
stateno=3082
pos=ceil(46*root,const(size.xscale)),Ceil(-45*root,const(size.yscale))
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)

[State 3000, end]
type=DestroySelf
trigger1=root,movetype=H && Root,stateno!=9000
trigger2=root,stateno!=9000 && root,stateno!=3001

;---------------------------------------------------------------------------
[StateDef 3005]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1=1
text="fvar(12) = %f || fvar(10) = %f || var(25) = %d || var(2) = %d"
params=fvar(12),fvar(10), var(25), var(2)
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.35
fvar(10)= .35
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=3005
value = 3005

[State 0, VelSet];1
type = VelSet
trigger1 = var(1)=1
trigger2 = AnimElemTime(9)>=0
x = 7*root,const(size.xscale)
y = 0

[State 0, VelSet];2
type = VelSet
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<0
trigger2 = AnimElemTime(8)>=0&&AnimElemTime(9)<0
x = 7*root,const(size.xscale)
y = -5*root,const(size.yscale)

[State 0, VelSet];3
type = VelSet
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<0
trigger2 = AnimElemTime(7)>=0&&AnimElemTime(8)<0
x = 7*root,const(size.xscale)
y = -2*root,const(size.yscale)

[State 0, VelSet];4
type = VelSet
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(5)<0
trigger2 = AnimElemTime(6)>=0&&AnimElemTime(7)<0
x = 5*root,const(size.xscale)
y = -4*root,const(size.yscale)

[State 0, VelSet];5
type = VelSet
trigger1 = AnimElemTime(5)>=0&&AnimElemTime(6)<0
x = 0
y = -6*root,const(size.yscale)

[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

[State 1005, HitBy]
type=HitBy
trigger1=prevstateno!=3005
value=SCA,AP
ignorehitpause=1

[State 1005, HitBy]
type=NotHitBy
trigger1=prevstateno=3005
value=SCA
ignorehitpause=1

[State 1010, HitOverride]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=3005
ignorehitpause=1

[State 0, HitDef] ;Standing
type=HitDef
trigger1= !movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,HP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Back
priority=5,Hit
damage=13,1
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale),-4.1125
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-4.1125
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
fall=1
fall.recover=0
sprpriority=3
getpower=0,0  ;Damage x .8, Damage x .7
givepower=7,5 ;Damage x .6, Damage x .4
yaccel=.8

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1
;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=frontedgedist <= -240
id =3005
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=Time=0&&PrevStateNo!=3005
trigger1=!NumExplod(3005)
anim=3015
ID=3005
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=3
ownpal=0
removeongethit=0
ignorehitpause=0

[State 1010, end]
type = ChangeState
trigger1=frontedgedist <= -240
value=3009;ifelse(var(20)<=0,1025,1026)

;---------------------------------------------------------------------------
[StateDef 3006]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1=1
text="fvar(12) = %f || fvar(10) = %f || var(25) = %d || var(2) = %d"
params=fvar(12),fvar(10), var(25), var(2)
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.35
fvar(10)= .35
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=3006
value = 3006

[State 0, VelSet];1
type = VelSet
trigger1 = var(1)=1
x = -5*root,const(size.xscale)
y = 4*root,const(size.yscale)

[State 0, VelSet];2
type = VelSet
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<0
x = -3*root,const(size.xscale)
y = 5*root,const(size.yscale)

[State 0, VelSet];3
type = VelSet
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<0
x = 0*root,const(size.xscale)
y = 6*root,const(size.yscale)

[State 0, VelSet];4
type = VelSet
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(5)<0
x = 3*root,const(size.xscale)
y = 5*root,const(size.yscale)

[State 0, VelSet];5
type = VelSet
trigger1 = AnimElemTime(5)>=0&&AnimElemTime(6)<0
x = 5*root,const(size.xscale)
y = 4*root,const(size.yscale)

[State 0, VelSet];6
type = VelSet
trigger1 = AnimElemTime(6)>=0&&AnimElemTime(7)<0
x = 6*root,const(size.xscale)
y = 5*root,const(size.yscale)

[State 0, VelSet];7
type = VelSet
trigger1 = AnimElemTime(7)>=0
x = 7*root,const(size.xscale)
y = 0;*root,const(size.yscale)

[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

[State 1005, HitBy]
type=HitBy
trigger1=prevstateno!=3006
value=SCA,AP
ignorehitpause=1

[State 1005, HitBy]
type=NotHitBy
trigger1=prevstateno=3006
value=SCA
ignorehitpause=1

[State 1010, HitOverride]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=3006
ignorehitpause=1

[State 0, HitDef] ;Standing
type=HitDef
trigger1= !movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,HP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Back
priority=5,Hit
damage=13,1
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale),-4.1125
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-4.1125
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
fall=1
fall.recover=0
sprpriority=3
getpower=0,0  ;Damage x .8, Damage x .7
givepower=7,5 ;Damage x .6, Damage x .4
yaccel=.8

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1
;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=frontedgedist <= -240
id =3006
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=Time=0&&PrevStateNo!=3006
trigger1=!NumExplod(3006)
anim=3016
ID=3006
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=3
ownpal=0
removeongethit=0
ignorehitpause=0

[State 1010, end]
type = ChangeState
trigger1=frontedgedist <= -240
value=3009;ifelse(var(20)<=0,1025,1026)

;---------------------------------------------------------------------------
[StateDef 3007]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1=1
text="fvar(12) = %f || fvar(10) = %f || var(25) = %d || var(2) = %d"
params=fvar(12),fvar(10), var(25), var(2)
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.35
fvar(10)= .35
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=3007
value = 3007

[State 0, VelSet];1
type = VelSet
trigger1 = var(1)=1
trigger2 = AnimElemTime(3)>=0&&AnimElemTime(4)<0
x = 6*root,const(size.xscale)
y = -2*root,const(size.yscale)

[State 0, VelSet];2
type = VelSet
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<0
x = 5*root,const(size.xscale)
y = -4*root,const(size.yscale)

[State 0, VelSet];3
type = VelSet
trigger1 = AnimElemTime(4)>=0
x = 7*root,const(size.xscale)
y = 0;-4*root,const(size.yscale)

[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

[State 1005, HitBy]
type=HitBy
trigger1=prevstateno!=3007
value=SCA,AP
ignorehitpause=1

[State 1005, NotHitBy]
type=NotHitBy
trigger1=prevstateno=3007
value=SCA
ignorehitpause=1

[State 1010, HitOverride]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=3007
ignorehitpause=1

[State 0, HitDef] ;Standing
type=HitDef
trigger1= !movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,HP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Back
priority=5,Hit
damage=13,1
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale),-4.1125
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-4.1125
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
fall=1
fall.recover=0
sprpriority=3
getpower=0,0  ;Damage x .8, Damage x .7
givepower=7,5 ;Damage x .6, Damage x .4
yaccel=.8

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1
;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=frontedgedist <= -240
id =3007
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=Time=0&&PrevStateNo!=3008
trigger1=!NumExplod(3007)
anim=3017
ID=3007
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=3
ownpal=0
removeongethit=0
ignorehitpause=0

[State 1010, end]
type = ChangeState
trigger1=frontedgedist <= -240
value=3009;ifelse(var(20)<=0,1025,1026)

;---------------------------------------------------------------------------
[StateDef 3008]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1=1
text="fvar(12) = %f || fvar(10) = %f || var(25) = %d || var(2) = %d"
params=fvar(12),fvar(10), var(25), var(2)
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.35
fvar(10)= .35
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=3008
value = 3008

[State 0, VelSet];1
type = VelSet
trigger1 = var(1)=1
x = 6*root,const(size.xscale)
y = 2*root,const(size.yscale)

[State 0, VelSet];2
type = VelSet
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(3)<0
x = 5*root,const(size.xscale)
y = 4*root,const(size.yscale)

[State 0, VelSet];3
type = VelSet
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<0
x = 3*root,const(size.xscale)
y = 5*root,const(size.yscale)

[State 0, VelSet];4
type = VelSet
trigger1 = AnimElemTime(4)>=0&&AnimElemTime(5)<0
x = 0;*root,const(size.xscale)
y = 5*root,const(size.yscale)

[State 0, VelSet];5
type = VelSet
trigger1 = AnimElemTime(5)>=0&&AnimElemTime(6)<0
x = -3*root,const(size.xscale)
y = 5*root,const(size.yscale)

[State 0, VelSet];6
type = VelSet
trigger1 = AnimElemTime(6)>=0&&AnimElemTime(7)<0
x = -5*root,const(size.xscale)
y = 4*root,const(size.yscale)

[State 0, VelSet];7
type = VelSet
trigger1 = AnimElemTime(7)>=0&&AnimElemTime(8)<0
x = -6*root,const(size.xscale)
y = 2*root,const(size.yscale)

[State 0, VelSet];8
type = VelSet
trigger1 = AnimElemTime(8)>=0&&AnimElemTime(9)<0
x = -7*root,const(size.xscale)
y = 0;*root,const(size.yscale)

[State 0, VelSet];9
type = VelSet
trigger1 = AnimElemTime(9)>=0&&AnimElemTime(10)<0
x = -6*root,const(size.xscale)
y = -2*root,const(size.yscale)

[State 0, VelSet];10
type = VelSet
trigger1 = AnimElemTime(10)>=0&&AnimElemTime(11)<0
x = -5*root,const(size.xscale)
y = -4*root,const(size.yscale)

[State 0, VelSet];11
type = VelSet
trigger1 = AnimElemTime(11)>=0&&AnimElemTime(12)<0
x = -2*root,const(size.xscale)
y = -5*root,const(size.yscale)

[State 0, VelSet];12
type = VelSet
trigger1 = AnimElemTime(12)>=0&&AnimElemTime(13)<0
x = 0;*root,const(size.xscale)
y = -5*root,const(size.yscale)

[State 0, VelSet];13
type = VelSet
trigger1 = AnimElemTime(13)>=0&&AnimElemTime(14)<0
x = 0;*root,const(size.xscale)
y = -5*root,const(size.yscale)

[State 0, VelSet];14
type = VelSet
trigger1 = AnimElemTime(14)>=0&&AnimElemTime(15)<0
x = 5*root,const(size.xscale)
y = -4*root,const(size.yscale)

[State 0, VelSet];15
type = VelSet
trigger1 = AnimElemTime(15)>=0&&AnimElemTime(16)<0
x = 7*root,const(size.xscale)
y = -2*root,const(size.yscale)

[State 0, VelSet];15
type = VelSet
trigger1 = AnimElemTime(16)>=0
x = 7*root,const(size.xscale)
y = 0;*root,const(size.yscale)

[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

[State 1005, HitBy]
type=HitBy
trigger1=prevstateno!=3008
value=SCA,AP
ignorehitpause=1

[State 1005, NotHitBy]
type=NotHitBy
trigger1=prevstateno=3008
value=SCA
ignorehitpause=1

[State 1010, HitOverride]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=3008
ignorehitpause=1

[State 0, HitDef] ;Standing
type=HitDef
trigger1= !movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,HP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Back
priority=5,Hit
damage=13,1
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale),-4.1125
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-4.1125
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
fall=1
fall.recover=0
sprpriority=3
getpower=0,0  ;Damage x .8, Damage x .7
givepower=7,5 ;Damage x .6, Damage x .4
yaccel=.8

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1
;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=frontedgedist <= -240
id =3008
ignorehitpause=1

[State 0, Explod]
type=Explod
trigger1=Time=0&&PrevStateNo!=3008
trigger1=!NumExplod(3008)
anim=3018
ID=3008
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=3
ownpal=0
removeongethit=0
ignorehitpause=0

[State 1010, end]
type = ChangeState
trigger1=frontedgedist <= -240
value=3009;ifelse(var(20)<=0,1025,1026)

;---------------------------------------------------------------------------;
[StateDef 3009]
type=A
movetype=I
physics=N
juggle=0
ctrl = 0
velset=0,0
sprpriority=3
movehitpersist=1
hitcountpersist=1

[State 0, PlaySnd]
type=PlaySnd
trigger1=Time=0
value=S5,13
channel=2
pan=1

[State 0, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=1209
trigger1=Time=0
value=1209

[State 0, DestroySelf]
type=DestroySelf
trigger1=animtime=0
;-------------------------------------------------------------------------------
; Hyper Mega Laser
;-------------------------------------------------------------------------------
[StateDef 3050]
movetype=A
ctrl=0
sprpriority=3
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.3
fvar(10)= .3
ignorehitpause=1

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

[State 3050, BindToRoot]
type=BindToRoot
trigger1=1
time=2
pos=ceil(110*root,const(size.xscale)),ceil(-115*root,const(size.yscale))
ignorehitpause=1

[State 3050, ChangeAnim]
type=ChangeAnim
trigger1=anim!=3050&&Time=0
value=3050

[State 3050, ChangeAnim]
type=ChangeAnim
trigger1=root,stateno=9000
value=anim
elem=animelemno(0)
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time=0 && PrevStateNo!=3050
value = S5,21
channel = 10

[State 3050, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP
stateno=3050
ignorehitpause=1

[State 3050, HitBy]
type=HitBy
trigger1=1
value=SCA
ignorehitpause=1

[State 3050, 1]
type=HitDef
trigger1=var(1)%5 = 0 && root,stateno!=9000
trigger1=(enemynear,stateno != [5070,5071])
attr=A,HP
damage=41,6
animtype=Medium
air.animtype=Back
fall.animtype=Back
guardflag=MA
hitflag=MAFD
priority=5,Hit
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=High
ground.slidetime=18
ground.hittime=21
ground.velocity=-5.625*root,const(size.xscale),-4.1125
guard.velocity=-5.625*root,const(size.xscale)
air.type=Low
air.velocity=-5.625*root,const(size.xscale),-4.1125
air.hittime=28
airguard.velocity=-5.625*root,const(size.xscale),-.41125
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
fall=1
fall.recover=0
getpower=0,0
givepower=24,16
yaccel=.8

[State 3050, Explod]
type=Explod
trigger1=movehit=1 && numtarget
trigger1=target,time<=0 && target,movetype=H
anim=3051
ID=3051
pos= ifelse(random<333, -20, ifelse(random >= 667, 20, 0)),enemynear,const(size.mid.pos.y)
facing= -1;ifelse((enemynear,facing = facing), 1, -1)
postype=p2
bindtime=1
removetime=-2
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=5
ignorehitpause=1

[State 0, VarAdd]
type=VarAdd
trigger1=root,stateno!=9000
var(1)=1

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8260+(random%4)
ID=8200
pos=Ceil((p2dist X) - 10 * root,const(size.yscale)), Ceil((p2dist Y) + enemynear,const(size.mid.pos.y) * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil((p2dist X) - 10 * root,const(size.yscale)), Ceil((p2dist Y) + enemynear,const(size.mid.pos.y) * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1000, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 3050, end]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = root,stateno!=3001 && root,stateno != 9000
trigger3 = root,movetype=H && root,stateno != 9000

;-------------------------------------------------------------------------------
; Rush Buster Attack
;-------------------------------------------------------------------------------
[StateDef 3060]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.35
fvar(10)= .35
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
v=1
value=1
ignorehitpause=1

[State 1005, PlaySnd]
type=PlaySnd
trigger1=Time=0&&PrevStateNo!=3060
value=S5,3
channel=10

[State 1005, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=3060&&Time=0
value=3060

[State 1005, VelSet]
type=VelSet
trigger1=var(1)>1
x=10*root,const(size.xscale)

[State 1005, PosSet]
type=PosSet
trigger1=Pos Y >= Floor(-Vel Y) && Vel Y > 0
y=0

[State 1005, VelSet]
type=VelSet
trigger1=Pos Y >= Floor(-Vel Y) && Vel Y > 0
y=0

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

[State 1005, HitBy]
type=HitBy
trigger1=prevstateno!=3060
value=SCA,AP
ignorehitpause=1

[State 1005, HitBy]
type=NotHitBy
trigger1=prevstateno=3060
value=SCA
ignorehitpause=1

[State 1010, HitOverride]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=3060
ignorehitpause=1

[State 1005, HitDef]
type=HitDef
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Back
priority=5,Hit
damage=13,1
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=18
ground.hittime=21
air.hittime=28
yaccel=.8
ground.velocity=-5.625*root,const(size.xscale),-4.1125
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-4.1125
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
getpower=0,0  ;Damage x .8, Damage x .7
givepower=7,5 ;Damage x .6, Damage x .4
fall=1
fall.recover=0
;-------------------------------------------------------------------------------
;[State 1050, EnvShake]
;type = EnvShake
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;time=12
;ampl=4
;ignorehitpause=1

[State 1005, HitSound] ;Alternative way to use Hit Sound
type=PlaySnd
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S1,5
channel=1
ignorehitpause=1

[State 1005, GuardSound] ;Alternative way to use Guard Sound
type=PlaySnd
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 650, MvC2 KnockDown]
type=TargetState
triggerall= movehit=1 && numtarget
trigger1=(target,stateno=5020)&&(target,alive);&&(target,hitfall)
trigger1=Target,Time<=0&&target,MoveType=H
value=5021
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
trigger1=Target,Time<=0&&target,MoveType=H
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

;-------------------------------------------------------------------------------
[State 221, Explod]
type=Explod
triggerall=animelemtime(4)>=0
trigger1=(gametime%3)=1
anim=1019
ID=1019
postype=p1
bindtime=1
vel=-4,0
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
triggerall=animelemtime(4)>=0
trigger1=(gametime%3)=1
anim=1019
ID=1019
postype=p1
bindtime=1
vel=-5,(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
triggerall=animelemtime(4)>=0
trigger1=(gametime%3)=1
anim=1019
ID=1019
postype=p1
bindtime=1
vel=-5,-(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1
;-------------------------------------------------------------------------------

[State 1005, end]
type=ChangeState
trigger1=FrontEdgeBodyDist <= -240 ;Projectile goes front offscreen by 120 pixels
value=3061

;-------------------------------------------------------------------------------
; Mega Buster Shot Hit/Guarded
;-------------------------------------------------------------------------------
[StateDef 3061]
ctrl=0
anim=3061
sprpriority=3
velset=0,0
movehitpersist=1
hitcountpersist=1

[State 1051, end]
type=DestroySelf
trigger1=Time>=27

;-------------------------------------------------------------------------------
; Rush Attack Start Up
;-------------------------------------------------------------------------------
[StateDef 3062]
ctrl=0
anim=3062
sprpriority=3

[State 1007, BindToRoot]
type=BindToRoot
trigger1=1
time=2
pos=ceil(-36*root,const(size.xscale)),Ceil(-41*root,const(size.yscale))
ignorehitpause=1

[State 1007, end]
type=ChangeState
trigger1=AnimTime=0
value=3060

;-------------------------------------------------------------------------------
; Beat Buster Attack
;-------------------------------------------------------------------------------
[StateDef 3070]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.35
fvar(10)= .35
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
v=1
value=1
ignorehitpause=1

[State 1005, PlaySnd]
type=PlaySnd
trigger1=Time=0&&PrevStateNo!=3070
value=S5,3
channel=10

[State 1005, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=3070&&Time=0
value=3070

[State 1005, VelSet]
type=VelSet
trigger1=var(1)>1
x=10*root,const(size.xscale)

[State 1005, HitBy]
type=HitBy
trigger1=prevstateno!=3070
value=SCA,AP
ignorehitpause=1

[State 1005, HitBy]
type=NotHitBy
trigger1=prevstateno=3070
value=SCA
ignorehitpause=1

[State 1010, HitOverride]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=3070
ignorehitpause=1

[State 1005, HitDef]
type=HitDef
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Back
priority=5,Hit
damage=13,1
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=18
ground.hittime=21
air.hittime=28
yaccel=.8
ground.velocity=-5.625*root,const(size.xscale),-4.1125
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-4.1125
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
getpower=0,0  ;Damage x .8, Damage x .7
givepower=7,5 ;Damage x .6, Damage x .4
fall=1
fall.recover=0
;-------------------------------------------------------------------------------
;[State 1050, EnvShake]
;type = EnvShake
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;time=12
;ampl=4
;ignorehitpause=1

[State 1005, HitSound] ;Alternative way to use Hit Sound
type=PlaySnd
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S1,5
channel=1
ignorehitpause=1

[State 1005, GuardSound] ;Alternative way to use Guard Sound
type=PlaySnd
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 650, MvC2 KnockDown]
type=TargetState
triggerall= movehit=1 && numtarget
trigger1=(target,stateno=5020)&&(target,alive);&&(target,hitfall)
trigger1=Target,Time<=0&&target,MoveType=H
value=5021
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
trigger1=Target,Time<=0&&target,MoveType=H
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

;-------------------------------------------------------------------------------
[State 221, Explod]
type=Explod
triggerall=animelemtime(4)>=0
trigger1=(gametime%3)=1
anim=1009
ID=1009
postype=p1
bindtime=1
vel=-4,0
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
triggerall=animelemtime(4)>=0
trigger1=(gametime%3)=1
anim=1009
ID=1009
postype=p1
bindtime=1
vel=-5,(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
triggerall=animelemtime(4)>=0
trigger1=(gametime%3)=1
anim=1009
ID=1009
postype=p1
bindtime=1
vel=-5,-(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1
;-------------------------------------------------------------------------------

[State 1005, end]
type=ChangeState
trigger1=FrontEdgeBodyDist <= -240 ;Projectile goes front offscreen by 120 pixels
value=3071

;-------------------------------------------------------------------------------
; Mega Buster Shot Hit/Guarded
;-------------------------------------------------------------------------------
[StateDef 3071]
ctrl=0
anim=3071
sprpriority=3
velset=0,0
movehitpersist=1
hitcountpersist=1

[State 1051, end]
type=DestroySelf
trigger1=Time>=27

;-------------------------------------------------------------------------------
; Beat Attack Start Up
;-------------------------------------------------------------------------------
[StateDef 3072]
ctrl=0
anim=3072
sprpriority=3

[State 1007, BindToRoot]
type=BindToRoot
trigger1=1
time=2
pos=ceil(-3*root,const(size.xscale)),Ceil(-92*root,const(size.yscale))
ignorehitpause=1

[State 1007, end]
type=ChangeState
trigger1=AnimTime=0
value=3070

;-------------------------------------------------------------------------------
; Eddie Buster Attack
;-------------------------------------------------------------------------------
[StateDef 3080]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.35
fvar(10)= .35
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
v=1
value=1
ignorehitpause=1

[State 1005, PlaySnd]
type=PlaySnd
trigger1=Time=0&&PrevStateNo!=3080
value=S5,3
channel=10

[State 1005, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=3080&&Time=0
value=3080

[State 1005, VelSet]
type=VelSet
trigger1=var(1)>1
x=10*root,const(size.xscale)

[State 1005, HitBy]
type=HitBy
trigger1=prevstateno!=3080
value=SCA,AP
ignorehitpause=1

[State 1005, HitBy]
type=NotHitBy
trigger1=prevstateno=3080
value=SCA
ignorehitpause=1

[State 1010, HitOverride]
type=hitoverride
trigger1=1
attr=SCA,AA,AP,AT
stateno=3080
ignorehitpause=1

[State 1005, HitDef]
type=HitDef
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Medium
fall.animtype=Back
priority=5,Hit
damage=13,1
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=18
ground.hittime=21
air.hittime=28
yaccel=.8
ground.velocity=-5.625*root,const(size.xscale),-4.1125
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-4.1125
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*const(size.xscale),-8.225
down.hittime=20
getpower=0,0  ;Damage x .8, Damage x .7
givepower=7,5 ;Damage x .6, Damage x .4
fall=1
fall.recover=0
;-------------------------------------------------------------------------------
;[State 1050, EnvShake]
;type = EnvShake
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;time=12
;ampl=4
;ignorehitpause=1

[State 1005, HitSound] ;Alternative way to use Hit Sound
type=PlaySnd
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S1,5
channel=1
ignorehitpause=1

[State 1005, GuardSound] ;Alternative way to use Guard Sound
type=PlaySnd
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 650, MvC2 KnockDown]
type=TargetState
triggerall= movehit=1 && numtarget
trigger1=(target,stateno=5020)&&(target,alive);&&(target,hitfall)
trigger1=Target,Time<=0&&target,MoveType=H
value=5021
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget
trigger1=(target,stateno=5080)&&(target,alive)&&(target,hitfall)
trigger1=Target,Time<=0&&target,MoveType=H
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

;-------------------------------------------------------------------------------
[State 221, Explod]
type=Explod
triggerall=animelemtime(4)>=0
trigger1=(gametime%3)=1
anim=1014
ID=1014
postype=p1
bindtime=1
vel=-4,0
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
triggerall=animelemtime(4)>=0
trigger1=(gametime%3)=1
anim=1014
ID=1014
postype=p1
bindtime=1
vel=-5,(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
triggerall=animelemtime(4)>=0
trigger1=(gametime%3)=1
anim=1014
ID=1014
postype=p1
bindtime=1
vel=-5,-(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1
;-------------------------------------------------------------------------------

[State 1005, end]
type=ChangeState
trigger1=FrontEdgeBodyDist <= -240 ;Projectile goes front offscreen by 120 pixels
value=3081

;-------------------------------------------------------------------------------
; Mega Buster Shot Hit/Guarded
;-------------------------------------------------------------------------------
[StateDef 3081]
ctrl=0
anim=3081
sprpriority=3
velset=0,0
movehitpersist=1
hitcountpersist=1

[State 1051, end]
type=DestroySelf
trigger1=Time>=27

;-------------------------------------------------------------------------------
; Rush Attack Start Up
;-------------------------------------------------------------------------------
[StateDef 3082]
ctrl=0
anim=3082
sprpriority=3

[State 1007, BindToRoot]
type=BindToRoot
trigger1=1
time=2
pos=ceil(46*root,const(size.xscale)),Ceil(-45*root,const(size.yscale))
ignorehitpause=1

[State 1007, end]
type=ChangeState
trigger1=AnimTime=0
value=3080

;-------------------------------------------------------------------------------
; Rush Drill
;-------------------------------------------------------------------------------
[StateDef 3100]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3100
trigger1=Time=0
value=3100

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3100||PrevStateNo!=9000)
trigger1=Statetype!=A
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3100||PrevStateNo!=9000)
x=0
y=0

[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=3100&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 220, VarAdd];VarAdd
type=VarAdd
trigger1=1
v=1
value=1

[State 1000, Special Spark]
type=Explod
trigger1=statetype!=A
trigger1=AnimElemTime(2)=0
anim=8006
ID=8006
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ownpal=1
ignorehitpause=1

[State 3000, SuperPause]
type=SuperPause
trigger1=AnimElemTime(17)=0
time=46
anim=-1
movetime=46
darken=0
p2defmul=1
sound=-1,0
poweradd=-1000
unhittable=1

[State 3000, PlaySnd]
type=PlaySnd
trigger1=AnimElemTime(2)=0
value=S3,18
channel=5

;Set/Add Hyper Combo Variable (+1)
;For MAX Supers or Level 3 Supers use VarSet w/ Value = 3 instead of VarAdd
[State 3000, VarAdd]
type=VarAdd
trigger1=AnimElemTime(17)=0
v=45
value=1

[State 3000, Hyper Spark]
type=Helper
trigger1=AnimElemTime(17)=0
helpertype=normal
stateno=8000
ID=8000
name="Hyper Spark"
postype=p1
pos=Ceil(29*const(size.xscale)),Ceil(-50*const(size.yscale))
ownpal=1
persistent=0
supermovetime=99999

[State 3000, VarSet] ;Stop Corner Push (optional)
type=VarSet
trigger1=AnimElemTime(17)=0
fvar(5)=0

[State 3000, NotHitBy] ;Change to add invincibility or omit to have none
type=NotHitBy
trigger1=AnimElemTime(17)>=0
value=SCA
time=1

[State 3000, AfterImage] ;PreSet After Images
type = null;AfterImage
trigger1 = AnimElemTime(17)=0
time = 2
length = 15
framegap = 4
trans = add1 ;"none","add1","sub"
PalContrast = 150,50,70

[State 3000, Hyper background]
type=Helper
triggerall=!Numhelper(8000) ;When Hyper Spark disappears
triggerall=!Numhelper(8001) ;If Hyper Background does not exist
trigger1=animelemtime(17)>=0
helpertype=normal
stateno=8001
ID=8001
name="Hyper Background"
postype=p1
ownpal=1
persistent=0
size.xscale=.5
size.yscale=.5
supermovetime=99999
pausemovetime=99999
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(31)>=0&&animelemtime(34)<0
time=1
add=64,64,64
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(34)>=0&&animelemtime(37)<0
time=1
add=128,128,128
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(37)>=0&&animelemtime(40)<0
time=1
add=192,192,192
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(40)>=0
time=1
add=255,255,255
ignorehitpause=1

[State 3000, end]
type=ChangeState
trigger1=AnimTime=0
value=3101
ctrl=0

;-------------------------------------------------------------------------------
; Rush Drill
;-------------------------------------------------------------------------------
[StateDef 3101]
type=U
movetype=A
physics=N
ctrl=0
sprpriority=1
;anim=3000
;facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 3100, HitBy]
type=HitBy
trigger1=1
value=SCA,AA,AP
ignorehitpause=1

[State 0, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 0, Helper]
type=Helper
trigger1=!numhelper(8950)
trigger1=Time=0&&PrevStateNo!=3101&&PrevStateNo!=9000
helpertype=normal ;player
name="Timer"
ID=8950
stateno=8950
pos=0,0
postype=p1
ownpal=1
supermovetime=99999

[State 0, Helper]
type=Helper
trigger1=!numhelper(3110)
trigger1=Time=0&&PrevStateNo!=3101&&PrevStateNo!=9000
helpertype=normal ;player
name="Wheels"
ID=3110
stateno=3110
pos=0,0
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
supermovetime=5

[State 0, Helper]
type=Helper
trigger1=!numhelper(3103)
trigger1=Time=0&&PrevStateNo!=3101&&PrevStateNo!=9000
helpertype=normal ;player
name="Body"
ID=3103
stateno=3103
pos=0,0
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
supermovetime=5

[State 0, Helper]
type=Helper
trigger1=!numhelper(3104)
trigger1=Time=0&&PrevStateNo!=3101&&PrevStateNo!=9000
helpertype=normal ;player
name="Part"
ID=3104
stateno=3104
pos=0,0
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
supermovetime=5

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3101
trigger1=Time=0
trigger2=anim=3105&&animtime=0
value=3101

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3105
trigger1=p2dist X < -5
value=3105

[State 3000, Turn]
type = Turn
trigger1 = p2dist X < -5
trigger1 = anim = 3105
;-------------------------------------------------------------------------------
[State 0, VelSet]
type = VelSet
triggerall = var(1) < 153 && statetype != A
triggerall = command = "a" || command = "b" || command = "c"
trigger1 = Vel X <= const(velocity.walk.fwd.x) * const(size.xscale)
trigger2 = command = "holdfwd"
x = (const(velocity.walk.fwd.x) * const(size.xscale))*2

[State 0, VelSet]
type = VelSet
triggerall = var(1) < 153 && Vel X < const(velocity.walk.fwd.x) * const(size.xscale)
triggerall = statetype != A
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x) * const(size.xscale)

[State 0, VelSet]
type = VelSet
triggerall = var(1) < 153 && Vel X > const(velocity.walk.back.x) * const(size.xscale)
triggerall = statetype != A
trigger1 = command = "holdback"
x = const(velocity.walk.back.x) * const(size.xscale)

[State 0, VelSet]
type = VelSet
trigger1 = vel X < 1 && Vel X > -1
trigger2 = command != "holdfwd" && command != "holdback"
trigger2 = statetype != A && Vel X < (const(velocity.walk.fwd.x) * const(size.xscale))/2
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = var(1) >= 153
x = 0
y = 0

[State 0, VelMul]
type = VelMul
trigger1 = Vel X >= (const(velocity.walk.fwd.x) * const(size.xscale))/2
trigger1 = statetype != A
x = .95
;-------------------------------------------------------------------------------
[State 0, VelSet]
type = VelSet
triggerall = numhelper(3103)
trigger1 = statetype != A
trigger1 = Pos Y >= 0 && var(1) < 153
trigger1 = helper(3103),var(2) > 5
y = -10

[State 0, VelAdd]
type = VelAdd
trigger1 = Pos Y < 0 && statetype = A
trigger1 = var(1) < 153
y = .5

[State 3101, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y < 0
statetype = A

[State 3101, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y >= 0
statetype = S

[State 0, PosSet]
type = PosSet
trigger1 = Pos Y >= floor(-Vel Y)
trigger1 = Vel Y > 0
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y >= floor(-Vel Y)
trigger1 = Vel Y > 0
y = 0

[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=3101&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 3100, VarAdd];VarAdd
type=VarAdd
trigger1=1
v=1
value=1

[State 3100, VarAdd];VarAdd
type=VarAdd
triggerall=var(1)<153
trigger1=time=0&&(PrevStateNo=9000)
var(1) = 10

[State 3100, NotHitBy]
type=NotHitBy
trigger1=var(1)>=153
value=SCA
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=var(1) < 3
trigger2=var(1) > 161
time=1
add=255,255,255
ignorehitpause=1
[State 3100, PalFX]
type=PalFX
trigger1=var(1) = [3,5]
trigger2=var(1) = [159,161]
time=1
add=192,192,192
ignorehitpause=1
[State 3100, PalFX]
type=PalFX
trigger1=var(1) = [6,8]
trigger2=var(1) = [156,158]
time=1
add=128,128,128
ignorehitpause=1
[State 3100, PalFX]
type=PalFX
trigger1=var(1) = [9,11]
trigger2=var(1) = [153,155]
time=1
add=64,64,64
ignorehitpause=1

[State 3000, PlaySnd]
type=PlaySnd
trigger1=Var(1) = 5
value=S3,19
channel=5
;-----------------------------
[State -3, Corner Push]
type= varset
triggerall=numhelper(3120)
trigger1= fvar(5)
trigger1= helper(3120),numtarget
trigger1= (enemynear, hitover) || (enemynear, gethitvar(hitshaketime) > 0 && enemynear, time <= 0)
fvar(5)= 0

[State -3, Corner Push]
type= varset
triggerall=numhelper(3120)
trigger1= helper(3120),movecontact=1 && helper(3120),numtarget
fvar(5)= (enemynear, gethitvar(xvel))
ignorehitpause= 1

[State -3, Corner Push]
type= posadd
triggerall=numhelper(3120)
triggerall= fvar(5)
triggerall= helper(3120),numtarget;(statetype = S || statetype = C)&&
triggerall= !helper(3120),hitpausetime && (enemynear, gethitvar(hitshaketime) <= 0)
triggerall= (enemynear, statetype != L) ;&& !(target, hitfall);&& !(target, gethitvar(yvel));(target, statetype = S || target, statetype = C)
trigger1= enemynear, frontedgebodydist <= abs(enemynear, vel x)
trigger1= (enemynear, gethitvar(xvel) * enemynear, facing) > 0
trigger2= enemynear, backedgebodydist <= abs(enemynear, vel x)
trigger2= (enemynear, gethitvar(xvel) * enemynear, facing) < 0
x= ifelse(enemynear, frontedgebodydist <= 0, -1, 1) * (enemynear, facing) * fvar(5)

[State -3, Corner Push]
type= varset
triggerall=numhelper(3120)
trigger1= helper(3120),numtarget
trigger1= enemynear, gethitvar(hitshaketime) <= 0
fvar(5)= fvar(5) * 0.85

[State 3000, end]
type=ChangeState
;triggerall=statetype!=A
trigger1=Var(1) >= 186
value=3102

;[State 3000, end]
;type=ChangeState
;triggerall=statetype=A
;trigger1=Var(1) >= 186
;value=51
;ctrl=var(11)

;-------------------------------------------------------------------------------
; Rush Drill
;-------------------------------------------------------------------------------
[StateDef 3102]
type=U
movetype=I
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3102 && anim != 54
trigger1=Time=0
value=ifelse(statetype = A, 54, 3002)

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3102||PrevStateNo!=9000)
trigger1=Statetype!=A
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3102||PrevStateNo!=9000)
x=0
y=0

[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=3102&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 220, VarAdd];VarAdd
type=VarAdd
trigger1=1
v=1
value=1

;Set/Add Hyper Combo Variable (+1)
;For MAX Supers or Level 3 Supers use VarSet w/ Value = 3 instead of VarAdd
[State 3000, VarAdd]
type=VarSet
trigger1=AnimElemTime(1)=0
v=45
value=0

[State 0, VelSet]
type = VelSet
triggerall = statetype = A
trigger1=time=0&&(PrevStateNo!=3102&&prevstateno!=9000)
x = -2
y = -4

[State 0, VelAdd]
type = VelAdd
trigger1 = statetype = A
y = .5

[State 3102, PalFX]
type = PalFX
trigger1 = var(1) < 3
time = 1
add = 255,255,255

[State 3102, PalFX]
type = PalFX
trigger1 = var(1) = [3,5]
time = 1
add = 192,192,192

[State 3102, PalFX]
type = PalFX
trigger1 = var(1) = [6,8]
time = 1
add = 128,128,128

[State 3102, PalFX]
type = PalFX
trigger1 = var(1) = [9,11]
time = 1
add = 64,64,64

[State 3000, end]
type=ChangeState
triggerall=statetype=A
trigger1=Pos Y >= floor(-Vel Y) && Vel Y > 0
value=52

[State 3000, end]
type=ChangeState
triggerall=statetype!=A
trigger1=AnimTime=0
value=0
ctrl=1

[State 3000, end]
type=ChangeState
triggerall=statetype=A
trigger1=Var(1) = 12
value=51
ctrl=var(11)

;----------------------
[StateDef 3103]
movetype=I
ctrl=0
anim=3103
sprpriority=1

[State 3100, AssertSpecial]
type = AssertSpecial
trigger1 = parent,anim=3105
flag = invisible
flag2 = noshadow
ignorehitpause=1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var(2) = %d"
params = var(2)

[State 0, VarSet]
type = VarSet
trigger1 = root,statetype=A
var(2) = 0

[State 0, VarAdd]
type = VarAdd
triggerall = root,statetype!=A
trigger1 = root,command = "holdup"
trigger2 = var(2) > 0
var(2) = 1

[State 1150, BindToParent]
type=BindToParent
trigger1=parent,var(1) >= 153
time=2
facing=1
pos = 0,0
ignorehitpause=1

[State 1150, BindToParent]
type=BindToParent
triggerall =var(2) && var(2)<=5
trigger1=parent,var(1) < 153
time=2
facing=1
pos = 0,5
ignorehitpause=1

[State 1150, BindToParent]
type=BindToParent
triggerall = !var(2)
trigger1=parent,var(1) < 153
time=2
facing=1
pos = 0,ifelse(time % 5 = 2, 2, ifelse(time % 5 = 1, 1, 0))
ignorehitpause=1

[State 0, Helper]
type=Helper
trigger1=!numhelper(3120)
trigger1=Time=0
helpertype=normal ;player
name="Drill"
ID=3120
stateno=3120
pos=0,0
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
supermovetime=5

[State 0, Helper]
type=Helper
trigger1=!numhelper(3150)
trigger1=Time=0
helpertype=normal ;player
name="Fire"
ID=3150
stateno=3150
pos=0,0
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
supermovetime=5

[State 1150, VelSet]
type=VelSet
trigger1=1
x=parent,vel X
y=parent,vel Y
ignorehitpause=1

[State 1150, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 1150, DestroySelf]
type=DestroySelf
trigger1=parent,movetype=H&&stateno!=9000
trigger2=(parent,anim!=3101 && parent,anim!=3105)

;----------------------
[StateDef 3104]
movetype=I
ctrl=0
anim=3104
sprpriority=0

[State 3100, AssertSpecial]
type = AssertSpecial
trigger1 = parent,anim=3105
flag = invisible
flag2 = noshadow
ignorehitpause=1

[State 1150, BindToParent]
type=BindToParent
trigger1=1
time=2
facing=1
pos = 0,0
ignorehitpause=1

[State 1150, VelSet]
type=VelSet
trigger1=1
x=parent,vel X
y=parent,vel Y
ignorehitpause=1

[State 1150, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 1150, DestroySelf]
type=DestroySelf
trigger1=parent,movetype=H&&stateno!=9000
trigger2=(parent,anim!=3101 && parent,anim!=3105)

;----------------------
[StateDef 3110]
movetype=I
ctrl=0
anim=3110
sprpriority=1

[State 3100, AssertSpecial]
type = AssertSpecial
trigger1 = parent,anim=3105
flag = invisible
flag2 = noshadow
ignorehitpause=1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !root,vel X
trigger2 = root,var(1) >= 153
value = anim
elem = animelemno(0)

[State 3110, ChangeAnim]
type = ChangeAnim
triggerall = anim != 3110
trigger1 = root,vel X > 0 && root,Vel X <= root,const(velocity.walk.fwd.x)*root,const(size.xscale)
trigger1 = root,var(1) < 153
value = 3110
elem = animelemno(0)

[State 3110, ChangeAnim]
type = ChangeAnim
triggerall = anim != 3111
trigger1 = root,vel X < 0 && root,Vel X >= root,const(velocity.walk.back.x)*root,const(size.xscale)
trigger1 = root,var(1) < 153
value = 3111
elem = animelemno(0)

[State 3110, ChangeAnim]
type = ChangeAnim
triggerall = anim != 3115
trigger1 = root,vel X > root,const(velocity.walk.fwd.x)*root,const(size.xscale) && root,vel X <= (root,const(velocity.walk.fwd.x)*root,const(size.xscale))*2
trigger1 = root,var(1) < 153
value = 3115
elem = animelemno(0)

[State 3110, ChangeAnim]
type = ChangeAnim
triggerall = anim != 3116
trigger1 = root,vel X < root,const(velocity.walk.back.x)*root,const(size.xscale) && root,vel X >= (root,const(velocity.walk.back.x)*root,const(size.xscale))*2
trigger1 = root,var(1) < 153
value = 3116
elem = animelemno(0)

[State 1150, BindToParent]
type=BindToParent
trigger1=1
time=2
facing=1
pos = 0,0
ignorehitpause=1

[State 1150, VelSet]
type=VelSet
trigger1=1
x=parent,vel X
y=parent,vel Y
ignorehitpause=1

[State 1150, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 1150, DestroySelf]
type=DestroySelf
trigger1=parent,movetype=H&&stateno!=9000
trigger2=(parent,anim!=3101 && parent,anim!=3105)

;----------------------
[StateDef 3120]
movetype=A
ctrl=0
anim=3120
sprpriority=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.45
fvar(10)= .45
ignorehitpause=1

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

[State 3120, ChangeAnim]
type = ChangeAnim
trigger1 = root,var(1) >= 153
value = anim
elem = animelemno(0)

[State 3100, AssertSpecial]
type = AssertSpecial
trigger1 = root,anim=3105
flag = invisible
flag2 = noshadow
ignorehitpause=1

[State 1150, BindToParent]
type=BindToParent
trigger1=1
time=2
facing=1
pos = 0,0
ignorehitpause=1

[State 1150, VelSet]
type=VelSet
trigger1=1
x=parent,vel X
y=parent,vel Y
ignorehitpause=1

[State 1150, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 3120, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=root,var(1)=1&&root,PrevStateNo!=3101&&root,PrevStateNo!=9000
value=S5,24
channel=9

[State 200, 1] ;Hit
type=HitDef
triggerall=root,anim != 3105 && root,stateno != 9000 && root,var(1)<150
trigger1=!movecontact || (time%7) = 1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,HA
damage=27,1
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=5,Hit
pausetime=1,4
sparkno=-1
guard.sparkno=-1
sparkxy=Ceil(-15*const(size.xscale)),Ceil(-16*const(size.yscale))
hitsound=-1,0
guardsound=-1,0
ground.type=High
ground.slidetime=18
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),0
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),-8.225
air.hittime=21
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=0,0  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
sprpriority=2
fall.recover=0
;envshake.time=8
;envshake.ampl=2

[State 200, 1] ;Hit
type=HitDef
triggerall=root,anim != 3105 && root,stateno != 9000
trigger1=root,var(1) = 150
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,HA
damage=48,6
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
id=3120
guardflag=MA
hitflag=MAFD
priority=5,Hit
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=Ceil(-15*const(size.xscale)),Ceil(-16*const(size.yscale))
hitsound=-1,0
guardsound=-1,0
ground.type=High
ground.slidetime=18
ground.hittime=21
ground.velocity=-5.625*const(size.xscale),-23.5
guard.velocity=-9.1*const(size.xscale)
airguard.velocity=-9.1*const(size.xscale),0
air.type=High
air.velocity=-5.625*const(size.xscale),-23.5
air.hittime=21
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=0,0  ;Damage x .8, Damage x .7
givepower=28,19 ;Damage x .6, Damage x .4
yaccel=.8
sprpriority=2
fall=1
fall.recover=0
;envshake.time=8
;envshake.ampl=2

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = root,var(1) >= 153
movetype = I

[State 3120, TargetState]
type=TargetState
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
trigger1=target,statetype=L
value=5085
ignorehitpause=1

[State 3120, TargetState]
type=TargetState
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
trigger1=target,statetype!=L
value=5055
ID=3120
ignorehitpause=1

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8250+(random%8)
ID=8200
pos=Ceil((p2dist X) - 15 * root,const(size.xscale)),Ceil(-16 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil((p2dist X) - 15 * root,const(size.xscale)),Ceil(-16 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=1
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1150, DestroySelf]
type=DestroySelf
trigger1=root,movetype=H&&root,stateno!=9000
trigger2=(root,anim!=3101 && root,anim!=3105)

;----------------------
[StateDef 3150]
movetype=I
ctrl=0
anim=9741
sprpriority=0

[State 3100, AssertSpecial]
type = AssertSpecial
trigger1 = root,anim=3105
flag = invisible
flag2 = noshadow
ignorehitpause=1

[State 1150, BindToParent]
type=BindToParent
trigger1=1
time=2
facing=1
pos = 0,0
ignorehitpause=1

[State 1150, VelSet]
type=VelSet
trigger1=1
x=parent,vel X
y=parent,vel Y
ignorehitpause=1

[State 1150, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 3150, Explod] ;Dash Fwd Fire
type=Explod
triggerall = root,var(1) < 154 && root,statetype != A && !numexplod(3150)
trigger1 = root,command = "a" || root,command = "b" || root,command = "c"
trigger2 = root,Vel X > root,const(velocity.walk.fwd.x) * root,const(size.xscale)
anim=3150
ID=3150
pos=0,0
postype=p1
bindtime=-1
removetime=-2
supermovetime=99999
pausemovetime=99999
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=0
ownpal=0
removeongethit=1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=root,movetype=H&&stateno!=9000
trigger2=(root,anim!=3101 && root,anim!=3105)
trigger3=root,Vel X <= 1
trigger4=root,var(1) >= 154 || root,statetype = A
id = 3150

[State 3150, Explod] ;Dash Fwd Fire
type=Explod
triggerall = numhelper(3103)
trigger1 = helper(3103),var(2) = 6
trigger1 = !root,vel X
anim=3151
ID=3151
pos=0,-10
postype=p1
bindtime=-1
removetime=-2
supermovetime=99999
pausemovetime=99999
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=0
ownpal=0
removeongethit=1

[State 3150, Explod] ;Dash Fwd Fire
type=Explod
triggerall = numhelper(3103)
trigger1 = helper(3103),var(2) = 6
trigger1 = !root,vel X
anim=3151
ID=3151
pos=-8,-15
postype=p1
bindtime=-1
removetime=-2
supermovetime=99999
pausemovetime=99999
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=0
ownpal=0
removeongethit=1

[State 3150, Explod] ;Dash Fwd Fire
type=Explod
triggerall = numhelper(3103)
trigger1 = helper(3103),var(2) = 6
trigger1 = !root,vel X
anim=3151
ID=3151
pos=8,-15
postype=p1
bindtime=-1
removetime=-2
supermovetime=99999
pausemovetime=99999
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=0
ownpal=0
removeongethit=1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=root,movetype=H&&stateno!=9000
trigger2=(root,anim!=3101 && root,anim!=3105)
trigger3=root,var(1) >= 154 ;|| root,statetype != A
id = 3151

[State 3150, Explod] ;Dash Fwd Fire
type=Explod
triggerall = numhelper(3103)
trigger1 = helper(3103),var(2) = 6
trigger1 = root,Vel X > 0
anim=3152
ID=3152
pos=0,-10
postype=p1
bindtime=-1
removetime=-2
supermovetime=99999
pausemovetime=99999
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=0
ownpal=0
removeongethit=1

[State 3150, Explod] ;Dash Fwd Fire
type=Explod
triggerall = numhelper(3103)
trigger1 = helper(3103),var(2) = 6
trigger1 = root,Vel X > 0
anim=3152
ID=3152
pos=-8,-15
postype=p1
bindtime=-1
removetime=-2
supermovetime=99999
pausemovetime=99999
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=0
ownpal=0
removeongethit=1

[State 3150, Explod] ;Dash Fwd Fire
type=Explod
triggerall = numhelper(3103)
trigger1 = helper(3103),var(2) = 6
trigger1 = root,Vel X > 0
anim=3152
ID=3152
pos=8,-15
postype=p1
bindtime=-1
removetime=-2
supermovetime=99999
pausemovetime=99999
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=0
ownpal=0
removeongethit=1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=root,movetype=H&&stateno!=9000
trigger2=(root,anim!=3101 && root,anim!=3105)
trigger3=root,var(1) >= 154 ;|| root,statetype != A
id = 3152

[State 3150, Explod] ;Dash Fwd Fire
type=Explod
triggerall = numhelper(3103)
trigger1 = helper(3103),var(2) = 6
trigger1 = root,Vel X < 0
anim=3153
ID=3153
pos=0,-10
postype=p1
bindtime=-1
removetime=-2
supermovetime=99999
pausemovetime=99999
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=0
ownpal=0
removeongethit=1

[State 3150, Explod] ;Dash Fwd Fire
type=Explod
triggerall = numhelper(3103)
trigger1 = helper(3103),var(2) = 6
trigger1 = root,Vel X < 0
anim=3153
ID=3153
pos=-8,-15
postype=p1
bindtime=-1
removetime=-2
supermovetime=99999
pausemovetime=99999
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=0
ownpal=0
removeongethit=1

[State 3150, Explod] ;Dash Fwd Fire
type=Explod
triggerall = numhelper(3103)
trigger1 = helper(3103),var(2) = 6
trigger1 = root,Vel X < 0
anim=3153
ID=3153
pos=8,-15
postype=p1
bindtime=-1
removetime=-2
supermovetime=99999
pausemovetime=99999
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=0
ownpal=0
removeongethit=1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=root,movetype=H&&stateno!=9000
trigger2=(root,anim!=3101 && root,anim!=3105)
trigger3=root,var(1) >= 154 ;|| root,statetype != A
id = 3153

[State 1150, DestroySelf]
type=DestroySelf
trigger1=root,movetype=H&&stateno!=9000
trigger2=(root,anim!=3101 && root,anim!=3105)

;-------------------------------------------------------------------------------
; Beat Plane Start Up
;-------------------------------------------------------------------------------
[StateDef 3200]
type=U
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3200
trigger1=Time=0
value=3200

[State 3200, VarSet] ;Set Knockdown Off
type = VarSet
trigger1 = Time = 0 && PrevStateNo != 3200
var(4) = 0

;-------------------------------------------------------------------------------
[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3200||PrevStateNo!=9000)
trigger1=Statetype!=A
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3200||PrevStateNo!=9000)
x=0
y=0

[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=3200&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 220, VarAdd];VarAdd
type=VarAdd
trigger1=1
v=1
value=1

[State 1000, Special Spark]
type=Explod
trigger1=statetype!=A
trigger1=AnimElemTime(2)=0
anim=8006
ID=8006
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ownpal=1
ignorehitpause=1

[State 3000, SuperPause]
type=SuperPause
trigger1=AnimElemTime(13)=0
time=46
anim=-1
movetime=46
darken=0
p2defmul=1
sound=-1,0
poweradd=-1000
unhittable=1

[State 3000, PlaySnd]
type=PlaySnd
trigger1=AnimElemTime(10)=0
value=S3,20
channel=5

;Set/Add Hyper Combo Variable (+1)
;For MAX Supers or Level 3 Supers use VarSet w/ Value = 3 instead of VarAdd
[State 3000, VarAdd]
type=VarSet
trigger1=AnimElemTime(13)=0
v=45
value=1

[State 3000, Hyper Spark]
type=Helper
trigger1=AnimElemTime(13)=0
helpertype=normal
stateno=8000
ID=8000
name="Hyper Spark"
postype=p1
pos=Ceil(29*const(size.xscale)),Ceil(-50*const(size.yscale))
ownpal=1
persistent=0
supermovetime=99999

[State 3000, VarSet] ;Stop Corner Push (optional)
type=VarSet
trigger1=AnimElemTime(13)=0
fvar(5)=0

[State 3000, NotHitBy] ;Change to add invincibility or omit to have none
type=NotHitBy
trigger1=AnimElemTime(13)>=0
value=SCA
time=1

[State 3000, AfterImage] ;PreSet After Images
type = null;AfterImage
trigger1 = AnimElemTime(13)=0
time = 2
length = 15
framegap = 4
trans = add1 ;"none","add1","sub"
PalContrast = 150,50,70

[State 0, Helper]
type=Helper
trigger1=!numhelper(11000)
helpertype=normal ;player
name="Beat"
ID=11000
stateno=11000
pos=(-backedgebodydist) - 32,-120
postype = p1
ownpal = 1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 3000, Hyper background]
type=Helper
triggerall=!Numhelper(8000) ;When Hyper Spark disappears
triggerall=!Numhelper(8001) ;If Hyper Background does not exist
trigger1=animelemtime(17)>=0
helpertype=normal
stateno=8001
ID=8001
name="Hyper Background"
postype=p1
ownpal=1
persistent=0
size.xscale=.5
size.yscale=.5
supermovetime=99999
pausemovetime=99999
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(24)>=0&&animelemtime(27)<0
time=1
add=64,64,64
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(27)>=0&&animelemtime(30)<0
time=1
add=128,128,128
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(30)>=0&&animelemtime(33)<0
time=1
add=192,192,192
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=animelemtime(33)>=0
time=1
add=255,255,255
ignorehitpause=1

[State 3000, end]
type=ChangeState
trigger1=AnimTime=0
value=3201
ctrl=0

;-------------------------------------------------------------------------------
; Beat Plane
;-------------------------------------------------------------------------------
[StateDef 3201]
type=A
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3201
trigger1=Time=0
trigger2=Anim = 3205 && AnimTime = 0
value=3201

;-------------------------------------------------------------------------------
[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=3201&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 220, VarAdd];VarAdd
type=VarAdd
trigger1=1
v=1
value=1

[State 0, VelSet]
type = VelSet
triggerall = var(1) < 153
trigger1 = command = "holdup"
y = -5

[State 0, VelSet]
type = VelSet
triggerall = var(1) < 153
trigger1 = command = "holddown"
y = 5

[State 0, VelSet]
type = VelSet
triggerall = var(1) < 153
trigger1 = command = "holdback"
x = -6

[State 0, VelSet]
type = VelSet
triggerall = var(1) < 153
trigger1 = command = "holdfwd"
x = 6

[State 0, VelSet]
type = VelSet
trigger1 = (Pos Y > -16) && command = "holddown"
trigger2 = ScreenPos Y <= 80 && command = "holdup"
trigger3 = command != "holdup" && command != "holddown"
trigger4 = var(1) >= 153
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = (Pos Y > -16) && command != "holddown"
trigger2 = prevstateno != 3201 && Time = 0 && Pos Y >= 0
y = -4

[State 0, VelSet]
type = VelSet
trigger1 = command != "holdfwd" && command != "holdback"
trigger2 = var(1) >= 153
x = 0

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3205
trigger1=p2dist X < -5
value=3205

[State 3000, Turn]
type = Turn
trigger1 = p2dist X < -5
trigger1 = anim = 3205 ;&& animtime = 0

[State 3000, PlaySnd]
type=PlaySnd
trigger1=Var(1) = 5
value=S3,21
channel=5

[State 3100, PalFX]
type=PalFX
trigger1=var(1) < 3
trigger2=var(1) > 161
time=1
add=255,255,255
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=var(1) = [3,5]
trigger2=var(1) = [159,161]
time=1
add=192,192,192
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=var(1) = [6,8]
trigger2=var(1) = [156,158]
time=1
add=128,128,128
ignorehitpause=1

[State 3100, PalFX]
type=PalFX
trigger1=var(1) = [9,11]
trigger2=var(1) = [153,155]
time=1
add=64,64,64
ignorehitpause=1

[State 0, Helper]
type=Helper
trigger1=!numhelper(3202)
trigger1=time=0&&prevstateno!=3201
helpertype=normal ;player
name="Beat Plane Body"
ID=3202
stateno=3202
pos=0,0
postype = p1
ownpal = 0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
supermovetime=10

[State 0, Helper]
type=Helper
trigger1=!numhelper(3205)
trigger1=time=0&&prevstateno!=3201
helpertype=normal ;player
name="Invisibody"
ID=3205
stateno=3205
pos=0,0
postype = p1
ownpal = 1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
supermovetime=10

[State 0, Helper]
type=Helper
trigger1=!numhelper(8950)
trigger1=Time=0&&PrevStateNo!=3201&&PrevStateNo!=9000
helpertype=normal ;player
name="Timer"
ID=8950
stateno=8950
pos=0,0
postype=p1
ownpal=1
supermovetime=99999

[State 3000, end]
type=ChangeState
trigger1=Var(1) >= 186
value=3002
ctrl=0

;----------------------
[StateDef 3202]
movetype=I
ctrl=0
anim=3202
sprpriority=1

[State 3100, AssertSpecial]
type = AssertSpecial
trigger1 = parent,anim=3205
flag = invisible
flag2 = noshadow
ignorehitpause=1

[State 1150, BindToParent]
type=BindToParent
trigger1=1
time=2
facing=1
pos = 0,0
ignorehitpause=1

[State 1150, VelSet]
type=VelSet
trigger1=1
x=parent,vel X
y=parent,vel Y
ignorehitpause=1

[State 1150, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 0, Helper]
type=Helper
trigger1=!numhelper(3203)
trigger1=time=0&&prevstateno!=3202
helpertype=normal ;player
name="Beat Plane Wing"
ID=3203
stateno=3203
pos=0,0
postype = p1
ownpal = 0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
supermovetime=10

[State 0, Helper]
type=Helper
trigger1=!numhelper(3204)
trigger1=time=0&&prevstateno!=3202
helpertype=normal ;player
name="Beat Plane Propeller"
ID=3204
stateno=3204
pos=0,0
postype = p1
ownpal = 0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
supermovetime=10

[State 3202, ChangeAnim]
type = ChangeAnim
triggerall = anim != 3207 && root,var(1)>=6 && root,var(1) < 153 && root,anim != 3205
trigger1 = root,command = "x" || root,command = "y" || root,command = "z"
value = 3207

[State 3202, ChangeAnim]
type = ChangeAnim
triggerall = anim != 3202
trigger1 = anim = 3207 && animtime = 0
value = 3202

[State 220, Helper]
type=null;Helper
triggerall=anim=3207&&root,var(1) >=6&&root,var(1) < 153
trigger1=AnimElem=2
helpertype=normal ;player
name="Beat Shot"
ID=3210
stateno=3210
pos=ceil(30*const(size.xscale)),Ceil(-12*const(size.yscale))
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 220, Helper]
type=Helper
triggerall =root,var(1) >=6&&root,var(1) < 153 && root,anim != 3205 && !numhelper(3208)
trigger1 = root,command = "a" || root,command = "b" || root,command = "c"
helpertype=normal ;player
name="Beat Missile Opener"
ID=3208
stateno=3208
pos=0,0
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 1150, DestroySelf]
type=DestroySelf
trigger1=parent,movetype=H&&stateno!=9000
trigger2=(parent,anim!=3201 && parent,anim!=3205)

;----------------------
[StateDef 3203]
movetype=I
ctrl=0
anim=3203
sprpriority=2

[State 3100, AssertSpecial]
type = AssertSpecial
trigger1 = root,anim=3205
flag = invisible
flag2 = noshadow
ignorehitpause=1

[State 1150, BindToParent]
type=BindToParent
trigger1=1
time=2
facing=1
pos = 0,0
ignorehitpause=1

[State 1150, VelSet]
type=VelSet
trigger1=1
x=parent,vel X
y=parent,vel Y
ignorehitpause=1

[State 1150, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 1150, DestroySelf]
type=DestroySelf
trigger1=root,movetype=H&&stateno!=9000
trigger2=(root,anim!=3201 && root,anim!=3205)

;----------------------
[StateDef 3204]
movetype=I
ctrl=0
anim=3204
sprpriority=1

[State 3100, AssertSpecial]
type = AssertSpecial
trigger1 = root,anim=3205
flag = invisible
flag2 = noshadow
ignorehitpause=1

[State 1150, BindToParent]
type=BindToParent
trigger1=1
time=2
facing=1
pos = 0,0
ignorehitpause=1

[State 1150, VelSet]
type=VelSet
trigger1=1
x=parent,vel X
y=parent,vel Y
ignorehitpause=1

[State 1150, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 1150, DestroySelf]
type=DestroySelf
trigger1=root,movetype=H&&stateno!=9000
trigger2=(root,anim!=3201 && root,anim!=3205)

;----------------------
[StateDef 3205]
movetype=I
ctrl=0
sprpriority=1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = root,anim
elem = root,animelemno(0)

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

[State 1150, BindToParent]
type=BindToRoot
trigger1=1
time=2
facing=1
pos = 0,0
ignorehitpause=1

[State 1150, VelSet]
type=VelSet
trigger1=1
x=root,vel X
y=root,vel Y
ignorehitpause=1

[State 1150, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 220, Helper]
type=Helper
triggerall=root,anim!=3205 && root,var(1)>=6 && root,var(1) < 153
triggerall=numhelper(3202)
trigger1=helper(3202),anim=3207
trigger1=helper(3202),AnimElem=2
helpertype=normal ;player
name="Beat Shot"
ID=3210
stateno=3210
pos=ceil(30*const(size.xscale)),Ceil(-12*const(size.yscale))
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, Helper]
type=Helper
triggerall=root,anim!=3205 && root,var(1)>=6 && root,var(1) < 153
triggerall=numhelper(3208)
trigger1=helper(3208),anim=3208
trigger1=helper(3208),AnimElem=2
helpertype=normal ;player
name="Beat Plane Missile"
ID=3215
stateno=3215
pos=Ceil(7 * root,const(size.xscale)),0
postype = p1
ownpal = 0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 1150, DestroySelf]
type=DestroySelf
trigger1=parent,movetype=H&&stateno!=9000
trigger2=(parent,anim!=3201 && parent,anim!=3205)

;----------------------
[StateDef 3208]
movetype=I
ctrl=0
anim=3208
sprpriority=2

[State 3100, AssertSpecial]
type = AssertSpecial
trigger1 = root,anim=3205
flag = invisible
flag2 = noshadow
ignorehitpause=1

[State 1150, BindToRoot]
type=BindToRoot
trigger1=1
time=2
facing=1
pos = 0,0
ignorehitpause=1

[State 1150, VelSet]
type=VelSet
trigger1=1
x=root,vel X
y=root,vel Y
ignorehitpause=1

[State 1150, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 1150, DestroySelf]
type=DestroySelf
trigger1=root,movetype=H&&stateno!=9000
trigger2=(root,anim!=3201 && root,anim!=3205)
trigger3=animtime=0

;-------------------------------------------------------------------------------
; Beat Plane Shot
;-------------------------------------------------------------------------------
[StateDef 3210]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.3
fvar(10)= .3
ignorehitpause=1

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

[State 221, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
v=1
value=1
ignorehitpause=1

[State 1050, PlaySnd]
type=PlaySnd
trigger1=Time=0&&PrevStateNo!=3210
value=S5,4
channel=10

[State 1050, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=3210&&Time=0
value=3210

[State 1050, VelSet]
type=VelSet
trigger1=var(1)>1
x=7.5

[State 1050, HitBy]
type=HitBy
trigger1=1
value=SCA,AP
ignorehitpause=1

[State 1050, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP,AA,AT
stateno=3211
ignorehitpause=1

[State 221, HitDef]
type=HitDef
triggerall=root,var(13)=0 ;Air
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,HP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=20,1;97,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
getpower=0,0
givepower=12,8

[State 221, HitDef]
type=HitDef
triggerall=root,var(13)=1 ;Air
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,HP
hitflag=MAF
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=20,1;97,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
getpower=0,0
givepower=12,8

;-------------------------------------------------------------------------------
;[State 1050, EnvShake]
;type = EnvShake
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;time=12
;ampl=4
;ignorehitpause=1

[State 1050, HitSound] ;Alternative way to use Hit Sound
type=PlaySnd
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S1,5
channel=1
ignorehitpause=1

[State 1050, GuardSound] ;Alternative way to use Guard Sound
type=PlaySnd
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
;triggerall=!parent,var(12)
trigger1=MoveHit&&NumTarget
trigger1=Target,Stateno=5020
trigger1=Target,Time<=0&&target,MoveType=H
value=5025
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget ;&& parent,hitcount<2
trigger1=(target,stateno=5080)&&(target,alive);&&(target,hitfall)
trigger1=Target,Time<=0&&target,MoveType=H
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 221, end]
type=ChangeState
trigger1=MoveContact||MoveReversed ;Attack Connects
trigger2=FrontEdgeBodyDist <= -120 ;Projectile goes front offscreen by 120 pixels
value=3211

;-------------------------------------------------------------------------------
; Mega Buster Shot Hit/Guarded
;-------------------------------------------------------------------------------
[StateDef 3211]
ctrl=0
anim=3211
sprpriority=3
velset=0,0
movehitpersist=1
hitcountpersist=1

[State 1051, end]
type=DestroySelf
trigger1=Time>=27

;-------------------------------------------------------------------------------
; Beat Plane Missile
;-------------------------------------------------------------------------------
[StateDef 3215]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.3
fvar(10)= .3
ignorehitpause=1

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

[State 221, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
v=1
value=1
ignorehitpause=1

[State 1050, PlaySnd]
type=PlaySnd
trigger1=Time=0&&PrevStateNo!=3215
value=S5,6
channel=10

[State 1050, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=3215&&Time=0
value=3215

[State 1050, VelSet]
type=VelSet
trigger1=var(1)>1
x=3.5

[State 0, VelAdd]
type = VelAdd
trigger1 = var(1)>0
y = .5

[State 1050, HitBy]
type=HitBy
trigger1=1
value=SCA,AP
ignorehitpause=1

[State 1050, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP,AA,AT
stateno=3216
ignorehitpause=1

[State 221, HitDef]
type=HitDef
triggerall=root,var(13)=0 ;Air
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,HP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=27,1;97,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
getpower=0,0
givepower=12,8

[State 221, HitDef]
type=HitDef
triggerall=root,var(13)=1 ;Air
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,HP
hitflag=MAF
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=27,1;97,0
pausetime=1,8
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),0
airguard.velocity=-5.625*root,const(size.xscale),0
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
getpower=0,0
givepower=12,8

;-------------------------------------------------------------------------------
;[State 1050, EnvShake]
;type = EnvShake
;trigger1=movehit=1&&numtarget
;trigger1=target,time<=0&&p2movetype=H
;time=12
;ampl=4
;ignorehitpause=1

[State 1050, HitSound] ;Alternative way to use Hit Sound
type=PlaySnd
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S1,5
channel=1
ignorehitpause=1

[State 1050, GuardSound] ;Alternative way to use Guard Sound
type=PlaySnd
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
;triggerall=!parent,var(12)
trigger1=MoveHit&&NumTarget
trigger1=Target,Stateno=5020
trigger1=Target,Time<=0&&target,MoveType=H
value=5025
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget ;&& parent,hitcount<2
trigger1=(target,stateno=5080)&&(target,alive);&&(target,hitfall)
trigger1=Target,Time<=0&&target,MoveType=H
value=5085
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 221, end]
type=ChangeState
trigger1=MoveContact||MoveReversed ;Attack Connects
trigger2=FrontEdgeBodyDist <= -120 ;Projectile goes front offscreen by 120 pixels
trigger3=pos Y >= floor(-Vel Y) && Vel Y > 0
value=3216

;-------------------------------------------------------------------------------
; Beat Plane Missile Destroyed
;-------------------------------------------------------------------------------
[StateDef 3216]
ctrl=0
anim=3216
sprpriority=3
velset=0,0
movehitpersist=1
hitcountpersist=1

[State 1051, end]
type=DestroySelf
trigger1=Time>=27

;-------------------------------------------------------------------------------
; Mega Buster Sweep
;-------------------------------------------------------------------------------
[StateDef 3300]
type=U
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, VarSet]
type=VarSet
trigger1=Time=0&&(PrevStateNo!=3300&&PrevStateNo!=9000)
var(5)=0

[State 0, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=animelemtime(146)>=0
var(4)=1
ignorehitpause=1

[State 3000, ChangeAnim]
type=ChangeAnim
trigger1=(anim!=[3300,3302])
trigger1=Time=0
value=ifelse(statetype=A, 3301, ifelse(statetype=C, 3302, 3300))

[State 3000, ChangeAnim]
type=ChangeAnim
trigger1=anim!=3300&&statetype!=A&&command!="holddown"
value=3300
elem=animelemno(0)

[State 3000, ChangeAnim]
type=ChangeAnim
trigger1=anim!=3302&&statetype!=A&&command="holddown"
value=3302
elem=animelemno(0)

[State 3000, ChangeAnim]
type=ChangeAnim
trigger1=anim!=3301&&statetype=A
value=3301;ifelse(statetype!=A, 3300, 3301)
elem=animelemno(0)

[State 0, Helper]
type=Helper
trigger1=!numhelper(8950)
trigger1=animelemtime(12)>=0&&PrevStateNo!=3300&&PrevStateNo!=9000
helpertype=normal ;player
name="Timer"
ID=8950
stateno=8950
pos=0,0
postype=p1
ownpal=1
supermovetime=99999

;-------------------------------------------------------------------------------
[State 0, VelSet]
type=VelSet
trigger1=animelemtime(1)=0 && statetype = A
x=ifelse(Vel X, Vel X*.025, 0)
y=ifelse(Vel Y < 0, -1, (Vel Y * .025))

[State 0, VelAdd]
type=VelAdd
trigger1=Pos Y < 0 && StateType = A && AnimElemTime(12)>=0
trigger1=Vel Y <= .25
y = .025

[State 0, PosSet]
type=PosSet
trigger1=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
trigger2=!Time&&(PrevStateNo!=3300||PrevStateNo!=9000)
trigger2=Statetype!=A
y=0

[State 0, VelSet]
type=VelSet
trigger1=statetype=A
trigger1=Pos Y >= Floor(-Vel Y)
trigger1=Vel Y >= 0
trigger2=!Time&&(PrevStateNo!=3300||PrevStateNo!=9000)
trigger2=Statetype!=A
x=0
y=0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1=pos Y >= Floor(-Vel Y) && Vel Y >= 0
trigger1=command!="holddown"
statetype = S
physics = S

[State 0, StateTypeSet]
type = StateTypeSet
trigger1=pos Y >= Floor(-Vel Y) && Vel Y >= 0
trigger1=command="holddown"
statetype = C
physics = C

[State 0, PosFreeze]
type = PosFreeze
trigger1 = animelemtime(12)<0
value = 1
;-------------------------------------------------------------------------------

[State 0,PalFX]
type = palfx
trigger1 = (var(1) = [11,12]) || (var(1) = [16,17]) || (var(1) = [21,22]) || (var(1) = [26,27])
trigger2 = (var(1) = [31,32]) || (var(1) = [36,37]) || (var(1) = [41,42]) || (var(1) = [46,47])
trigger3 = (var(1) = [51,52]) || (var(1) = [56,57]) || (var(1) = [61,62]) || (var(1) = [66,67])
trigger4 = (var(1) = [71,72]) || (var(1) = [76,77]) || (var(1) = [81,82]) || (var(1) = [86,87])
trigger5 = (var(1) = [91,92]) || (var(1) = [96,97]) || (var(1) = [101,102]) || (var(1) = [106,107])
trigger6 = (var(1) = [111,112]) || (var(1) = [116,117]) || (var(1) = [121,122]) || (var(1) = [126,127])
trigger7 = (var(1) = [131,132]) || (var(1) = [136,137]) || (var(1) = [141,142]) || (var(1) = [146,147])
add = 80,144,240
time = 1
[State 0,PalFX]
type=PalFx
trigger1 = (var(1) = 13) || (var(1) = 18) || (var(1) = 23) || (var(1) = 28)
trigger2 = (var(1) = 33) || (var(1) = 38) || (var(1) = 43) || (var(1) = 48)
trigger3 = (var(1) = 53) || (var(1) = 58) || (var(1) = 63) || (var(1) = 68)
trigger4 = (var(1) = 73) || (var(1) = 78) || (var(1) = 83) || (var(1) = 88)
trigger5 = (var(1) = 93) || (var(1) = 98) || (var(1) = 103) || (var(1) = 108)
trigger6 = (var(1) = 113) || (var(1) = 118) || (var(1) = 123) || (var(1) = 128)
trigger7 = (var(1) = 133) || (var(1) = 138) || (var(1) = 143) || (var(1) = 148)
add=32,112,224
time=1
[State 0,PalFX]
type=PalFx
trigger1 = (var(1) = 14) || (var(1) = 19) || (var(1) = 24) || (var(1) = 29)
trigger2 = (var(1) = 34) || (var(1) = 39) || (var(1) = 44) || (var(1) = 49)
trigger3 = (var(1) = 54) || (var(1) = 59) || (var(1) = 64) || (var(1) = 69)
trigger4 = (var(1) = 74) || (var(1) = 79) || (var(1) = 84) || (var(1) = 89)
trigger5 = (var(1) = 94) || (var(1) = 99) || (var(1) = 104) || (var(1) = 109)
trigger6 = (var(1) = 114) || (var(1) = 119) || (var(1) = 124) || (var(1) = 129)
trigger7 = (var(1) = 134) || (var(1) = 139) || (var(1) = 144) || (var(1) = 149)
add=32,32,192
time=1
[State 0,PalFX]
type=PalFx
trigger1 = (var(1) = 15) || (var(1) = 20) || (var(1) = 25) || (var(1) = 30)
trigger2 = (var(1) = 35) || (var(1) = 40) || (var(1) = 45) || (var(1) = 50)
trigger3 = (var(1) = 55) || (var(1) = 60) || (var(1) = 65) || (var(1) = 70)
trigger4 = (var(1) = 75) || (var(1) = 80) || (var(1) = 85) || (var(1) = 90)
trigger5 = (var(1) = 95) || (var(1) = 100) || (var(1) = 105) || (var(1) = 110)
trigger6 = (var(1) = 115) || (var(1) = 120) || (var(1) = 125) || (var(1) = 130)
trigger7 = (var(1) = 135) || (var(1) = 140) || (var(1) = 145) || (var(1) = 150)
add=32,32,160
time=1

[State 220, VarSet];VarTimerSet
type=VarSet
trigger1=time=0&&(PrevStateNo!=3300&&prevstateno!=9000)
var(1)=0
ignorehitpause=1

[State 220, VarAdd];VarAdd
type=VarAdd
trigger1=1
v=1
value=1

[State 1000, Special Spark]
type=Explod
trigger1=statetype!=A
trigger1=AnimElem=2
anim=8006
ID=8006
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ownpal=1
ignorehitpause=1

[State 3000, SuperPause]
type=SuperPause
trigger1=AnimElemTime(11)=0
time=38
anim=-1
movetime=0
darken=0
p2defmul=1
sound=-1,0
poweradd=-1000
unhittable=1

[State 3000, PlaySnd]
type=PlaySnd
trigger1=AnimElem=7
value=S3,25
channel=5

[State 3000, PlaySnd]
type=PlaySnd
trigger1=AnimElem=12
value=S3,5
channel=5

;Set/Add Hyper Combo Variable (+1)
;For MAX Supers or Level 3 Supers use VarSet w/ Value = 3 instead of VarAdd
[State 3000, VarAdd]
type=VarAdd
trigger1=AnimElemTime(11)=0
v=45
value=1

[State 3000, Hyper Spark]
type=Helper
triggerall=statetype!=A
trigger1=AnimElemTime(11)=0
helpertype=normal
stateno=8000
ID=8000
name="Hyper Spark"
postype=p1
pos=Ceil(29*const(size.xscale)),Ceil(-50*const(size.yscale))
ownpal=1
persistent=0
supermovetime=99999

[State 3000, Hyper Spark]
type=Helper
triggerall=statetype=A
trigger1=AnimElemTime(11)=0
helpertype=normal
stateno=8000
ID=8000
name="Hyper Spark"
postype=p1
pos=Ceil(34*const(size.xscale)),Ceil(-72*const(size.yscale))
ownpal=1
persistent=0
supermovetime=99999

[State 3000, Hyper background]
type=Helper
triggerall=!Numhelper(8000) ;When Hyper Spark disappears
triggerall=!Numhelper(8001) ;If Hyper Background does not exist
trigger1=AnimElemTime(11)>=0
helpertype=normal
stateno=8001
ID=8001
name="Hyper Background"
postype=p1
ownpal=1
persistent=0
size.xscale=.5
size.yscale=.5
supermovetime=99999
pausemovetime=99999

[State 3000, VarSet] ;Stop Corner Push (optional)
type=VarSet
trigger1=AnimElemTime(11)=0
fvar(5)=0

[State 3000, NotHitBy] ;Change to add invincibility or omit to have none
type=NotHitBy
trigger1=AnimElemTime(15)<0
value=SCA
time=1

[State 3000, AfterImage] ;PreSet After Images
type = AfterImage
trigger1 = AnimElemTime(11)=0
time = 2
length = 15
framegap = 4
trans = add1 ;"none","add1","sub"
PalContrast = 150,50,70

[State 3000, VarSet]
type=VarSet
trigger1=AnimTime=0
var(45)=0
ignorehitpause=1

[State 220, Helper]
type=Helper
trigger1=!numhelper(3307)
helpertype=normal ;player
name="Super Mega Shot Mother"
ID=3307
stateno=3307
pos=0,0
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 3000, end]
type=ChangeState
triggerall=statetype!=A
trigger1=Var(1) > 189||AnimTime=0
value=ifelse(statetype=C, 11, 0)
ctrl=1

[State 3000, end]
type=ChangeState
triggerall=statetype=A
trigger1=Var(1) > 189||AnimTime=0
value=51

;-------------------------------------------------------------------------------
; Mega Buster
;-------------------------------------------------------------------------------
[StateDef 3305]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
movehitpersist=1
hitcountpersist=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.4
fvar(10)= .4
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 221, VarSet] ;Attack Type
type=VarSet
trigger1=time=0&&prevstateno!=3305
var(5)=parent,var(5)
ignorehitpause=1

[State 221, VarSet] ;Attack Type
type=VarSet
trigger1=!numhelper(3307)
var(5)=5
ignorehitpause=1

[State 221, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
v=1
value=1
ignorehitpause=1

[State 1050, ChangeAnim]
type=ChangeAnim
trigger1=Anim!=221&&Time=0
value=221

[State 1050, VelSet]
type=VelSet
trigger1=var(1)>1
x=8.25 * root,const(size.xscale)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
ignorehitpause = 1

[State 0, AngleAdd]
type = AngleSet
trigger1 = 1
value = -(Vel Y)*10
ignorehitpause = 1

[State 0, Trans]
type=null;Trans
trigger1=1
trans=AddAlpha
value=192,128
ignorehitpause=1

[State 0, VelSet]
type = VelSet
;trigger1 = root,command != "holdup"&&root,command!="holddown"
trigger1 = var(1)=2 ;&& prevstateno!= 3005
y = ifelse(random < 333, -1, ifelse((random = [333,665]),0, 1))

;[State 0, VelSet]
;type = VelSet
;trigger1 = root,command = "holdup"&&root,command!="holddown"
;trigger1 = var(1)=2 ;&& prevstateno!= 3005
;y = ifelse(random < 333, -2, ifelse((random = [333,665]),-1, -3))

;[State 0, VelSet]
;type = VelSet
;trigger1 = root,command = "holddown"&&root,command!="holdup"
;trigger1 = var(1)=2 ;&& prevstateno!= 3005
;y = ifelse(random < 333, 2, ifelse((random = [333,665]),1, 3))

[State 1050, HitBy]
type=HitBy
trigger1=1
value=SCA,AP
ignorehitpause=1

[State 1050, HitOverride]
type=HitOverride
trigger1=1
attr=SCA,AP,AA,AT
stateno=3306
ignorehitpause=1

[State 221, HitDef]
type=HitDef
trigger1=!MoveContact && Vel Y < 0 && root,var(5)!=5
trigger1=(enemynear,stateno!=[5070,5071])
attr=A,HP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=20,2
pausetime=1,4
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=High      ;Low,Trip,None
air.type=High
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-2.75;-4.1125
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*root,const(size.xscale),-8.225
down.hittime=20
forcenofall=1
getpower=0,0
givepower=9,6

[State 221, HitDef]
type=HitDef
trigger1=!MoveContact && Vel Y >= 0 && var(5)!=5
trigger1=(enemynear,stateno!=[5070,5071])
attr=A,HP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=5,Hit
damage=20,2
pausetime=1,4
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=Low      ;Low,Trip,None
air.type=Low
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
ground.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-2.75;-4.1125
airguard.velocity=-5.25*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*root,const(size.xscale),-8.225
down.hittime=20
forcenofall=1
getpower=0,0
givepower=9,6

[State 221, HitDef] ;Knockdown
type=HitDef
trigger1=!MoveContact && var(5)=5
trigger1=(enemynear,stateno!=[5070,5071])
attr=A,HP
hitflag=MAFD
guardflag=MA
animtype=Medium
air.animtype=Back
fall.animtype=Back
priority=5,Hit
damage=20,2
pausetime=1,4
sparkno=-1;S8210+(random%4)
guard.sparkno=-1;S8300
sparkxy=-10,0
hitsound=-1,0;S1,6
guardsound=-1,0;S2,0
ground.type=High      ;Low,Trip,None
air.type=High
ground.slidetime=14
ground.hittime=16
air.hittime=16
yaccel=.8
fall=1
fall.recover=0
ground.velocity=-5.625*root,const(size.xscale),-8.225
air.velocity=-5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
ground.cornerpush.veloff=0
sprpriority=3
fall.xvelocity=0
fall.yvelocity=0
down.velocity=-9.1*root,const(size.xscale),-8.225
down.hittime=20
getpower=0,0
givepower=9,6

;-------------------------------------------------------------------------------
[State 1050, EnvShake]
type = null;EnvShake
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
time=12
ampl=4
ignorehitpause=1

[State 1050, HitSound] ;Alternative way to use Hit Sound
type=PlaySnd
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S1,5
channel=1
ignorehitpause=1

[State 1050, GuardSound] ;Alternative way to use Guard Sound
type=PlaySnd
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = root,statetype = A && var(5)=5
trigger1 = movehit && !var(12)
var(12) = 1
ignorehitpause=1

[State 650, MvC2 KnockDown]
type=TargetState
triggerall=root,Var(12)>0&&var(5)=5
trigger1=MoveHit&&NumTarget
trigger1=Target,Stateno=5020
trigger1=Target,Time<=0&&P2MoveType=H
value=5021
ignorehitpause=1

[State 221, P2 Recovery]
type=TargetState
triggerall= movehit=1 && numtarget
triggerall=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
trigger1=var(5)!=5
value=5025
ignorehitpause=1

;--------------------------
[State 221, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 221, end]
type=ChangeState
trigger1=MoveContact||MoveReversed ;Attack Connects
trigger2=FrontEdgeBodyDist <= -120 ;Projectile goes front offscreen by 120 pixels
trigger3=pos Y >= 0
value=3306

;-------------------------------------------------------------------------------
; Mega Buster Shot Hit/Guarded
;-------------------------------------------------------------------------------
[StateDef 3306]
ctrl=0
anim=222
sprpriority=3
velset=0,0
movehitpersist=1
hitcountpersist=1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
ignorehitpause = 1

[State 0, Trans]
type=null;Trans
trigger1=1
trans=AddAlpha
value=192,128
ignorehitpause=1

[State 9500, Flying Screen Helper]
type=Helper
trigger1=root,Var(12)=1
trigger1=movehit&&Numtarget
;trigger1=Target,Time<=0&&Target,Movetype=H
trigger1=!NumHelper(9500)
helpertype=normal ;player
name="Flying Screen Effect"
ID=9500
stateno=9500
pos=0,0
postype=p2
ownpal=0
ignorehitpause=1
size.ground.back=0
size.ground.front=0
size.air.back=0
size.air.front=0

[State 1051, end]
type=DestroySelf
trigger1=Time>=16
;---------------------------------------------
[StateDef 3307]
type=A
movetype=I
physics=N
ctrl=0

[State 3007, AssertSpecial]
type=AssertSpecial
trigger1=1
flag=invisible
ignorehitpause=1

[State 3007, ChangeAnim]
type=ChangeAnim
trigger1=1
value=root,anim
elem=root,animelemno(0)
ignorehitpause=1

[State 3007, BindToRoot]
type=BindToRoot
trigger1=1
time=2
ignorehitpause=1

[State 3007, PlayerPush]
type=PlayerPush
trigger1=1
value=1
ignorehitpause=1

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

[State 220, Helper]
type=Helper
triggerall=root,statetype=S
trigger1=root,AnimElem=12||root,AnimElem=17||root,AnimElem=22||root,AnimElem=27||root,AnimElem=32
trigger2=root,AnimElem=37||root,AnimElem=42||root,AnimElem=47||root,AnimElem=52||root,AnimElem=57
trigger3=root,AnimElem=62||root,AnimElem=67||root,AnimElem=72||root,AnimElem=77||root,AnimElem=82
trigger4=root,AnimElem=87||root,AnimElem=92||root,AnimElem=97||root,AnimElem=102||root,AnimElem=107
trigger5=root,AnimElem=112||root,AnimElem=117||root,AnimElem=122||root,AnimElem=127||root,AnimElem=132
trigger6=root,AnimElem=137||root,AnimElem=142||root,AnimElem=147;||AnimElem=152||AnimElem=157
helpertype=normal ;player
name="Mega Shot FX"
ID=3308
stateno=3308
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 220, Helper]
type=Helper
triggerall=root,statetype=S
trigger1=root,AnimElem=12||root,AnimElem=17||root,AnimElem=22||root,AnimElem=27||root,AnimElem=32
trigger2=root,AnimElem=37||root,AnimElem=42||root,AnimElem=47||root,AnimElem=52||root,AnimElem=57
trigger3=root,AnimElem=62||root,AnimElem=67||root,AnimElem=72||root,AnimElem=77||root,AnimElem=82
trigger4=root,AnimElem=87||root,AnimElem=92||root,AnimElem=97||root,AnimElem=102||root,AnimElem=107
trigger5=root,AnimElem=112||root,AnimElem=117||root,AnimElem=122||root,AnimElem=127||root,AnimElem=132
trigger6=root,AnimElem=137||root,AnimElem=142||root,AnimElem=147;||AnimElem=152||AnimElem=157
helpertype=normal ;player
name="Super Mega Shot"
ID=3305
stateno=3305
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 220, Helper]
type=Helper
triggerall=root,statetype=C
trigger1=root,AnimElem=12||root,AnimElem=17||root,AnimElem=22||root,AnimElem=27||root,AnimElem=32
trigger2=root,AnimElem=37||root,AnimElem=42||root,AnimElem=47||root,AnimElem=52||root,AnimElem=57
trigger3=root,AnimElem=62||root,AnimElem=67||root,AnimElem=72||root,AnimElem=77||root,AnimElem=82
trigger4=root,AnimElem=87||root,AnimElem=92||root,AnimElem=97||root,AnimElem=102||root,AnimElem=107
trigger5=root,AnimElem=112||root,AnimElem=117||root,AnimElem=122||root,AnimElem=127||root,AnimElem=132
trigger6=root,AnimElem=137||root,AnimElem=142||root,AnimElem=147;||AnimElem=152||AnimElem=157
helpertype=normal ;player
name="Mega Shot FX"
ID=3308
stateno=3308
pos=ceil(24*const(size.xscale)),Ceil(-34*const(size.yscale))
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 220, Helper]
type=Helper
triggerall=root,statetype=C
trigger1=root,AnimElem=12||root,AnimElem=17||root,AnimElem=22||root,AnimElem=27||root,AnimElem=32
trigger2=root,AnimElem=37||root,AnimElem=42||root,AnimElem=47||root,AnimElem=52||root,AnimElem=57
trigger3=root,AnimElem=62||root,AnimElem=67||root,AnimElem=72||root,AnimElem=77||root,AnimElem=82
trigger4=root,AnimElem=87||root,AnimElem=92||root,AnimElem=97||root,AnimElem=102||root,AnimElem=107
trigger5=root,AnimElem=112||root,AnimElem=117||root,AnimElem=122||root,AnimElem=127||root,AnimElem=132
trigger6=root,AnimElem=137||root,AnimElem=142||root,AnimElem=147;||AnimElem=152||AnimElem=157
helpertype=normal ;player
name="Super Mega Shot"
ID=3305
stateno=3305
pos=ceil(24*const(size.xscale)),Ceil(-34*const(size.yscale))
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 220, Helper]
type=null;Helper
triggerall=root,statetype!=A
triggerall=root,command="holdx"||root,command="y"||root,command="z"
trigger1=(time%5)=0
trigger1=root,AnimElemTime(13)>=0 && root,animelemtime(147)<0
helpertype=normal ;player
name="Super Mega Shot"
ID=3305
stateno=3305
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 220, Helper]
type=Helper
triggerall=root,statetype=A
trigger1=root,AnimElem=12||root,AnimElem=17||root,AnimElem=22||root,AnimElem=27||root,AnimElem=32
trigger2=root,AnimElem=37||root,AnimElem=42||root,AnimElem=47||root,AnimElem=52||root,AnimElem=57
trigger3=root,AnimElem=62||root,AnimElem=67||root,AnimElem=72||root,AnimElem=77||root,AnimElem=82
trigger4=root,AnimElem=87||root,AnimElem=92||root,AnimElem=97||root,AnimElem=102||root,AnimElem=107
trigger5=root,AnimElem=112||root,AnimElem=117||root,AnimElem=122||root,AnimElem=127||root,AnimElem=132
trigger6=root,AnimElem=137||root,AnimElem=142||root,AnimElem=147;||AnimElem=152||AnimElem=157
helpertype=normal ;player
name="Mega Shot FX"
ID=3308
stateno=3308
pos=ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 220, Helper]
type=Helper
triggerall=root,statetype=A
trigger1=root,AnimElem=12||root,AnimElem=17||root,AnimElem=22||root,AnimElem=27||root,AnimElem=32
trigger2=root,AnimElem=37||root,AnimElem=42||root,AnimElem=47||root,AnimElem=52||root,AnimElem=57
trigger3=root,AnimElem=62||root,AnimElem=67||root,AnimElem=72||root,AnimElem=77||root,AnimElem=82
trigger4=root,AnimElem=87||root,AnimElem=92||root,AnimElem=97||root,AnimElem=102||root,AnimElem=107
trigger5=root,AnimElem=112||root,AnimElem=117||root,AnimElem=122||root,AnimElem=127||root,AnimElem=132
trigger6=root,AnimElem=137||root,AnimElem=142||root,AnimElem=147;||AnimElem=152||AnimElem=157
helpertype=normal ;player
name="Super Mega Shot"
ID=3305
stateno=3305
pos=ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 220, Helper]
type=null;Helper
triggerall=root,statetype=A
triggerall=root,command="holdx"||root,command="y"||root,command="z"
trigger1=(time%5)=0
trigger1=root,AnimElemTime(13)>=0 && root,animelemtime(147)<0
helpertype=normal ;player
name="Super Mega Shot"
ID=3305
stateno=3305
pos=ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
postype=p1
ownpal=0
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = var(12) = 1
trigger1 = root,statetype = A
var(12) = 1
persistent = 0

[State 3000, VarSet] ;Knockdown Var
type=VarSet
trigger1=AnimElemTime(147)>=0
var(5)=5

[State 3007, DestroySelf]
type=DestroySelf
trigger1=animtime=0
trigger2=root,stateno!=[3300,3301]
trigger3=root,movetype=H && root,stateno!=9000

;-------------------------------------------------------------------------------
; Mega Buster Shot FX
;-------------------------------------------------------------------------------
[StateDef 3308]
ctrl=0
anim=3308
sprpriority=3

[State 3307, BindToRoot]
type=BindToRoot
trigger1=root,statetype=S
time=2
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
ignorehitpause=1

[State 3307, BindToRoot]
type=BindToRoot
trigger1=root,statetype=C
time=2
pos=ceil(24*const(size.xscale)),Ceil(-34*const(size.yscale))
ignorehitpause=1

[State 3307, BindToRoot]
type=BindToRoot
trigger1=root,statetype=A
time=2
pos=ceil(29*const(size.xscale)),Ceil(-68*const(size.yscale))
ignorehitpause=1

[State 1050, PlaySnd]
type=PlaySnd
trigger1=Time=0&&PrevStateNo!=3308
value=S5,2
channel=10

[State 3308, end]
type=DestroySelf
trigger1=AnimTime=0
trigger2=(root,anim!=[3300,3302])
trigger3=root,movetype=H && root,stateno!=9000

;-------------------------------------------------------------------------------
; Cross Assist (Jump In)
;-------------------------------------------------------------------------------
[StateDef 3900]
type=A
movetype=I
physics=N
ctrl=0
sprpriority=2
;anim=9741
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

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

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=55&&anim!=3900;&&anim!=0
trigger1=time=0
value=55

[State 3900, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 0, VelSet]
type = VelSet
trigger1 = anim = 55
trigger1 = time = 1
x = 5
y = -3

[State 0, PosSet]
type = PosSet
trigger1 = time = 0 && anim = 55 && anim != 3900 && anim != 0
x = (-160 - 64) * facing
y = enemynear,pos Y - 90

[State 0, VelAdd]
type = VelAdd
trigger1 = anim = 55 && time > 0
y = .5

[State 0, ScreenBound]
type = ScreenBound
;trigger1 = anim = 55 && anim != 3900 && anim != 0
;trigger1 = backedgebodydist < 0
trigger1=1
value = 0

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3900&&anim!=0
trigger1=pos Y >= floor(-vel y)
trigger1=Vel Y >= 0
value=3900

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=numpartner
triggerall=anim=3900&&anim!=0
trigger1=animtime=0
value=0

;-------------------------------------------------------------------------------
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=pos Y >= floor(-Vel Y) && vel Y >= 0
statetype=S
physics=N

[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3900||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= floor(-Vel Y) && vel Y > 0
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3900||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= 0 && vel Y >= 0
trigger2=statetype!=A
x=0
y=0

[State 3900, ChangeState]
type = ChangeState
trigger1 = (!numpartner)
trigger1 = (anim = 3900 && animtime = 0) || (anim = 0)
trigger2 = (numpartner) && (anim != 3900 && anim != 55)
trigger2 = partner,movetype = I || partner,movetype=A
value = 3901
ctrl = 0

;-------------------------------------------------------------------------------
; Cross Assist (Attack 1)
;-------------------------------------------------------------------------------
[StateDef 3901]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

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

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

[State 3900, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3901
trigger1=Time=0
value=3901

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=anim=3901&&animtime=0
movetype=I

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=numpartner
triggerall=anim=3901&&anim!=0
trigger1=animtime=0
value=0

;-------------------------------------------------------------------------------
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=pos Y >= floor(-Vel Y) && vel Y >= 0
statetype=S
physics=N

[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3901||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= floor(-Vel Y) && vel Y > 0
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3901||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= 0 && vel Y >= 0
trigger2=statetype!=A
x=0
y=0
;-------------------------------------------------------------------------------

[State 220, Helper]
type=Helper
trigger1=AnimElem=4||AnimElem=8||AnimElem=12||AnimElem=16||AnimElem=20
helpertype=normal ;player
name="Mega Shot FX"
ID=223
stateno=223
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
[State 220, Helper]
type=Helper
trigger1=AnimElem=4||AnimElem=8||AnimElem=12||AnimElem=16||AnimElem=20
helpertype=normal ;player
name="Mega Shot"
ID=3950
stateno=3950
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 3900, ChangeState]
type = ChangeState
trigger1 = (!numpartner)
trigger1 = (anim = 3901 && animtime = 0) || (anim = 0)
trigger2 = (numpartner) && anim != 3901
trigger2 = partner,movetype = I || partner,movetype=A
value = 3902
;trigger1=animtime=0
;value=0
ctrl = 0

;-------------------------------------------------------------------------------
; Cross Assist (Attack 2)
;-------------------------------------------------------------------------------
[StateDef 3902]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

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

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

[State 3900, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3902
trigger1=Time=0
value=3902

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=(anim=3902||anim=47)&&animtime=0
movetype=I

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=anim=3902&&animelemtime(2)>0
trigger1=pos Y >= floor(-vel y)
trigger1=Vel Y >= 0
value = 47

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=numpartner
triggerall=(anim=3902||anim=47)&&anim!=0
trigger1=animtime=0
value=0

;-------------------------------------------------------------------------------
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=pos Y >= floor(-Vel Y) && vel Y >= 0
statetype=S
physics=N

[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3901||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= floor(-Vel Y) && vel Y > 0
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3901||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= 0 && vel Y >= 0
trigger2=statetype!=A
x=0
y=0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2 && anim = 3902
x = p2dist X / 16
y = -3

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2) > 0 && anim = 3902
y = .3

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(2) >= 0 && anim = 3902
statetype = A

[State 625, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0&&anim=3902
value=S0,2
channel=0

[State 610, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0&&anim=3902
value=S3,2
channel=5

[State 625, 1] ;Forward
type=HitDef
trigger1=!movecontact&&anim=3902
attr=A,HA
damage=83,0
animtype=Medium
air.animtype=Back
fall.animtype=Medium
guardflag=MA
hitflag=MAFD
priority=3,Hit
pausetime=5,4
sparkno=S8240+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-17*const(size.xscale)), Ceil(-57*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=High
ground.slidetime=0
ground.hittime=30
ground.velocity=0
airguard.velocity=0,0
air.type=High
air.velocity=0,-8
air.hittime=30
down.velocity=0,-8
down.hittime=30
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=0,0  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.8
air.fall=1
fall.recover=0
;envshake.time=12
;envshake.ampl=4

[State 0, ChangeState]
type = ChangeState
trigger1 = (!numpartner)
trigger1 = (anim = 47 && animtime = 0) || (anim = 0)
trigger2 = (numpartner) && (anim != 47 && anim != 3902)
trigger2 = partner,movetype = I || partner,movetype=A
value = 3903
ctrl = 0

;-------------------------------------------------------------------------------
; Cross Assist (Attack 3)
;-------------------------------------------------------------------------------
[StateDef 3903]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

[State 0, PlayerPush]
type = PlayerPush
trigger1 = animelemtime(4)>=0
value = 0

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

[State 3900, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3903
trigger1=Time=0
value=3903

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=anim=3903&&animtime=0
movetype=I

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=numpartner
triggerall=anim=3903&&anim!=0
trigger1=animtime=0
value=0

;-------------------------------------------------------------------------------
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=pos Y >= floor(-Vel Y) && vel Y >= 0
statetype=S
physics=N

[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3903||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= floor(-Vel Y) && vel Y > 0
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3903||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= 0 && vel Y >= 0
trigger2=statetype!=A
y=0
;-------------------------------------------------------------------------------

[State 0, VelSet]
type = VelSet
trigger1=animelem=4&&anim=3903
x = enemynear,const(size.ground.front)/2

[State 0, VelSet]
type = VelSet
trigger1=animelem=7&&anim=3903
x = 0

[State 450, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=animelem=4&&anim=3903
value=S5,0
channel=0

[State 450, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=animelem=4&&anim=3903
value=S3,3
channel=5

[State 450, 1] ;Trip
type=HitDef
trigger1=!movecontact&&anim=3903
attr=C,HA
damage=90,0
animtype=Hard
air.animtype=Back
fall.animtype=Hard
guardflag=LA
hitflag=MAFD
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-8*const(size.xscale)), Ceil(-10*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=Trip
ground.slidetime=0
ground.hittime=30
ground.velocity=0,-8
guard.velocity=0
airguard.velocity=0,0
air.type=Low
air.velocity=0,-8
air.hittime=30
down.velocity=0,-8
down.hittime=30
fall=1
fall.recover=0
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=0,0  ;Damage x .8, Damage x .7
givepower=54,54 ;Damage x .6, Damage x .4
yaccel=.8
;envshake.time=12
;envshake.ampl=4

[State 3900, ChangeState]
type = ChangeState
trigger1 = (!numpartner)
trigger1 = (anim = 3903 && animtime = 0) || (anim = 0)
trigger2 = (numpartner) && anim != 3903
trigger2 = partner,movetype = I || partner,movetype=A
value = 3904
;trigger1=animtime=0
;value=0
ctrl = 0

;-------------------------------------------------------------------------------
; Cross Assist (Attack 4)
;-------------------------------------------------------------------------------
[StateDef 3904]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

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

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

[State 3900, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3904
trigger1=Time=0
value=3904

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=anim=3904&&animtime=0
movetype=I

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=numpartner
triggerall=anim=3904&&anim!=0
trigger1=animtime=0
value=0

;-------------------------------------------------------------------------------
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=pos Y >= floor(-Vel Y) && vel Y >= 0
statetype=S
physics=N

[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3903||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= floor(-Vel Y) && vel Y > 0
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3903||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= 0 && vel Y >= 0
trigger2=statetype!=A
y=0
;-------------------------------------------------------------------------------

[State 250, PlaySnd] ;Whiff Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0&&anim=3904
value=S0,2
channel=0
[State 250, PlaySnd] ;Character Sound
type=PlaySnd
trigger1=AnimElemTime(6)=0&&anim=3904
value=S3,3
channel=5
[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&anim=3904
attr=S,HA
damage=83,0
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=ceil(-11*const(size.xscale)),ceil(-71*const(size.yscale))
;sparkno=-1*(var(40):=8240)**0
;sparkxy=var(42):=Ceil(-11*const(size.xscale)), var(43):=Ceil(-71*const(size.yscale))
hitsound=S1,9
guardsound=S2,0
ground.type=Low
ground.slidetime=0
ground.hittime=30
ground.velocity=0,-8
guard.velocity=0
airguard.velocity=0,0
air.type=Low
air.velocity=0,-8
air.hittime=30
down.velocity=0,-8
down.hittime=30
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=0,0  ;Damage x .8, Damage x .7
givepower=49,33 ;Damage x .6, Damage x .4
yaccel=.5
;envshake.time=12
;envshake.ampl=4

[State 3900, ChangeState]
type = ChangeState
trigger1 = (!numpartner)
trigger1 = (anim = 3904 && animtime = 0) || (anim = 0)
trigger2 = (numpartner) && anim != 3904
trigger2 = partner,movetype = I || partner,movetype=A
value = 3905
;trigger1=animtime=0
;value=0
ctrl = 0

;-------------------------------------------------------------------------------
; Cross Assist (Attack 4)
;-------------------------------------------------------------------------------
[StateDef 3905]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

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

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

[State 3900, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3905
trigger1=Time=0
value=3905

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=(anim=3905||anim=1105)&&animtime=0
movetype=I

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=numpartner
triggerall=(anim=3905||anim=1105)&&anim!=0
trigger1=animtime=0
value=0

;-------------------------------------------------------------------------------
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=pos Y >= floor(-Vel Y) && vel Y >= 0
statetype=S
physics=N

[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3905||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= floor(-Vel Y) && vel Y > 0
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3905||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= 0 && vel Y >= 0
trigger2=statetype!=A
y=0
;-------------------------------------------------------------------------------

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 4 && anim = 3905
x = enemynear,const(size.ground.front)/2
y = -9

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(4)>0&& anim = 3905
y = .5

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 6 && anim = 3905
x = 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(4) >= 0 && anim = 3905
statetype = A

[State 250, 1] ;Fierce
type=HitDef
trigger1=!movecontact&&anim=3905
attr=A,HA
damage=111,13
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
guardflag=MA
hitflag=MAFD
priority=4,Hit
pausetime=5,4
sparkno=S8250+(random%8)
guard.sparkno=S8300
sparkxy=Ceil(-11*const(size.xscale)), Ceil(-71*const(size.yscale))
hitsound=S1,6
guardsound=S2,0
ground.type=High
ground.slidetime=0
ground.hittime=30
ground.velocity=0,-8
guard.velocity=0
airguard.velocity=0,0
air.type=Low
air.velocity=0,-8
air.hittime=30
down.velocity=0,-8
down.hittime=20
fall.xvelocity=0
fall.yvelocity=0
ground.cornerpush.veloff=0
getpower=0,0  ;Damage x .8, Damage x .7
givepower=66,44 ;Damage x .6, Damage x .4
yaccel=.3
;envshake.time=12
;envshake.ampl=4

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=anim=3905&&anim!=1105
trigger1=animelemtime(4)>0
trigger1=pos Y >= floor(-Vel Y) && vel Y >= 0
value = 1105


[State 3900, ChangeState]
type = ChangeState
trigger1 = (!numpartner)
trigger1 = ((anim = 3905 || anim=1105) && animtime = 0) || (anim = 0)
trigger2 = (numpartner) && (anim != 3905 && anim != 1105)
trigger2 = partner,movetype = I || partner,movetype=A
value = 3906
;trigger1=animtime=0
;value=0
ctrl = 0

;-------------------------------------------------------------------------------
; Cross Assist (Final Attack pt1)
;-------------------------------------------------------------------------------
[StateDef 3906]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
;facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

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

[State 0, ScreenBound]
type = ScreenBound
trigger1 = animelemtime(2)<0
value = 0

[State 3900, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3906
trigger1=Time=0
value=3906

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=anim=3906&&animtime=0
movetype=I

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=numpartner
triggerall=anim=3906&&anim!=0
trigger1=animtime=0
value=0

;-------------------------------------------------------------------------------
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=pos Y >= floor(-Vel Y) && vel Y >= 0
statetype=S
physics=N

[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3906||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= floor(-Vel Y) && vel Y > 0
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3906||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= 0 && vel Y >= 0
trigger2=statetype!=A
x=0
y=0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2 && anim = 3906
x = p2dist X / 6
y = -3

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2) > 0 && anim = 3906
y = .3

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(2) >= 0 && anim = 3906
statetype = A

[State 0, ChangeState]
type = ChangeState
trigger1 = anim=3906&&animelemtime(2)>0
trigger1 = pos Y >= floor(-Vel Y) && vel Y >= 0
value = 3907
ctrl = 0

;-------------------------------------------------------------------------------
; Cross Assist (Final Attack pt2)
;-------------------------------------------------------------------------------
[StateDef 3907]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
;facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

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

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

[State 3900, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3907
trigger1=Time=0
value=3907

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=anim=3907&&animtime=0
movetype=I

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=numpartner
triggerall=anim=3907&&anim!=0
trigger1=animtime=0
value=0

;-------------------------------------------------------------------------------
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=pos Y >= floor(-Vel Y) && vel Y >= 0
statetype=S
physics=N

[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3907||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= floor(-Vel Y) && vel Y > 0
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3907||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= 0 && vel Y >= 0
trigger2=statetype!=A
x=0
y=0

[State 0, ChangeState]
type = ChangeState
trigger1 = (!numpartner)
trigger1 = (anim = 3907 && animtime = 0) || (anim = 0)
trigger2 = (numpartner) && anim != 3907
trigger2 = partner,movetype = I || partner,movetype=A
value = 3908
ctrl = 0

;-------------------------------------------------------------------------------
; Cross Assist (Attack 1)
;-------------------------------------------------------------------------------
[StateDef 3908]
type=S
movetype=A
physics=N
ctrl=0
sprpriority=2
;anim=3000
facep2=ifelse(prevstateno!=9000, 1, 0)
movehitpersist=ifelse(prevstateno=9000,1,0)
hitcountpersist=ifelse(prevstateno=9000,1,0)

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

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

[State 3900, Knockdown Var] ;Can Knockdown? 1 = True, 0 = False
type=VarSet
trigger1=1
var(4)=1
ignorehitpause=1

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=anim!=3908
trigger1=Time=0
value=3908

[State 0, StateTypeSet]
type=StateTypeSet
trigger1=anim=3908&&animtime=0
movetype=I

[State 3000, ChangeAnim]
type=ChangeAnim
triggerall=numpartner
triggerall=anim=3908&&anim!=0
trigger1=animtime=0
value=0

;-------------------------------------------------------------------------------
[State 0, StateTypeSet]
type=StateTypeSet
trigger1=pos Y >= floor(-Vel Y) && vel Y >= 0
statetype=S
physics=N

[State 0, PosSet]
type=PosSet
trigger1=!Time&&(PrevStateNo!=3908||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= floor(-Vel Y) && vel Y > 0
y=0

[State 0, VelSet]
type=VelSet
trigger1=!Time&&(PrevStateNo!=3908||PrevStateNo!=9000)
trigger1=Statetype!=A
trigger2=pos Y >= 0 && vel Y >= 0
trigger2=statetype!=A
x=0
y=0
;-------------------------------------------------------------------------------

[State 220, Helper]
type=Helper
trigger1=AnimElem=3
helpertype=normal ;player
name="Mega Shot FX"
ID=223
stateno=223
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
[State 220, Helper]
type=Helper
trigger1=AnimElem=3
helpertype=normal ;player
name="Mega Shot"
ID=3960
stateno=3960
pos=ceil(24*const(size.xscale)),Ceil(-46*const(size.yscale))
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State 3900, ChangeState]
type = ChangeState
trigger1 = (anim = 3908 && animtime = 0) || (anim = 0)
value=0
ctrl = 1

;---------------------------------------------------------------------------
[StateDef 3950]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
;movehitpersist=1
hitcountpersist=1

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1=1
text="fvar(12) = %f || fvar(10) = %f || var(25) = %d || var(2) = %d"
params=fvar(12),fvar(10), var(25), var(2)
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.17
fvar(10)= .17
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=221
value = 221

[State 0, VelSet]
type = VelSet
trigger1 = var(1)>1
x = 7*root,const(size.xscale)

[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

[State 1005, HitBy]
type=HitBy
trigger1=1
value=SCA,AP
ignorehitpause=1

[State 1010, HitOverride]
type=hitoverride
trigger1= 1
time=1
attr=SCA,AA,AP,AT
stateno=222
ignorehitpause=1

;--------------------------------
[State 0, HitDef] ;Standing
type=HitDef
trigger1=!movecontact
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
priority=5,Hit
damage=41,2
pausetime=1,8
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=0
ground.hittime=30
air.hittime=30
ground.velocity=0,0
guard.velocity=0
air.velocity=0,-8
airguard.velocity=0,0
down.velocity=0,-8
down.hittime=30
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
yaccel=.8

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1010, end]
type = ChangeState
trigger1=frontedgedist <= -240
trigger2=movecontact||movereversed
value=222


;---------------------------------------------------------------------------
[StateDef 3960]
type = A
movetype= A
physics = N
ctrl = 0
sprpriority = 3
;movehitpersist=1
hitcountpersist=1

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1=1
text="fvar(12) = %f || fvar(10) = %f || var(25) = %d || var(2) = %d"
params=fvar(12),fvar(10), var(25), var(2)
ignorehitpause=1

;-------------------------------------------------------------------------------
[State 0, Damage based on hits]
type=varset
trigger1=1
fvar(12)=root,fvar(12)
ignorehitpause=1

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

[State 0, Dampener]
type=varset
trigger1=fvar(10)<=.17
fvar(10)= .17
ignorehitpause=1

[State 0, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1
;-------------------------------------------------------------------------------
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=1010
value = 1010

[State 0, VelSet]
type = VelSet
trigger1 = var(1)>1
x = ifelse((time<=0 && var(2)>1),0.64,7)*root,const(size.xscale)

[State 0, VarSet]
type = VarSet
trigger1 = Time=0&&PrevStateNo!=3960
var(5)=0

[State 1005, TimerVar] ;Self-Timer Var
type=VarAdd
trigger1=1
var(1)=1
ignorehitpause=1

[State 0, Helper]
type=Helper
triggerall=var(5)!=2
trigger1=!time&&!PrevStateNo
helpertype=normal ;player
name="Dust Trail"
ID=7505
stateno=7505
pos=Ceil(-25*root,const(size.xscale)),Ceil(-Pos Y)
postype=p1
ownpal=0
size.xscale=root,const(size.xscale)
size.yscale=root,const(size.yscale)
ignorehitpause=1

[State 0, VarSet]
type=VarSet
trigger1=!Time&&!PrevStateNo
var(25)=5

[State 0, Hit Var]
type=VarAdd
trigger1=Time=0
var(2)=1
ignorehitpause=1

[State 1005, HitBy]
type=HitBy
trigger1=1
value=SCA,AP
ignorehitpause=1

[State 1010, HitOverride]
type=hitoverride
trigger1= 1
time=1
attr=SCA,AA,AP,AT
stateno=ifelse(var(2)<var(25), 3950, 1011)
ignorehitpause=1

;--------------------------------
[State 0, HitDef] ;Air
type=HitDef
triggerall=var(5)>=2
trigger1=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=A,SP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
priority=5,Hit
damage=41,2
pausetime=ifelse(var(2)<var(25), 6, 1),5
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale),-8.225
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
air.fall=1
fall.recover=0
yaccel=.8
;--------------------------------
[State 0, HitDef] ;Crouching
type=HitDef
triggerall=var(5)=1
trigger1=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=C,SP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
priority=5,Hit
damage=41,2
pausetime=ifelse(var(2)<var(25), 6, 1),5
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=24
ground.velocity=-5.625*root,const(size.xscale)
guard.velocity=-5.625*root,const(size.xscale)
air.velocity=-5.625*root,const(size.xscale),-8.225
airguard.velocity=-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=-5.625*const(size.xscale),-8.225
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=32,28  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
yaccel=.8
;--------------------------------
[State 0, HitDef] ;Standing
type=HitDef
triggerall=var(5)=0
trigger1=1
trigger1=(enemynear,stateno!=[5070,5071]) ;classic vs. no hit while trip anim
attr=S,SP
hitflag=MAFD
guardflag=MA
animtype=Hard
air.animtype=Hard
fall.animtype=Hard
priority=5,Hit
damage=41,2
pausetime=3,5;ifelse(var(2)<var(25), 6, 1),5
sparkno=-1
guard.sparkno=-1
sparkxy=-10,0
hitsound=S-1,0;S1,16
guardsound=S-1,0;S2,0
ground.type=Low
air.type=Low
ground.slidetime=0
ground.hittime=30
air.hittime=30
ground.velocity=0;-5.625*root,const(size.xscale)
guard.velocity=0;-5.625*root,const(size.xscale)
air.velocity=0,-8;-5.625*root,const(size.xscale),-8.225
airguard.velocity=0,0;-5.625*root,const(size.xscale),-0.857142857142857
down.velocity=0,-8;-5.625*const(size.xscale),-8.225
down.hittime=30
ground.cornerpush.veloff=0
fall.xvelocity=0
fall.yvelocity=0
sprpriority=3
getpower=0,0  ;Damage x .8, Damage x .7
givepower=24,16 ;Damage x .6, Damage x .4
yaccel=.8

[State 1010, EnvColor]
type=EnvColor
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
value=255,255,255
time=1
ignorehitpause=1

[State 1010, HitSound]
type=playsnd
trigger1= movehit=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S1,6
channel=1
ignorehitpause=1

[State 0, PlaySnd]
type = PlaySnd
trigger1= moveguarded=1 && numtarget
trigger1= !(target,time) && target,movetype=H
value=S2,0
channel=2
ignorehitpause=1

[State 1005, HitSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8240+(random%8)
ID=8200
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

[State 1005, GuardSpark] ;Alternative Way to use a guardspark
type=Explod
trigger1=moveguarded=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=8300
ID=8300
pos=Ceil(10 * root,const(size.xscale)),Ceil(0 * root,const(size.yscale))
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
ontop=1
ownpal=0
ignorehitpause=1

;--------------------------
[State 1005, No Underground Juggle]
type=targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger1= (target,statetype!=L)&&(target,stateno!=5101)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause= 1

[State 1010, ParentVarSet]
type=ParentVarSet
trigger1=PrevStateNo!=3960&&Time=0
var(25)=0
ignorehitpause=1
persistent=0

;-------------------------------------------------------------------------------
[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1014
ID=1014
postype=p1
bindtime=1
vel=-4,0
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1014
ID=1014
postype=p1
bindtime=1
vel=-5,(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1

[State 221, Explod]
type=Explod
trigger1=(gametime%3)=1
anim=1014
ID=1014
postype=p1
bindtime=1
vel=-5,-(random%5)
random=20,20
removetime=10
scale=root,const(size.xscale)/4,root,const(size.yscale)/4
sprpriority=ifelse(Vel Y > 0, -1, 4)
ownpal=0
removeongethit=1
ignorehitpause=1
;-------------------------------------------------------------------------------

[State 1010, end]
type = ChangeState
trigger1=movecontact
value=ifelse(var(2)<var(25),3960,1011)

[State 1010, end]
type = ChangeState
trigger1=frontedgedist <= -240
value=1011;ifelse(var(20)<=0,1025,1026)

;-------------------------------------------------------------------------------
;Timer
[StateDef 8950]
movetype=I
ctrl=0
anim=9741

[State 3310, VarSet]
type = VarSet
trigger1 = (root,anim=[3100,3105])
trigger2 = (root,anim=[3200,3205])
fvar(0) = 1 - (root,var(1) * .0065)

[State 3310, VarSet]
type = VarSet
trigger1 = (root,anim=[3300,3302])
fvar(0) = 1 - ((root,var(1) - 11) * .0073)

[State 3310, Explod]
type=Explod
triggerall=root,teamside=1
trigger1=!numexplod(8955)&&time=0
anim=8955;ifelse((root,anim=[3300,3302]), 8965, ifelse((root,anim=[3100,3102]), 8975, 8955))
ID=8955
pos=9,100
postype=left
scale=.5,.5
bindtime=-1
removetime=-1
sprpriority=5
ownpal=0
supermovetime=99999

[State 3310, Explod]
type=Explod
triggerall=root,teamside=1
trigger1=!numexplod(8950)&&time=0
anim=8950
ID=8950
pos=0,100
postype=left
scale=.5,.5
bindtime=-1
removetime=-1
sprpriority=5
ownpal=0
supermovetime=99999

[State 3310, Explod]
type=Explod
triggerall=root,teamside=2
trigger1=!numexplod(8955)&&time=0
anim=ifelse((root,anim=[3300,3302]), 8966, ifelse((root,anim=[3100,3102]), 8976, 8956))
ID=8955
pos=-8,100
postype=right
scale=.5,.5
bindtime=-1
removetime=-1
sprpriority=5
ownpal=0
supermovetime=99999

[State 3310, Explod]
type=Explod
triggerall=root,teamside=2
trigger1=!numexplod(8950)&&time=0
anim=8951
ID=8950
pos=0,100
postype=right
scale=.5,.5
bindtime=-1
removetime=-1
sprpriority=5
ownpal=0
supermovetime=99999

[State 3310, ModifyExplod]
type = ModifyExplod
triggerall = root,var(1) > 1
trigger1 = ((root,anim = [3100,3105]) && root,var(1)<153)
trigger2 = ((root,anim = [3200,3201]) && root,var(1)<153)
trigger3 = ((root,anim = [3300,3302]) && root,var(1)<148)
ID = 8955
scale = fvar(0) * .5,.5

[State 3310, RemoveExplod]
type = RemoveExplod
trigger1 = (root,anim != [3100,3105]) && (root,anim != [3200,3201]) && (root,anim != [3300,3302])
id = 8950

[State 3310, RemoveExplod]
type = RemoveExplod
trigger1 = ((root,anim = [3100,3101]) && root,var(1)>=153)
trigger2 = ((root,anim = [3200,3201]) && root,var(1)>=153)
trigger3 = ((root,anim = [3300,3302]) && root,var(1)>=148)
trigger4 = (root,anim != [3100,3105]) && (root,anim != [3200,3201]) && (root,anim != [3300,3302])
id = 8955

[State 0, DestroySelf]
type = DestroySelf
trigger1 = (root,anim != [3100,3105]) && (root,anim != [3200,3201])&& (root,anim != [3300,3302])

;-------------------------------------------------------------------------------
;Rush
[StateDef 10000]
type = S
movetype= I
physics = S
ctrl = 0
anim=10000
sprpriority=-1

[State 0, PosSet]
type = PosSet
triggerall = PrevStateNo = [10300,10302]
trigger1 = time = 0
y = 0

[State 0, VelSet]
type = VelSet
triggerall = PrevStateNo = [10300,10302]
trigger1 = time = 0
x = 0
y = 0

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

[State 0, Turn]
type = Turn
;trigger1 = root,anim=5||root,anim=6
trigger1 = facing!=root,facing

[State 10000, end]
type = ChangeAnim
triggerall=Anim!=10005
trigger1 = (Anim=10021||Anim=10101)
trigger1 = RootDist X >= -60
trigger2 = root,anim=5||root,anim=6
value = 10005

[State 0, VelSet]
type = VelSet
trigger1=anim=10000 || anim = 10012
x = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=RootDist X = [-60,60]
trigger1 = Anim != 10000 && Anim != 10005
trigger2 = Anim = 10005 && AnimTime = 0 ;Turn anim over
trigger3 = Anim = 10012 && AnimTime = 0
value=10000

[State 20, 1]
type = VelSet
trigger1=anim=10020
x = 4.5 * root,const(size.xscale)

[State 20, 2]
type = VelSet
trigger1=anim=10021
x = -3.5 * root,const(size.xscale)

[State 20, 1]
type = VelSet
trigger1=anim=10100
x = 6 * root,const(size.xscale)

[State 20, 2]
type = VelSet
trigger1=anim=10101
x = -5 * root,const(size.xscale)

[State 10000, end]
type = ChangeAnim
trigger1 = RootDist X > 90&&Anim!=10100
value = 10100

[State 10000, end]
type = ChangeAnim
trigger1 = RootDist X < -90&&Anim!=10101
value = 10101

[State 10000, end]
type = ChangeAnim
triggerall = anim != 10100
trigger1 = RootDist X > 60&&Anim!=10020
value = 10020

[State 10000, end]
type = ChangeAnim
triggerall = anim != 10101
trigger1 = RootDist X < -60&&Anim!=10021
value = 10021

[State 0, ChangeState]
type=ChangeState
triggerall=RootDist X = [-60,60]
trigger1=root,gethitvar(hitcount)>=3
trigger1=root,movetype=H
trigger1=(root,stateno!=[120,159])&&(root,stateno!=9000)
trigger2=!root,alive
trigger3=root,stateno=170&&roundstate>2
value=10170

[State 0, ChangeState]
type=null;ChangeState
trigger1=root,stateno=40||root,stateno=7000
value=10040

[State 0, ChangeState]
type = ChangeState
triggerall=RootDist X = [-180,180]
trigger1=root,var(25)>=20;&&root,var(20)<540
trigger1=numhelper(1050)
value=10200

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,stateno=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 0, ChangeState]
type=ChangeState
triggerall=RootDist X = [-60,60]
trigger1=(root,stateno=[181,189]) && root,stateno!=185
value=10180

[State 0, ChangeState]
type = ChangeState
trigger1 = root,stateno = 185
value = 10185

[State 0, ChangeState]
type = ChangeState
trigger1 = rootdist X < -480 || rootdist X > 480
value = 10190

[State 0, ChangeState]
type = ChangeState
trigger1 = root,stateno = 3200
trigger1 = root,animelemtime(13)>=0
trigger2 = root,stateno = 3201
value = 10192

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=185
value=10185
;---------------------------------------------------------------------------
; Jump Start
[Statedef 10040]
type    = S
physics = S
anim = 10040
ctrl = 0
sprpriority = -1

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

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

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

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

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

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = (root,prevstateno = [105,106]) ;RUN_FWD
trigger1 = var(1) = -1
x = root,const(velocity.runjump.back.x)

[State 0, ChangeState]
type = ChangeState
trigger1=root,var(20)>=20&&root,var(20)<540
trigger1=numhelper(1050)
value=10200

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,stateno=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 0, ChangeState]
type = ChangeState
trigger1 = root,stateno = 3200
trigger1 = root,animelemtime(13)>=0
trigger2 = root,stateno = 3201
value = 10192

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 10050

;---------------------------------------------------------------------------
; Jump Up
[Statedef 10050]
type    = A
physics = N

[State 0, VelAdd]
type = VelAdd
trigger1=1
y=root,const(movement.yaccel)

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

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 10041, ifelse((vel x)>0, 10042, 10043))

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y >= Ceil(-Vel Y)
trigger1 = Vel Y >= 0
value = 10052

;---------------------------------------------------------------------------
; Rush Jump Land
[Statedef 10052]
type    = S
physics = S
ctrl = 0
anim = 10047

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

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

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,stateno=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 0, ChangeState]
type = ChangeState
trigger1 = root,stateno = 3200
trigger1 = root,animelemtime(13)>=0
trigger2 = root,stateno = 3201
value = 10192

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 10000
;-------------------------------------------------------------------------------
;Rush Sad
[StateDef 10170]
type = S
movetype= I
physics = S
ctrl = 0
anim=10170
sprpriority=-3
velset=0,0

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

[State 0, Explod]
type=Explod
triggerall=AnimElemTime(2)=0
trigger1=anim=10170&&roundstate>2;!Root,alive
anim=10171
ID=10170
pos=0,0
postype=p1
bindtime=1
removetime=-2
supermovetime=9999
pausemovetime=9999
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=-1
ownpal=1

[State 0, ChangeAnim]
type=ChangeAnim
triggerall=anim!=10012
trigger1=root,movetype!=H||((root,stateno=[120,159])&&(root,stateno=9000))
trigger1=roundstate<=2
value=10012

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,stateno=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 0, ChangeState]
type = ChangeState
trigger1 = root,stateno = 3200
trigger1 = root,animelemtime(13)>=0
trigger2 = root,stateno = 3201
value = 10192

[State 0, ChangeState]
type=ChangeState
triggerall=anim=10012
trigger1=animtime=0
value=10000
;-------------------------------------------------------------------------------
;Rush Win
[StateDef 10180]
type = S
movetype= I
physics = S
ctrl = 0
anim=10180
sprpriority=-1
velset=0,0

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

[State 10180, Explod]
type=Explod
trigger1=animelem=9
trigger1=!numexplod(10181)
anim=10181
ID=10181
postype=p1
bindtime=-1
removetime=-1
scale=root,const(size.xscale),root,const(size.yscale)
sprpriority=-1
ownpal=0
removeongethit=1

[State 10180, PlaySnd]
type = PlaySnd
trigger1 = time = 39
value = S3,34+(random%5)
channel = 8

[State 0, StopSnd]
type = StopSnd
trigger1 = root,stateno != [181,186]
trigger2 = root,movetype = H && root,stateno!=9000
channel = 8

[State 10180, RemoveExplod]
type = RemoveExplod
trigger1 = root,stateno != [181,186]
trigger2 = root,movetype = H && root,stateno!=9000
id = 10181

[State 10180, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,stateno=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 10180, ChangeState]
type = ChangeState
trigger1 = root,stateno = 3200
trigger1 = root,animelemtime(13)>=0
trigger2 = root,stateno = 3201
value = 10192

[State 10180, ChangeState]
type=ChangeState
trigger1 = root,stateno != [181,189]
trigger2 = root,movetype = H && root,stateno!=9000
value=10000

;-------------------------------------------------------------------------------
;Rush Win
[StateDef 10185]
type = S
movetype= I
physics = S
ctrl = 0
;anim=10185
sprpriority=3
velset=0,0

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

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "rootdist x = %f"
params = rootdist X

[State 0, VelSet]
type = VelSet
trigger1=anim=10000 || anim = 10012 || anim = 10185 || anim=10005
x = 0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall=RootDist X <= -30 && anim != 10185
trigger1 = Anim != 10000 && Anim != 10005
trigger2 = Anim = 10005 && AnimTime = 0 ;Turn anim over
trigger3 = Anim = 10012 && AnimTime = 0
value=10000

[State 20, 1]
type = VelSet
triggerall = anim != 10185
trigger1=anim=10020
x = 4.5 * root,const(size.xscale)

[State 10000, end]
type = ChangeAnim
triggerall = anim != 10100 && anim != 10185
trigger1 = RootDist X > -30&&Anim!=10020
value = 10020

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root,stateno=185
trigger1 = root,animelem=5
trigger1 = anim != 10185
value = 10185

;[State 0, BindToRoot]
;type = BindToRoot
;trigger1 = root,animelemtime(5)<0
;pos = Ceil(40*root,const(size.xscale)),0

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,stateno=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 0, ChangeState]
type = ChangeState
trigger1 = root,stateno = 3200
trigger1 = root,animelemtime(13)>=0
trigger2 = root,stateno = 3201
value = 10192

[State 0, BindToRoot]
type = BindToRoot
trigger1 = anim = 10185;root,animelemtime(5)>=0
time=2
pos = 0,0

;-------------------------------------------------------------------------------
;Rush Intro
[StateDef 10190]
type = A
physics = N
ctrl = 0
anim=10190
sprpriority=-1

[State 0, PosSet]
type = PosSet
trigger1 = Time = 0
x = (root,pos X) - (Ceil(45*const(size.xscale))*facing)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S5,27
channel = 9

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

[State 0, PosSet]
type=PosAdd
trigger1=Time=0 && roundstate >= 2
y=ceil(root,pos Y) - 210

[State 0, PosSet]
type=PosAdd
trigger1=Time=0 && roundstate < 2
y=ceil(-pos Y) - 210

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

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

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,stateno=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 0, ChangeState]
type = ChangeState
trigger1 = root,stateno = 3200
trigger1 = root,animelemtime(13)>=0
trigger2 = root,stateno = 3201
value = 10192

[State 0, ChangeState]
type=ChangeState
trigger1=Pos Y >= Ceil(-Vel Y)
trigger1=Vel Y >= 0
value=10191
;-------------------------------------------------------------------------------
;Rush Intro 2
[StateDef 10191]
type = A
physics = N
ctrl = 0
anim=10191
sprpriority=-1
velset=0,0

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

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

[State 0, PalFXWiz]
type=PalFX
trigger1=animelemtime(2)<0
time=2
add=255-(time*14),255-(time*14),255-(time*14)

[State 0, PlaySnd]
type=PlaySnd
trigger1=AnimElemTime(3)=0
value=S5,23
pan=1
channel=9

[State 0, ChangeState]
type = ChangeState
trigger1=root,anim=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,anim=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 0, ChangeState]
type = ChangeState
trigger1 = root,anim = 3200
trigger1 = root,animelemtime(13)>=0
trigger2 = root,anim = 3201
value = 10192

[State 0, ChangeState]
type=ChangeState
trigger1=AnimTime=0
value=10000

;-------------------------------------------------------------------------------
;Rush Intro
[StateDef 10192]
type = A
physics = N
ctrl = 0
anim=10192
sprpriority=-1

[State 0, PosSet]
type = null;PosSet
trigger1 = Time = 0
x = (root,pos X) - (Ceil(45*const(size.xscale))*facing)

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

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

[State 0, VelSet]
type=VelSet
trigger1=Time > 0
x=0
y=-10

[State 0, SuperPause]
type=SuperPause
triggerall=root,anim=3200
trigger1=time=0
time=46
anim=-1
sound=-1,0
movetime=46
darken = 0

[State 0, ChangeState]
type = ChangeState
trigger1=root,anim=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,anim=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 0, ChangeState]
type=destroyself
trigger1=screenpos Y < 0
;---------------------------------------------------------------------------
; Rush Growl
[Statedef 10200]
type    = S
physics = S
velset=0,0
sprpriority=-1
ctrl = 0
anim = 10200

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

[State 52, 4]
type = ChangeState
trigger1 = (root,stateno=[1000,1002])&&Root,AnimElemTime(1)=0
;trigger2 = root,var(20)>=540
value = 10201

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,stateno=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 0, ChangeState]
type = ChangeState
trigger1 = root,stateno = 3200
trigger1 = root,animelemtime(13)>=0
trigger2 = root,stateno = 3201
value = 10192

[State 52, 4]
type = ChangeState
trigger1 = !root,var(25)
trigger2 = RootDist X != [-180,180]
value = 10000
;---------------------------------------------------------------------------
; Rush Growl End
[Statedef 10201]
type    = S
physics = S
velset=0,0
sprpriority=-1
ctrl = 0
anim = 10201

[State 0, PlaySnd]
type=PlaySnd
trigger1=AnimElemTime(3)=0
value=S5,23
pan=1
channel=9

[State 0, ChangeState]
type = ChangeState
trigger1=root,anim=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,anim=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 0, ChangeState]
type = ChangeState
trigger1 = root,stateno = 3200
trigger1 = root,animelemtime(13)>=0
trigger2 = root,stateno = 3201
value = 10192

[State 52, 4]
type = ChangeState
trigger1 = AnimTime=0
value = 10000
;-------------------------------------------------------------------------------
;Rush Merge (Rush Drill)
[StateDef 10300]
type = S
physics = N
ctrl = 0
sprpriority=-1
velset=0,0

[State 0, SuperPause]
type=SuperPause
trigger1=time=0
time=46
anim=-1
sound=-1,0
movetime=46
darken = 0

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

[State 0, PalFXWiz]
type=PalFX
trigger1=animelemtime(5)>=0
time=1
add=0+((time-14)*16),0+((time-14)*16),0+((time-14)*16)

[State 0, VelSet]
type=VelSet
trigger1=animelemtime(5)=0
x=(rootdist X)/27
y=(rootdist Y)/27

[State 0, ChangeState]
type=ChangeAnim
triggerall=anim!=10300
trigger1=Time=0
value=10300

[State 0, ChangeState]
type=ChangeState
trigger1=(Root,Anim=3001) || (Root,Anim=3101) || (Root,Anim=3105)
value=10301

[State 0, ChangeState]
type=ChangeState
trigger1=(Root,Anim!=3001) && (Root,Anim!=3101) && (Root,Anim!=3105)
trigger1=root,movetype=H || root,movetype=I
value=10302

;-------------------------------------------------------------------------------
;Rush Merge 2 (Rush Drill)
[StateDef 10301]
movetype = I
ctrl = 0
sprpriority=-1
velset=0,0
anim=9741

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

[State 0, BindToRoot]
type=BindToRoot
trigger1=1
facing=1
time=2

[State 0, ChangeState]
type=ChangeState
trigger1=(Root,Anim!=3001) && (Root,Anim!=3101) && (Root,Anim!=3105)
value=10302
;-------------------------------------------------------------------------------
;Rush End Merge (Rush Drill)
[StateDef 10302]
type = A
physics = N
ctrl = 0
sprpriority=-1
velset=0,0
anim=10000

[State 0, PalFX]
type=PalFX
trigger1=time<22
time=1
add=255-(time*11),255-(time*11),255-(time*11)

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

[State 0, VelSet]
type=VelSet
trigger1=time=0
x=-2.05
y=(-pos Y) / 19

;[State 0, VelSet]
;type = VelSet
;trigger1 = time = 1
;x = -2.05
;y = -9

;[State 0, VelAdd]
;type = VelAdd
;trigger1 = time > 1
;y = .5

[State 0, ChangeState]
type = ChangeState
trigger1=root,anim=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,anim=3100
trigger2=root,animelemtime(17)>=0
value=10300

[State 0, ChangeState]
type=ChangeState
trigger1=pos Y >= floor(-vel Y) && vel Y > 0
trigger2=Time=22
value=10000

;-------------------------------------------------------------------------------
;Beat Walks In  ;-195,-120
[StateDef 11000]
type = A
movetype= I
physics = N
ctrl = 0
anim=11000
sprpriority=-1

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

[State 0, Turn]
type = Turn
trigger1 = facing!=root,facing

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

[State 0, ChangeState]
type = ChangeState
trigger1=(root,stateno!=[3000,3001])&&(root,stateno!=[3200,3201])
trigger2=root,movetype = H
value=11302

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,stateno=3200
trigger2=root,animelemtime(13)>=0
value=11300

;-------------------------------------------------------------------------------
;Beat Merge (Beat Plane)
[StateDef 11300]
type = A
physics = N
ctrl = 0
sprpriority=-1
velset=0,0

[State 0, SuperPause]
type=SuperPause
trigger1=time=0
time=46
anim=-1
sound=-1,0
movetime=46
darken = 0

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

[State 0, PalFXWiz]
type=PalFX
trigger1=time>14
time=2
add=0+((time-14)*16),0+((time-14)*16),0+((time-14)*16)

[State 0, VelSet]
type=VelSet
trigger1=time=15
x=(rootdist X)/27
y=(rootdist Y - 60)/27

[State 0, ChangeState]
type=ChangeState
trigger1=Root,stateno=3001||Root,stateno=3201
value=11301

[State 0, ChangeState]
type=ChangeState
trigger1=root,stateno!=3001&&root,stateno!=3201
trigger1=root,movetype=H || root,movetype = I
value=11302

;-------------------------------------------------------------------------------
;Beat Merge 2 (Beat Plane)
[StateDef 11301]
movetype = I
ctrl = 0
sprpriority=-1
velset=0,0
anim=9741

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

[State 0, BindToRoot]
type=BindToRoot
trigger1=1
time=2

[State 0, ChangeState]
type=ChangeState
trigger1=Root,Anim!=3001 && Root,StateNo!=3201
value=11302

;-------------------------------------------------------------------------------
;Beat Merge End (Beat Plane)
[StateDef 11302]
type = A
physics = N
ctrl = 0
sprpriority=-1
velset=0,0
anim=11000

[State 0, PalFX]
type=PalFX
triggerall = prevstateno = 11301
trigger1=time<22
time=1
add=255-(time*11),255-(time*11),255-(time*11)

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

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

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
trigger2=root,stateno=3200
trigger2=root,animelemtime(13)>=0
value=11300

[State 0, ChangeState]
type=DestroySelf
trigger1=frontedgebodydist<=-32

;-------------------------------------------------------------------------------
;Eddie Stand
[StateDef 12000]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 12000
sprpriority = 3

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = RootDist X = [-30,90]
trigger1 = anim!=12000
trigger2 = anim=12001&&animtime=0
value = 12000

[State 0, VelSet]
type = VelSet
trigger1 = anim = 12020
x = 3

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

[State 0, ChangeAnim]
type=ChangeAnim
triggerall = anim != 12020&&(anim=12000)
trigger1 = RootDist X > 90
value = 12020

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
value=12301

[State 11300, end]
type = ChangeState
triggerall=anim=12000 && roundstate > 2
trigger1 = RootDist X <= 90
value = 12180

[State 11300, end]
type = ChangeState
triggerall=anim=12000
trigger1 = RootDist X <= 90
value = 12200
;-------------------------------------------------------------------------------
[StateDef 12180]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 12180
sprpriority = 3

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

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
value=12301
;-------------------------------------------------------------------------------
;Eddie Give Item
[StateDef 12200]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
;anim = 11300
sprpriority = 3

[State 0, DisplayToClipboard]
type=DisplayToClipboard
trigger1=1
text="rdx = %f"
params=rootdist X
ignorehitpause=1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=12200
value = 12200

[State 11300, end]
type = ChangeState
triggerall=anim=12000 && roundstate > 2
trigger1 = RootDist X <= 90
value = 12180

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
value=12301

[State 11300, end]
type = ChangeState
trigger1 = AnimTime=0
value = 12191
;-------------------------------------------------------------------------------
;Eddie (Walk)
[StateDef 12020]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
;anim = 11300
sprpriority = 3

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0&&Anim!=12020
value = 12020

[State 0, VelSet]
type = VelSet
trigger1 = anim = 12020
x = 4

[State 11300, end]
type = ChangeState
triggerall=anim=12020 && roundstate > 2
trigger1 = RootDist X <= 90
value = 12180

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
value=12301

[State 11300, end]
type = ChangeState
trigger1 = root,movetype=H&&(root,stateno!=9000&&(root,stateno!=[120,159]))
value = 12191
;-------------------------------------------------------------------------------
;Call Eddie (Flip Top)
[StateDef 12190]
type = A
physics = N
ctrl = 0
anim=12190
sprpriority=3

[State 0, VarSet]
type = VarSet
trigger1=Time=0&&PrevStateNo!=12190
var(50)=root,var(5)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S5,27
channel = 9

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

;[State 0, PosSet]
;type=PosSet
;trigger1=Time=0
;y=-210

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

[State 0, VelSet]
type=VelSet
trigger1=1
y=12.5

[State 0, ChangeState]
type=ChangeState
trigger1=Pos Y >= Ceil(-Vel Y)
trigger1=Vel Y >= 0
value=12000

;-------------------------------------------------------------------------------
;Call Eddie (Flip Top)
[StateDef 12191]
type = A
physics = N
ctrl = 0
anim=12191
sprpriority=3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S5,27
channel = 9

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

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

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

[State 0, ChangeState]
type=DestroySelf
trigger1=ScreenPos Y <= -50

;-------------------------------------------------------------------------------
;Eddie Appears  ;-195,-120
[StateDef 12300]
type = A
movetype= I
physics = N
ctrl = 0
anim=12000
sprpriority=-1

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

[State 0, Turn]
type = Turn
trigger1 = facing = root,facing

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

[State 0, ChangeState]
type = ChangeState
trigger1=root,anim!=[3000,3001]
trigger2=root,movetype = H || root,movetype = I
value=12303

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
value=12301

;-------------------------------------------------------------------------------
;Eddie Merge (Hyper Megaman)
[StateDef 12301]
type = A
physics = N
ctrl = 0
sprpriority=-1
velset=0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 12000
trigger1 = animtime = 0
value = 12000

[State 0, SuperPause]
type=SuperPause
trigger1=time=0
time=46
anim=-1
sound=-1,0
movetime=46
darken = 0

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

[State 0, PalFXWiz]
type=PalFX
trigger1=time>14
time=2
add=0+((time-14)*16),0+((time-14)*16),0+((time-14)*16)

[State 0, VelSet]
type=VelSet
trigger1=time=15
x=(rootdist X)/27
y=(rootdist Y - 60)/27

[State 0, ChangeState]
type=ChangeState
trigger1=Root,stateno=3001
value=12302

[State 0, ChangeState]
type=ChangeState
trigger1=root,stateno!=3001
trigger1=root,movetype=H || root,movetype = I
value=12303

;-------------------------------------------------------------------------------
;Eddie Merge 2 (Hyper Megaman)
[StateDef 12302]
movetype = I
ctrl = 0
sprpriority=-1
velset=0,0
anim=9741

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

[State 0, BindToRoot]
type=BindToRoot
trigger1=1
time=2

[State 0, ChangeState]
type=ChangeState
trigger1=Root,Anim!=3001
value=12303

;-------------------------------------------------------------------------------
;Eddie Merge End (Hyper Megaman)
[StateDef 12303]
type = A
physics = N
ctrl = 0
sprpriority=-1
velset=0,0
anim=12000

[State 0, PalFX]
type=PalFX
triggerall = prevstateno = 12302
trigger1=time<22
time=1
add=255-(time*11),255-(time*11),255-(time*11)

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

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

[State 0, ChangeState]
type = ChangeState
trigger1=root,stateno=3000
trigger1=root,animelemtime(17)>=0
value=12301

[State 0, ChangeState]
type=DestroySelf
trigger1=frontedgebodydist<=-32

;--------------------------------Flying Screen----------------------------------
[StateDef 9500]
movetype=I
ctrl=0
anim=9741

;[State 9500, VarAdd]
;type=VarAdd
;trigger1=pos Y != 0 ;&& !enemynear,gethitvar(hitshaketime)
;var(0)=1
;ignorehitpause=1

[State 0, Width]
type = Width
trigger1 = 1
value = 0,0;-root,const(size.air.front) + (enemynear,const(size.ground.front)),-root,const(size.air.back) + (enemynear,const(size.ground.front))

[State 0, ScreenBound]
type=ScreenBound
trigger1=root,var(12)!=[2,4];root,statetype=A
;trigger2=root,statetype!=A && !root,ctrl
value=1
movecamera=1,0
ignorehitpause=1

[State 0, PlaySnd]
type=PlaySnd
trigger1=enemynear,gethitvar(hitshaketime) = 1
value=S9500,0
channel=0
ignorehitpause=1

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = (enemynear,pos X) - (96 * enemynear,facing);Ceil((enemynear,pos X) - (enemynear,const(size.ground.front)*4) *enemynear,facing)
y = enemynear,pos y
ignorehitpause=1

[State 0, VelSet]
type = VelSet
trigger1 = enemynear,vel x
x = enemynear,vel x

;[State 0, PosAdd]
;type = PosAdd
;trigger1 = Time= 0
;x = -80 ;(-160 + enemynear,const(size.air.back)) + abs(root,pos x/3)

[State 9500, DestroySelf]
type=DestroySelf
trigger1=enemynear,movetype!=H;Pos Y >= 0
;trigger1=time>=var(0)
ignorehitpause=1

;--------------------------------
;Hyper Armor
[Statedef 9000]
type = U
;movetype=H
physics=N
ctrl = 0
facep2=0
hitcountpersist=1
movehitpersist=1

;[State 9000, VarSet]
;type=VarSet
;trigger1=prevstateno!=9000
;var(3) = prevstateno

[State 9000, VarSet]
type=VarSet
trigger1=time=0&&prevstateno!=9000
var(6)=gethitvar(hitshaketime)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = Anim
elem =AnimElemNo(-1) - 1 * (!AnimTime && AnimElemNo(0) > 2)	; Helps prevent looping

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time>=0
value = SCA
ignorehitpause = 1

[State 0, PosFreeze]
type = PosFreeze
trigger1 = time>=0
value = 1
ignorehitpause = 1

[State 0, Shake]
type = OffSet
trigger1 = time < enemynear,hitpausetime;gethitvar(hittime)
x = Cos(Time*Pi/2);*gethitvar(animtype)

[State 0, PalFx]
type = PalFX
trigger1 = !(time%gethitvar(hittime))
time = 1
add = 102, -17, -256

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

;[State 0, HitVelSet]
;type = HitVelSet
;trigger1 = hitshakeover
;x = 1

[State 192, 2]
type = ChangeState
trigger1 = time >= var(6);!enemynear,hitpausetime || (time / 2) > enemynear,hitpausetime)
value = var(3)
ctrl=ifelse(var(3)=0||var(3)=10||var(3)=11||var(3)=12||var(3)=20||var(3)=50||var(3)=51,1,0)
;--------------------------------------------------------------------------
[StateDef 9001]
type = A
movetype=H
physics=N
velset=0,0
ctrl=0

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
var(17) = 0

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

[State 0, VelSet]
type = VelSet
trigger1 = time = 1
x = -3
y = -15

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 5055 && SelfAnimExist(5055)
value = 5055

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 5051 && !SelfAnimExist(5055)
value = 5051

[State 0, VelAdd]
type = VelAdd
trigger1 = time > 1
y = .5

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


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

[State -2, varKOsnd]
type=varset
trigger1=alive&&var(27)>0
trigger2=!alive&&var(27)<2
var(27)=ifelse(alive,0,var(27)+1)
ignorehitpause=1

[State -2, KOsnd]
type=playsnd
trigger1=!alive&&var(27)=1
trigger1=var(27):=2
value=S5500,0
channel=5
ignorehitpause=1
persistent=0

[State -2, KOsnd]
type=playsnd
triggerall=TeamMode=Simul
triggerall=NumPartner
triggerall=Partner,Alive
trigger1=!alive&&var(27)=1
trigger1=var(27):=2
value=S5600,0
channel=15
volume=255
ignorehitpause=1
persistent=0

[State -3, GetHit Snd]
type=playsnd
triggerall=alive&&time=1
triggerall=stateno=5000||stateno=5010
trigger1=gethitvar(animtype)>=2&&random<750
trigger2=gethitvar(animtype)=1&&random<500
trigger3=gethitvar(animtype)=0&&random<375
value=s5000,ifelse(gethitvar(animtype)>=2, 2, 0+(random%2))
channel=5
ignorehitpause=1

[State -3, GetHit Snd]
type=playsnd
triggerall=alive&&time=1&&random<700
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=s5000,0+(random%3)
channel=5
ignorehitpause=1

[State -3, Dizzy Snd]
type=PlaySnd
trigger1=Alive&&Time=1
trigger1=Anim=5300
value=S5300,0
channel=5
ignorehitpause=1
;------------------------------------------------------
;signs

[State -2, VS_Combo]
type = VarSet
triggerall = (var(29)!=10) || (var(29)=10 && movehit && statetype != A)
trigger1 = var(28) >= 3
trigger2 = var(28)=-1 && (movehit || p2movetype = H && p2stateno != [120,159]);p2stateno = [5000,5899])
var(29) = 1+(var(28)>4)+(var(28)>5)+(var(28)>7)+(var(28)>9)+(var(28)>29)+(var(28)>59)+(var(28)>=100)-(var(28)=-1)
ignorehitpause = 1

[State -2, Air Combo]
type = VarSet
triggerall = var(28) >= 3 && statetype = A && var(29)!=10 && var(12)
trigger1 = (movehit)
trigger2 = numhelper(221)
trigger2 = helper(221),movehit
trigger3 = numhelper(1005)
trigger3 = helper(1005),movehit
trigger4 = numhelper(1010)
trigger4 = helper(1010),movehit
var(29) = 10
ignorehitpause = 1

[State -2, Danger]
type = VarSet
trigger1 = var(30) !=1 && roundstate=2 && life <= Ceil(const(data.life)/5)
var(29) = 9
ignorehitpause = 1

; sound First attack
[State -2, First Attack]
type = PlaySnd
triggerall = var(28)=-1
triggerall = NumExplod(8050) = 0
trigger1 = var(28)=-1 && (movehit || p2movetype = H && p2stateno != [120,159]);p2stateno = 6300 || p2movetype = H);p2stateno = [5000,5899])
persistent = 0
value = 8050,0
channel = 20
volume=255
ignorehitpause = 1

; Telop sound
[State -2, Combo Sound]
type = PlaySnd
trigger1 = NumExplod(8050) = 0
trigger1 = var(28)=0 && var(29)!=0
persistent = 0;1
value = 8050,var(29)
channel = 20
volume=255
ignorehitpause = 1

[State -2, VarAdd] ;Normal Score Addition
type = VarAdd
triggerall = var(51) < 999999
trigger1 = enemynear,time<=0 && enemynear,gethitvar(hitshaketime)
trigger1 = enemynear,movetype=H && (enemynear,stateno!=[120,159])
var(51) = enemynear,gethitvar(damage) * 10
ignorehitpause=1

[State -2, Left]
type = explod
trigger1 = var(28)=0 && var(29)!=0
trigger2 = var(28)=-1 && (movehit || p2movetype = H && (p2stateno != [120,159]));p2stateno = 6300 ||p2movetype = H);p2stateno = [5000,5899])
trigger3 = var(28)=0 && var(29)=10 && (movehit || p2movetype = H && (p2stateno != [120,159]))
triggerall = TeamSide = 1 && NumExplod(8050) = 0
anim = (8050 + var(29))
ID = 8050
postype = left
pos = 3,90
ontop = 1
bindtime = -1
removetime = 60
ownpal = 1
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
trigger1 = var(28)=0 && var(29)!=0
trigger2 = var(28)=-1 && (movehit || p2movetype = H && (p2stateno != [120,159]));p2stateno = 6300 ||p2movetype = H);p2stateno = [5000,5899])
trigger3 = var(28)=0 && var(29)=10 && (movehit || p2movetype = H && (p2stateno != [120,159]))
triggerall = TeamSide = 2 && NumExplod(8050) = 0
anim = (8150+ var(29));8011;8720;
ID = 8050
postype = right
pos = -10,90;130;82
ontop = 1
bindtime = -1
removetime = 60;90
ownpal = 1
supermovetime = 60;90
pausemovetime = 60;90
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 = (p2movetype = H && p2stateno != [120,159]);p2stateno = 6300 || p2movetype = H;p2stateno = [5000,5899]
trigger2 = var(28)=-1 && (movehit || p2movetype = H && p2stateno != [120,159]);p2stateno = 6300 || p2movetype = H);p2stateno = [5000,5899])
var(28) = 1 + (var(28)=-1)
ignorehitpause = 1

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

[State -2, VS_Combo]
type = VarSet
triggerall = numexplod(8050)!=0
trigger1 = var(28)=0
var(29) = 0
ignorehitpause = 1

[State -2, Is Danger]
type = VarSet
trigger1 = var(30) = 0 && life <= Ceil(const(data.life)/5)
;trigger1 = var(30) = 1 && roundstate!=2
var(30) = 1;(roundstate>1)
ignorehitpause = 1

[State -2, Is Danger]
type = VarSet
trigger1 = var(30) = 1 && life > Ceil(const(data.life)/5)
;trigger1 = var(30) = 1 && roundstate!=2
var(30) = 0;(roundstate>1)
ignorehitpause = 1

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

[State -2, AssertSpecial]
type = AssertSpecial
triggerall = roundno = 1
trigger1 = roundstate < 2
flag = nomusic
;-------------------------------------------------------------------------------

;------------------------------
;Charge FXes (MvC Style)
;------------------------------
;Level 1 Charging FX
[State -2, Charge FX]
type=PalFX
triggerall=var(25)>=20
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%49)=[0,2]
trigger2=(gametime%49)=[46,48]
time=1
add=-128,-128,-128
ignorehitpause=1
[State -2, Charge FX]
type=PalFX
triggerall=var(25)>=20
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%49)=[3,5]
trigger2=(gametime%49)=[43,45]
time=1
add=-64,-64,-64
ignorehitpause=1
[State -2, Charge FX]
type=PalFX
triggerall=var(25)>=20
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%49)=[6,8]
trigger2=(gametime%49)=[39,42]
time=1
add=-32,-32,-32
ignorehitpause=1
[State -2, Charge FX]
type=PalFX
triggerall=var(25)>=20
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%49)=[13,15]
trigger2=(gametime%49)=[32,35]
time=1
add=32,32,32
ignorehitpause=1
[State -2, Charge FX]
type=PalFX
triggerall=var(25)>=20
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%49)=[16,19]
trigger2=(gametime%49)=[31,33]
time=1
add=64,64,64
ignorehitpause=1
[State -2, Charge FX]
type=PalFX
triggerall=var(25)>=20
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%49)=[20,22]
trigger2=(gametime%49)=[27,30]
time=1
add=128,128,128
ignorehitpause=1
[State -2, Charge FX]
type=PalFX
triggerall=var(25)>=20
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%49)=[23,26]
time=1
add=160,160,160
ignorehitpause=1
;-------------------------------------
 ;Level 1
[state -2, Level 1 Charge FX1]
type = PalFx
triggerall = var(25) >= 75
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%28)=[0,1]
add = 128,0,0
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 1 Charge FX2]
type = PalFx
triggerall = var(25) >= 75
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%28)=[2,3]
trigger2=(gametime%28)=[26,27]
add = 128,51,0
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 1 Charge FX3]
type = PalFx
triggerall = var(25) >= 75
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%28)=[4,5]
trigger2=(gametime%28)=[24,25]
add = 128,68,0
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 1 Charge FX4]
type = PalFx
triggerall = var(25) >= 75
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%28)=[6,7]
trigger2=(gametime%28)=[22,23]
add = 128,75,0
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 1 Charge FX5]
type = PalFx
triggerall = var(25) >= 75
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%28)=[8,9]
trigger2=(gametime%28)=[20,21]
add = 128,110,8
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 1 Charge FX6]
type = PalFx
triggerall = var(25) >= 75
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%28)=[10,11]
trigger2=(gametime%28)=[18,19]
add = 128,128,42
time = 1
ignorehitpause = 1
color = 0
[state -2, Level 1 Charge FX7]
type = PalFx
triggerall = var(25) >= 75
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%28)=[12,13]
trigger2=(gametime%28)=[16,17]
add = 128,128,94
time = 1
ignorehitpause = 1
color = 0
[state -2, Level 1 Charge FX8]
type = PalFx
triggerall = var(25) >= 75
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%28)=[14,15]
add = 128,128,128
ignorehitpause = 1
color = 0
time = 1
;------------------------------
 ;Level 2
[state -2, Level 2 Charge FX1]
type = PalFx
triggerall = var(25) >= 120
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=0
add = 128,0,0
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 2 Charge FX2]
type = PalFx
triggerall = var(25) >= 120
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=1
trigger2=(gametime%14)=13
add = 128,51,0
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 2 Charge FX3]
type = PalFx
triggerall = var(25) >= 120
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=2
trigger2=(gametime%14)=12
add = 128,68,0
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 2 Charge FX4]
type = PalFx
triggerall = var(25) >= 120
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=3
trigger2=(gametime%14)=11
add = 128,75,0
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 2 Charge FX5]
type = PalFx
triggerall = var(25) >= 120
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=4
trigger2=(gametime%14)=10
add = 128,110,8
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 2 Charge FX6]
type = PalFx
triggerall = var(25) >= 120
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=5
trigger2=(gametime%14)=9
add = 128,128,42
time = 1
ignorehitpause = 1
color = 0
[state -2, Level 2 Charge FX7]
type = PalFx
triggerall = var(25) >= 120
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=6
trigger2=(gametime%14)=8
add = 128,128,94
time = 1
ignorehitpause = 1
color = 0
[state -2, Level 2 Charge FX8]
type = PalFx
triggerall = var(25) >= 120
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=7
add = 128,128,128
ignorehitpause = 1
color = 0
time = 1

;------------------------------
 ;Level 3
[state -2, Level 3 Charge FX1]
type = PalFx
triggerall = var(25) >= 240
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=0
add = 119,16,0
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 3 Charge FX2]
type = PalFx
triggerall = var(25) >= 240
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=1
trigger2=(gametime%14)=13
add = 119,16,16
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 3 Charge FX3]
type = PalFx
triggerall = var(25) >= 240
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=2
trigger2=(gametime%14)=12
add = 119,59,128
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 3 Charge FX4]
type = PalFx
triggerall = var(25) >= 240
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=3
trigger2=(gametime%14)=11
add = 119,65,128
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 3 Charge FX5]
type = PalFx
triggerall = var(25) >= 240
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=4
trigger2=(gametime%14)=10
add = 119,102,128
time = 1
color = 0
ignorehitpause = 1
[state -2, Level 3 Charge FX6]
type = PalFx
triggerall = var(25) >= 240
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=5
trigger2=(gametime%14)=9
add = 119,119,128
time = 1
ignorehitpause = 1
color = 0
[state -2, Level 3 Charge FX7]
type = PalFx
triggerall = var(25) >= 240
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=6
trigger2=(gametime%14)=8
add = 119,128,128
time = 1
ignorehitpause = 1
color = 0
[state -2, Level 3 Charge FX8]
type = PalFx
triggerall = var(25) >= 240
triggerall=(stateno!=[1000,1002]) && (stateno!=[3000,3999])
trigger1=(gametime%14)=7
add = 128,128,128
ignorehitpause = 1
color = 0
time = 1

[State -2, Charge Helper]
type = Helper
trigger1 = numhelper(1050) = 0 && var(25) >= 20
;trigger1 =command = "hold"
type = normal
name = "Charge FX"
ID = 1050
postype = p1
supermovetime = 999999
stateno = 1050
ownpal = 1

[State -2, Charge]
type = VarAdd
triggerall = var(25) < 2940 && (stateno!=[3000,3999]);3960;300;(stateno != [1000,1001]) && var(20) < 225
trigger1 = stateno=1000&&animelemtime(24)>=0
trigger1 = stateno=1001&&animelemtime(24)>=0
trigger1 = stateno=1002&&animelemtime(18)>=0
trigger2 = command = "holdz";||command="holdy"||command="holdx"
;trigger3 = numhelper(1090)=1
var(25)=1

;[State -2, VarSet]
;type = VarSet
;trigger1 = var(25) >= 600;3960;300
;v = 25
;value = 600;3960;300

[State -2, VarSet Charge Used]
type = VarSet
triggerall = (stateno != [1000,1002])&&var(25)<75
trigger1 = (command !="holdz")
;trigger1 = ((command !="holdz"&&command!="holdy"&&command!="holdx") && stateno != [200,1999])
trigger1 = ctrl = 0
trigger2 = stateno = [180,194]
var(25)=0
ignorehitpause = 1

[State -2, VarSet Charge End]
type = Varset
triggerall = (stateno != [1000,1002])
trigger1 = roundstate!=2
var(25)=0
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = var(25)<75&&(command != "holdz");(command != "holdz"&&command != "holdy"&&command != "holdx")
;trigger2 = (stateno = [3000,3999])
;triggerall = movetype=H
var(25)=0
ignorehitpause = 1

[State -2, Charge Snd]
type=PlaySnd
trigger1=NumHelper(1050)
trigger1=Var(25)=75
trigger1=stateno!=[1000,1005]
value=S5,8
channel=7
[State -2, Stop Charge Snd]
type=StopSnd
trigger1=!NumHelper(1050)
trigger1=stateno=[1000,1005]
channel=7
;-------------------------------------------------------------------------------
[State -2, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5020)&&(target,alive)&&(target,hitfall)
trigger1=(stateno!=450&&stateno!=620&&stateno!=650&&stateno!=625&&stateno!=660) && var(4)=0
value=5025
ignorehitpause=1

[State -2, P2 Recovery]
type=TargetState
triggerall=movehit=1 && numtarget
triggerall=target,movetype=H && target,time<=0
trigger1=(target,stateno=5080)&&(target,alive)&&(target,gethitvar(yvel));&&(target,hitfall)
value=5085
ignorehitpause=1

[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)||(enemynear,stateno=[120,159])
trigger2= !numenemy
fvar(12)=0

[State -2, Reset Throw var when the opponent recovers]
type=varset
trigger1= numenemy
trigger1= (enemynear,movetype!=H)||(enemynear,stateno=[120,159])
trigger2= !numenemy
fvar(11)=1

[State -2, Dampener]
type=varset
trigger1=(stateno!= [3000,3999])&&(stateno!=[1000,1999])
fvar(10)=ifelse(fvar(10)<=.1&&fvar(12), .1, ifelse(fvar(12)=0,1,.85**(fvar(12))))
ignorehitpause=1

[State -2, Dampener]
type=varset
trigger1=(stateno=[1000,1999])
fvar(10)= ifelse(fvar(10)<=.2&&fvar(12), .2, ifelse(fvar(12)=0,1,.9**(fvar(12))))
ignorehitpause=1

[State -2, Dampener]
type=varset
trigger1=(stateno=[3000,3999])
fvar(10)= ifelse(fvar(10)<=.3&&fvar(12), .3, ifelse(fvar(12)=0,1,.95**(fvar(12))))
ignorehitpause=1

[State -2, Attack Multiplier]
type=AttackMulSet
trigger1=1
value=fvar(10)*fvar(11)
ignorehitpause=1
;-------------------------------------------------------------------------------

;[State -2, DisplayToClipboard]
;type = DisplayToClipboard
;trigger1 = 1
;text = "Proudly Presented By DarkCipherLucius, Special Thanks to:\nInfinity Mugen Team"
;ignorehitpause = 1

;[State -2, DisplayToClipboard]
;type=DisplayToClipboard
;trigger1=1
;text="T? = %d || OTG? = %d || GB? = %d || WB? = %d || FS? = %d"
;params=Var(1), Var(13), var(14), var(15), var(12)
;ignorehitpause=1

;Order of Parameters
; Var(1) = Timer Variable
; Var(13) = Off The Ground Hit Variable
; Var(14) = Ground Bounce Variable
; Var(15) = Wall Bounce Variable
; Var(12) = Flying Screen Variable

;[State -2, DisplayToClipboard]
;type = DisplayToClipboard
;trigger1 = 1
;text = "DMGx = %f || Air Combo = %d\nScreen Bound? = %d || Super Jump? = %d"
;params = fvar(10), Var(16), Var(12), var(11)
;ignorehitpause=1

;Order of Parameters
; fVar(10) = Damage Multiplier
; Var(13) = Throw Damage Multiplier
; Var(14) = Aerial Rave Combo Variable
; Var(12) = Flying Screen/Aerial Rave Variable
; Var(11) = Super Jump Variable

;[State -2, DisplayToClipboard]
;type = DisplayToClipboard
;trigger1 = 1
;text = "ScreenPos Y = %f || ScreenPos X = %f\nFrontEdgeBodyDist = %d || BackEdgeBodyDist = %d || Pos Y = %f"
;params = ScreenPos Y, ScreenPos X, FrontEdgeBodyDist, BackEdgeBodyDist, Pos Y
;ignorehitpause=1

[State -2, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "ScreenPos Y = %f || ScreenPos X = %f\nPos X = %f || Pos Y = %f || p2bodydist y = %f"
params = ScreenPos Y, ScreenPos X, Pos X, Pos Y, p2bodydist y
ignorehitpause=1
;--------------------------------------------------------------
;[State -2, HitPause]
;type=varset
;trigger1= movecontact=1&&enemynear,time<=0;movecontact!=1
;trigger1= enemynear,movetype=H
;var(44)=1;gametime+2
;ignorehitpause=1

;[State -2, HitSparks]
;type=helper
;trigger1= var(44)=1
;trigger1= movehit=1 && numenemy <= 1
;trigger1= var(40)=8230||var(40)=8235||var(40)=8240||var(40)=8245
;helpertype=normal
;stateno=var(40)
;ID=8200
;name="Spark"
;postype=p2
;pos= (enemy(0),const(size.ground.front) + var(42)) * (enemy(0),facing) * (-facing), floor(pos y-enemy(0),pos y) + var(43)
;facing= ifelse((enemy(0),facing = facing), 1, -1)
;ownpal=1
;size.xscale=1
;size.yscale=1
;pausemovetime=65535
;supermovetime=65535
;ignorehitpause=1

;[State -2, GuardSparks]
;type=helper
;trigger1= var(44)=1
;trigger1= moveguarded=1 && numenemy <= 1
;trigger1= var(41)=8300 ;|| var(41)=8001
;helpertype=normal
;stateno=8300;var(31)
;ID=8300
;name="Spark"
;postype=p2
;pos= (enemy(0),const(size.ground.front) + var(42)) * (enemy(0),facing) * (-facing), floor(pos y-enemy(0),pos y) + var(43)
;facing= ifelse((enemy(0),facing = facing), 1, -1)
;ownpal=1
;size.xscale=1
;size.yscale=1
;pausemovetime=65535
;supermovetime=65535
;ignorehitpause=1

;[State -2, HitSparks]
;type=helper
;trigger1= var(44)=1
;trigger1= movehit=1 && numenemy >= 2
;trigger1= var(40)=8230||var(40)=8235||var(40)=8240||var(40)=8245
;helpertype=normal
;stateno=var(40)
;ID=8200
;name="Spark"
;postype=p2
;pos= (enemy(1),const(size.ground.front) + var(42)) * (enemy(1),facing) * (-facing), floor(pos y-enemy(1),pos y) + var(43)
;facing= ifelse((enemy(1),facing = facing), 1, -1)
;ownpal=1
;size.xscale=1
;size.yscale=1
;pausemovetime=65535
;supermovetime=65535
;ignorehitpause=1

;[State -2, GuardSparks]
;type=helper
;trigger1= var(44)=1
;trigger1= moveguarded=1 && numenemy >= 2
;trigger1= var(41)=8300 ;|| var(41)=8001
;helpertype=normal
;stateno=8300;var(31)
;ID=8300
;name="Spark"
;postype=p2
;pos= (enemy(1),const(size.ground.front) + var(42)) * (enemy(1),facing) * (-facing), floor(pos y-enemy(1),pos y) + var(43)
;facing= ifelse((enemy(1),facing = facing), 1, -1)
;ownpal=1
;size.xscale=1
;size.yscale=1
;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=44
;value=-1
;ignorehitpause=1

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

;======== Hero Mode Level 1=========
;This code is used for the full game release.
[State -2, PalFX]
type = null;PalFX
triggerall = stateno != [3000,4999]
triggerall = roundstate = 2
trigger1 = power < 2000
trigger1 = power >= 1000
trigger1 = (GameTime%50)=0
time = 20
add = 0,0,50
color = 128
sinadd = 0,0,100,40
ignorehitpause = 1

[State -2, Set Powered Up Attack]
type = null;AttackMulSet
trigger1 = power < 2000
trigger1 =  power >= 1000
trigger2 = hitdefattr = SCA,HA,HT,HP
trigger2 = power < 1000
value = 1.1*(fvar(10)*fvar(11))
ignorehitpause=1

[State -2, DefenceMulSet]
type = null;DefenceMulSet
trigger1 = power < 2000
trigger1 =  power >= 1000
value = 1.1

;======== Hero Mode Level 2=========
;This code is used for the full game release.
[State -2, PalFX]
type = null;PalFX
triggerall = stateno != [3000,4999]
triggerall = roundstate = 2
trigger1 = power < 3000
trigger1 = power >= 2000
trigger1 = (GameTime%50)=0
time = 20
add = 0,50,0
color = 128
sinadd = 0,100,0,40
ignorehitpause = 1

[State -2, Set Powered Up Attack]
type = null;AttackMulSet
trigger1 = power < 3000
trigger1 =  power >= 2000
trigger2 = hitdefattr = SCA,HA,HT,HP
trigger2 = power < 2000
trigger2 =  power >= 1000
value = 1.2*(fvar(10)*fvar(11))
ignorehitpause=1

[State -2, DefenceMulSet]
type = null;DefenceMulSet
trigger1 = power < 3000
trigger1 =  power >= 2000
value = 1.2

;======== Hero Mode Level 3=========
;This code is used for the full game release.
[State -2, PalFX]
type = null;PalFX
triggerall = stateno != [3000,4999]
triggerall = roundstate = 2
trigger1 = power >= 3000
trigger1 = (GameTime%50)=0
time = 20
add = 50,0,0
color = 128
sinadd = 100,0,0,40
ignorehitpause = 1

[State -2, Set Powered Up Attack]
type = null;AttackMulSet
trigger1 =  power >= 3000
trigger2 = hitdefattr = SCA,HA,HT,HP
trigger2 =  power >= 2000
value = 1.3*(fvar(10)*fvar(11))
ignorehitpause=1

[State -2, DefenceMulSet]
type = null;DefenceMulSet
trigger1 =  power >= 3000
value = 1.3

[State -2, Set Powered Up Attack]
type = null;AttackMulSet
trigger1 =  power < 1000
value = (fvar(10)*fvar(11))
ignorehitpause=1

[State -2, Weapon Get Helper]
type=Helper
triggerall=NumHelper(12000)
trigger1=Helper(12000),Stateno=12200
trigger1=Helper(12000),AnimElemTime(6)=0
helpertype=normal ;player
name="Weapon"
ID=1270
stateno=1270
pos= facing * Ceil((ifelse(Helper(12000),facing=1, Helper(12000),rootdist X * -1, Helper(12000),rootdist X)-4)*const(size.xscale)) ,Ceil(((-Pos Y)-33)*const(size.yscale))
postype=p1
facing=facing * Helper(12000),facing
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)
size.ground.back=Ceil(10*const(size.xscale))
size.ground.front=Ceil(10*const(size.yscale))

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

[Statedef -3]

;---------------------------KO FX--------------------------
[State -3,AssertSpecial]
type = assertspecial
trigger1 = !alive
flag = invisible
flag2 = noshadow
[State -3, NotHitBy]
type = NotHitBy
trigger1 = !alive
value = SCA
[State -3, PosFreeze]
type = PosFreeze
trigger1 = !alive
value = 1
[State -3, ScreenBound]
type = ScreenBound
trigger1 = !alive
trigger1 = stateno = 5150
value = 0
movecamera = 0,0
[State -3, PosSet]
type = PosSet
trigger1 = !alive
trigger1 = stateno = 5150
trigger1 = time = 1
y = 0
[State -3, PlayerPush]
type = PlayerPush
trigger1 = !alive
trigger1 = stateno = 5150
value = 0
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(-5+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0, -2
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(-3+const(size.mid.pos.x)*const(size.xscale)),ceil(-3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1.5, -1.5
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(-5+const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -2, 0
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(-3+const(size.mid.pos.x)*const(size.xscale)),ceil(3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1.5, 1.5
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(5+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0, 2
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(3+const(size.mid.pos.x)*const(size.xscale)),ceil(3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1.5, 1.5
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(5+const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 2, 0
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(3+const(size.mid.pos.x)*const(size.xscale)),ceil(-3+const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1.5, -1.5
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -0.5, -1
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1, -0.5
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -0.5, 1
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = -1, 0.5
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0.5, 1
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1, 0.5
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 0.5, -1
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = Explod
trigger1 = !alive && stateno != 5150
anim = 5999
id = 5999
postype = p1
pos = ceil(const(size.mid.pos.x)*const(size.xscale)),ceil(const(size.mid.pos.y)*const(size.yscale))
ownpal = 1
bindtime = 1
sprpriority = -3
persistent = 0
velocity = 1, -0.5
removetime = 300
removeongethit = 1
[State -3, KO Effect]
type = playsnd
trigger1 = !alive && stateno != 5150
value = S5,25
channel = 7
[State -3, SelfState]
type = SelfState
triggerall = stateno != 5150;matchover&&stateno!= 5150
trigger1 = !alive
value = 5150
;-------------------------------------------------------------------------------
[State -3, Super Armor]
type = HitOverride
trigger1=numhelper(1220)
trigger1=(Helper(1220),var(5)!=5)
trigger1=(Helper(1220),stateno=1220)
trigger1=(Helper(1220),Vel X=0)
trigger1=(Helper(1220),Var(3)<10)
trigger1 = (stateno!=[120,159])
trigger2 = anim = 3101
attr = SCA, AA, AP
stateno = 9000
slot=0
ignorehitpause=1

[State -3, Stateno Var]
type=VarSet
trigger1=stateno!=9000&&movetype!=H
trigger1=stateno!=[800,899]
var(3)=stateno
;ignorehitpause=1

[State -3, Summon Rush]
type=Helper
triggerall=!numhelper(10000)
trigger1=(stateno!=[190,194])&&Stateno!=5900
trigger1=(stateno!=[3200,3201])&&prevstateno!=9000
helpertype=normal ;player
name="Rush"
ID=10000
stateno=ifelse((prevstateno=[3200,3201])||movetype=H,10190,10000)
pos=Ceil(-45*const(size.xscale)),0
postype=p1
ownpal=1
size.xscale=const(size.xscale)
size.yscale=const(size.yscale)

[State -3, Explod] ;Fire FX on enemy
type=Explod
triggerall=stateno=[1100,1199]
trigger1=enemynear,movetype=H && movehit
trigger1=(enemynear,gametime % 6) = 0
anim=7000
ID=7000
pos=0,floor(enemynear,const(size.mid.pos.y))
postype=p2
facing=-1
bindtime=-1
random=60,30
removetime=-2
sprpriority=5
ownpal=1
ignorehitpause=1

[State -3, Recovery Roll]
type = ChangeState
triggerall = command="bdz"||command="bdy"||command="bdx"||command="rbdz"||command="rbdy"||command="rbdx"
triggerall = alive;hitfall
trigger1 = stateno = 5100 || Stateno = 5110
trigger1 = Pos Y >= -5 && Time < 5
trigger2 = (StateNo = 5071 || Stateno = 5050) && Pos Y >= -5 && Vel Y >= 0
value = ifelse(command="bdz",5252,ifelse(command="bdy",5251,ifelse(command="bdx",5250,ifelse(command="rbdz",5257,ifelse(command="rbdy",5256,5255)))))
ctrl = 0

;-------------------------------------------------------------------------------
; Ariel Rave Mode
;Var(11) = 0 ; Not in Super Jump Mode
;Var(11) = 1 : Super Jump Activated, disallow movement
;Var(11) = 2 : Super Jump Activated, allow air movement

[State -3, VelAdd]
type = VelAdd
triggerall = Var(11)=2 && var(12) != 1 && var(12) != 5
triggerall = statetype=A && MoveType!= H;(stateno = [600,699])
triggerall = (stateno!=[700,3999])&&(stateno!=[100,109])
trigger1 = Vel X > -4
trigger1 = command = "holdback"
x = -.1
[State -3, VelAdd]
type = VelAdd
triggerall = Var(11)=2 && var(12) != 1 && var(12) != 5
triggerall = statetype=A && MoveType!= H;(stateno = [600,699])
triggerall = (stateno!=[700,3999])&&(stateno!=[100,109])
trigger1 = Vel X < 4
trigger1 = command = "holdfwd"
x = .1
[State 70, VelMul]
type = VelMul
trigger1 = Vel X != 0
trigger1 = Var(11)=2&&Command != "holdfwd" && Command != "holdback"
trigger1 = statetype=A && MoveType!= H
trigger1 = (stateno!=[700,3999])&&(stateno!=[100,109])
x = .95
[State -3, Turn]
type = Turn
triggerall = Var(11) && statetype = A
triggerall = p2dist X < -5
trigger1 = (stateno!=[700,3999])&&(stateno!=[100,109])
trigger1 = movetype = I && MoveType!= H
;-------------------------------------------------------------------------------
[State -3, Super Jump Reset]
type = VarSet
triggerall = var(11)=1
;trigger1 = enemynear,movetype!=H
trigger1 = frontedgebodydist>=-10||backedgebodydist>=-10
trigger1 = statetype!=A
var(11)=0
[State -3, Super Jump Var]
type = VarSet
triggerall = var(11)>0
trigger1 = statetype!=A&&stateno!=40
var(11)=1
[State -3, Super Jump VelAdd]
type = VelAdd
triggerall = Var(11)=2&&!var(20)&&!var(21)
triggerall = (statetype=A) && (MoveType!= H)
trigger1 = (stateno!=[700,3999])&&(stateno!=[100,109])
y=ifelse(movetype=A&&!movecontact,-.1,-.2)
[State -3, Super Jump VelAdd]
type = VelAdd
triggerall = Var(11)=2&&!var(20)&&!var(21)
triggerall = (statetype=A) && (MoveType!= H)
trigger1 = (stateno!=[700,3999])&&(stateno!=[100,109])
trigger1 = movetype = A && movecontact
y=.05
ignorehitpause = 1

;-------------------------------------------------------------------------------
;Flying Screen Code using Var(12)
; 1 = Flying Screen Active, Will go offscreen, air only, camera won't follow
; 2 = Aerial Rave Mode, turns into Flying Screen on Finisher
; 3 = Still in Flying Screen but Prevents going off screen, camera won't follow
; 4 = Flying Screen Still Active, Prevents going off screen, camera now follows
; 5 = Flying Screen Activated ON GROUND, Will go offscreen, camera won't follow

[State -3, ScreenBound] ;Go offscreen when true
type=ScreenBound
trigger1=(var(12)=1||var(12)=5)
value=0
movecamera=0,0
ignorehitpause=1

[State -3, ScreenBound] ;Prevent Going Offscreen
type=ScreenBound
trigger1=(var(12)=3)
value=1
movecamera=0,0
ignorehitpause=1

[State -3, VarSet] ;Keep Camera from following but prevent going offscreen
type = VarSet      ;if close to corner
trigger1=frontedgebodydist<=48&&var(12)=1
trigger1=statetype=A
var(12)=3

[State -3, VarSet] ;Keep Flying Screen Active but No longer go offscreen
type = VarSet
triggerall=statetype!=A&&(backedgebodydist>=-10 || frontedgebodydist>=-10)
;trigger1=movetype!=A
trigger1=(var(12) = 5 && ctrl)
trigger2=(Var(12) && (Var(12) != 5 && Var(12) != 2) && !ctrl)
var(12)=4

[State -3, VarSet] ;Reset Flying Screen
type = VarSet
trigger1 = enemynear,movetype!=H
trigger1 = (ScreenPos Y >= 15)&&(backedgebodydist>=-10)
trigger2 = statetype!=A&&(backedgebodydist<=-48||frontedgebodydist<=-48)
trigger3 = statetype!=A&&(backedgebodydist>=-10||frontedgebodydist>=-10) ;&& Var(12) != 4
trigger3 = var(12) != [3,5] ;&& ctrl
var(12)=0

;[State -3, VarSet] ;Go Offscreen if a Flying Screen Attack Hits while on Ground
;type = VarSet
;trigger1=statetype!=A&&var(12)
;trigger1=movetype=A
;var(12)=5

[State -3, CtrlSet] ;Remove Control when offscreen
type = CtrlSet
trigger1 = var(12)=1&&statetype=A&&(backedgebodydist <= -48 || frontedgebodydist <= -48)
trigger2 = backedgebodydist < -10 || frontedgebodydist < -10
trigger2 = statetype = A ;|| !var(11)
trigger3 = statetype != A && var(12) = 5
trigger3 = backedgebodydist < -10 || frontedgebodydist < -10
value = 0
;-------------------------------------------------------------------------------
;Set Position during Flying Screen Effect
[State -3, PosSet]
type = PosSet
triggerall = var(12)=1 || var(12) = 3
;triggerall = (stateno != [1000,3999]) || ((Stateno = [1000,3999]) && animtime = 0)
trigger1 = backedgebodydist <= -48 || frontedgebodydist <= -48
trigger2 = screenpos Y < 15 && (backedgebodydist < -10) && var(12) != 3
x = Ceil(ifelse(backedgebodydist < -10,-256,256)*facing)*const(size.xscale)
[State -3, PosSet]
type = PosSet
triggerall = var(12)=1 || var(12) = 3
;triggerall = (stateno != [1000,3999]) || ((Stateno = [1000,3999]) && animtime = 0)
trigger1=backedgebodydist <= -48 || frontedgebodydist <= -48
trigger2=screenpos Y < 15 && (backedgebodydist < -10 || frontedgebodydist < -10)&&var(12) != 3
y = 0
[State -3, ChangeState]
type = ChangeState
triggerall = var(12)=5
trigger1 = backedgebodydist < -10 || frontedgebodydist < -10
value = 110
ctrl = 0
[State -3, ChangeState]
type = ChangeState
triggerall = var(12)=1 || var(12) = 3
;triggerall = (stateno != [1000,3999]) || ((Stateno = [1000,3999]) && animtime = 0)
trigger1 = backedgebodydist <= -48 || frontedgebodydist <= -48
trigger2 = screenpos Y < 15 && (backedgebodydist < -10 || frontedgebodydist < -10)&&var(12) != 3
value = 52
ctrl = 0

;-------------------------------------------------------------------------------
[State -3, Use Limiter (Negates Spam) Air Only]
type=VarSet
trigger1=statetype!=A
var(10)=0

[State -3, AssertSpecial]
type=AssertSpecial
trigger1=var(12)=2
trigger1=statetype=A&&MoveType!= H
flag=nojugglecheck
ignorehitpause=1

[State -3, Air Jump Reset]
type = VarSet
triggerall = var(20)
trigger1 = statetype!=A&&MoveType!= H
trigger2 = stateno=52
var(20)=0

[State -3, Wall Cling Reset]
type = VarSet
trigger1 = statetype!=A&&var(21)!=0
trigger2 = (stateno=45)
var(21)=0

;---------------------------------------------------------------------------
; Air Jump
[State -3, Air Jump]
type = null;ChangeState
triggerall = screenpos Y > -Const(size.head.pos.y)
triggerall = Pos Y <= Ceil(Const(size.head.pos.y)/2)
triggerall = Var(20)<2 && Stateno != 45
triggerall = (command="holdup")&&!var(23);||(command="upfwd")||(command="upback"))
trigger1 = Statetype = A && (ctrl||(stateno = [50,51]))
trigger2 = (stateno=600||stateno=610||stateno=620||stateno=630||stateno=635||stateno=640||stateno=645)&&(movecontact)
value = 45

[State -3, Air Jump Direction Var]
type=VarSet
trigger1=1
var(23)=ifelse(command="holdup",1,0)

;---------------------------------------------------------------------------
[State -3, Super Jump Activation]
type=VarSet
triggerall = StateType != A
trigger1 = command="Super_Jump"
trigger2 = (stateno = 250) && movehit = 1 && !var(12)
trigger2 = command = "holdup"
trigger3 = stateno = 200 || stateno = 210 || stateno = 230 || stateno = 240
trigger3 = stateno = 400 || stateno = 410 || stateno = 430 || stateno = 440
trigger3 = command = "Super_Jump"
var(11) = 2
ignorehitpause=1

[State -3, Ariel Rave Mode] ;Ariel Rave Mode if Launcher Hits
type = VarSet
triggerall = Var(11) && !var(12)
triggerall = StateType != A
trigger1=stateno=40
trigger1=prevstateno=250
var(12) = 2

[State 250, Super Jump]
type = ChangeState
trigger1 = movehit = 1 && !var(12)
trigger1 = stateno = 250
trigger1 = command = "holdup"
trigger2 = stateno = 200 || stateno = 210 || stateno = 230 || stateno = 240 || stateno = 400 || stateno = 410 || stateno = 430 || stateno = 440 || stateno = 450
trigger2 = command = "Super_Jump"
trigger2 = movehit = 1
value = 40

[State -3, Air Dash Reset]
type = VarSet
triggerall = var(22)
trigger1 = statetype!=A
trigger2 = stateno=52
var(22)=0

[State -3, AssertSpecial]
type = AssertSpecial
trigger1 = roundno=1
trigger1 = roundstate<2
flag = nomusic
flag2 = nobardisplay
ignorehitpause = 1

[State -3, VarRangeSet] ;Reset Ground Bounce, Wall Bounce, OTG, and Air Combo
type=VarRangeSet
trigger1=numenemy
trigger1=(enemynear,movetype!=H)||(enemynear,stateno=[120,159])
trigger2=!numenemy ;|| !numtarget
value=0
first=13
last=16
ignorehitpause=1

[State -3, OTG Var] ;Can only OTG once (only for basic attacks)
type=VarSet
triggerall=stateno<=999
triggerall=NumTarget
trigger1=movehit=1&&target,movetype=H
trigger1=target,statetype=L&&target,pos Y>=0
trigger2=numhelper(221)
trigger2=helper(221),movehit=1&&enemynear,movetype=H
trigger2=enemynear,statetype=L&&enemynear,pos Y>=0
trigger3=numhelper(421)
trigger3=helper(421),movehit=1&&enemynear,movetype=H
trigger3=enemynear,statetype=L&&enemynear,pos Y>=0
trigger4=numhelper(621)
trigger4=helper(621),movehit=1&&enemynear,movetype=H
trigger4=enemynear,statetype=L&&enemynear,pos Y>=0
var(13)=1
ignorehitpause=1

[State -3, Ground Bounce Var] ;Can only force P2 to bounce on ground once
type=VarSet
trigger1=numenemy
trigger1=NumTarget
trigger1=target,stateno=5106 ;Enemy Bounces offground
trigger1=target,id=enemynear,id
var(14)=1
ignorehitpause=1

[State -3, Ground Bounce Var] ;Can only force P2 to bounce on ground once
type=VarSet
trigger1=numenemy
trigger1=NumTarget
trigger1=target,stateno=6504 ;Enemy Bounces offground
trigger1=target,id=enemynear,id
var(15)=1
ignorehitpause=1

[State -3, VarSet]
type=VarAdd
trigger1=statetype=A && (stateno != [1000,1999])
trigger1=numtarget && numenemy
trigger1=movehit=1&&target,time<=0
trigger1=target,movetype=H && (target,stateno!=[120,159])
trigger2=!var(16)
trigger2=stateno=250;||stateno=420||stateno=220||stateno=450
trigger2=numtarget && numenemy
trigger2=movehit=1&&target,time<=0
trigger2=target,movetype=H && (target,stateno!=[120,159])
var(16)=1
ignorehitpause=1

[State -3, Reset Knockdown Var]
type=VarSet
trigger1=(stateno!=[1000,3999])
trigger2=movetype=H&&stateno!=9000
var(4)=0
ignorehitpause=1
;--------------------------
[State -3, VarAdd]
type = null;VarAdd
trigger1 = movetype = H ;&& hitshakeover
trigger1 = (stateno != [120,159])
var(17) = Ceil(gethitvar(damage))
ignorehitpause=1

[State -3, VarAdd]
type = null;VarAdd
triggerall = var(17)
trigger1 = movetype != H && (gametime%3)=0
var(17) = -1

[State -3, ChangeState]
type = null;ChangeState
trigger1 = var(17) >= 400 && stateno != 9001
trigger1 = movetype = H
value = 9001
ctrl = 0

;--------------------------
[State -3, Wall Hit Spark]
type=Explod
triggerall = numenemy
triggerall = enemynear,movetype=H && enemynear,statetype = A
triggerall = enemynear,backedgebodydist <= 10 || enemynear,frontedgedist <= 10
triggerall = var(39) = 1
trigger1=(enemynear,stateno=[5020,5029])
trigger2=(enemynear,stateno=[5030,5039])&&(enemynear,anim!=[5099,5099])
trigger3=(enemynear,stateno=[5050,5069])
anim=8008
ID=8008
pos=0,enemynear,const(size.mid.pos.y)
postype=p2
bindtime=1
ownpal=1
removetime=-2
supermovetime=9999
pausemovetime=9999
sprpriority=-1
ignorehitpause=1

[State -3, Wall Hit Snd]
type = PlaySnd
triggerall = numenemy
triggerall = enemynear,movetype=H && enemynear,statetype = A
triggerall = enemynear,backedgebodydist <= 10 || enemynear,frontedgedist <= 10
triggerall = var(39) = 1
trigger1=(enemynear,stateno=[5020,5029])
trigger2=(enemynear,stateno=[5030,5039])&&(enemynear,anim!=[5099,5099])
trigger3=(enemynear,stateno=[5050,5069])
value = S6000,4
channel = 4
ignorehitpause=1

[State -3, Wall Hit Var]
type=VarAdd
triggerall=numenemy
trigger1=enemynear,frontedgebodydist <= enemynear,const(size.air.front) || enemynear,backedgebodydist <= enemynear,const(size.air.back)
trigger1=enemynear,statetype=A&&enemynear,movetype=H
trigger1=!enemynear,gethitvar(hitshaketime)
var(39)=1
ignorehitpause=1

[State -3, VarSet]
type=VarSet
triggerall=numenemy
trigger1=enemynear,movetype=H && enemynear,time<=0
;trigger1=enemynear,statetype=A&&enemynear,movetype=H
var(39)=0
ignorehitpause=1

[State -3, Helper]
type = Helper
trigger1 = !numhelper(8900) && numenemy && roundstate = 2
trigger1 = enemy(0),screenpos Y >= 300;(240 - enemy(0),const(size.mid.pos.y)*2)
helpertype = normal ;player
name = "Player 2 Pos"
ID = 8900
stateno = 8900
postype = p1
facing=facing
ownpal = 1
supermovetime=9999
pausemovetime=9999

[State -3, Helper]
type =Helper
trigger1 = !numhelper(8901) && numenemy >= 2 && roundstate = 2
trigger1 = enemy(1),screenpos Y >= 300;(240 - enemy(1),const(size.mid.pos.y)*2)
helpertype = normal ;player
name = "Player 4 Pos"
ID = 8901
stateno = 8901
postype = p1
facing=facing
ownpal = 1
supermovetime=9999
pausemovetime=9999

[State -3, TargetFacing]
type=TargetFacing
triggerall=numenemy&&numtarget
triggerall=target,time<=0
trigger1=target,movetype=H && (target,stateno!=[120,159])
trigger1=(target,anim=[5000,5500])
trigger1=target,statetype!=L
value=ifelse(P2Dist X >= 0, -1, 1)
ignorehitpause=1

;==================================================================================
;==================================================================================
;==================================================================================

[State -3, You Win SND]
type = PlaySnd
triggerall = stateno = [181,189]
trigger1 = Time = 1
value = s8002,2
ignorehitpause = 1
volume = 255
channel = 20
persistent = 0
abspan = 1

[State -3, Perfect SND]
type = PlaySnd
triggerall = stateno = [181,189]
triggerall = Life = LifeMax
trigger1 = time=90
value = s8002,3
ignorehitpause = 1
volume = 255
channel = 20
persistent = 0
abspan = 1

[State -3, Jumping Sound]
type = PlaySnd
triggerall = Var(11)!=2
triggerall = Time = 1
trigger1 = stateno = 50 ;Jumping
value = s41,0
channel = 4

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
value = s52,0
channel = 4

[State -3, Landing Shake]
type = EnvShake
triggerall = Time = 1 && var(0)>1
trigger1 = stateno = 52 ;Jump land
time = Ceil(5*var(0))
ampl = var(0)
ignorehitpause=1

[State -3, Character Size]
type=VarSet
trigger1=1
v=0
value=1
ignorehitpause=1
;Change the value to the following based on the character's size and weight:
; 0 = Small
; 1 = Medium
; 2 = Large
; 3 = Extra Large

[State -3, Character Size Default] ;Just in case.....
type=VarSet
trigger1=var(0)>3
v=0
value=0
ignorehitpause=1

[State -3, Landing Anim]
type = Explod
triggerall = Time = 1
trigger1 = stateno = 52
anim = 8002
ID = 8002
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
supermove = 9999
pausemove = 9999
scale = 1,1
sprpriority = 3
ownpal = 1
ignorehitpause =1

[State -3, AfterImagePersist]
type=afterimagetime
trigger1=var(45)
time=2

[State -3, StopSnd]
type = StopSnd
trigger1 = movetype = H
trigger2 = stateno != [3000,3999]
channel = 15
ignorehitpause = 1

[State -3, AfterImageTime]
type = AfterImageTime
trigger1 = numhelper(7005)=1
time = 0
ignorehitpause = 1

[State -3, VarSet]
type = VarSet
trigger1 = (stateno != [3000,4999]) && stateno!=9000
var(45)=0

;-----------------------------
[State -3, Corner Push]
type= varset
trigger1= fvar(5)
trigger1= numtarget
trigger1= (target, hitover) || (target, gethitvar(hitshaketime) > 0 && target, time <= 0)
fvar(5)= 0

[State -3, Corner Push]
type= varset
trigger1= movecontact=1 && numtarget
fvar(5)= (target, gethitvar(xvel))
ignorehitpause= 1

[State -3, Corner Push]
type= posadd
triggerall= fvar(5)
triggerall= numtarget;(statetype = S || statetype = C)&&
triggerall= !hitpausetime && (target, gethitvar(hitshaketime) <= 0)
triggerall= (target, statetype != L) ;&& !(target, hitfall);&& !(target, gethitvar(yvel));(target, statetype = S || target, statetype = C)
trigger1= target, frontedgebodydist <= abs(target, vel x)
trigger1= (target, gethitvar(xvel) * target, facing) > 0
trigger2= target, backedgebodydist <= abs(target, vel x)
trigger2= (target, gethitvar(xvel) * target, facing) < 0
x= ifelse(target, frontedgebodydist <= 0, -1, 1) * (target, facing) * fvar(5)

[State -3, Corner Push]
type= varset
trigger1= numtarget
trigger1= target, gethitvar(hitshaketime) <= 0
fvar(5)= fvar(5) * 0.85
;--------------------------
[State -3, Safety] ;No Underground Juggle
type= targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=0) && (target,ID=enemynear,ID)
trigger1= !(target,hitshakeover) && (target, pos y>0) ; (target, hitfall) &&
;trigger2= (target,statetype!=L)
pos= ceil(p2dist x), ceil(-pos y)
ignorehitpause=1

;-------------- Generated by Fighter Factory -------------

;--------------------- Variable List ----------------------

; Var(0) - StateDef -3
; Var(1) - StateDef 200, 210, 220, 221, 225, 230, 240, 250, 400, 410, 415, 420, 425, 430, 440, 450, 610, 620, 625, 640, 650, 660, 900, 1005, 1010, 1015, 1100, 1101, 1102, 1204, 1205, 1211, 1220, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1705, 1800, 1810, 1850, 1855, 3000, 3001, 3005, 3006, 3007, 3008, 3050, 3060, 3070, 3080, 3300, 3305, 10040, 10050
; Var(2) - StateDef 220, 420, 620, 1010, 1015, 1205, 1220
; Var(3) - StateDef 1204, -3
; Var(4) - StateDef 1850, 3000, 3001, 3300, -3
; Var(5) - StateDef 220, 221, 420, 620, 1000, 1001, 1002, 1005, 1010, 1015, 1100, 1200, 1201, 1202, 1203, 1210, 1211, 1700, 1705, 1800, 1810, 1850, 3300, 3305
; Var(6) - Statedef 9000
; Var(10) - StateDef -3
; Var(11) - StateDef 221, 625, 650, 660, 1005, 3307, -3
; Var(12) - StateDef 221, 625, 650, 660, 1005, 3307, -3
; Var(13) - StateDef -3
; Var(14) - StateDef -3
; Var(15) - Statedef -3
; Var(16) - Statedef -3
; Var(17) - Statedef -3
; Var(20) - StateDef -3
; Var(22) - StateDef -3
; Var(25) - StateDef 1000, 1001, 1002, 1010, 1015, -2
; Var(26) - StateDef -2
; Var(27) - StateDef -2
; Var(28) - StateDef -2
; Var(29) - StateDef 900, -2
; Var(30) - StateDef -2
; Var(39) - StateDef -3
; Var(40) - StateDef 200, 210, 225, 230, 240, 250, 400, 410, 415, 425, 430, 440, 450, 600, 610, 625, 630, 640, 650, 660, 1850, 3001
; Var(42) - StateDef 200, 210, 225, 230, 240, 250, 400, 410, 415, 425, 430, 440, 450, 600, 610, 625, 630, 640, 650, 660, 1005, 1010, 1015, 1205, 1206, 1211, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1705, 1810, 1850, 3001, 3005, 3006, 3007, 3008, 3050, 3060, 3070, 3080
; Var(44) - StateDef -2
; Var(45) - StateDef 3000, 3300, -3
; Var(50) - StateDef 190, 1270, 1290, 12190

;--------------------- Float Variable List ----------------------

; fVar(5) - StateDef 3000, 3300, -3
; fVar(10) - StateDef 221, 1005, 1010, 1015, 1205, 1206, 1211, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1705, 1810, 3005, 3006, 3007, 3008, 3050, 3060, 3070, 3080, 3305, -2
; fVar(11) - StateDef 801, -2
; fVar(12) - StateDef 221, 1005, 1010, 1015, 1205, 1206, 1211, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1705, 1810, 3005, 3006, 3007, 3008, 3050, 3060, 3070, 3080, 3305, -2

;Sound Channels
;Attack Whiff Sounds = 0
;Attack Hit Sounds = 1
;Guard Sounds = 2
;Jump/Landing Sounds = 3
;Wall Hit Sound = 4
;Character Sounds = 5
;Character Effect Sounds = 6
;Other Character Effect Sounds = 7
;Other Abnormal Character Sounds = 8
;Character Helper Sounds = 9
;Character Special Effect Sounds = 10
;Hyper Effect Sounds = 15
;Announcer Sounds = 20
