;---------------------------------------------------------------------------
; Pillar
[Statedef 2000]
type    = U
movetype= A
physics = N
ctrl = 0
anim = 2000
velset = 0,0
poweradd = -1000
sprpriority = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifelse(StateType=A,2040,ifelse(random<500,2010,2000))
[State 0, ChangeAnim Force Playball]
type = ChangeAnim
trigger1 = !Time && StateType != A && command = "x"
value = 2000
[State 0, ChangeAnim Force Saki]
type = ChangeAnim
trigger1 = !Time && PrevStateNo = 2101
value = 2010

[State 0, VarSet Strength]
type = VarSet
trigger1 = !Time && !Var(15)
v = 5
value = cond(command != "x",cond(command = "y",1,2),0)
[State 0, VarSet Strength AI]
type = VarSet
trigger1 = !Time && Var(15)
v = 5
value = 2
[State 0, VarSet Strength Ender]
type = VarSet
trigger1 = !Time && PrevStateNo = 2101
v = 5
value = 0
[State 0, VarSet]
type = VarSet
trigger1 = !Time
v = 6
value = Random%40

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = StateType = C
statetype = S

; = = = = = SUPER PAUSE = = = = =
[State 0, SuperPause]
type = SuperPause
trigger1 = Time = 16
time = 32
anim = -1
sound = S4,0
pos = 0,0
movetime = 32
darken = 0
unhittable = 1
[State 0, Explod Super B]
type = Explod
trigger1 = Time = 16
anim = 8500
ID = 8500
pos = -12,-72-(16*(Anim=2040))
postype = p1
bindtime = 32
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = -3
ownpal = 1
removeongethit = 1
[State 0, Explod Super F]
type = Explod
trigger1 = Time = 16
anim = 8501
ID = 8501
pos = -12,-72-(16*(Anim=2040))
postype = p1
bindtime = 32
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 1
[State 0, PalFX Blackout]
type = BGPalFX
trigger1 = Time = 16
time = 32
add = -256,-256,-256
mul = 0,0,0
color = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [16,48]
flag = noBG
flag2 = noFG
flag3 = globalnoshadow
; = = = = = = = = = = = = = = = =

[State 0, Explod Overlay]
type = Explod
triggerall = Anim = 2000
trigger1 = Time = 1
anim = 2001
ID = 2001
pos = 0,0
postype = p1
bindtime = 666
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 4
removeongethit = 1
[State 0, Explod Basketball]
type = Explod
triggerall = Anim = 2000
trigger1 = Time = 0
anim = 2050+Var(6)
ID = 2002
pos = 26,-240
postype = p1
vel = 0,6
accel = 0,1.75
removetime = 49
scale = ifelse(Var(6)=39,0.3,1),ifelse(Var(6)=39,0.3,1)
pausemovetime = 666
supermovetime = 666
sprpriority = 2
removeongethit = 1
[State 0, Explod Eye]
type = Explod
triggerall = Anim = 2010
trigger1 = Time = 3
anim = 2011
ID = 2011
pos = 0,0
postype = p1
removetime = -2
bindtime = 666
pausemovetime = 666
supermovetime = 666
sprpriority = 2
removeongethit = 1
[State 0, Explod Powerup]
type = Explod
triggerall = Anim = 2000
triggerall = Time = 12
trigger1 = (Var(6) = [33,39]) && Var(6) != 37
anim = 2021
ID = 2021
pos = 160,0
postype = left
bindtime = 666
removetime = -2
scale = 4,4
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1

[State 0, ModifyExplod]
type = ModifyExplod
triggerall = Anim = 2000
trigger1 = Time = 11
trigger2 = Time = 19
ID = 2002
vel = 0,0
accel = 0,0
pos = 26,-71
bindtime = 666
postype = p1
[State 0, ModifyExplod]
type = ModifyExplod
triggerall = Anim = 2000
trigger1 = Time = 12
trigger2 = Time = 17
ID = 2002
pos = 25,-70
postype = p1
[State 0, ModifyExplod]
type = ModifyExplod
triggerall = Anim = 2000
trigger1 = Time = 13
ID = 2002
pos = 24,-69
postype = p1
[State 0, ModifyExplod]
type = ModifyExplod
triggerall = Anim = 2000
trigger1 = Time = 21
ID = 2002
pos = -10,-82
postype = p1
[State 0, ModifyExplod]
type = ModifyExplod
triggerall = Anim = 2000
trigger1 = Time = 24
ID = 2002
pos = -1,-105
postype = p1
[State 0, ModifyExplod]
type = ModifyExplod
triggerall = Anim = 2000
trigger1 = Time = 28
ID = 2002
pos = -3,-119
postype = p1
[State 0, ModifyExplod]
type = ModifyExplod
triggerall = Anim = 2000
trigger1 = Time = 34
ID = 2002
pos = -2,-118
postype = p1
[State 0, ModifyExplod]
type = ModifyExplod
triggerall = Anim = 2000
trigger1 = Time = 42
ID = 2002
pos = 8,-111
postype = p1
[State 0, ModifyExplod]
type = ModifyExplod
triggerall = Anim = 2000
trigger1 = Time = 46
ID = 2002
pos = 2,-104
sprpriority = -1
postype = p1

[State 0, EnvShake]
type = EnvShake
trigger1 = Time = [54,61] 
time = 4
freq = 120
ampl = -24+(Time-49)*2
phase = 120+(Time%2*120)

[State 0, Snd Voice]
type = PlaySnd
trigger1 = Time = 12 && Anim = 2000
trigger2 = Time = 4 && Anim != 2000
value = S2000,ifelse(anim=2000,0,1)
channel = 0
[State 0, Snd BOOM]
type = PlaySnd
trigger1 = Time = 50
value = S2001,0
;channel = 1
[State 0, Snd Ball Drop]
type = PlaySnd
triggerall = Anim = 2000
trigger1 = Time = 1
value = S5,0
channel = 1
[State 0, Snd Ball Catch]
type = PlaySnd
triggerall = Anim = 2000
trigger1 = Time = 12
value = S5,2
channel = 1
[State 0, Snd Ball Special]
type = PlaySnd
triggerall = Anim = 2000
trigger1 = Time = 8
value = S2002,Var(6)
channel = 2

[State 0, Snd Ball Special - Doom Powerup]
type = PlaySnd
triggerall = Anim = 2000
triggerall = Time = 12
trigger1 = Var(6) = [33,36]
trigger2 = Var(6) = 39
value = S2003,0
[State 0, Snd Ball Special - Hell Dunk]
type = PlaySnd
triggerall = Anim = 2000
triggerall = Time = 12
trigger1 = Var(6) = [29,32]
value = S2003,1

[State 0, Helper Proj]
type = Helper
triggerall = Anim = 2000
triggerall = Time = 12
trigger1 = (Var(6) = [33,39]) && Var(6) != 37
name = "itemup"
ID = 2030
stateno = 2030
pos = Ceil(Var(30)*0.5),0
postype = back
ownpal = 1
supermovetime = 666
size.xscale = 1
size.yscale = 1

[State 0, VelSet]
type = VelSet
triggerall = StateType = A
trigger1 = Time = 1
x = -3
y = -3
[State 0, VelSet]
type = VelSet
triggerall = StateType = A
trigger1 = Time = 16
x = 0
y = 0
[State 0, VelSet]
type = VelSet
triggerall = StateType = A
trigger1 = Time = 50
x = -4
y = -6

[State 0, VelMul]
type = VelMul
trigger1 = StateType = A
x = 0.9
y = ifelse(Time<50,0.9,1)

[State 0, Helper]
type = Helper
trigger1 = Time = 49
name = "PLAYBALL"
ID = 2010
stateno = 2010
pos = 72+(Var(5)*64),4
postype = p1
ownpal = 1

[State 0, StateTypeSet]
type = StateTypeSet
triggerall = StateType = A
trigger1 = Time = 50
physics = A
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Time = 50
movetype = I

[State 0, PosAdd]
type = PosAdd
triggerall = Anim = 2000
trigger1 = AnimTime = 0
x = 8
[State 0, ChangeState]
type = ChangeState
triggerall = StateType = S
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; H - BurstPillar
[Statedef 2010]
type    = S
movetype = A
physics = N
velset = 0,0
anim = 2020

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

[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 4
[State 0, PosAdd]
type = PosAdd
triggerall = FrontEdgeDist < 30
trigger1 = Time <= 4
x = -15+FrontEdgeDist

[State 0, AllPalFX]
type = AllPalFX
trigger1 = Time = 4
time = 1
add = 256,256,256
mul = 256,256,256

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = A,HP
hitflag = MAF
guardflag = M
animtype = Up
priority = 9,Hit
damage = Ceil(192*Root,FVar(13)),33
pausetime = 0,12+(3*Root,Var(9))
guard.pausetime = 0,4
sparkno = s8010
guard.sparkno = s8110
sparkxy = 0,-68
hitsound = S1,8
guardsound = S2,3 
ground.type = High
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 12
guard.hittime = 12
air.hittime = 24
yaccel = 0.5
fall = 1
fall.recover = 0
ground.velocity = -2,-10
guard.velocity = -6
air.velocity = -3,-8 
getpower = 0,0
givepower = 24,12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0, ChangeState]
type = ChangeState
triggerall = HitShakeOver
trigger1 = Time = 8
trigger2 = MoveContact
value = Cond(NumTarget = 1 && !MoveGuarded && !MoveReversed,2012,2011)
ctrl = 0

;---------------------------------------------------------------------------
; H - BurstPillar Fail
[Statedef 2011]
type    = S
movetype = I
physics = N

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = AnimElemNo(0) < 13
value = 0
scale = 1-(Time*0.2),1

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

;---------------------------------------------------------------------------
; H - BurstPillar Succeed
[Statedef 2012]
type    = S
movetype = I
physics = N
sprpriority = 2

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = AnimElemNo(0) < 13
value = 0
scale = 1-(Time*0.02),1

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

[State 0, AllPalFX]
type = AllPalFX
trigger1 = !Time
time = 1
add = 256,256,256
mul = 256,256,256

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElem = 10
trigger1 = Time < 32
value = 2020
elem = 7

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 1
x = P2Dist X*0.5

[State 0, TargetState]
type = TargetState
trigger1 = Time = 1
value = 2020
[State 0, TargetBind]
type = TargetBind
trigger1 = Time = 1
time = 1
pos = 0,0
[State 0, TargetState]
type = TargetState
trigger1 = Time = 33
value = 2021

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

;---------------------------------------------------------------------------
; V - Abducted 1
[Statedef 2020]
type = A
movetype = H
physics = N
velset = 0,-8

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

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

[State 0, SprPriority]
type = SprPriority
trigger1 = Time%3 = 0
value = -1
ignorehitpause = 1
[State 0, SprPriority]
type = SprPriority
trigger1 = Time%3 = 1
value = 4
ignorehitpause = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 1
scale = 1-(Time*0.03),1+(Time*0.05)

[State 0, PalFX]
type = PalFX
trigger1 = Time%4 = 0
time = 1
add = 128,128,128
color = 0
[State 0, PalFX]
type = PalFX
trigger1 = Time%4 = 2
time = 1
add = -128,-128,-128
color = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 2030
ignorehitpause = 1

;---------------------------------------------------------------------------
; V - Abducted 2
[Statedef 2021]
type = A
movetype = H
physics = N
velset = 0,8

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 2031
ignorehitpause = 1

[State 0, PosSet]
type = PosSet
trigger1 = !Time
y = -640

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

[State 0, PosSet]
type = PosSet
trigger1 = !Alive
y = 1024

[State 0, SelfState]
type = SelfState
triggerall = Alive
trigger1 = Pos Y + Vel Y > 0
value = 5100
[State 0, SelfState]
type = ChangeState
triggerall = !Alive
trigger1 = 1
value = 5850
[State 0, SelfState]
type = SelfState
triggerall = !Alive
trigger1 = 1
value = 5150

;---------------------------------------------------------------------------
; H - DoomText
[Statedef 2030]
type    = A
movetype = I
physics = N
velset = 0,0
anim = 666
sprpriority = 9

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

[State 0, Turn]
type = Turn
trigger1 = Time = 0 && Facing != 1

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 0
y = (Var(31) - ScreenPos Y * -0.25)
[State 0, PosAdd]
type = PosAdd
trigger1 = Time < 12
trigger2 = Time >= 84
y = -0.5
[State 0, PosSet]
type = PosSet
trigger1 = 1
x = 0

[State 0, Trans]
type = Trans
;trigger1 = Time = [1,2]
trigger1 = Time = [94,96]
trans = addalpha
alpha = 40,216
[State 0, Trans]
type = Trans
;trigger1 = Time = [3,4]
trigger1 = Time = [92,93]
trans = addalpha
alpha = 80,176
[State 0, Trans]
type = Trans
;trigger1 = Time = [5,6]
trigger1 = Time = [90,91]
trans = addalpha
alpha = 120,136
[State 0, Trans]
type = Trans
;trigger1 = Time = [7,8]
trigger1 = Time = [88,89]
trans = addalpha
alpha = 160,96
[State 0, Trans]
type = Trans
;trigger1 = Time = [9,10]
trigger1 = Time = [86,87]
trans = addalpha
alpha = 200,56
[State 0, Trans]
type = Trans
;trigger1 = Time = [11,12]
trigger1 = Time = [84,85]
trans = addalpha
alpha = 240,16

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Parent,StateNo = 2000
trigger1 = Time = 1 
value = 2022
elem = -30+Parent,Var(6)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time > 1
value = Anim
elem = AnimElemNo(0)

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 96

;---------------------------------------------------------------------------
; Yagami Style Init
[Statedef 2100]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 2100
velset = 0,0
poweradd = -1000
sprpriority = 0

; = = = = = SUPER PAUSE = = = = =
[State 0, SuperPause]
type = SuperPause
trigger1 = Time = 4
time = 32
anim = -1
sound = S4,1
pos = 0,0
movetime = 32
darken = 0
unhittable = 1
[State 0, Explod Super B]
type = Explod
trigger1 = Time = 4
anim = 8504
ID = 8504
pos = 8,-80
postype = p1
bindtime = 32
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = -3
ownpal = 1
removeongethit = 1
[State 0, Explod Super F]
type = Explod
trigger1 = Time = 4
anim = 8505
ID = 8505
pos = 8,-80
postype = p1
bindtime = 32
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 1
[State 0, PalFX Blackout]
type = BGPalFX
trigger1 = Time = 4
time = 32
add = -256,-256,-256
mul = 0,0,0
color = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [4,36]
flag = noBG
flag2 = noFG
flag3 = globalnoshadow
; = = = = = = = = = = = = = = = =

[State 0, Snd Voice]
type = PlaySnd
trigger1 = Time = 4
value = S2100,0
channel = 0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 5, 2
x = 1.5
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 6
x = 3
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 6, 2
x = 8.5
[State 0, VelSet]
type = VelMul
trigger1 = AnimElemNo(0) > 9
x = 0.85

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = S,HA
hitflag = MAF
guardflag = M
animtype = medium
priority = 5,Hit
damage = Ceil(16*FVar(13)),8
pausetime = 0,1
guard.pausetime = 11,12
sparkno = s8010
guard.sparkno = s8100
sparkxy = -64+Floor(P2Dist X*0.75),-16
hitsound = S1,7
guardsound = S2,1
ground.type = Low
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 14
guard.hittime = 14
air.hittime = 24
;guard.dist = 320
yaccel = 0.5
kill = 0
ground.velocity = -4
guard.velocity = -4
air.velocity = -2.5,-2.5
;getpower = 104,52
givepower = 26,13
p1stateno = 2101
p2stateno = 2110

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 10
movetype = I

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

;---------------------------------------------------------------------------
; YS - Success
[Statedef 2101]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
sprpriority = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Anim != 2101
value = SCA
time = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = !Time
x = 8

[State 0, VarSet AI Chooser]
type = VarSet
trigger1 = !Time
v = 5
value = 0
[State 0, VarSet AI Chooser]
type = VarSet
triggerall = !Time && Var(15)
trigger1 = Power >= 1000
v = 5
value = 10+random%3
[State 0, VarSet AI Chooser]
type = VarSet
triggerall = !Time && Var(15)
trigger1 = Power >= 2000
v = 5
value = 20+random%3

[State 0, Helper]
type = Helper
trigger1 = !Time
name = "LISAUI"
ID = 2198
stateno = 2198
pos = 0,0
postype = back
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State 0, VarRangeSet]
type = VarRangeSet
trigger1 = !Time
value = 0
first = 20
last = 29
[State 0, VarSet]
type = VarSet
trigger1 = !Time
v = 21
value = -2

; = = = = = CONNECT = = = = =
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Var(20) < 2
trigger1 = Time <= 32
trigger1 = Anim = 2100
trigger1 = AnimElemNo(0) >= 9
value = 2100
elem = 9

[State 0, Offset]
type = Offset
triggerall = Var(20) < 2
trigger1 = Time < 32
x = -2+floor(random*0.004)
y = -1+floor(random*0.002)

[State 0, TargetBind]
type = TargetBind
triggerall = Var(20) < 2
trigger1 = Time <= 32
time = 1
pos = 32,0

; = = = = = FAIL STATE = = = = =
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Var(20) = 0
trigger1 = Anim = 2100
trigger1 = AnimElemNo(0) >= 12
trigger2 = Var(24+Var(22)) = 0
trigger2 = Anim = [2130,2135]
trigger2 = AnimTime = 0
value = 2101

[State 0, TargetState]
type = TargetState
triggerall = NumTarget
trigger1 = Anim = 2101
trigger1 = AnimElem = 1,1
value = 2111

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 2101
trigger1 = AnimElem = 1,1
x = -6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Anim = 2101
trigger1 = AnimElem = 1,1
value = S2101,1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Anim = 2101
trigger1 = AnimElem = 1,1
movetype = I
physics = S

; = = = = = REPLAY INPUT = = = = =
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Var(22) < 6
triggerall = Var(24+Var(22)) != 0
trigger1 = Anim = 2100
trigger1 = AnimElemNo(0) >= 10
trigger2 = Anim = [2130,2135]
trigger2 = AnimTime > -8
value = 2129 + Var(24+Var(22))

[State 0, Var Add]
type = VarAdd
trigger1 = Anim = [2130,2135]
trigger1 = AnimElem = 1, 1
v = 22
value = 1

