;---------------------------------------------------------------------------
; Ice Quake

; Ice Quake: touching the ground to cause the quake
[StateDef 4500]
type    = C
MoveType= A
physics = C
ctrl = 0
anim = 2500
VelSet = 0,0

[State 4500, dust]
type = Explod
trigger1 = Time = 0
anim = 918
supermove = 1
ontop = 1
removeongethit = 1

[State 4500, crystal strike!]
type = PlaySnd
trigger1 = Time = 0
value = 10,10
;volume = 0
;channel = -1
;lowpriority = 
;freqmul = 1.0
;loop = 0
;pan = 0
;abspan = 0
;ignorehitpause = 0
;persistent = 1

[State 4500, super portrait]
type = Explod
trigger1 = animelem = 3
anim = 10000
ID = 10000
pos = 0,0
postype = back
bindtime = 999
removetime = 40
supermove = 40
pausemovetime = 40
sprpriority = -1
ownpal = 1

[State 4500, super bg]
type = Explod
trigger1 = animelem = 3
anim = 10005
ID = 10005
pos = 0,0
postype = back
bindtime = 999
removetime = 40
supermove = 40
pausemovetime = 40
sprpriority = -2
ownpal = 1

[State 4500, superpause]
type = SuperPause
;trigger1 = AnimElem = 1
trigger1 = AnimElem = 3, = 8
time = 40
anim = S3001
sound = S10,1
pos = 10,0
darken = 1
poweradd = -1000

[State 4500, quake noise]
type = PlaySnd
trigger1 = AnimElem = 3, = 12
value = 10,11

[State 4500, shake]
type = EnvShake
trigger1 = AnimElem = 3, = 15
time = 50
;freq = 60
ampl = -2
;phase = 
;ignorehitpause = 0
;persistent = 1



[State 4500, quake1]
type = Helper
;trigger1 = time = 5
trigger1 = AnimElem = 3, = 20
name = "Quake1"
pos = floor(P2Dist X), 0
postype = p1
StateNo = 4501

[State 4500, quake2]
type = Helper
;trigger1 = time = 10
trigger1 = AnimElem = 3, = 25
name = "Quake2"
pos = floor(P2Dist X)-35, 0
postype = p1
StateNo = 4501

[State 4500, quake3]
type = Helper
;trigger1 = time = 10
trigger1 = AnimElem = 3, = 25
name = "Quake3"
pos = floor(P2Dist X)+35, 0
postype = p1
StateNo = 4501

[State 4500, quake2]
type = Helper
;trigger1 = time = 20
trigger1 = AnimElem = 4
name = "Quake2"
pos = floor(P2Dist X)-50, 0
postype = p1
StateNo = 4501

[State 4500, quake3]
type = Helper
;trigger1 = time = 20
trigger1 = AnimElem = 4
name = "Quake3"
pos = floor(P2Dist X)+50, 0
postype = p1
StateNo = 4501

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


; Ice Quake: helper state for ice quake effect
[StateDef 4501]
type    = C
MoveType= A
physics = N
ctrl = 0
anim = 4500
sprpriority = 2

;[State 4501, PlaySnd]
;type = PlaySnd
;trigger1 = time = 0
;value = 9,7
;channel = 1
;volume = -100

[State 4501, make me unhittable]
type = AssertSpecial
trigger1 = IsHelper
flag = unguardable

[State 4501, nothitby]
type = NotHitBy
trigger1 = 1
value = SCA

[State 4501, HitDef 1]
type = HitDef
trigger1 = Time % 8 = 0	;time = 0
attr = C,SA
damage = 30,15	;100,50
fall = 1
priority = 7
guardflag = MA
hitflag = MAFD
pausetime = 6,6
hitsound = S2,2
guardsound = S3,0
;sparkxy = 0,-70
animtype = DiagUp
ground.type = Low
ground.slidetime = 8
ground.hittime  = 20
ground.velocity = 0,-6
guard.velocity = 0
air.velocity = 0,-8

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