[State 0, VelSet]
type = VelSet
trigger1 = Anim = [2130,2135]
trigger1 = AnimElem = 1, 1
x = 2
[State 0, VelMul]
type = VelMul
trigger1 = Anim = [2130,2135]
x = 0.9 

[State 0, Explod XIII Punch]
type = Explod
trigger1 = Anim = 2130 && AnimElem = 3 ; X 1
trigger2 = Anim = 2130 && AnimElem = 6 ; X 2
trigger3 = Anim = 2134 && AnimElem = 3 ; B 1
trigger4 = Anim = 2134 && AnimElem = 8 ; B 2
trigger5 = Anim = 2133 && AnimElem = 3 ; A 1
trigger6 = Anim = 2133 && AnimElem = 7 ; A 2
anim = 8300
ID = 8300
pos = 24+floor(Random*0.048),-40-floor(Random*0.064)
postype = p1
;facing = ifelse(Random<500,1,-1)
vfacing = ifelse(Random<500,1,-1)
bindtime = 1
removetime = -2
pausemovetime = 99999
supermovetime = 666
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1

[State 0, Explod XIII Slash]
type = Explod
trigger1 = Anim = 2131 && AnimElem = 4 ; Y 1
trigger2 = Anim = 2131 && AnimElem = 9 ; Y 2
trigger3 = Anim = 2132 && AnimElem = 5 ; Z 1
trigger4 = Anim = 2132 && AnimElem = 11 ; Z 2
trigger5 = Anim = 2135 && Time%4 = 0 && AnimElemNo(0) < 16 ; Z
anim = 8305
ID = 8300
pos = 24+floor(Random*0.048),-24-floor(Random*0.064)
postype = p1
facing = ifelse(Random<500,1,-1)
vfacing = ifelse(Random<500,1,-1)
bindtime = 1
removetime = -2
pausemovetime = 99999
supermovetime = 666
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1

[State 0, Explod Spinny]
type = Explod
triggerall = Anim = 2135
trigger1 = AnimElem = 3
trigger2 = AnimElem = 8
trigger3 = AnimElem = 13
anim = 2502
ID = 2502
facing = ifelse(random<500,1,-1)
bindtime = 666
removetime = -2
pausemovetime = 666
supermovetime = 666
scale = 1.2+(Random*0.00025),1;+(Random*0.00025)
sprpriority = 3
shadow = -1
removeongethit = 1

[State 0, Snd Heavy Punch]
type = PlaySnd
trigger1 = Anim = 2130 && AnimElem = 3 ; X 1
trigger2 = Anim = 2130 && AnimElem = 6 ; X 2
trigger3 = Anim = 2134 && AnimElem = 3 ; B 1
trigger4 = Anim = 2134 && AnimElem = 8 ; B 2
trigger5 = Anim = 2133 && AnimElem = 3 ; A 1
trigger6 = Anim = 2133 && AnimElem = 7 ; A 2
value = S1,7
;channel = 3
[State 0, Snd Heavy Slash]
type = PlaySnd
trigger1 = Anim = 2131 && AnimElem = 4 ; Y 1
trigger2 = Anim = 2131 && AnimElem = 9 ; Y 2
trigger3 = Anim = 2132 && AnimElem = 5 ; Z 1
trigger4 = Anim = 2132 && AnimElem = 11 ; Z 2
;trigger5 = Anim = 2135 && Time%4 = 0 && AnimElemNo(0) < 16 ; Z
value = S1,6
;channel = 3

[State 0, HitDef Low Punches]
type = HitDef
trigger1 = Anim = 2130 && AnimElem = 3 ; X 1
trigger2 = Anim = 2130 && AnimElem = 6 ; X 2
trigger3 = Anim = 2134 && AnimElem = 3 ; B 1
attr = S,HA
hitflag = MAF
;guardflag = M
animtype = Back
priority = 9,Hit
damage = Ceil(12*FVar(13)),2
pausetime = 0,4
sparkno = s8010
;guard.sparkno = s8110
sparkxy = -24,-60
hitsound = S2102,0
;guardsound = S2,3 
ground.type = Low
ground.slidetime = 32
ground.hittime = 32
getpower = 0,0
givepower = 24,12
p2stateno = 2112
kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
envshake.time = 4
envshake.freq = 40
envshake.ampl = -6
envshake.phase = 60

[State 0, HitDef High Punches]
type = HitDef
trigger1 = Anim = 2134 && AnimElem = 8 ; B 2
trigger2 = Anim = 2133 && AnimElem = 3 ; A 1
trigger3 = Anim = 2133 && AnimElem = 7 ; A 2
attr = S,HA
hitflag = MAF
;guardflag = M
animtype = Back
priority = 9,Hit
damage = Ceil(12*FVar(13)),2
pausetime = 0,4
sparkno = s8010
;guard.sparkno = s8110
sparkxy = -24,-68
hitsound = S2102,1
;guardsound = S2,3 
ground.type = High
ground.slidetime = 32
ground.hittime = 32
getpower = 0,0
givepower = 24,12
p2stateno = 2112
kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
envshake.time = 4
envshake.freq = 40
envshake.ampl = -8
envshake.phase = 60

[State 0, HitDef Low Claw]
type = HitDef
trigger1 = Anim = 2131 && AnimElem = 4 ; Y 1
attr = S,HA
hitflag = MAF
;guardflag = M
animtype = Back
priority = 9,Hit
damage = Ceil(12*FVar(13)),2
pausetime = 0,4
sparkno = s8010
;guard.sparkno = s8110
sparkxy = -24,-56
hitsound = S2102,2
;guardsound = S2,3 
ground.type = Low
ground.slidetime = 32
ground.hittime = 32
getpower = 0,0
givepower = 24,12
p2stateno = 2112
kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
envshake.time = 4
envshake.freq = 40
envshake.ampl = -6
envshake.phase = 60

[State 0, HitDef High Claw]
type = HitDef
trigger1 = Anim = 2131 && AnimElem = 9 ; Y 2
trigger2 = Anim = 2132 && AnimElem = 5 ; Z 1
trigger3 = Anim = 2132 && AnimElem = 11 ; Z 2
attr = S,HA
hitflag = MAF
;guardflag = M
animtype = Back
priority = 9,Hit
damage = Ceil(12*FVar(13)),2
pausetime = 0,4
sparkno = s8010
;guard.sparkno = s8110
sparkxy = -24,-68
hitsound = S2102,3
;guardsound = S2,3 
ground.type = High
ground.slidetime = 32
ground.hittime = 32
getpower = 0,0
givepower = 24,12
p2stateno = 2112
kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
envshake.time = 4
envshake.freq = 40
envshake.ampl = -8
envshake.phase = 60

[State 0, HitDef Spinny]
type = HitDef
trigger1 = Anim = 2135 && Time%4 = 0 && AnimElemNo(0) < 16 ; Z
attr = S,HA
hitflag = MAF
;guardflag = M
animtype = Back
priority = 9,Hit
damage = Ceil(6*FVar(13)),2
pausetime = 0,4
sparkno = s8010
;guard.sparkno = s8110
sparkxy = -8-random%25,-32-random%33
hitsound = S1,5;S2102,2
;guardsound = S2,3 
ground.type = Low
ground.slidetime = 32
ground.hittime = 32
getpower = 0,0
givepower = 12,6
p2stateno = 2112
kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
envshake.time = 4
envshake.freq = 40
envshake.ampl = -6
envshake.phase = 60

; = = = = = INPUT COMMANDS = = = = =
[State 0, VarAdd Timer]
type = VarAdd
triggerall = Var(20) < 6 || Var(21) < 0
trigger1 = Time > 1
v = 21
value = 1
[State 0, VarSet FailState]
type = VarSet
trigger1 = Anim = 2101
v = 20
value = 666

[State 0, VarSet Input if X]
type = VarSet
triggerall = Var(20) < 6
triggerall = Var(21) >= 0
trigger1 = command = "x" && !Var(15)
trigger2 = Var(15) && !Var(5) && Random < 200 ; AI Random
trigger3 = Var(15) && Var(5) = 10 && Var(20) = 0 ; AI Pillar 1
trigger4 = Var(15) && Var(5) = 10 && Var(20) = 3 ; AI Pillar 4
trigger5 = Var(15) && Var(5) = 21 && Var(20) = 0 ; AI Bulletstorm 1
trigger6 = Var(15) && Var(5) = 21 && Var(20) = 1 ; AI Bulletstorm 2
trigger7 = Var(15) && Var(5) = 22 && Var(20) = 0 ; AI Stellar 1
v = 24+Var(20)
value = 1
[State 0, VarSet Input if Y]
type = VarSet
triggerall = Var(20) < 6
triggerall = Var(21) >= 0
trigger1 = command = "y" && !Var(15)
trigger2 = Var(15) && !Var(5) && Random < 200 ; AI Random
trigger3 = Var(15) && Var(5) = 10 && Var(20) = 1 ; AI Pillar 2
trigger4 = Var(15) && Var(5) = 10 && Var(20) = 4 ; AI Pillar 5
trigger5 = Var(15) && Var(5) = 12 && Var(20) = 1 ; AI AoKuang 2
trigger6 = Var(15) && Var(5) = 12 && Var(20) = 2 ; AI AoKuang 3
trigger7 = Var(15) && Var(5) = 12 && Var(20) = 5 ; AI AoKuang 6
trigger8 = Var(15) && Var(5) = 21 && Var(20) = 2 ; AI Bulletstorm 3
trigger9 = Var(15) && Var(5) = 21 && Var(20) = 3 ; AI Bulletstorm 4
trigger10 = Var(15) && Var(5) = 22 && Var(20) = 2 ; AI Stellar 3
v = 24+Var(20)
value = 2
[State 0, VarSet Input if Z]
type = VarSet
triggerall = Var(20) < 6
triggerall = Var(21) >= 0
trigger1 = command = "z" && !Var(15)
trigger2 = Var(15) && !Var(5) && Random < 200 ; AI Random
trigger3 = Var(15) && Var(5) = 10 && Var(20) = 2 ; AI Pillar 3
trigger4 = Var(15) && Var(5) = 10 && Var(20) = 5 ; AI Pillar 6
trigger5 = Var(15) && Var(5) = 11 && Var(20) <= 2 ; AI StrifeGuy 1 2 3
trigger6 = Var(15) && Var(5) = 21 && Var(20) = 4 ; AI Bulletstorm 5
trigger7 = Var(15) && Var(5) = 21 && Var(20) = 5 ; AI Bulletstorm 6
trigger8 = Var(15) && Var(5) = 22 && Var(20) = 4 ; AI Stellar 5
v = 24+Var(20)
value = 3
[State 0, VarSet Input if A]
type = VarSet
triggerall = Var(20) < 6
triggerall = Var(21) >= 0
trigger1 = command = "a" && !Var(15)
trigger2 = Var(15) && !Var(5) && Random < 200 ; AI Random
trigger3 = Var(15) && Var(5) = 11 && Var(20) = 5 ; AI StrifeGuy 6
trigger4 = Var(15) && Var(5) = 20 && Var(20) = 0 ; AI Katriarch 1
trigger5 = Var(15) && Var(5) = 20 && Var(20) = 2 ; AI Katriarch 3
trigger6 = Var(15) && Var(5) = 20 && Var(20) = 4 ; AI Katriarch 5
trigger7 = Var(15) && Var(5) = 22 && Var(20) = 1 ; AI Stellar 2
v = 24+Var(20)
value = 4
[State 0, VarSet Input if B]
type = VarSet
triggerall = Var(20) < 6
triggerall = Var(21) >= 0
trigger1 = command = "b" && !Var(15)
trigger2 = Var(15) && !Var(5) && Random < 200 ; AI Random
trigger3 = Var(15) && Var(5) = 11 && Var(20) = 4 ; AI StrifeGuy 5
trigger4 = Var(15) && Var(5) = 12 && Var(20) = 0 ; AI AoKuang 1
trigger5 = Var(15) && Var(5) = 12 && Var(20) = 3 ; AI AoKuang 4
trigger6 = Var(15) && Var(5) = 12 && Var(20) = 4 ; AI AoKuang 5
trigger7 = Var(15) && Var(5) = 20 && Var(20) = 1 ; AI Katriarch 2
trigger8 = Var(15) && Var(5) = 20 && Var(20) = 3 ; AI Katriarch 4
trigger9 = Var(15) && Var(5) = 22 && Var(20) = 3 ; AI Stellar 4
v = 24+Var(20)
value = 5
[State 0, VarSet Input if C]
type = VarSet
triggerall = Var(20) < 6
triggerall = Var(21) >= 0
trigger1 = command = "c" && !Var(15)
trigger2 = Var(15) && !Var(5) && Random < 333 ; AI Random
trigger3 = Var(15) && Var(5) = 11 && Var(20) = 3 ; AI StrifeGuy 4
trigger4 = Var(15) && Var(5) = 20 && Var(20) = 5 ; AI Katriarch 6
trigger5 = Var(15) && Var(5) = 22 && Var(20) = 5 ; AI Stellar 6
v = 24+Var(20)
value = 6

[State 0, VarSet Reset Timer]
type = VarSet
triggerall = Var(20) < 6
trigger1 = Var(24+Var(20)) != 0
v = 21
value = -3
[State 0, PlaySnd Confirm]
type = PlaySnd
trigger1 = Var(21) = -3
value = S2101,0
channel = 2+(Var(20)%2)
[State 0, VarAdd Next Input ID]
type = VarAdd
triggerall = Var(20) < 6
trigger1 = Var(21) = -3
v = 20
value = 1

; = = = = = ENDERS = = = = =
[State 0, ChangeState Saki Ender (XYZXYZ)]
type = ChangeState
triggerall = Var(22) >= 6
triggerall = Power >= 1000
triggerall = Anim = [2130,2135]
triggerall = AnimTime > -8
trigger1 = Var(24) = 1 ;X
trigger1 = Var(25) = 2 ;Y
trigger1 = Var(26) = 3 ;Z
trigger1 = Var(27) = 1 ;X
trigger1 = Var(28) = 2 ;Y
trigger1 = Var(29) = 3 ;Z
value = 2000

[State 0, ChangeState AoKuang Ender (BYYBBY)]
type = ChangeState
triggerall = Var(22) >= 6
triggerall = Power >= 2000
triggerall = Anim = [2130,2135]
triggerall = AnimTime > -8
trigger1 = Var(24) = 5 ;B
trigger1 = Var(25) = 2 ;Y
trigger1 = Var(26) = 2 ;Y
trigger1 = Var(27) = 5 ;B
trigger1 = Var(28) = 5 ;B
trigger1 = Var(29) = 2 ;Y
value = 2500

[State 0, ChangeState SpinGirl Ender (XAYBZC)]
type = ChangeState
triggerall = Var(22) >= 6
triggerall = Power >= 1000
triggerall = Anim = [2130,2135]
triggerall = AnimTime > -8
trigger1 = Var(24) = 1 ;X
trigger1 = Var(25) = 4 ;A
trigger1 = Var(26) = 2 ;Y
trigger1 = Var(27) = 5 ;B
trigger1 = Var(28) = 3 ;Z
trigger1 = Var(29) = 6 ;C
value = 2700

[State 0, ChangeState Katriarch Ender (ABABAC)]
type = ChangeState
triggerall = Var(22) >= 6
triggerall = Power >= 2000
triggerall = Anim = [2130,2135]
triggerall = AnimTime > -4
trigger1 = Var(24) = 4 ;A
trigger1 = Var(25) = 5 ;B
trigger1 = Var(26) = 4 ;A
trigger1 = Var(27) = 5 ;B
trigger1 = Var(28) = 4 ;A
trigger1 = Var(29) = 6 ;C
value = 2600

[State 0, ChangeState HolHorse Ender (XXYYZZ)]
type = ChangeState
triggerall = Var(22) >= 6
triggerall = Power >= 2000
triggerall = Anim = [2130,2135]
triggerall = AnimTime > -8
trigger1 = Var(24) = 1 ;X
trigger1 = Var(25) = 1 ;X
trigger1 = Var(26) = 2 ;Y
trigger1 = Var(27) = 2 ;Y
trigger1 = Var(28) = 3 ;Z
trigger1 = Var(29) = 3 ;Z
value = 2300

[State 0, ChangeState StrifeGuy Ender (ZZZCBA)]
type = ChangeState
triggerall = Var(22) >= 6
triggerall = Power >= 1000
triggerall = Anim = [2130,2135]
triggerall = AnimTime > -4
trigger1 = Var(24) = 3 ;Z
trigger1 = Var(25) = 3 ;Z
trigger1 = Var(26) = 3 ;Z
trigger1 = Var(27) = 6 ;C
trigger1 = Var(28) = 5 ;B
trigger1 = Var(29) = 4 ;A
value = 2201

[State 0, ChangeState Punchy Ender 1 (XAXAXA)]
type = ChangeState
triggerall = Var(22) >= 6
triggerall = Power >= 1000
triggerall = Anim = [2130,2135]
triggerall = AnimTime > -4
trigger1 = Var(24) = 1 ;X
trigger1 = Var(25) = 4 ;A
trigger1 = Var(26) = 1 ;X
trigger1 = Var(27) = 4 ;A
trigger1 = Var(28) = 1 ;X
trigger1 = Var(29) = 4 ;A
value = 3000

[State 0, ChangeState Punchy Ender 2 (AXAXAX)]
type = ChangeState
triggerall = Var(22) >= 6
triggerall = Power >= 1000
triggerall = Anim = [2130,2135]
triggerall = AnimTime > -4
trigger1 = Var(24) = 4 ;A
trigger1 = Var(25) = 1 ;X
trigger1 = Var(26) = 4 ;A
trigger1 = Var(27) = 1 ;X
trigger1 = Var(28) = 4 ;A
trigger1 = Var(29) = 1 ;X
value = 3000

[State 0, ChangeState]
type = ChangeState
triggerall = Anim = 2101
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 0, ChangeState]
type = ChangeState
triggerall = Anim != 2101
trigger1 = AnimTime > -4
value = 2140

;---------------------------------------------------------------------------
; YS V - Init
[Statedef 2110]
type = S
movetype = H
physics = N
velset = 0,0

[State 0, PlayerPush]
type = PlayerPush
trigger1 = Time < 16
value = 0
[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time < 16
value = SCA
time = 1

[State 0, Offset]
type = Offset
trigger1 = Time < 16
x = -2+floor(random*0.004)
y = -1+floor(random*0.002)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 5010

[State 0, ChangeState]
type = ChangeState
trigger1 = Time = 96
value = 2111

;---------------------------------------------------------------------------
; YS V - Released
[Statedef 2111]
type = S
movetype = H
physics = S
velset = -4,0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 2101

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

;---------------------------------------------------------------------------
; YS V - HitShake
[Statedef 2112]
type    = S
movetype= H
physics = N
velset = 0,0

[State 0, PalFX]
type = PalFX
trigger1 = Time < 6
time = 1
add = 255-(42*Time),0,0
mul = 255,64+(32*Time),64+(32*Time)
color = 256
ignorehitpause = 1

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((GetHitVar(groundtype) = 1),5001,5011)

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

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

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 2113

;---------------------------------------------------------------------------
; YS V - HitReact
[Statedef 2113]
type    = S
movetype= H
physics = S

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

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = ifelse((GetHitVar(groundtype) = 1),5006,5016)

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

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

[State 5001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

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

;---------------------------------------------------------------------------
; YS - OH PLZ
[Statedef 2140]
type    = S
movetype= A
physics = N
anim = 2140
ctrl = 0
velset = 0,0
sprpriority = 0

[State 0, Width]
type = Width
trigger1 = !Time
edge = 24,0
[State 0, Width]
type = Width
trigger1 = AnimElem = 2 
edge = 48,0

[State 0, TargetBind]
type = TargetBind
trigger1 = !Time
time = 1
pos = 24,0
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElem = 2 
time = 1
pos = 48,0

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
x = 12

[State 0, Snd Swing]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 10
value = S0,3
channel = 1
[State 0, Snd Voice]
type = PlaySnd
trigger1 = AnimElem = 5
trigger2 = AnimElem = 11
trigger3 = AnimElem = 24
value = S2140,Floor(AnimElemNo(0)*0.1)
channel = 0
abspan = 0

[State 0, PalFX]
type = AllPalFX
trigger1 = AnimElem = 5
trigger2 = AnimElem = 11
trigger3 = AnimElem = 24
time = 1
invertall = 1
[State 0, PalFX]
type = AllPalFX
trigger1 = AnimElem = 5,1
trigger2 = AnimElem = 11,1
trigger3 = AnimElem = 24,1
time = 1
color = 0
add = 128,0,32
mul = 256,128,128

[State 0, Explod XIII Slash]
type = Explod
trigger1 = AnimElem = 5
trigger2 = AnimElem = 11
trigger3 = AnimElem = 23
trigger4 = AnimElem = 24
anim = 8305
ID = 8300
pos = 64,-64
postype = p1
facing = ifelse((AnimElem=5||AnimElem=24),1,-1)
bindtime = 1
removetime = -2
pausemovetime = 99999
supermovetime = 666
scale = 0.75,0.75
sprpriority = 9
ontop = 1
ownpal = 1

[State 0, Explod OH PLZ F]
type = Explod
trigger1 = AnimElem = 5, 2
trigger2 = AnimElem = 11, 2
trigger3 = AnimElem = 24, 2
anim = 2141+2*((Floor(GameTime*0.1))%2)
ID = 2140
pos = Floor(Var(30)*0.5),Floor(Var(31)*0.5)
postype = left
facing = 1
bindtime = 666
removetime = 20
pausemovetime = 66666
supermovetime = 66666
scale = 4.5*(1+Floor(AnimElemNo(0)*0.1)),5*(1+Floor(AnimElemNo(0)*0.15))
sprpriority = 9
ontop = 1
ownpal = 1
[State 0, Explod OH PLZ B]
type = Explod
trigger1 = AnimElem = 5, 2
trigger2 = AnimElem = 11, 2
trigger3 = AnimElem = 24, 2
anim = 2142+2*((Floor(GameTime*0.1))%2)
ID = 2140
pos = Floor(Var(30)*0.5),Floor(Var(31)*0.5)
postype = left
facing = 1
bindtime = 666
removetime = 20
pausemovetime = 66666
supermovetime = 66666
scale = 4.5*(1+Floor(AnimElemNo(0)*0.1)),5*(1+Floor(AnimElemNo(0)*0.15))
sprpriority = -9
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 5
trigger2 = AnimElem = 11
trigger3 = AnimElem = 24
time = 6
freq = 80
ampl = -24
phase = 80
[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 5, 6
trigger2 = AnimElem = 11, 6
trigger3 = AnimElem = 24, 6
time = 4
freq = 60
ampl = -12
phase = 60
[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 5, 10
trigger2 = AnimElem = 11, 10
trigger3 = AnimElem = 24, 10
time = 4
freq = 40
ampl = -6
phase = 40

[State 0, HitDef High Claw]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 11
attr = S,HA
hitflag = MAF
animtype = Back
priority = 9,Hit
damage = Ceil((16*FVar(13))),32
pausetime = 0,48
sparkno = s8010
sparkxy = -24,-68
hitsound = S1,6
ground.type = High
ground.slidetime = 32
ground.hittime = 32
getpower = 0,0
givepower = 24,12
p2stateno = 2112
kill = 0
snap = 64,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0

[State 0, HitDef]
type = HitDef
trigger1 = AnimElem = 24
attr = S,HA
hitflag = MAF
guardflag = H
animtype = Diagup
priority = 9,Hit
damage = Ceil(32*FVar(13)),19
pausetime = 4,21
sparkno = s8010
sparkxy = -64+Floor(P2Dist X*0.75),-32+Floor(P2Dist Y*0.5)
hitsound = S1,6
ground.type = High
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 16
guard.hittime = 16
air.hittime = 24
yaccel = 0.4
fall = 1
fall.recover = 0
ground.velocity = -9,-6
getpower = 0,0
givepower = 18,9
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0

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

;---------------------------------------------------------------------------
; YS - HUD
[Statedef 2198]
type    = A
movetype= I
physics = N
anim = 666
ctrl = 0
sprpriority = 9

[State 0, Explod UI BG]
type = Explod
trigger1 = !Time
anim = 2110
ID = 2198
pos = -160,80
postype = back
facing = 1
bindtime = 99999
removetime = 99999
pausemovetime = 99999
supermovetime = 99999
scale = 0.5,0.5
sprpriority = 7
;ontop = 1
ownpal = 1

[State 0, Explod UI Text B]
type = Explod
trigger1 = !Time
anim = 2111
ID = 2199
pos = -120,86 ;40,6
postype = back
facing = ifelse(facing = 1,1,-1)
bindtime = 99999
removetime = 99999
pausemovetime = 99999
supermovetime = 99999
scale = 0.5,0.5
sprpriority = 8
ontop = 1
ownpal = 1

[State 0, Explod UI Text F]
type = Explod
trigger1 = !Time
anim = 2112
ID = 2199
pos = -120,86 ;40,6
postype = back
facing = ifelse(facing = 1,1,-1)
bindtime = 99999
removetime = 99999
pausemovetime = 99999
supermovetime = 99999
scale = 0.5,0.5
sprpriority = 8
ontop = 1
ownpal = 1

[State 0, Explod UI Input 1]
type = Explod
trigger1 = 1
anim = ifelse(Root,Var(24)!=0,2119+Root,Var(24),666)
ID = 2197
pos = ifelse(facing = 1,8,70),94 ;40,6
postype = back
facing = ifelse(facing = 1,1,-1)
bindtime = 99999
pausemovetime = 99999
supermovetime = 99999
removetime = 1
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1
[State 0, Explod UI Input 2]
type = Explod
trigger1 = 1
anim = ifelse(Root,Var(25)!=0,2119+Root,Var(25),666)
ID = 2197
pos = ifelse(facing = 1,20,58),94 ;40,6
postype = back
facing = ifelse(facing = 1,1,-1)
bindtime = 99999
pausemovetime = 99999
supermovetime = 99999
removetime = 1
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1
[State 0, Explod UI Input 3]
type = Explod
trigger1 = 1
anim = ifelse(Root,Var(26)!=0,2119+Root,Var(26),666)
ID = 2197
pos = ifelse(facing = 1,32,46),94 ;40,6
postype = back
facing = ifelse(facing = 1,1,-1)
bindtime = 99999
pausemovetime = 99999
supermovetime = 99999
removetime = 1
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1
[State 0, Explod UI Input 4]
type = Explod
trigger1 = 1
anim = ifelse(Root,Var(27)!=0,2119+Root,Var(27),666)
ID = 2197
pos = ifelse(facing = 1,44,34),94 ;40,6
postype = back
facing = ifelse(facing = 1,1,-1)
bindtime = 99999
pausemovetime = 99999
supermovetime = 99999
removetime = 1
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1
[State 0, Explod UI Input 5]
type = Explod
trigger1 = 1
anim = ifelse(Root,Var(28)!=0,2119+Root,Var(28),666)
ID = 2197
pos = ifelse(facing = 1,56,22),94 ;40,6
postype = back
facing = ifelse(facing = 1,1,-1)
bindtime = 99999
pausemovetime = 99999
supermovetime = 99999
removetime = 1
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1
[State 0, Explod UI Input 6]
type = Explod
trigger1 = 1
anim = ifelse(Root,Var(29)!=0,2119+Root,Var(29),666)
ID = 2197
pos = ifelse(facing = 1,68,10),94 ;40,6
postype = back
facing = ifelse(facing = 1,1,-1)
bindtime = 99999
pausemovetime = 99999
supermovetime = 99999
removetime = 1
scale = 0.5,0.5
sprpriority = 9
ontop = 1
ownpal = 1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = [1,16]
ID = 2198
pos = -160+(Time*10),80
postype = back
facing = ifelse(facing = 1,1,-1)
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = [1,16]
ID = 2199
pos = -120+(Time*10),86
postype = back
facing = ifelse(facing = 1,1,-1)

[State 0, ChangeState]
type = ChangeState
trigger1 = Root,StateNo != [2100,2139]
trigger2 = Root,StateNo = 2101 && Root,Anim = 2101
value = 2199

;---------------------------------------------------------------------------
; YS - HUD END
[Statedef 2199]
type    = A
movetype= I
physics = N
anim = 666
ctrl = 0
sprpriority = 9

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = [0,15]
ID = 2198
pos = -((1+Time)*10),80
postype = back
facing = ifelse(facing = 1,1,-1)
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = Time = [0,15]
ID = 2199
pos = 40-((1+Time)*10),86
postype = back
facing = ifelse(facing = 1,1,-1)

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 16
id = 2198
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 16
id = 2199

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 17

;---------------------------------------------------------------------------
; StrifeGuy A
[Statedef 2200]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 2200
velset = 0,0
poweradd = -1000
sprpriority = 1

[State 0, Helper]
type = Helper
trigger1 = Time = 1
name = "Creepshow"
ID = 2210
stateno = 2210
pos = 0,0
postype = p1
ownpal = 1
supermovetime = 666

[State 0, Snd Voice]
type = PlaySnd
trigger1 = Time = 32
value = S2201,0
channel = 0
[State 0, Snd Static]
type = PlaySnd
trigger1 = !Time
value = S2204,0
channel = 1
;[State 0, StopSnd]
;type = StopSnd
;trigger1 = Time = 32
;channel = 1

[State 0, ReversalDef]
type = ReversalDef
trigger1 = Time < 32
reversal.attr = SCA,NA,SA,HP
sparkno = -1
hitsound = -1
p1stateno = 2201

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

;---------------------------------------------------------------------------
; StrifeGuy S1
[Statedef 2201]
type    = S
movetype= A
physics = N
anim = 666
velset = 0,0
poweradd = ifelse(PrevStateNo = 2101,-1000,0)
sprpriority = 2

; = = = = = SUPER PAUSE = = = = =
[State 0, SuperPause]
type = SuperPause
trigger1 = Time = 0
time = 96
anim = -1
sound = S4,2
pos = 0,0
movetime = 96
darken = 0
unhittable = 1
[State 0, Explod Super B]
type = Explod
trigger1 = Time = 0
anim = 8502
ID = 8502
pos = -12,-80
postype = p1
bindtime = 32
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = -3
ownpal = 1
removeongethit = 1
[State 0, Explod Super F]
type = Explod
trigger1 = Time = 0
anim = 8503
ID = 8503
pos = -12,-80
postype = p1
bindtime = 96
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 1
[State 0, PalFX Blackout]
type = BGPalFX
trigger1 = Time = 0
time = 32
add = -256,-256,-256
mul = 0,0,0
color = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,96]
flag = noBG
flag2 = noFG
flag3 = globalnoshadow
; = = = = = = = = = = = = = = = =

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 0
scale = 1.4,1.4

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
value = 2202

[State 0, PalFX]
type = PalFX
trigger1 = Time <= 15
time = 1
add = 255-(Time*16),255-(Time*16),255-(Time*16)
mul = 256,256,256
[State 0, AllPalFX]
type = AllPalFX
trigger1 = Time = 0
trigger2 = Time = 96
time = 1
add = 255,255,255
mul = 256,256,256
color = 256

[State 0, PlaySnd Exp1]
type = PlaySnd
trigger1 = Time = 95
value = S5,16
channel = 1
abspan = 0
[State 0, PlaySnd Exp2]
type = PlaySnd
trigger1 = Time = 98
value = S5,17
abspan = 0
[State 0, Snd Voice]
type = PlaySnd
trigger1 = Time = 48
value = S2200,0
channel = 0
[State 0, StopSnd]
type = StopSnd
trigger1 = Time = 2
channel = 1

[State 0, Explod StrifeGuy]
type = Explod
trigger1 = Time = 96
anim = 2203
ID = 2203
pos = 0,0
postype = p1
removetime = 88
scale = 1.4,1.4
sprpriority = 2
shadow = -1
[State 0, Explod Exp1]
type = Explod
trigger1 = Time = 97
anim = 2207;817
ID = 2207;817
pos = -4,-72
facing = -1
postype = p1
removetime = -2
sprpriority = 5
scale = 1.5,1.5
ownpal = 1
[State 0, Explod Exp2]
type = Explod
trigger1 = Time = 97
anim = 2208;818
ID = 2208;818
pos = -4,-72
facing = -1
postype = p1
removetime = -2
sprpriority = 5
scale = 1.5,1.5
ownpal = 1
[State 0, Explod Exp2]
type = Explod
trigger1 = Time = 98
anim = 2206
ID = 2206
pos = 160,0
postype = left
bindtime = 666
removetime = -2
scale = 4,4
sprpriority = 9
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 3
name = "The Mask"
ID = 2220
stateno = 2220
pos = -20,-85
postype = p1
ownpal = 1
supermovetime = 666

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = A,HA
hitflag = MAFD
;guardflag = M
animtype = Diagup
priority = 9,Hit
damage = Ceil(164*FVar(13)),33
pausetime = 0,16
sparkno = s8010
guard.sparkno = s8110
sparkxy = -56+Floor(P2Dist X*0.75),-68
hitsound = S1,9
guardsound = S2,1 
ground.type = High
ground.slidetime = 24
ground.hittime = 24
air.hittime = 24
yaccel = 0.4
fall = 1
fall.recover = 0
ground.velocity = -12,-6
guard.velocity = -6
air.velocity = -12,-5.5
getpower = 0,0
givepower = 18,9

[State 0, TargetState]
type = TargetState
triggerall = RoundState > 2
triggerall = MoveHit && !MoveReversed
trigger1 = Time = 99
value = 5850

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

;---------------------------------------------------------------------------
; StrifeGuy S2
[Statedef 2202]
type    = S
movetype= A
physics = N
anim = 666
sprpriority = 2

[State 0, ScreenBound]
type = ScreenBound
trigger1 = Anim != 101
value = 0
movecamera = 0,0
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = Time = [0,24] 
time = 4
freq = 120
ampl = -24+(Time)
phase = 120+(Time%2*120)

[State 0, PosAdd]
type = PosAdd
trigger1 = Time = 0
x = -400

[State 0, Snd Voice]
type = PlaySnd
triggerall = RoundState = 2
trigger1 = Anim != 101
trigger1 = Time = 96
trigger2 = Anim != 101
trigger2 = Anim = 100
trigger2 = BackEdgeDist > 16
value = S2202,0
channel = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 40
value = 100
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 101
trigger1 = Time = 96
trigger2 = Anim != 101
trigger2 = Anim = 100
trigger2 = BackEdgeDist > 16
trigger3 = Anim = 101
trigger3 = Abs(Vel X) > 2
value = 101

[State 0, Snd Skid]
type = PlaySnd
trigger1 = Time%4 = 0
trigger1 = Anim = 101
trigger1 = AnimElemNo(0) = 1
value = S101,1
channel = 1

[State 0, VelSet]
type = VelSet
trigger1 = Anim = 100
x = 24
[State 0, VelMul]
type = VelMul
trigger1 = Anim = 101
x = 0.8

[State 0, ChangeState]
type = ChangeState
trigger1 = Anim = 101 && AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; H - StaticIori F.In
[Statedef 2210]
type    = A
movetype = I
physics = N
velset = 0,0
anim = 666
sprpriority = 2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 1
value = 2204
elem = random%5

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 0
scale = 0.3333,0.3333

[State 0, PalFX]
type = PalFX
trigger1 = Random < 333
time = 1
add = -256+(GameTime%16)*32,-256+(GameTime%16)*32,-256+(GameTime%16)*32
mul = 256,256,256
invertall = (Random < 333)
color = 0

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
pos = -12.75,1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Random < 200
flag = invisible

[State 0, Trans]
type = Trans
trigger1 = Time <= 16
trans = addalpha
alpha = floor((11+(Random%6))*Time),256-floor((11+(Random%6))*Time)
[State 0, Trans]
type = Trans
trigger1 = Time > 16
trans = addalpha
alpha = floor((11+(Random%6))*16),256-floor((11+(Random%6))*16)

[State 0, ChangeState]
type = ChangeState
trigger1 = Root,StateNo = 2201
value = 2211
[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 31
trigger2 = Root,StateNo != 2200

;---------------------------------------------------------------------------
; H - StaticIori F.Out
[Statedef 2211]
type    = A
physics = N
sprpriority = 4

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 0
scale = 0.3333,0.3333

[State 0, PalFX]
type = PalFX
trigger1 = Random < 333
time = 1
add = -256+(GameTime%16)*32,-256+(GameTime%16)*32,-256+(GameTime%16)*32
mul = 256,256,256
invertall = (Random < 333)
color = 0

[State 0, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-floor((11+(Random%6))*Time),floor((11+(Random%6))*Time)

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 17

;---------------------------------------------------------------------------
; H - The Mask
[Statedef 2220]
type    = A
movetype = I
physics = N
velset = -1-(0.01*(Random%500)),2
anim = 666
sprpriority = 3

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time < 48
value = 0
scale = 1.4,1.4
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >= 48
value = 0
scale = 1.4,1.4-((Time-48)*0.0875)

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

[State 0, VelAdd]
type = VelAdd
trigger1 = Time < 17
y = 0.33
[State 0, VelMul]
type = VelMul
trigger1 = 1 
x = 0.875

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

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

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 64

;---------------------------------------------------------------------------
; Bulletstorm
[Statedef 2300]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 2300
velset = 0,0
poweradd = -2000
sprpriority = 0

; = = = = = SUPER PAUSE = = = = =
[State 0, SuperPause]
type = SuperPause
trigger1 = Time = 16
time = 32
anim = -1
sound = S4,1
pos = 0,0
movetime = 32
darken = 0
unhittable = 1
[State 0, Explod Super B]
type = Explod
trigger1 = Time = 16
anim = 8515
ID = 8515
pos = Floor(Var(30)*0.5),Floor(Var(31)*0.5)
postype = left
bindtime = 32
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = -3
scale = 0.00261*Var(30),0.00447*Var(31)
ownpal = 1
removeongethit = 1
[State 0, Explod Super F]
type = Explod
trigger1 = Time = 16
anim = 8516
ID = 8516
pos = -4,-120
postype = p1
bindtime = 32
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 1
[State 0, Helper Super Face]
type = Helper
trigger1 = Time = 20
name = "SuperFace"
ID = 2370
stateno = 2370
pos = -16,Floor(Var(31)*0.5)-64
postype = back
facing = 1
ownpal = 1
supermovetime = 666
pausemovetime = 666
[State 0, PalFX Blackout]
type = BGPalFX
trigger1 = Time = 16
time = 32
add = -256,-256,-256
mul = 0,0,0
color = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [16,48]
flag = noBG
flag2 = noFG
flag3 = globalnoshadow
; = = = = = = = = = = = = = = = =

[State 0, Var HitCount Reset]
type = VarSet
trigger1 = !Time
v = 7
value = 1

[State 0, Snd Voice]
type = PlaySnd
trigger1 = Time = 16
value = S2300,0
channel = 0
[State 0, Snd Fire]
type = PlaySnd
triggerall = Time < 120
trigger1 = Anim = [2301,2308]
trigger1 = Time%5 = 0
trigger2 = Time = 50
value = S2301,0
channel = ifelse(Time%10 <= 4,1,2)

[State 0, Anim ShotFirst]
type = ChangeAnim
trigger1 = Time = 50
value = 2301+Random%5
[State 0, Anim ShotNext]
type = ChangeAnim
triggerall = Time = (50,120)
triggerall = Anim = [2301,2308]
trigger1 = Time%5 = 0
value = 2301+((1+Random%3+(Anim-2301))%8)
[State 0, Anim ShotEnd]
type = ChangeAnim
triggerall = Time >= 120
triggerall = Anim = [2301,2308]
trigger1 = Time%5 = 0
value = 2309

[State 0, Helper Bullet]
type = Helper
trigger1 = Time = 50
name = "FINGA"
ID = 2305
stateno = 2305
pos = 16,-103
postype = p1
ownpal = 1
size.xscale = 0.25
size.yscale = 0.25
[State 0, Helper Bullet]
type = Helper
triggerall = Anim = [2301,2308]
trigger1 = Time%5 = 0
name = "Bulletstorm"
ID = 2310
stateno = 2310
pos = 0,-104
postype = p1
ownpal = 1

[State 0, Explod Burst UL]
type = Explod
triggerall = Anim = 2301
triggerall = Time < 120
trigger1 = Time%5 = 0
anim = 2360
ID = 2360
pos = -2,-130
postype = p1
bindtime = 1
removetime = -2
sprpriority = 4
[State 0, Explod Burst U]
type = Explod
triggerall = Anim = 2302
triggerall = Time < 120
trigger1 = Time%5 = 0
anim = 2360
ID = 2360
pos = 19,-137
postype = p1
bindtime = 1
removetime = -2
sprpriority = 4
[State 0, Explod Burst UR]
type = Explod
triggerall = Anim = 2303
triggerall = Time < 120
trigger1 = Time%5 = 0
anim = 2360
ID = 2360
pos = 38,-122
postype = p1
bindtime = 1
removetime = -2
sprpriority = 4
[State 0, Explod Burst R]
type = Explod
triggerall = Anim = 2304
triggerall = Time < 120
trigger1 = Time%5 = 0
anim = 2360
ID = 2360
pos = 48,-104
postype = p1
bindtime = 1
removetime = -2
sprpriority = 4
[State 0, Explod Burst DR]
type = Explod
triggerall = Anim = 2305
triggerall = Time < 120
trigger1 = Time%5 = 0
anim = 2360
ID = 2360
pos = 40,-84
postype = p1
bindtime = 1
removetime = -2
sprpriority = 4
[State 0, Explod Burst D]
type = Explod
triggerall = Anim = 2306
triggerall = Time < 120
trigger1 = Time%5 = 0
anim = 2360
ID = 2360
pos = 20,-72
postype = p1
bindtime = 1
removetime = -2
sprpriority = 4
[State 0, Explod Burst DL]
type = Explod
triggerall = Anim = 2307
triggerall = Time < 120
trigger1 = Time%5 = 0
anim = 2360
ID = 2360
pos = 0,-79
postype = p1
bindtime = 1
removetime = -2
sprpriority = 4
[State 0, Explod Burst L]
type = Explod
triggerall = Anim = 2308
triggerall = Time < 120
trigger1 = Time%5 = 0
anim = 2360
ID = 2360
pos = -12,-104
postype = p1
bindtime = 1
removetime = -2
sprpriority = 4

[State 0, ChangeState]
type = ChangeState
trigger1 = Anim = 2309 && AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; H - Finger
[Statedef 2305]
type    = A
movetype = A
physics = N
anim = 2310
sprpriority = 3

[State 0, VarSet]
type = VarSet
trigger1 = Parent,Anim = 2301
v = 5
value = 0
[State 0, VarSet]
type = VarSet
trigger1 = Parent,Anim = 2302
v = 5
value = 315
[State 0, VarSet]
type = VarSet
trigger1 = Parent,Anim = 2303
v = 5
value = 270
[State 0, VarSet]
type = VarSet
trigger1 = Parent,Anim = 2304
v = 5
value = 225
[State 0, VarSet]
type = VarSet
trigger1 = Parent,Anim = 2305
v = 5
value = 180
[State 0, VarSet]
type = VarSet
trigger1 = Parent,Anim = 2306
v = 5
value = 135
[State 0, VarSet]
type = VarSet
trigger1 = Parent,Anim = 2307
v = 5
value = 90
[State 0, VarSet]
type = VarSet
trigger1 = Parent,Anim = 2308
v = 5
value = 45

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time%5 = 0 
value = cond((Var(5)=[90,255]),2311,2310)

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = Cond(Time%5=0,Var(5),Var(5)+(AnimTime*4))

[State 0, BindToParent]
type = BindToParent
trigger1 = Parent,Anim = [2301,2308]
;trigger1 = Parent,AnimElemNo(0) = 1
;trigger2 = Parent,AnimElemNo(0) = 3
time = 1
pos = 16,-103

[State 0, BindToParent]
type = BindToParent
trigger1 = Parent,Anim = [2301,2303]
trigger1 = Parent,Time%5 = [2,3]
time = 1
pos = 16,-102
[State 0, BindToParent]
type = BindToParent
trigger1 = Parent,Anim = 2304
trigger1 = Parent,Time%5 = [2,3]
time = 1
pos = 15,-103
[State 0, BindToParent]
type = BindToParent
trigger1 = Parent,Anim = [2305,2307]
trigger1 = Parent,Time%5 = [2,3]
time = 1
pos = 16,-104
[State 0, BindToParent]
type = BindToParent
trigger1 = Parent,Anim = 2308
trigger1 = Parent,Time%5 = [2,3]
time = 1
pos = 17,-103

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Parent,Anim != [2301,2308]
trigger2 = Parent,StateNo != 2300
ignorehitpause = 1 

;---------------------------------------------------------------------------
; H - Bullet Init
[Statedef 2310]
type    = A
movetype = A
physics = N
anim = 2319
sprpriority = 3

[State 0, Var Init Angle 315]
type = VarSet
triggerall = !Time
trigger1 = Parent,Anim = 2301
v = 5
value = 2355+Random%5
[State 0, Var Init Angle 270]
type = VarSet
triggerall = !Time
trigger1 = Parent,Anim = 2302
v = 5
value = 2350+Random%5
[State 0, Var Init Angle 225]
type = VarSet
triggerall = !Time
trigger1 = Parent,Anim = 2303
v = 5
value = 2345+Random%5
[State 0, Var Init Angle 180]
type = VarSet
triggerall = !Time
trigger1 = Parent,Anim = 2304
v = 5
value = 2340+Random%5
[State 0, Var Init Angle 135]
type = VarSet
triggerall = !Time
trigger1 = Parent,Anim = 2305
v = 5
value = 2335+Random%5
[State 0, Var Init Angle 090]
type = VarSet
triggerall = !Time
trigger1 = Parent,Anim = 2306
v = 5
value = 2330+Random%5
[State 0, Var Init Angle 045]
type = VarSet
triggerall = !Time
trigger1 = Parent,Anim = 2307
v = 5
value = 2325+Random%5
[State 0, Var Init Angle 000]
type = VarSet
triggerall = !Time
trigger1 = Parent,Anim = 2308
v = 5
value = 2320+Random%5

[State 0, PosAdd Init Dist 315]
type = PosAdd
triggerall = !Time
trigger1 = Parent,Anim = 2301
x = -4
y = -28
[State 0, PosAdd Init Dist 270]
type = PosAdd
triggerall = !Time
trigger1 = Parent,Anim = 2302
x = 22
y = -38
[State 0, PosAdd Init Dist 225]
type = PosAdd
triggerall = !Time
trigger1 = Parent,Anim = 2303
x = 47
y = -25
[State 0, PosAdd Init Dist 180]
type = PosAdd
triggerall = !Time
trigger1 = Parent,Anim = 2304
x = 58
y = -1
[State 0, PosAdd Init Dist 135]
type = PosAdd
triggerall = !Time
trigger1 = Parent,Anim = 2305
x = 48
y = 28
[State 0, PosAdd Init Dist 090]
type = PosAdd
triggerall = !Time
trigger1 = Parent,Anim = 2306
x = 20
y = 40
[State 0, PosAdd Init Dist 045]
type = PosAdd
triggerall = !Time
trigger1 = Parent,Anim = 2307
x = -10
y = 36
[State 0, PosAdd Init Dist 000]
type = PosAdd
triggerall = !Time
trigger1 = Parent,Anim = 2308
x = -20
y = 0

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 6
value = 0

[State 0, State U]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2320
trigger2 = Var(5) = 2344
trigger3 = Var(5) = 2348
trigger4 = Var(5) = 2352
trigger5 = Var(5) = 2356
value = 2311
[State 0, State UL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2321
trigger2 = Var(5) = 2325
trigger3 = Var(5) = 2349
trigger4 = Var(5) = 2353
trigger5 = Var(5) = 2357
value = 2312
[State 0, State L]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2322
trigger2 = Var(5) = 2326
trigger3 = Var(5) = 2330
trigger4 = Var(5) = 2354
trigger5 = Var(5) = 2358
value = 2313
[State 0, State DL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2323
trigger2 = Var(5) = 2327
trigger3 = Var(5) = 2331
trigger4 = Var(5) = 2335
trigger5 = Var(5) = 2359
value = 2314
[State 0, State D]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2324
trigger2 = Var(5) = 2328
trigger3 = Var(5) = 2332
trigger4 = Var(5) = 2336
trigger5 = Var(5) = 2340
value = 2315
[State 0, State DR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2329
trigger2 = Var(5) = 2333
trigger3 = Var(5) = 2337
trigger4 = Var(5) = 2341
trigger5 = Var(5) = 2345
value = 2316
[State 0, State R]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2334
trigger2 = Var(5) = 2338
trigger3 = Var(5) = 2342
trigger4 = Var(5) = 2346
trigger5 = Var(5) = 2350
value = 2317
[State 0, State UR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2339
trigger2 = Var(5) = 2343
trigger3 = Var(5) = 2347
trigger4 = Var(5) = 2351
trigger5 = Var(5) = 2355 
value = 2318

;---------------------------------------------------------------------------
; H - Bullet U
[Statedef 2311]
type    = A
movetype = A
physics = N
anim = 2319

[State 0, Explod Trail]
type = Explod
trigger1 = !Time
anim = Var(5)
ID = 2315
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
sprpriority = 3

[State 0, PosAdd MoveU]
type = PosAdd
trigger1 = Time = 1
y = -16

[State 0, Var Time]
type = VarAdd
trigger1 = !Time
v = 6
value = ifelse(EnemyNear,StateType=L,10,1)

[State 0, Direction Random 270-XXX]
type = VarSet
trigger1 = !Time
v = 5
value = 2350+Random%5
[State 0, Direction Hone 270-000]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y = [16,48]
v = 5
value = 2350
[State 0, Direction Hone 270-045]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y < 16
v = 5
value = 2351
[State 0, Direction Hone 270-090]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X = [-32,32]
trigger1 = P2Dist Y < 16
v = 5
value = 2352
[State 0, Direction Hone 270-135]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y < 16
v = 5
value = 2353
[State 0, Direction Hone 270-180]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y = [16,48]
v = 5
value = 2354

[State 0, Direction Leave]
type = VarSet
triggerall = Time = 1
trigger1 = Var(6) >= 64
v = 5
value = 2352

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = A,HP
hitflag = MAF
guardflag = M
animtype = Heavy
priority = 9,Hit
damage = Ceil((78*Parent,FVar(13))/Parent,Var(7)),26
pausetime = 0,4+(3*Root,Var(9))
guard.pausetime = 0,4
sparkno = s8010
guard.sparkno = s8110
sparkxy = 0,0
hitsound = S1,7
guardsound = S2,2 
ground.type = High
ground.slidetime = 28
ground.hittime = 28
guard.slidetime = 12
guard.hittime = 12
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.velocity = -4
guard.velocity = -4
air.velocity = -3,-6 
getpower = 0,0
givepower = 24,12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1 && !MoveReversed
v = 7
value = 1

[State 0, PalFX]
type = BGPalFX
trigger1 = MoveHit = 1 && !MoveReversed
time = 1
add = 128,128,128
mul = 256,256,256
invertall = 0
color = 192

[State 0, DestroySelf]
type = DestroySelf
triggerall = Var(6) > 32
trigger1 = FrontEdgeDist < -32
trigger2 = BackEdgeDist < -32
trigger3 = Pos Y < -300
;trigger4 = Var(6) = 64
[State 0, DestroySelf]
type = DestroySelf
trigger1 = Pos Y > 8
trigger2 = MoveContact

[State 0, State U]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2320
trigger2 = Var(5) = 2344
trigger3 = Var(5) = 2348
trigger4 = Var(5) = 2352
trigger5 = Var(5) = 2356
value = 2311
[State 0, State UL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2321
trigger2 = Var(5) = 2325
trigger3 = Var(5) = 2349
trigger4 = Var(5) = 2353
trigger5 = Var(5) = 2357
value = 2312
[State 0, State L]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2322
trigger2 = Var(5) = 2326
trigger3 = Var(5) = 2330
trigger4 = Var(5) = 2354
trigger5 = Var(5) = 2358
value = 2313
[State 0, State DL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2323
trigger2 = Var(5) = 2327
trigger3 = Var(5) = 2331
trigger4 = Var(5) = 2335
trigger5 = Var(5) = 2359
value = 2314
[State 0, State D]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2324
trigger2 = Var(5) = 2328
trigger3 = Var(5) = 2332
trigger4 = Var(5) = 2336
trigger5 = Var(5) = 2340
value = 2315
[State 0, State DR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2329
trigger2 = Var(5) = 2333
trigger3 = Var(5) = 2337
trigger4 = Var(5) = 2341
trigger5 = Var(5) = 2345
value = 2316
[State 0, State R]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2334
trigger2 = Var(5) = 2338
trigger3 = Var(5) = 2342
trigger4 = Var(5) = 2346
trigger5 = Var(5) = 2350
value = 2317
[State 0, State UR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2339
trigger2 = Var(5) = 2343
trigger3 = Var(5) = 2347
trigger4 = Var(5) = 2351
trigger5 = Var(5) = 2355 
value = 2318

;---------------------------------------------------------------------------
; H - Bullet UL
[Statedef 2312]
type    = A
movetype = A
physics = N
anim = 2319

[State 0, Explod Trail]
type = Explod
trigger1 = !Time
anim = Var(5)
ID = 2315
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
sprpriority = 3

[State 0, PosAdd MoveUL]
type = PosAdd
trigger1 = Time = 1
x = -16
y = -16

[State 0, Var Time]
type = VarAdd
trigger1 = !Time
v = 6
value = ifelse(EnemyNear,StateType=L,10,1)

[State 0, Direction Random 315-XXX]
type = VarSet
trigger1 = !Time
v = 5
value = 2355+Random%5
[State 0, Direction Hone 315-045]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y < 16
v = 5
value = 2355
[State 0, Direction Hone 315-090]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X = [-32,32]
trigger1 = P2Dist Y < 16
v = 5
value = 2356
[State 0, Direction Hone 315-135]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y < 16
v = 5
value = 2357
[State 0, Direction Hone 315-180]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y = [16,48]
v = 5
value = 2358
[State 0, Direction Hone 315-225]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y > 48
v = 5
value = 2359

[State 0, Direction AntiGround 1]
type = VarSet
triggerall = Time = 1
;triggerall = Random < 666 ;-;
trigger1 = Var(5) = 2359
trigger1 = Pos Y >= -8
v = 5
value = 2358

[State 0, Direction Leave]
type = VarSet
triggerall = Time = 1
trigger1 = Var(6) >= 64
v = 5
value = 2357

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = A,HP
hitflag = MAF
guardflag = M
animtype = Heavy
priority = 9,Hit
damage = Ceil((78*Parent,FVar(13))/Parent,Var(7)),26
pausetime = 0,4+(3*Root,Var(9))
guard.pausetime = 0,4
sparkno = s8010
guard.sparkno = s8110
sparkxy = 0,0
hitsound = S1,7
guardsound = S2,2 
ground.type = High
ground.slidetime = 28
ground.hittime = 28
guard.slidetime = 12
guard.hittime = 12
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.velocity = -4
guard.velocity = -4
air.velocity = -3,-6 
getpower = 0,0
givepower = 24,12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1 && !MoveReversed
v = 7
value = 1

[State 0, PalFX]
type = BGPalFX
trigger1 = MoveHit = 1 && !MoveReversed
time = 1
add = 128,128,128
mul = 256,256,256
invertall = 0
color = 192

[State 0, DestroySelf]
type = DestroySelf
triggerall = Var(6) > 32
trigger1 = FrontEdgeDist < -32
trigger2 = BackEdgeDist < -32
trigger3 = Pos Y < -300
;trigger4 = Var(6) = 64
[State 0, DestroySelf]
type = DestroySelf
trigger1 = Pos Y > 8
trigger2 = MoveContact

[State 0, State U]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2320
trigger2 = Var(5) = 2344
trigger3 = Var(5) = 2348
trigger4 = Var(5) = 2352
trigger5 = Var(5) = 2356
value = 2311
[State 0, State UL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2321
trigger2 = Var(5) = 2325
trigger3 = Var(5) = 2349
trigger4 = Var(5) = 2353
trigger5 = Var(5) = 2357
value = 2312
[State 0, State L]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2322
trigger2 = Var(5) = 2326
trigger3 = Var(5) = 2330
trigger4 = Var(5) = 2354
trigger5 = Var(5) = 2358
value = 2313
[State 0, State DL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2323
trigger2 = Var(5) = 2327
trigger3 = Var(5) = 2331
trigger4 = Var(5) = 2335
trigger5 = Var(5) = 2359
value = 2314
[State 0, State D]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2324
trigger2 = Var(5) = 2328
trigger3 = Var(5) = 2332
trigger4 = Var(5) = 2336
trigger5 = Var(5) = 2340
value = 2315
[State 0, State DR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2329
trigger2 = Var(5) = 2333
trigger3 = Var(5) = 2337
trigger4 = Var(5) = 2341
trigger5 = Var(5) = 2345
value = 2316
[State 0, State R]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2334
trigger2 = Var(5) = 2338
trigger3 = Var(5) = 2342
trigger4 = Var(5) = 2346
trigger5 = Var(5) = 2350
value = 2317
[State 0, State UR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2339
trigger2 = Var(5) = 2343
trigger3 = Var(5) = 2347
trigger4 = Var(5) = 2351
trigger5 = Var(5) = 2355 
value = 2318

;---------------------------------------------------------------------------
; H - Bullet L
[Statedef 2313]
type    = A
movetype = A
physics = N
anim = 2319

[State 0, Explod Trail]
type = Explod
trigger1 = !Time
anim = Var(5)
ID = 2315
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
sprpriority = 3

[State 0, PosAdd MoveL]
type = PosAdd
trigger1 = Time = 1
x = -16

[State 0, Var Time]
type = VarAdd
trigger1 = !Time
v = 6
value = ifelse(EnemyNear,StateType=L,10,1)

[State 0, Direction Random 000-XXX]
type = VarSet
trigger1 = !Time
v = 5
value = 2320+Random%5
[State 0, Direction Hone 000-090]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X = [-32,32]
trigger1 = P2Dist Y < 16
v = 5
value = 2320
[State 0, Direction Hone 000-135]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y < 16
v = 5
value = 2321
[State 0, Direction Hone 000-180]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y = [16,48]
v = 5
value = 2322
[State 0, Direction Hone 000-225]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y > 48
v = 5
value = 2323
[State 0, Direction Hone 000-270]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X = [-32,32]
trigger1 = P2Dist Y > 48
v = 5
value = 2324

[State 0, Direction AntiGround 1]
type = VarSet
triggerall = Time = 1
;triggerall = Random < 666 ;-;
trigger1 = Var(5) = [2323,2324]
trigger1 = Pos Y >= -8
v = 5
value = 2322

[State 0, Direction Leave]
type = VarSet
triggerall = Time = 1
trigger1 = Var(6) >= 64
v = 5
value = 2322

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = A,HP
hitflag = MAF
guardflag = M
animtype = Heavy
priority = 9,Hit
damage = Ceil((78*Parent,FVar(13))/Parent,Var(7)),26
pausetime = 0,4+(3*Root,Var(9))
guard.pausetime = 0,4
sparkno = s8010
guard.sparkno = s8110
sparkxy = 0,0
hitsound = S1,7
guardsound = S2,2 
ground.type = High
ground.slidetime = 28
ground.hittime = 28
guard.slidetime = 12
guard.hittime = 12
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.velocity = -4
guard.velocity = -4
air.velocity = -3,-6 
getpower = 0,0
givepower = 24,12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1 && !MoveReversed
v = 7
value = 1

[State 0, PalFX]
type = BGPalFX
trigger1 = MoveHit = 1 && !MoveReversed
time = 1
add = 128,128,128
mul = 256,256,256
invertall = 0
color = 192

[State 0, DestroySelf]
type = DestroySelf
triggerall = Var(6) > 32
trigger1 = FrontEdgeDist < -32
trigger2 = BackEdgeDist < -32
trigger3 = Pos Y < -300
;trigger4 = Var(6) = 64
[State 0, DestroySelf]
type = DestroySelf
trigger1 = Pos Y > 8
trigger2 = MoveContact

[State 0, State U]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2320
trigger2 = Var(5) = 2344
trigger3 = Var(5) = 2348
trigger4 = Var(5) = 2352
trigger5 = Var(5) = 2356
value = 2311
[State 0, State UL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2321
trigger2 = Var(5) = 2325
trigger3 = Var(5) = 2349
trigger4 = Var(5) = 2353
trigger5 = Var(5) = 2357
value = 2312
[State 0, State L]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2322
trigger2 = Var(5) = 2326
trigger3 = Var(5) = 2330
trigger4 = Var(5) = 2354
trigger5 = Var(5) = 2358
value = 2313
[State 0, State DL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2323
trigger2 = Var(5) = 2327
trigger3 = Var(5) = 2331
trigger4 = Var(5) = 2335
trigger5 = Var(5) = 2359
value = 2314
[State 0, State D]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2324
trigger2 = Var(5) = 2328
trigger3 = Var(5) = 2332
trigger4 = Var(5) = 2336
trigger5 = Var(5) = 2340
value = 2315
[State 0, State DR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2329
trigger2 = Var(5) = 2333
trigger3 = Var(5) = 2337
trigger4 = Var(5) = 2341
trigger5 = Var(5) = 2345
value = 2316
[State 0, State R]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2334
trigger2 = Var(5) = 2338
trigger3 = Var(5) = 2342
trigger4 = Var(5) = 2346
trigger5 = Var(5) = 2350
value = 2317
[State 0, State UR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2339
trigger2 = Var(5) = 2343
trigger3 = Var(5) = 2347
trigger4 = Var(5) = 2351
trigger5 = Var(5) = 2355 
value = 2318

;---------------------------------------------------------------------------
; H - Bullet DL
[Statedef 2314]
type    = A
movetype = A
physics = N
anim = 2319

[State 0, Explod Trail]
type = Explod
trigger1 = !Time
anim = Var(5)
ID = 2315
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
sprpriority = 3

[State 0, PosAdd MoveDL]
type = PosAdd
trigger1 = Time = 1
x = -16
y = 16

[State 0, Var Time]
type = VarAdd
trigger1 = !Time
v = 6
value = ifelse(EnemyNear,StateType=L,10,1)

[State 0, Direction Random 045-XXX]
type = VarSet
trigger1 = !Time
v = 5
value = 2325+Random%5
[State 0, Direction Hone 045-135]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y < 16
v = 5
value = 2325
[State 0, Direction Hone 045-180]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y = [16,48]
v = 5
value = 2326
[State 0, Direction Hone 045-225]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y > 48
v = 5
value = 2327
[State 0, Direction Hone 045-270]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X = [-32,32]
trigger1 = P2Dist Y > 48
v = 5
value = 2328
[State 0, Direction Hone 045-315]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y > 48
v = 5
value = 2329

[State 0, Direction AntiGround 1]
type = VarSet
triggerall = Time = 1
;triggerall = Random < 666 ;-;
trigger1 = Var(5) = [2327,2329]
trigger1 = Pos Y >= -8
v = 5
value = 2326

[State 0, Direction Leave]
type = VarSet
triggerall = Time = 1
trigger1 = Var(6) >= 64
v = 5
value = 2327

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = A,HP
hitflag = MAF
guardflag = M
animtype = Heavy
priority = 9,Hit
damage = Ceil((78*Parent,FVar(13))/Parent,Var(7)),26
pausetime = 0,4+(3*Root,Var(9))
guard.pausetime = 0,4
sparkno = s8010
guard.sparkno = s8110
sparkxy = 0,0
hitsound = S1,7
guardsound = S2,2 
ground.type = High
ground.slidetime = 28
ground.hittime = 28
guard.slidetime = 12
guard.hittime = 12
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.velocity = -4
guard.velocity = -4
air.velocity = -3,-6 
getpower = 0,0
givepower = 24,12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1 && !MoveReversed
v = 7
value = 1

[State 0, PalFX]
type = BGPalFX
trigger1 = MoveHit = 1 && !MoveReversed
time = 1
add = 128,128,128
mul = 256,256,256
invertall = 0
color = 192

[State 0, DestroySelf]
type = DestroySelf
triggerall = Var(6) > 32
trigger1 = FrontEdgeDist < -32
trigger2 = BackEdgeDist < -32
trigger3 = Pos Y < -300
;trigger4 = Var(6) = 64
[State 0, DestroySelf]
type = DestroySelf
trigger1 = Pos Y > 8
trigger2 = MoveContact

[State 0, State U]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2320
trigger2 = Var(5) = 2344
trigger3 = Var(5) = 2348
trigger4 = Var(5) = 2352
trigger5 = Var(5) = 2356
value = 2311
[State 0, State UL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2321
trigger2 = Var(5) = 2325
trigger3 = Var(5) = 2349
trigger4 = Var(5) = 2353
trigger5 = Var(5) = 2357
value = 2312
[State 0, State L]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2322
trigger2 = Var(5) = 2326
trigger3 = Var(5) = 2330
trigger4 = Var(5) = 2354
trigger5 = Var(5) = 2358
value = 2313
[State 0, State DL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2323
trigger2 = Var(5) = 2327
trigger3 = Var(5) = 2331
trigger4 = Var(5) = 2335
trigger5 = Var(5) = 2359
value = 2314
[State 0, State D]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2324
trigger2 = Var(5) = 2328
trigger3 = Var(5) = 2332
trigger4 = Var(5) = 2336
trigger5 = Var(5) = 2340
value = 2315
[State 0, State DR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2329
trigger2 = Var(5) = 2333
trigger3 = Var(5) = 2337
trigger4 = Var(5) = 2341
trigger5 = Var(5) = 2345
value = 2316
[State 0, State R]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2334
trigger2 = Var(5) = 2338
trigger3 = Var(5) = 2342
trigger4 = Var(5) = 2346
trigger5 = Var(5) = 2350
value = 2317
[State 0, State UR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2339
trigger2 = Var(5) = 2343
trigger3 = Var(5) = 2347
trigger4 = Var(5) = 2351
trigger5 = Var(5) = 2355 
value = 2318

;---------------------------------------------------------------------------
; H - Bullet D
[Statedef 2315]
type    = A
movetype = A
physics = N
anim = 2319

[State 0, Explod Trail]
type = Explod
trigger1 = !Time
anim = Var(5)
ID = 2315
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
sprpriority = 3

[State 0, PosAdd MoveD]
type = PosAdd
trigger1 = Time = 1
y = 16

[State 0, Var Time]
type = VarAdd
trigger1 = !Time
v = 6
value = ifelse(EnemyNear,StateType=L,10,1)

[State 0, Direction Random 090-XXX]
type = VarSet
trigger1 = !Time
v = 5
value = 2330+Random%5
[State 0, Direction Hone 090-180]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y = [16,48]
v = 5
value = 2330
[State 0, Direction Hone 090-225]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y > 48
v = 5
value = 2331
[State 0, Direction Hone 090-270]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X = [-32,32]
trigger1 = P2Dist Y > 48
v = 5
value = 2332
[State 0, Direction Hone 090-315]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y > 48
v = 5
value = 2333
[State 0, Direction Hone 090-000]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y = [16,48]
v = 5
value = 2334

[State 0, Direction AntiGround 1]
type = VarSet
triggerall = Time = 1
;triggerall = Random < 666 ;-;
trigger1 = Var(5) = 2331
trigger1 = Pos Y >= -8
v = 5
value = 2330
[State 0, Direction AntiGround 2]
type = VarSet
triggerall = Time = 1
;triggerall = Random < 666 ;-;
trigger1 = Var(5) = 2333
trigger1 = Pos Y >= -8
v = 5
value = 2334
[State 0, Direction AntiGround 3]
type = VarSet
triggerall = Time = 1
;triggerall = Random < 666 ;-;
trigger1 = Var(5) = 2332
trigger1 = Pos Y >= -8
v = 5
value = ifelse(Random<500,2330,2334)

[State 0, Direction Leave]
type = VarSet
triggerall = Time = 1
trigger1 = Var(6) >= 64
v = 5
value = 2332

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = A,HP
hitflag = MAF
guardflag = M
animtype = Heavy
priority = 9,Hit
damage = Ceil((78*Parent,FVar(13))/Parent,Var(7)),26
pausetime = 0,4+(3*Root,Var(9))
guard.pausetime = 0,4
sparkno = s8010
guard.sparkno = s8110
sparkxy = 0,0
hitsound = S1,7
guardsound = S2,2 
ground.type = High
ground.slidetime = 28
ground.hittime = 28
guard.slidetime = 12
guard.hittime = 12
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.velocity = -4
guard.velocity = -4
air.velocity = -3,-6 
getpower = 0,0
givepower = 24,12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1 && !MoveReversed
v = 7
value = 1

[State 0, PalFX]
type = BGPalFX
trigger1 = MoveHit = 1 && !MoveReversed
time = 1
add = 128,128,128
mul = 256,256,256
invertall = 0
color = 192

[State 0, DestroySelf]
type = DestroySelf
triggerall = Var(6) > 32
trigger1 = FrontEdgeDist < -32
trigger2 = BackEdgeDist < -32
trigger3 = Pos Y < -300
;trigger4 = Var(6) = 64
[State 0, DestroySelf]
type = DestroySelf
trigger1 = Pos Y > 8
trigger2 = MoveContact

[State 0, State U]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2320
trigger2 = Var(5) = 2344
trigger3 = Var(5) = 2348
trigger4 = Var(5) = 2352
trigger5 = Var(5) = 2356
value = 2311
[State 0, State UL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2321
trigger2 = Var(5) = 2325
trigger3 = Var(5) = 2349
trigger4 = Var(5) = 2353
trigger5 = Var(5) = 2357
value = 2312
[State 0, State L]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2322
trigger2 = Var(5) = 2326
trigger3 = Var(5) = 2330
trigger4 = Var(5) = 2354
trigger5 = Var(5) = 2358
value = 2313
[State 0, State DL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2323
trigger2 = Var(5) = 2327
trigger3 = Var(5) = 2331
trigger4 = Var(5) = 2335
trigger5 = Var(5) = 2359
value = 2314
[State 0, State D]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2324
trigger2 = Var(5) = 2328
trigger3 = Var(5) = 2332
trigger4 = Var(5) = 2336
trigger5 = Var(5) = 2340
value = 2315
[State 0, State DR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2329
trigger2 = Var(5) = 2333
trigger3 = Var(5) = 2337
trigger4 = Var(5) = 2341
trigger5 = Var(5) = 2345
value = 2316
[State 0, State R]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2334
trigger2 = Var(5) = 2338
trigger3 = Var(5) = 2342
trigger4 = Var(5) = 2346
trigger5 = Var(5) = 2350
value = 2317
[State 0, State UR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2339
trigger2 = Var(5) = 2343
trigger3 = Var(5) = 2347
trigger4 = Var(5) = 2351
trigger5 = Var(5) = 2355 
value = 2318

;---------------------------------------------------------------------------
; H - Bullet DR
[Statedef 2316]
type    = A
movetype = A
physics = N
anim = 2319

[State 0, Explod Trail]
type = Explod
trigger1 = !Time
anim = Var(5)
ID = 2315
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
sprpriority = 3

[State 0, PosAdd MoveDR]
type = PosAdd
trigger1 = Time = 1
x = 16
y = 16

[State 0, Var Time]
type = VarAdd
trigger1 = !Time
v = 6
value = ifelse(EnemyNear,StateType=L,10,1)

[State 0, Direction Random 135-XXX]
type = VarSet
trigger1 = !Time
v = 5
value = 2335+Random%5
[State 0, Direction Hone 135-225]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y > 48
v = 5
value = 2335
[State 0, Direction Hone 135-270]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X = [-32,32]
trigger1 = P2Dist Y > 48
v = 5
value = 2336
[State 0, Direction Hone 135-315]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y > 48
v = 5
value = 2337
[State 0, Direction Hone 135-000]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y = [16,48]
v = 5
value = 2338
[State 0, Direction Hone 135-045]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y < 16
v = 5
value = 2339

[State 0, Direction AntiGround 1]
type = VarSet
triggerall = Time = 1
;triggerall = Random < 666 ;-;
trigger1 = Var(5) = [2335,2337]
trigger1 = Pos Y >= -8
v = 5
value = 2338

[State 0, Direction Leave]
type = VarSet
triggerall = Time = 1
trigger1 = Var(6) >= 64
v = 5
value = 2337

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = A,HP
hitflag = MAF
guardflag = M
animtype = Heavy
priority = 9,Hit
damage = Ceil((78*Parent,FVar(13))/Parent,Var(7)),26
pausetime = 0,4+(3*Root,Var(9))
guard.pausetime = 0,4
sparkno = s8010
guard.sparkno = s8110
sparkxy = 0,0
hitsound = S1,7
guardsound = S2,2 
ground.type = High
ground.slidetime = 28
ground.hittime = 28
guard.slidetime = 12
guard.hittime = 12
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.velocity = -4
guard.velocity = -4
air.velocity = -3,-6 
getpower = 0,0
givepower = 24,12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1 && !MoveReversed
v = 7
value = 1

[State 0, PalFX]
type = BGPalFX
trigger1 = MoveHit = 1 && !MoveReversed
time = 1
add = 128,128,128
mul = 256,256,256
invertall = 0
color = 192

[State 0, DestroySelf]
type = DestroySelf
triggerall = Var(6) > 32
trigger1 = FrontEdgeDist < -32
trigger2 = BackEdgeDist < -32
trigger3 = Pos Y < -300
;trigger4 = Var(6) = 64
[State 0, DestroySelf]
type = DestroySelf
trigger1 = Pos Y > 8
trigger2 = MoveContact

[State 0, State U]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2320
trigger2 = Var(5) = 2344
trigger3 = Var(5) = 2348
trigger4 = Var(5) = 2352
trigger5 = Var(5) = 2356
value = 2311
[State 0, State UL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2321
trigger2 = Var(5) = 2325
trigger3 = Var(5) = 2349
trigger4 = Var(5) = 2353
trigger5 = Var(5) = 2357
value = 2312
[State 0, State L]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2322
trigger2 = Var(5) = 2326
trigger3 = Var(5) = 2330
trigger4 = Var(5) = 2354
trigger5 = Var(5) = 2358
value = 2313
[State 0, State DL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2323
trigger2 = Var(5) = 2327
trigger3 = Var(5) = 2331
trigger4 = Var(5) = 2335
trigger5 = Var(5) = 2359
value = 2314
[State 0, State D]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2324
trigger2 = Var(5) = 2328
trigger3 = Var(5) = 2332
trigger4 = Var(5) = 2336
trigger5 = Var(5) = 2340
value = 2315
[State 0, State DR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2329
trigger2 = Var(5) = 2333
trigger3 = Var(5) = 2337
trigger4 = Var(5) = 2341
trigger5 = Var(5) = 2345
value = 2316
[State 0, State R]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2334
trigger2 = Var(5) = 2338
trigger3 = Var(5) = 2342
trigger4 = Var(5) = 2346
trigger5 = Var(5) = 2350
value = 2317
[State 0, State UR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2339
trigger2 = Var(5) = 2343
trigger3 = Var(5) = 2347
trigger4 = Var(5) = 2351
trigger5 = Var(5) = 2355 
value = 2318

;---------------------------------------------------------------------------
; H - Bullet R
[Statedef 2317]
type    = A
movetype = A
physics = N
anim = 2319

[State 0, Explod Trail]
type = Explod
trigger1 = !Time
anim = Var(5)
ID = 2315
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
sprpriority = 3

[State 0, PosAdd MoveR]
type = PosAdd
trigger1 = Time = 1
x = 16

[State 0, Var Time]
type = VarAdd
trigger1 = !Time
v = 6
value = ifelse(EnemyNear,StateType=L,10,1)

[State 0, Direction Random 180-XXX]
type = VarSet
trigger1 = !Time
v = 5
value = 2340+Random%5
[State 0, Direction Hone 180-270]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X = [-32,32]
trigger1 = P2Dist Y > 48
v = 5
value = 2340
[State 0, Direction Hone 180-315]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y > 48
v = 5
value = 2341
[State 0, Direction Hone 180-000]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y = [16,48]
v = 5
value = 2342
[State 0, Direction Hone 180-045]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y < 16
v = 5
value = 2343
[State 0, Direction Hone 180-090]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X = [-32,32]
trigger1 = P2Dist Y < 16
v = 5
value = 2344

[State 0, Direction AntiGround 1]
type = VarSet
triggerall = Time = 1
;triggerall = Random < 666 ;-;
trigger1 = Var(5) = [2340,2341]
trigger1 = Pos Y >= -8
v = 5
value = 2342

[State 0, Direction Leave]
type = VarSet
triggerall = Time = 1
trigger1 = Var(6) >= 64
v = 5
value = 2342

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = A,HP
hitflag = MAF
guardflag = M
animtype = Heavy
priority = 9,Hit
damage = Ceil((78*Parent,FVar(13))/Parent,Var(7)),26
pausetime = 0,4+(3*Root,Var(9))
guard.pausetime = 0,4
sparkno = s8010
guard.sparkno = s8110
sparkxy = 0,0
hitsound = S1,7
guardsound = S2,2 
ground.type = High
ground.slidetime = 28
ground.hittime = 28
guard.slidetime = 12
guard.hittime = 12
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.velocity = -4
guard.velocity = -4
air.velocity = -3,-6 
getpower = 0,0
givepower = 24,12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1 && !MoveReversed
v = 7
value = 1

[State 0, PalFX]
type = BGPalFX
trigger1 = MoveHit = 1 && !MoveReversed
time = 1
add = 128,128,128
mul = 256,256,256
invertall = 0
color = 192

[State 0, DestroySelf]
type = DestroySelf
triggerall = Var(6) > 32
trigger1 = FrontEdgeDist < -32
trigger2 = BackEdgeDist < -32
trigger3 = Pos Y < -300
;trigger4 = Var(6) = 64
[State 0, DestroySelf]
type = DestroySelf
trigger1 = Pos Y > 8
trigger2 = MoveContact

[State 0, State U]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2320
trigger2 = Var(5) = 2344
trigger3 = Var(5) = 2348
trigger4 = Var(5) = 2352
trigger5 = Var(5) = 2356
value = 2311
[State 0, State UL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2321
trigger2 = Var(5) = 2325
trigger3 = Var(5) = 2349
trigger4 = Var(5) = 2353
trigger5 = Var(5) = 2357
value = 2312
[State 0, State L]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2322
trigger2 = Var(5) = 2326
trigger3 = Var(5) = 2330
trigger4 = Var(5) = 2354
trigger5 = Var(5) = 2358
value = 2313
[State 0, State DL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2323
trigger2 = Var(5) = 2327
trigger3 = Var(5) = 2331
trigger4 = Var(5) = 2335
trigger5 = Var(5) = 2359
value = 2314
[State 0, State D]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2324
trigger2 = Var(5) = 2328
trigger3 = Var(5) = 2332
trigger4 = Var(5) = 2336
trigger5 = Var(5) = 2340
value = 2315
[State 0, State DR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2329
trigger2 = Var(5) = 2333
trigger3 = Var(5) = 2337
trigger4 = Var(5) = 2341
trigger5 = Var(5) = 2345
value = 2316
[State 0, State R]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2334
trigger2 = Var(5) = 2338
trigger3 = Var(5) = 2342
trigger4 = Var(5) = 2346
trigger5 = Var(5) = 2350
value = 2317
[State 0, State UR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2339
trigger2 = Var(5) = 2343
trigger3 = Var(5) = 2347
trigger4 = Var(5) = 2351
trigger5 = Var(5) = 2355 
value = 2318

;---------------------------------------------------------------------------
; H - Bullet UR
[Statedef 2318]
type    = A
movetype = A
physics = N
anim = 2319

[State 0, Explod Trail]
type = Explod
trigger1 = !Time
anim = Var(5)
ID = 2315
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
sprpriority = 3

[State 0, PosAdd MoveUR]
type = PosAdd
trigger1 = Time = 1
x = 16
y = -16

[State 0, Var Time]
type = VarAdd
trigger1 = !Time
v = 6
value = ifelse(EnemyNear,StateType=L,10,1)

[State 0, Direction Random 225-XXX]
type = VarSet
trigger1 = !Time
v = 5
value = 2345+Random%5
[State 0, Direction Hone 225-315]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y > 48
v = 5
value = 2345
[State 0, Direction Hone 225-000]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y = [16,48]
v = 5
value = 2346
[State 0, Direction Hone 225-045]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X > 32
trigger1 = P2Dist Y < 16
v = 5
value = 2347
[State 0, Direction Hone 225-090]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X = [-32,32]
trigger1 = P2Dist Y < 16
v = 5
value = 2348
[State 0, Direction Hone 225-135]
type = VarSet
triggerall = Time = 1
triggerall = Random < 500 ;;;;
trigger1 = P2Dist X < -32
trigger1 = P2Dist Y < 16
v = 5
value = 2349

[State 0, Direction AntiGround 1]
type = VarSet
triggerall = Time = 1
;triggerall = Random < 666 ;-;
trigger1 = Var(5) = 2345
trigger1 = Pos Y >= -8
v = 5
value = 2346

[State 0, Direction Leave]
type = VarSet
triggerall = Time = 1
trigger1 = Var(6) >= 64
v = 5
value = 2347

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = A,HP
hitflag = MAF
guardflag = M
animtype = Heavy
priority = 9,Hit
damage = Ceil((78*Parent,FVar(13))/Parent,Var(7)),26
pausetime = 0,4+(3*Root,Var(9))
guard.pausetime = 0,4
sparkno = s8010
guard.sparkno = s8110
sparkxy = 0,0
hitsound = S1,7
guardsound = S2,2 
ground.type = High
ground.slidetime = 28
ground.hittime = 28
guard.slidetime = 12
guard.hittime = 12
yaccel = 0.5
air.fall = 1
fall.recover = 0
ground.velocity = -4
guard.velocity = -4
air.velocity = -3,-6 
getpower = 0,0
givepower = 24,12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = MoveHit = 1 && !MoveReversed
v = 7
value = 1

[State 0, PalFX]
type = BGPalFX
trigger1 = MoveHit = 1 && !MoveReversed
time = 1
add = 128,128,128
mul = 256,256,256
invertall = 0
color = 192

[State 0, DestroySelf]
type = DestroySelf
triggerall = Var(6) > 32
trigger1 = FrontEdgeDist < -32
trigger2 = BackEdgeDist < -32
trigger3 = Pos Y < -300
;trigger4 = Var(6) = 64
[State 0, DestroySelf]
type = DestroySelf
trigger1 = Pos Y > 8
trigger2 = MoveContact

[State 0, State U]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2320
trigger2 = Var(5) = 2344
trigger3 = Var(5) = 2348
trigger4 = Var(5) = 2352
trigger5 = Var(5) = 2356
value = 2311
[State 0, State UL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2321
trigger2 = Var(5) = 2325
trigger3 = Var(5) = 2349
trigger4 = Var(5) = 2353
trigger5 = Var(5) = 2357
value = 2312
[State 0, State L]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2322
trigger2 = Var(5) = 2326
trigger3 = Var(5) = 2330
trigger4 = Var(5) = 2354
trigger5 = Var(5) = 2358
value = 2313
[State 0, State DL]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2323
trigger2 = Var(5) = 2327
trigger3 = Var(5) = 2331
trigger4 = Var(5) = 2335
trigger5 = Var(5) = 2359
value = 2314
[State 0, State D]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2324
trigger2 = Var(5) = 2328
trigger3 = Var(5) = 2332
trigger4 = Var(5) = 2336
trigger5 = Var(5) = 2340
value = 2315
[State 0, State DR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2329
trigger2 = Var(5) = 2333
trigger3 = Var(5) = 2337
trigger4 = Var(5) = 2341
trigger5 = Var(5) = 2345
value = 2316
[State 0, State R]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2334
trigger2 = Var(5) = 2338
trigger3 = Var(5) = 2342
trigger4 = Var(5) = 2346
trigger5 = Var(5) = 2350
value = 2317
[State 0, State UR]
type = ChangeState
triggerall = Time = 1
trigger1 = Var(5) = 2339
trigger2 = Var(5) = 2343
trigger3 = Var(5) = 2347
trigger4 = Var(5) = 2351
trigger5 = Var(5) = 2355 
value = 2318

;---------------------------------------------------------------------------
; H - SuperFace
[Statedef 2370]
type    = A
movetype = I
physics = N
anim = 2370+random%2
sprpriority = -2

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time < 16
scale = 0.25+(Time*0.12),0.25+(Time*0.12)
[State 0, AngleDraw]
type = AngleDraw
trigger1 = Time >= 16
scale = 2,2

[State 0, Offset]
type = Offset
trigger1 = Time > 0
x = -12+random%25
y = -12+random%25

[State 0, PosAdd]
type = PosAdd
trigger1 = Time < 16
x = -3
y = 7

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 26

;---------------------------------------------------------------------------
; whos the hand
[Statedef 2400]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 2400
velset = 0,0
poweradd = -1000
sprpriority = 2

; = = = = = SUPER PAUSE = = = = =
[State 0, SuperPause]
type = SuperPause
trigger1 = Time = 4
time = 64
anim = -1
sound = S4,3
pos = 0,0
movetime = 64
darken = 0
unhittable = 1
[State 0, Explod Super R]
type = Explod
trigger1 = Time = 2
anim = 8506
ID = 8506
pos = 0,-76
postype = p1
bindtime = 68
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 1
[State 0, Explod Super G]
type = Explod
trigger1 = Time = 2
anim = 8507
ID = 8507
pos = 0,-76
postype = p1
bindtime = 68
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 1
[State 0, Explod Super B]
type = Explod
trigger1 = Time = 2
anim = 8508
ID = 8508
pos = 0,-76
postype = p1
bindtime = 68
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 1
[State 0, PalFX Blackout]
type = BGPalFX
trigger1 = Time = 4
time = 64
add = -32,-32,-32
mul = 256,256,256
color = 128
; = = = = = = = = = = = = = = = =

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = Anim = 2400
trigger1 = Time >= 73
value = -60+Time*-40
ignorehitpause = 1
;[State 0, AngleAdd]
;type = AngleAdd
;trigger1 = Anim = 2400
;trigger1 = Time >= 41
;value = -60

[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 6
value = 310
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 7
value = 260
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 8
value = 220
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 9
value = 180
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 10
value = 150
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 11
value = 120
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 12
value = 100
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 13
value = 80
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 14
value = 65
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 15
value = 50
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 16
value = 40
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 17
value = 30
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 18
value = 25
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 19
value = 20
ignorehitpause = 1
[State 0, AngleDraw]
type = AngleDraw
triggerall = Anim = 620
trigger1 = AnimElemNo(0) = 20
value = 15
ignorehitpause = 1
[State 0, AngleSet]
type = AngleSet
trigger1 = Anim != 620 && Anim != 2400
trigger2 = Pos Y + Vel Y >= 0
trigger3 = Time = 0
value = 0
ignorehitpause = 1

[State 0, Offset]
type = Offset
trigger1 = Anim = 2400
trigger1 = AnimElemNo(0) >= 6
trigger2 = Anim = 620
trigger2 = AnimElemNo(0) >= 5
y = -70
ignorehitpause = 1

[State 0, Helper]
type = Helper
trigger1 = Time = 128
name = "AfterIori"
ID = 621
stateno = 621
pos = 0,0
postype = p1
ownpal = 1
[State 0, Helper]
type = Helper
trigger1 = Time = 72
name = "SpinImage"
ID = 2401
stateno = 2401
pos = 0,0
postype = p1
ownpal = 1

[State 200, 1]
type = PlaySnd
triggerall = Anim = 2400
trigger1 = Time >= 68
trigger1 = Time%6 = 0
value = S0, 4
channel = ifelse(Time%12<6,1,2)

[State 0, HitDef]
type = HitDef
trigger1 = Time >= 72
trigger1 = Time%3 = 0
attr = A,HA
hitflag = MAF
guardflag = M
animtype = Heavy
priority = 6,Hit
damage = Ceil((60*FVar(13))/Var(7)),12
pausetime = 1,1
sparkno = s8005
guard.sparkno = s8105
sparkxy = 0,-64+Floor(P2Dist Y*0.5);-48+Floor(P2Dist X*0.75)
hitsound = S1,3
guardsound = S2,0 
ground.type = High
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 12
guard.hittime = 12
air.hittime = 24
yaccel = 0.4
air.fall = 1
fall.recover = 0
ground.velocity = ifelse(P2Dist X <= 0,-10-(0.01*Random),10+(0.01*Random)),-16
guard.velocity = -2
air.velocity = ifelse(P2Dist X <= 0,-10-(0.01*Random),10+(0.01*Random)),ifelse(P2Dist Y + 20 >= 0,-10-(0.005*Random),6+(0.005*Random))
getpower = 0,0
p2facing = 1
;givepower = 32,16

[State 0, HitDef]
type = HitDef
trigger1 = Time = 127
attr = A,HA
hitflag = MAF
guardflag = M
animtype = Heavy
priority = 6,Hit
damage = Ceil((78*FVar(13))/Var(7)),16
pausetime = 4,4
sparkno = s8010
guard.sparkno = s8105
sparkxy = 0,-64+Floor(P2Dist Y*0.5);-48+Floor(P2Dist X*0.75)
hitsound = S1,4
guardsound = S2,0 
ground.type = High
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 12
guard.hittime = 12
air.hittime = 24
yaccel = 0.6
air.fall = 1
fall.recover = 0
ground.velocity = ifelse(P2Dist X <= 0,-10-(0.01*Random),10+(0.01*Random)),-4
guard.velocity = -2
air.velocity = ifelse(P2Dist X <= 0,-10-(0.01*Random),10+(0.01*Random)),-4
getpower = 0,0

[State 0, VarSet HitCount]
type = VarSet
trigger1 = Time = 0
v = 7
value = 1
[State 0, VarAdd HitCount]
type = VarAdd
trigger1 = MoveHit = 1
v = 7
value = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Time = 128
movetype = I
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Time = 136
physics = A

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 128
value = 620
elem = 5
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 620
trigger1 = AnimTime = 0
value = 41
elem = 6

;---------------------------------------------------------------------------
; H - SpinImage
[Statedef 2401]
type    = A
movetype = I
physics = N
ctrl = 0
velset = 0,0
sprpriority = 3
anim = 666

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Parent,Time%3 != 2
trigger2 = Parent,MoveContact = 1 
flag = invisible

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 1
pos = 0,-70

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 0+Parent,Time*-40
scale = 0.5,0.5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Parent,Time = 128
trigger2 = Parent,StateNo != 2400 
trigger3 = Parent,Anim != 2400
ignorehitpause = 1

;---------------------------------------------------------------------------
; A MIGHTY STORM
[Statedef 2500]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 2500
velset = 0,0
poweradd = -2000
sprpriority = 0

; = = = = = SUPER PAUSE = = = = =
[State 0, SuperPause]
type = SuperPause
trigger1 = Time = 12
time = 44
anim = -1
sound = S4,4
pos = 0,0
movetime = 44
darken = 0
unhittable = 1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 10
value = S4,5
abspan = 0
[State 0, Explod Super B1]
type = Explod
trigger1 = Time = 12
anim = 8509
ID = 8509
pos = ceil(var(30)*0.5),ceil(var(31)*0.5)
postype = left
bindtime = 44
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = -3
scale = (0.003125*Var(30))*1.2,(0.004167*Var(31))*1.0715
ownpal = 1
removeongethit = 1
[State 0, Explod Super B2]
type = Explod
triggerall = Time >= 57
triggerall = Anim != 2503
trigger1 = Time%24 = 9
anim = 8510
ID = 8510
pos = ceil(var(30)*0.5),ceil(var(31)*0.5)
postype = left
bindtime = 44
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = -3
scale = (0.003125*Var(30))*0.75,(0.004167*Var(31))*0.75
ownpal = 1
removeongethit = 1
[State 0, Explod Super F]
type = Explod
trigger1 = Time = 30
anim = 8511
ID = 8511
pos = -6,-64
postype = p1
bindtime = 44
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 3
ontop = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 1
[State 0, Explod Super Face]
type = Explod
trigger1 = Time = 15
anim = 6260+random%2
ID = 6260
pos = 0,0
postype = back
bindtime = 44
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = -2
scale = Var(31)*0.0044643,Var(31)*0.0044643
ownpal = 1
removeongethit = 1
ignorehitpause = 1
[State 0, PalFX Blackout]
type = BGPalFX
trigger1 = Time = 12
time = 44
add = -256,-256,-256
mul = 0,0,0
color = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [12,64]
trigger2 = Anim = 2501
flag = noBG
flag2 = noFG
flag3 = globalnoshadow
; = = = = = = = = = = = = = = =

[State 0, ScreenBound]
type = ScreenBound
trigger1 = Anim = 2501
value = 1
movecamera = 0,0
[State 0, PlayerPush]
type = PlayerPush
triggerall = !MoveContact
trigger1 = Anim = 2501
value = 0

[State 0, VarSet]
type = VarSet
trigger1 = !Time
v = 5
value = 0

[State 0, Helper]
type = Helper
trigger1 = Anim = 2501
trigger1 = AnimElem = 2,1
name = "TORNADE"
ID = 2510
stateno = 2510
pos = 0,0
postype = p1

[State 0, Snd Voice 1]
type = PlaySnd
trigger1 = Time = 13
value = S2500,0
channel = 0
[State 0, Snd Voice 2]
type = PlaySnd
trigger1 = Time = 60
value = S2500,1
channel = 0
[State 0, Snd Voice 3]
type = PlaySnd
trigger1 = Anim = 2503
trigger1 = AnimElem = 1, 1
trigger1 = Var(5) = 2
value = S5000,0
channel = 0
[State 0, Snd Spin]
type = PlaySnd
trigger1 = Anim = 2501 && Time >= 60
trigger1 = Time%3 = 0
value = S0,2
channel = 1+(Time%6 >= 3)
[State 0, Snd Enemy Hits Wall]
type = PlaySnd
trigger1 = Enemy,StateNo = 2522
trigger1 = Enemy,Anim = 2520
trigger1 = Enemy,Time = 1
value = S1,4
channel = 3

[State 0, ChangeAnim Spinny]
type = ChangeAnim
trigger1 = Time = 57
value = 2501
[State 0, ChangeAnim Land]
type = ChangeAnim
triggerall = Anim = 2501
trigger1 = Time = 192
trigger2 = Time = 120
trigger2 = Var(5) = 0
trigger3 = Var(5) = 2
value = 2503

[State 0, Turn]
type = Turn
triggerall = P2Dist X < 0
trigger1 = Anim = 2503
trigger1 = AnimElem = 1

[State 0, Explod Spinny]
type = Explod
triggerall = Time >= 62
trigger1 = Anim = 2501
trigger1 = Time%4 = 0
anim = 2502
ID = 2502
facing = ifelse(random<500,1,-1)
bindtime = 666
removetime = -2
pausemovetime = 666
scale = 1.1+(Random*0.0005),1;+(Random*0.00025)
sprpriority = 3
shadow = -1
removeongethit = 1
[State 0, Explod Start Dust1]
type = Explod
triggerall = Anim = 2501
trigger1 = AnimElem = 1,1
anim = 8255
ID = 8255
facing = 1
pos = 0,2
postype = p1
removetime = -2
scale = 1,1
sprpriority = 0
ownpal = 1
[State 0, Explod Start Dust2]
type = Explod
triggerall = Anim = 2501
trigger1 = AnimElem = 1,1
anim = 8255
ID = 8255
facing = -1
pos = 0,2
postype = p1
removetime = -2
scale = 1,1
sprpriority = 0
ownpal = 1
[State 0, Explod WallHit]
type = Explod
trigger1 = Enemy,StateNo = 2522
trigger1 = Enemy,Anim = 2520
trigger1 = Enemy,Time = 1
anim = 8010
ID = 8010
pos = 0,-64
postype = p2
bindtime = 4
removetime = -2
scale = 1.5,1.5
sprpriority = 9
ownpal = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Anim = 2503
trigger1 = AnimElem = 1, 1
trigger1 = Var(5) = 2
id = 8510

[State 0, VelSet Init]
type = VelSet
trigger1 = Anim = 2501
trigger1 = AnimElem = 2,1
x = 8;ifelse(P2Dist X * 0.05 < 8,8,P2Dist X * 0.05)
[State 0, VelSet Bounce]
type = VelSet
trigger1 = BackEdgeDist <= 8 && Vel X < 0
trigger2 = FrontEdgeDist <= 8 && Vel X > 0
x = Vel X * -1.01
[State 0, VelMul]
type = VelMul
trigger1 = StateType = A
x = ifelse(Var(5)=0||Abs(Vel X) > 8,0.96,1.02)
[State 0, VelMul]
type = VelMul
trigger1 = Anim = 2503
x = 0.75
[State 0, VelMul]
type = TargetVelSet
triggerall = NumTarget
trigger1 = Enemy,StateNo = 2522
trigger1 = Enemy,Anim = 2520
trigger1 = Anim != 2501
x = enemy,Vel X *0.05

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Anim = 2501
trigger1 = AnimElemNo(0) >= 3
value = ,NP,SP,HP
time = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = Time = 57
statetype = A
movetype = A
physics = N
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = StateType = A
trigger1 = Anim = 2503
statetype = S
movetype = I
physics = S

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

;---------------------------------------------------------------------------
; H - STORM
[Statedef 2510]
type    = A
movetype = A
physics = N
anim = 2510
sprpriority = 3

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
[State 0, VarSet]
type = VarSet
trigger1 = Var(7) = 0
v = 7
value = 1

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = Root,Pos X
y = 0

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

[State 0, Explod]
type = Explod
trigger1 = NumExplod(2511) <= 0
anim = 2511
ID = 2511
pos = 0,0
postype = p1
bindtime = 66666
removetime = 66666
scale = 1,1
sprpriority = 9
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = NumExplod(2512) <= 0
anim = 2512
ID = 2512
pos = 0,0
postype = p1
bindtime = 66666
removetime = 66666
scale = 1.1,1
sprpriority = 0
ownpal = 1
removeongethit = 1

[State 0, HitDef]
type = HitDef
triggerall = !MoveReversed && !(MoveGuarded && !MoveHit)
trigger1 = Time%10 = 0
trigger2 = Time%10 = 4
attr = A,HP
hitflag = MAF
guardflag = M
animtype = Up
priority = 9,Hit
damage = Ceil((84*Parent,FVar(13))/Var(7)),10
pausetime = 0,2
guard.pausetime = 0,4
sparkno = s8010
guard.sparkno = s8110
sparkxy = 0,-68
hitsound = S1,3
guardsound = S2,3 
ground.type = High
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 12
guard.hittime = 12
air.hittime = 24
yaccel = 0.5
fall = 1
fall.recover = 0
getpower = 0,0
givepower = 24,12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0

[State 0, TargetState]
type = TargetState
triggerall = NumTarget
trigger1 = MoveHit = 1
value = 2520

[State 0, VarSet]
type = VarAdd
trigger1 = MoveHit = 1
v = 7
value = 1
[State 0, VarSet]
type = ParentVarSet
trigger1 = MoveHit && Root,Var(5) = 0
v = 5
value = 1
[State 0, VarSet]
type = ParentVarSet
trigger1 = MoveGuarded && Root,Var(5) = 0
v = 5
value = 2

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Root,StateNo != 2500
trigger2 = Root,StateType != A && Root,Time > 64
id = 2511
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Root,StateNo != 2500
trigger2 = Root,StateType != A && Root,Time > 64
id = 2512

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Root,StateNo != 2500
trigger2 = Root,StateType != A && Root,Time > 64

;---------------------------------------------------------------------------
; V - Thrown HitShake
[Statedef 2520]
type = A
movetype = H
physics = N
velset = 0,0

[State 0, EnvShake]
type = EnvShake
trigger1 = !Time
time = 4
freq = 90
ampl = -4
phase = 90

[State 0, Turn]
type = Turn
trigger1 = !Time
trigger1 = P2Dist X < 0

[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = !Time
value = 5011

[State 0, Offset]
type = Offset
trigger1 = 1
x = -2+(random*0.004)
y = -2+(random*0.004)

[State 0, ChangeState]
type = ChangeState
trigger1 = HitShakeOver
value = 2521

;---------------------------------------------------------------------------
; V - Thrown
[Statedef 2521]
type = A
movetype = H
physics = N

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

[State 0, ChangeAnim2]
type = ChangeAnim
trigger1 = !Time
value = 5030

[State 5011, 1]
type = VelSet
trigger1 = Time = 0 && PrevStateNo = 2520
x = 12+(Random*0.012)
y = -4-(0.05*Pos Y)
[State 0, VelAdd Gravity]
type = VelAdd
trigger1 = 1
y = 0.3

[State 0, VelMul]
type = VelMul
trigger1 = Pos Y + Vel Y >= 0
x = 0.1

[State 0, ChangeState]
type = ChangeState
triggerall = Time > 4
trigger1 = BackEdgeDist + Vel X < 0
trigger2 = FrontEdgeDist - Vel X < 0
value = 2522
[State 0, SelfState]
type = SelfState
trigger1 = Pos Y + Vel Y >= 0
value = 5100

;---------------------------------------------------------------------------
; V - Thrown WallHit
[Statedef 2522]
type = A
movetype = H
physics = N

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

[State 0, EnvShake]
type = EnvShake
trigger1 = !Time
time = 6
freq = 90
ampl = -6
phase = 90

[State 0, PosSet]
type = PosSet
trigger1 = 1
x = Pos X * 1000

[State 0, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1

[State 0, Turn]
type = Turn
trigger1 = !Time
trigger1 = P2Dist X < 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 2520

[State 0, Offset]
type = Offset
trigger1 = 1
x = -2+(random*0.004)
y = -2+(random*0.004)

[State 5011, 1]
type = VelSet
trigger1 = Time = 8
x = Vel X * -1.1

[State 0, ChangeState]
type = ChangeState
trigger1 = Time = 8
value = 2521

;---------------------------------------------------------------------------
; Katriarch
[Statedef 2600]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 2600
velset = 0,0
poweradd = -2000
sprpriority = 0

; = = = = = SUPER PAUSE = = = = =
[State 0, SuperPause]
type = SuperPause
trigger1 = Time = 0
time = 51
anim = -1
sound = S4,6
pos = 0,0
movetime = 51
darken = 0
unhittable = 1
[State 0, Explod Super F1]
type = Explod
trigger1 = Time = 0
anim = 8512
ID = 8512
pos = -24,-68
postype = p1
bindtime = 1
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 1
[State 0, Explod Super F2]
type = Explod
trigger1 = Time = 33
anim = 8513
ID = 8513
pos = Ceil(Var(30)*0.5),128
postype = back
bindtime = 1
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 1
[State 0, Explod Super F3]
type = Explod
trigger1 = Time = 45
anim = 8514
ID = 8514
pos = 0,-152
postype = p1
bindtime = 1
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 1
[State 0, PalFX Flash]
type = PalFX
trigger1 = Time = 34
trigger2 = Time = 37
time = 1
add = 192,128,256
mul = 384,384,512
color = 128
[State 0, PalFX Blackout]
type = BGPalFX
trigger1 = Time = 0
time = 51
mul = 160,160,160
color = 224
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,51]
flag = globalnoshadow
; = = = = = = = = = = = = = = = =

[State 0, PlaySnd Voice]
type = PlaySnd
trigger1 = Time = 0
value = S2600,0
channel = 0
[State 0, PlaySnd Swing]
type = PlaySnd
trigger1 = AnimElem = 8
value = S0,4
channel = 1
[State 0, PlaySnd Gong]
type = PlaySnd
trigger1 = Var(8) = 1 && MoveHit && !MoveReversed
value = S1,8

[State 0, AfterImage]
type = AfterImage
trigger1 = !Time
time = 2
length = 12
palcolor = 0
palbright = 64,64,96
palcontrast = 192,192,384
palpostbright = 32,32,48
paladd = 0,0,0
palmul = .8,.8,.85
timegap = 2
framegap = 3
ignorehitpause = 1
[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = Time < 64
time = 2
ignorehitpause = 1

[State 0, Explod Blur]
type = Explod
trigger1 = AnimElem = 9
anim = 2601
ID = 2601
pos = 0,0
postype = p1
bindtime = 999
removetime = -2
sprpriority = 4
removeongethit = 1
[State 0, Explod Blur]
type = Explod
trigger1 = AnimElem = 9
anim = 2602
ID = 2602
pos = 0,0
postype = p1
bindtime = 999
removetime = -2
sprpriority = 4
removeongethit = 1
[State 0, Explod GroundHit]
type = Explod
triggerall = MoveHit && !MoveReversed
trigger1 = Var(8) = 1
anim = 8215
ID = 8215
pos = 80,0
postype = p1
removetime = -2
sprpriority = -4
ownpal = 1
ignorehitpause = 1
[State 0, Explod GroundHit]
type = Explod
triggerall = MoveHit && !MoveReversed
trigger1 = Var(8) = 1
anim = 8210
ID = 8210
pos = 80,0
postype = p1
removetime = -2
sprpriority = 4
ownpal = 1
ignorehitpause = 1

[State 0, NotHitBy]
type = NotHitBy
trigger1 = Time <= 51
value = ,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 4

[State 0, VelSet]
type = VelSet
trigger1 = AnimElemNo(0) = [8,9]
x = 12
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 10
x = 3

[State 0, HitDef]
type = HitDef
trigger1 = !MoveContact && !MoveReversed
attr = S,HA
hitflag = MAF
guardflag = H
animtype = Heavy
priority = 9,Hit
damage = Ceil(320*FVar(13)),64
pausetime = 20,21
guard.pausetime = 15,16
sparkno = s8010
guard.sparkno = s8110
sparkxy = -64+Floor(P2Dist X*0.75),-32+Floor(P2Dist Y*0.5)
hitsound = S1,9
guardsound = S2,1
ground.type = High
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 16
guard.hittime = 16
air.hittime = 24
yaccel = 0.7
fall = 1
fall.recover = 0
snap = 80,0
ground.velocity = -9,40
guard.velocity = -6
air.velocity = -9,40
getpower = 0,0
givepower = 18,9
p2stateno = 2610
p2facing = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time < 96
trigger1 = MoveHit && !MoveReversed
trigger1 = AnimElemNo(0) = 16
value = anim
elem = 16

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

;---------------------------------------------------------------------------
; V - Katriarch
[Statedef 2610]
type    = A
movetype= H ;Get hit
physics = N
velset = 0,0

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
[State 0, AngleSet]
type = AngleSet
trigger1 = !time 
value = 0
[State 0, AngleAdd]
type = AngleAdd
trigger1 = HitShakeOver
value = 40

[State 942, 0]
type = PlaySnd
Trigger1 = Time = 0
value = F5, 4

[State 942, 4]
type = EnvShake
Trigger1 = Time = 0
time = 8
ampl = -12
freq = 90
phase = 90
[State 942, 4]
type = EnvShake
Trigger1 = Time = 8
time = 4
ampl = -6
freq = 60
phase = 60
[State 942, 4]
type = EnvShake
Trigger1 = Time = 12
time = 2
ampl = -3
freq = 30
phase = 30

[State 5100, 8]
type = Explod
trigger1 = Time = 1
anim = F(60 + (sysvar(1) > Const720p(20)) + (sysvar(1) > Const720p(56)))
pos = 0, 0
sprpriority = ifelse (sysvar(1) <= Const720p(56), -10, 10)

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

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

[State 5071, 1]
type = HitVelSet
trigger1 = HitShakeOver && Anim != 2611
x = 1
y = 1

[State 0, VelSet]
type = VelSet
trigger1 = HitShakeOver && Anim != 2611
x = Vel X*0.2
y = Vel Y*-0.75

[State 943, 0]
type = ChangeAnim2
Trigger1 = !Time
value = 2610
[State 943, 0]
type = ChangeAnim2
Trigger1 = HitShakeOver && Anim != 2611
value = 2611

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = HitShakeOver
y = 1

[State 943, 5]
type = SelfState
triggerall = Anim = 2611
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5110
ctrl = 0

;---------------------------------------------------------------------------
; SpinGirl
[Statedef 2700]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 2700
velset = 0,0
poweradd = -1000
sprpriority = 0

; = = = = = SUPER PAUSE = = = = =
[State 0, SuperPause]
type = SuperPause
trigger1 = Time = 4
time = 33
anim = -1
sound = S4,7
pos = 0,0
movetime = 33
darken = 0
unhittable = 0
[State 0, Explod Super B]
type = Explod
trigger1 = Time = 6
anim = 8517
ID = 8517
pos = -12,-72-(16*(Anim=2040))
postype = p1
bindtime = 32
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = -3
ownpal = 1
removeongethit = 1
[State 0, Explod Super F]
type = Explod
trigger1 = Time = 6
anim = 8518
ID = 8518
pos = -12,-72-(16*(Anim=2040))
postype = p1
bindtime = 32
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 9
ontop = 1
ownpal = 1
removeongethit = 1
[State 0, PalFX Blackout]
type = BGPalFX
trigger1 = Time = 6
time = 30
add = -256,-256,-256
mul = 0,0,0
color = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [6,36]
flag = noBG
flag2 = noFG
flag3 = globalnoshadow
; = = = = = = = = = = = = = = = =

[State 0, VarSet]
type = VarSet
trigger1 = !Time
v = 5
value = random%3
[State 0, VarSet]
type = VarSet
trigger1 = !Time
v = 7
value = 1

[State 0, ChangeAnim Idle]
type = ChangeAnim
trigger1 = Time = [4,38]
value = anim
elem = 4
[State 0, ChangeAnim Toss]
type = ChangeAnim
trigger1 = Time = 128
value = 2701

[State 0, Explod Victim Leap]
type = Explod
trigger1 = Time = 0
anim = 2710+(Var(5)*10)
ID = 2710
pos = -344,-400
postype = p1
vel = 12,1
accel = 0,1.2
removetime = 26
pausemovetime = 666
supermovetime = 666
sprpriority = 0
shadow = -1
ownpal = 1
removeongethit = 1
[State 0, Explod Victim Leap Image]
type = Explod
trigger1 = Time = 1
anim = 2710+(Var(5)*10)
ID = 2711
pos = -344,-400
postype = p1
vel = 12,1
accel = 0,1.2
removetime = 26
pausemovetime = 666
supermovetime = 666
sprpriority = 0
shadow = -1
ownpal = 1
removeongethit = 1
[State 0, Explod Victim Land]
type = Explod
trigger1 = Time = 26
anim = 2711+(Var(5)*10)
ID = 2711
pos = -40,0
postype = p1
bindtime = 20
removetime = 20
pausemovetime = 666
supermovetime = 666
sprpriority = 0
shadow = -1
ownpal = 1
removeongethit = 1
[State 0, Explod Victim Toss]
type = Explod
trigger1 = Time = 128
anim = 2718+(Var(5)*10)
ID = 2710
pos = -5,-112
postype = p1
bindtime = 1
removetime = 1
pausemovetime = 666
supermovetime = 666
sprpriority = 3
shadow = -1
ownpal = 1
removeongethit = 1
[State 0, Explod Grab]
type = Explod
trigger1 = Time = 46
anim = 8155
ID = 8155
pos = -44,-80
postype = p1
bindtime = 1
removetime = -2
pausemovetime = 666
supermovetime = 666
sprpriority = 3
ontop = 1
ownpal = 1
[State 0, Explod Spinny]
type = Explod
triggerall = Time >= 46
trigger1 = Anim = 2700
trigger1 = Time%4 = 0
anim = 2502
ID = 2502
facing = ifelse(random<500,1,-1)
bindtime = 666
removetime = -2
pausemovetime = 666
scale = 1+(Random*0.0005),1.05;+(Random*0.00025)
sprpriority = 3
shadow = -1
removeongethit = 1

[State 0, Helper]
type = Helper
trigger1 = Time = 46
name = "Sour Girl"
ID = 2710
stateno = 2710
pos = 0,0
postype = p1
ownpal = 1
pausemovetime = 66666

[State 0, Snd Swing]
type = PlaySnd
triggerall = Time = [46,128]
trigger1 = Time%4 = 0
value = S0,4
channel = ifelse(Time%8<4,1,2)
[State 0, Snd Grab]
type = PlaySnd
trigger1 = Time = 46
value = S5,14
[State 0, Snd Voice]
type = PlaySnd
trigger1 = Time = 0
value = S2700,0
channel = 0
[State 0, Snd Voice]
type = PlaySnd
trigger1 = Time = 48
value = S2700,1
channel = 0

[State 0, HitDef]
type = HitDef
trigger1 = Time%8 = 0
attr = S,HA
hitflag = MAF
guardflag = M
animtype = Heavy
priority = 9,Hit
damage = Ceil((48*FVar(13))/Var(7)),13
pausetime = 0,1
guard.pausetime = 2,4
sparkno = s8010
guard.sparkno = s8110
sparkxy = -64+Floor(P2Dist X*0.75),-56+Floor(P2Dist Y*0.5)-random%32
hitsound = S1,3
guardsound = S2,2
ground.type = High
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 16
guard.hittime = 16
air.hittime = 24
yaccel = 0.4
fall = 1
fall.recover = 0
ground.velocity = -0.5,-4
guard.velocity = -3
air.velocity = -1,-1.5
getpower = 0,0
givepower = 16,8
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0

[State 0, Projectile]
type = Projectile
trigger1 = Time = 129
ProjID = 2720
projanim = 2718+(Var(5)*10)
projhitanim = 2718+(Var(5)*10)
projremanim = 2718+(Var(5)*10)
projcancelanim = 2718+(Var(5)*10)
projremove = 0
projremovetime = 64
velocity = 24,-1.5
accel = 0,0.33
projhits = 1
projpriority = 9
projsprpriority = 3
projedgebound = 80
projstagebound = 80
offset = 32,-88
postype = p1
projshadow = -1
attr = A,HP
hitflag = MAF
guardflag = M
animtype = Diagup
damage = Ceil(64*FVar(13)),19
pausetime = 8,16
guard.pausetime = 8,16
sparkno = s8010
guard.sparkno = s8110
sparkxy = 0,0
hitsound = S1,4
guardsound = S2,2
ground.type = High
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 16
guard.hittime = 16
air.hittime = 24
yaccel = 0.5
fall = 1
fall.recover = 0
ground.velocity = -8,-1.5
guard.velocity = -3
air.velocity = -8,-1.5
getpower = 0,0
givepower = 16,8
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0

[State 0, VarSet]
type = VarAdd
trigger1 = MoveHit = 1
v = 7
value = 1

[State 0, VelSet]
type = VelSet
trigger1 = Time = 46
x = 0.75
[State 0, VelSet]
type = VelSet
trigger1 = Time = 128
x = 0

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

;---------------------------------------------------------------------------
; H - SpinGirl
[Statedef 2710]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 666

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 350 

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Root,Time%6 = 0 
value = 2712+(Root,Var(5)*10)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Root,Time%6 = 1 
value = 2713+(Root,Var(5)*10)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Root,Time%6 = 2 
value = 2714+(Root,Var(5)*10)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Root,Time%6 = 3 
value = 2715+(Root,Var(5)*10)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Root,Time%6 = 4
value = 2716+(Root,Var(5)*10)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Root,Time%6 = 5 
value = 2717+(Root,Var(5)*10)

[State 0, SprPriority]
type = SprPriority
trigger1 = Root,Time%6 = 4
value = -2
[State 0, SprPriority]
type = SprPriority
trigger1 = Root,Time%6 = 1
value = 3

[State 0, Explod S0-1]
type = Explod
trigger1 = Root,Time%6 = 0
anim = 2712+(Root,Var(5)*10)
ID = 2710
pos = -16,-2
postype = p1
bindtime = 1
removetime = 1
scale = 1,1
sprpriority = -2
[State 0, Explod S0-2]
type = Explod
trigger1 = Root,Time%6 = 0
anim = 2713+(Root,Var(5)*10)
ID = 2710
pos = 16,2
postype = p1
bindtime = 1
removetime = 1
scale = 1,1
sprpriority = -2

[State 0, Explod S1-1]
type = Explod
trigger1 = Root,Time%6 = 1
anim = 2713+(Root,Var(5)*10)
ID = 2710
pos = -8,-2
postype = p1
bindtime = 1
removetime = 1
scale = 1,1
sprpriority = 3
[State 0, Explod S1-2]
type = Explod
trigger1 = Root,Time%6 = 1
anim = 2714+(Root,Var(5)*10)
ID = 2710
pos = -8,2
postype = p1
bindtime = 1
removetime = 1
scale = 1,1
sprpriority = 3

[State 0, Explod S2-1]
type = Explod
trigger1 = Root,Time%6 = 2
anim = 2714+(Root,Var(5)*10)
ID = 2710
pos = 16,-2
postype = p1
bindtime = 1
removetime = 1
scale = 1,1
sprpriority = 3
;[State 0, Explod S2-2]
;type = Explod
;trigger1 = Root,Time%6 = 2
;anim = 2715+(Root,Var(5)*10)
;ID = 2710
;pos = -8,4
;postype = p1
;bindtime = 1
;removetime = 1
;scale = 1,1
;sprpriority = -2

[State 0, Explod S3-1]
type = Explod
trigger1 = Root,Time%6 = 3
anim = 2715+(Root,Var(5)*10)
ID = 2710
pos = 16,2
postype = p1
bindtime = 1
removetime = 1
scale = 1,1
sprpriority = 3
[State 0, Explod S3-2]
type = Explod
trigger1 = Root,Time%6 = 3
anim = 2716+(Root,Var(5)*10)
ID = 2710
pos = -16,-2
postype = p1
bindtime = 1
removetime = 1
scale = 1,1
sprpriority = 3

[State 0, Explod S4-1]
type = Explod
trigger1 = Root,Time%6 = 4
anim = 2716+(Root,Var(5)*10)
ID = 2710
pos = 8,2
postype = p1
bindtime = 1
removetime = 1
scale = 1,1
sprpriority = -2
[State 0, Explod S4-2]
type = Explod
trigger1 = Root,Time%6 = 4
anim = 2717+(Root,Var(5)*10)
ID = 2710
pos = 8,-2
postype = p1
bindtime = 1
removetime = 1
scale = 1,1
sprpriority = -2

[State 0, Explod S2-1]
type = Explod
trigger1 = Root,Time%6 = 5
anim = 2717+(Root,Var(5)*10)
ID = 2710
pos = -16,2
postype = p1
bindtime = 1
removetime = 1
scale = 1,1
sprpriority = -2

[State 0, BindToParent]
type = BindToParent
trigger1 = Root,Time%6 = 0 
time = 1
pos = 8,-92
[State 0, BindToParent]
type = BindToParent
trigger1 = Root,Time%6 = 1
time = 1
pos = 32,-88
[State 0, BindToParent]
type = BindToParent
trigger1 = Root,Time%6 = 2 
time = 1
pos = 8,-84
[State 0, BindToParent]
type = BindToParent
trigger1 = Root,Time%6 = 3
time = 1
pos = -8,-84
[State 0, BindToParent]
type = BindToParent
trigger1 = Root,Time%6 = 4
time = 1
pos = -32,-88
[State 0, BindToParent]
type = BindToParent
trigger1 = Root,Time%6 = 5 
time = 1
pos = -8,-92

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Root,StateNo != 2700
trigger2 = Root,Time = 128
ignorehitpause = 1

;---------------------------------------------------------------------------
; Punchy
[Statedef 3000]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 3000
velset = 0,0
poweradd = -1000
sprpriority = 0

[State 0, PalFXWiz]
type = PalFX
triggerall = Time < 148
trigger1 = Time%14 = 0
trigger1 = Time%10 != 6
time = 2
add = 96,64,96
mul = 256,64,256
color = 64
[State 0, PalFXWiz]
type = PalFX
triggerall = Time < 148
trigger1 = Time%14 = 2
trigger1 = Time%10 != 6
time = 2
add = 128,96,192
mul = 128,128,256
color = 64
[State 0, PalFXWiz]
type = PalFX
triggerall = Time < 148
trigger1 = Time%14 = 4
trigger1 = Time%10 != 6
time = 2
add = 64,64,192
mul = 192,192,256
color = 64
[State 0, PalFXWiz]
type = PalFX
triggerall = Time < 148
trigger1 = Time%14 = 6
trigger1 = Time%10 != 6
time = 2
add = 64,128,96
mul = 128,256,128
color = 64
[State 0, PalFXWiz]
type = PalFX
triggerall = Time < 148
trigger1 = Time%14 = 8
trigger1 = Time%10 != 6
time = 2
add = 96,96,0
mul = 256,256,128
color = 64
[State 0, PalFXWiz]
type = PalFX
triggerall = Time < 148
trigger1 = Time%14 = 10
trigger1 = Time%10 != 6
time = 2
add = 128,64,0
mul = 256,168,128
color = 64
[State 0, PalFXWiz]
type = PalFX
triggerall = Time < 148
trigger1 = Time%14 = 12
trigger1 = Time%10 != 6
time = 2
add = 128,32,32
mul = 256,128,128
color = 64

[State 0, Width]
type = Width
trigger1 = Anim = 3001
edge = 48,0
player = 24,0
[State 0, Width]
type = Width
trigger1 = Anim = 3002
edge = 8,0
player = 8,0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 3000
trigger1 = AnimTime = 0
value = 3001
elem = 1+random%3
;[State 0, ChangeAnim]
;type = ChangeAnim
;triggerall = Anim = 3001
;trigger1 = Time%2 = 0
;value = 3001
;elem = 1+((AnimElemNo(0)-2)+1+random%3)%3
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 3001
trigger1 = Time > 96
value = 3002

[State 0, Offset]
type = Offset
trigger1 = Anim = 3002
trigger1 = AnimElemNo(0) = 7
trigger1 = time%3 = 0
x = (Time-112)**2*0.01
y = (random%(Time-112))*0.01
[State 0, Offset]
type = Offset
trigger1 = Anim = 3002
trigger1 = AnimElemNo(0) = 7
trigger1 = time%3 = 1
x = (Time-112)**2*-0.01
y = (-random%(Time-112))*0.01

[State 0, Explod]
type = Explod
trigger1 = Anim = 3001
anim = 3010+gametime%3
ID = 3010
pos = 32+random%32,-40-random%64
vfacing = ifelse(random<250,-1,1)
bindtime = 666
removetime = -2
scale = 1,1
sprpriority = 3
shadow = -1
removeongethit = 1
[State 0, Explod]
type = Explod
trigger1 = Anim = 3002
trigger1 = AnimElem = 10
anim = 3013
ID = 3013
bindtime = 666
removetime = -2
sprpriority = 3

[State 0, PosAdd]
type = PosAdd
triggerall = Anim = 3002
trigger1 = AnimElemNo(0) = 2
trigger2 = AnimElemNo(0) = 3
trigger3 = AnimElemNo(0) = 4
x = -8
[State 0, PosAdd]
type = PosAdd
triggerall = Anim = 3002
trigger1 = AnimElem = 5, 0
trigger2 = AnimElem = 5, 1
x = -4
[State 0, PosAdd]
type = PosAdd
triggerall = Anim = 3002
trigger1 = AnimElem = 8
trigger2 = AnimElem = 9
trigger3 = AnimElem = 10
x = 20

[State 0, HitDef]
type = HitDef
trigger1 = Anim = 3001
trigger1 = GameTime%4 = 0
attr = S,HA
hitflag = MAF
guardflag = M
animtype = medium
priority = 4,Hit
damage = Ceil(4*FVar(13)),1
pausetime = 0,1
sparkno = s8000+((random%2)*5)
guard.sparkno = s8105
sparkxy = -8-random%48,-32-random%64
hitsound = -1;S1,7
guardsound = S2,0
ground.type = Low
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 8
guard.hittime = 8
air.hittime = 24
guard.velocity = -3
getpower = 0,0
givepower = 0,0
p2stateno = 3010
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
[State 0, HitDef]
type = HitDef
trigger1 = Anim = 3001
trigger1 = GameTime%4 = 2
attr = S,HA
hitflag = MAF
guardflag = M
animtype = medium
priority = 4,Hit
damage = Ceil(4*FVar(13)),1
pausetime = 0,1
sparkno = s8000+((random%2)*5)
guard.sparkno = s8105
sparkxy = -8-random%48,-32-random%64
hitsound = -1;S1,7
guardsound = S2,0
ground.type = High
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 8
guard.hittime = 8
air.hittime = 24
guard.velocity = -3
getpower = 0,0
givepower = 0,0
p2stateno = 3010
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0, HitDef]
type = HitDef
trigger1 = Anim = 3002
trigger1 = AnimElem = 9
attr = S,HA
hitflag = MAF
guardflag = M
animtype = Diagup
priority = 9,Hit
damage = Ceil(64*FVar(13)),19
pausetime = 0,16
guard.pausetime = 0,3
sparkno = s8010
guard.sparkno = s8105
sparkxy = -72+Floor(P2Dist X*0.75),-64
hitsound = S1,9
guardsound = S2,1 
ground.type = High
ground.slidetime = 24
ground.hittime = 24
guard.slidetime = 16
guard.hittime = 16
air.hittime = 24
yaccel = 0.4
fall = 1
fall.recover = 0
ground.velocity = -6,-6
guard.velocity = -6
air.velocity = -6,-6
getpower = 0,0
givepower = 0,0
envshake.time = 16
envshake.freq = 120
envshake.ampl = -24

[State 0, Snd Voice Init]
type = PlaySnd
trigger1 = Time = 4
value = S3000,1
channel = 0
[State 0, Snd Random Swing]
type = PlaySnd
trigger1 = Anim = 3001
trigger1 = Time%2 = 0
value = S0,random%2
channel = 1+GameTime%3
[State 0, Snd Dash Back]
type = PlaySnd
trigger1 = Anim = 3002
trigger1 = AnimElem = 2
value = S5,4
channel = 1
[State 0, Snd Final Swing]
type = PlaySnd
trigger1 = Anim = 3002
trigger1 = AnimElem = 8
value = S0,4
channel = 1
[State 0, Snd Random Hit]
type = PlaySnd
trigger1 = MoveHit = 1
trigger1 = Anim = 3001
value = S1,2+random%2
channel = 4+GameTime%4
[State 0, Snd Voice Sbaitso]
type = PlaySnd
trigger1 = Time = 152
trigger1 = Anim = 3002
value = S3000,0
channel = 0
[State 0, Snd Charge]
type = PlaySnd
trigger1 = Anim = 3002
trigger1 = AnimElem = 4
value = S3001,0
channel = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = Time = [140,152] 
time = 4
freq = 120
ampl = -12+(Time-140)
phase = 120+(Time%2*120)
;ignorehitpause = 1

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

;---------------------------------------------------------------------------
; V - HitShake
[Statedef 3010]
type    = S
movetype= H
physics = N
velset = 0,0

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((GetHitVar(groundtype) = 1),5001,5011)

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

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

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 3011

;---------------------------------------------------------------------------
; V - HitReact
[Statedef 3011]
type    = S
movetype= H
physics = S

[State 5001, 2]
type = ChangeAnim
triggerall = Anim = 5001 || Anim = 5011
trigger1 = AnimTime = 0
value = ifelse((GetHitVar(groundtype) = 1),5006,5016)
[State 5001, 2]
type = ChangeAnim
triggerall = Anim != 5300
trigger1 = Anim = 5006 || Anim = 5016
trigger1 = AnimTime = 0
trigger2 = Time = 12
value = 5300

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