;---------------------------------------------------------------------------
; びーむ
;---------------------------------------------------------------------------

[Statedef 22075]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
poweradd= -3000
anim = 22075
ctrl = 0

[State 22075]
type = NotHitBy 
trigger1 = 1
value = SCA

[State 22075]
type = SuperPause
trigger1 = time = 0
time = 42
movetime = 42
anim = -1

[State 2215]
type = Explod
trigger1 = time = 0
anim = 3028
sprpriority = -5
postype = p1
pos = -1,-100
bindtime = 1
supermove = 1
under = 0
ownpal = 1

[State 2215]
type = Explod
trigger1 = Time = 0
anim = 3029
sprpriority = 999
postype = p1
pos = -1,-100
bindtime = 1
supermove = 1
under = 0
ownpal = 1

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

[State 2215]
type = EnvColor
trigger1 = time = 3
persistent = 0
ignorehitpause = 1
time = 60
value = 0,0,0
under = 2

[State 2215]
type = PlaySnd
trigger1 = Time = 0
value = 3000,3
volume = -50

[State 2215]
type = PlaySnd
trigger1 = Time = 10
value = 192,0

[State 22075]
type = AssertSpecial
trigger1 = 1
flag= noBG
flag2= nobardisplay

[state 22075]
type = changestate
trigger1 = animtime = 0
value = 22076

;---------------------------------------------------------------------------
; 攻撃
;---------------------------------------------------------------------------

[Statedef 22076]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 0
anim = 22076
ctrl = 0

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

[State 22076]
type = AssertSpecial
trigger1 = 1
flag= noBG
flag2= noFG
flag3= nobardisplay

[State 22076]
type = EnvShake
trigger1 = (GameTime%3) = 1
time = 5
ampl = -3
freq = 95
phase = 95

[State 22076]
type = Projectile
triggerall = time <= 140
trigger1 = (GameTime%3) = 1
attr = S, HA
projanim = 22079
projhitanim = -1
projid = 22079
projpriority = 999999999
projsprpriority = 999999999
projremove = 1
projremovetime = 5
postype = p1
offset = 15,-85
velocity = 0
animtype  = diagup
damage  = Ceil((0.004+((palno=12)*0.01))*enemy,Const(data.life)),Ceil(0.0033 * enemy,Const(data.life))
getpower = 0,0
givepower = 0,0
guardflag = M
hitflag = MAFD
pausetime = 2,4
sparkno = -1
sparkxy = -15,-77
hitsound   = -1
guard.sparkno = -1
guardsound = -1
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -6,-6.5
air.velocity = -6,-6.8
fall = 1
fall.recover = 0
juggle = 15
p2stateno = 220760

[State 22076]
type = PlaySnd
trigger1 = animelem = 1
value = 2562, 24

[State 22076]
type = PlaySnd
trigger1 = animelem = 1
value = 2562, 25
volume = 150

[State 22076]
type = PlaySnd
trigger1 = animelem = 1
value = 2562, 17
volume = 150

[State 22075]
type = Explod
trigger1 = Time = 0
anim = 22170
sprpriority = 20
postype = p1
pos = 5,-80
bindtime = 1
supermove = 1
under = 0
ownpal = 1

[State 22076]
type = Explod
trigger1 = animelem = 1
anim = 22081
sprpriority = 0
postype = p1
pos = 25,0
vel = 0,0
bindtime = -1
removetime = 150
supermove = 0
under = 0
ownpal = 1

[State 22076]
type = NotHitBy 
trigger1 = 1
value = SCA

[state 22076]
type = changestate
trigger1 = time >= 150
value = 22077

;---------------------------------------------------------------------------
; 終了
;---------------------------------------------------------------------------

[Statedef 22077]
type    = S
movetype= A
physics = N
velset = 0,0
juggle = 15
anim = 2302
ctrl = 0

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

[State 1000, 5]
type = Explod
trigger1 = time = 0
anim = 22090
id = 22090
sprpriority = 99
postype = p1
pos = 30,-85
bindtime = -1
removetime = 15
supermove = 0
;ignorehitpause = 1
under = 0
ownpal = 1

[State a]
type = VarAdd
trigger1 = Time >= 1
var(40) = 1

[State a]
type = ModifyExplod
trigger1 = Time >= 1
ID = 22090
scale = 1.2-Var(40)/12.0 , 1.2-Var(40)/12.0

[state a]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;やられ
;---------------------------------------------------------------------------

[Statedef 220760]
type    = A
movetype= H
physics = N
velset = 0,0
facep2 = 1

[state 220760]
type = destroyself
trigger1 = ishelper

[State 220760]
type = lifeadd
trigger1 = time = 0
ignorehitpause = 1
value = -(Ceil(((0.005+((enemynear,palno=12)*0.007))*Const(data.life))))
absolute = 1

[State 220760]
type = lifeset
triggerall = enemynear,name="Voltec thunder mizuchi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 220760]
type = powerset
triggerall = enemynear,name="Voltec thunder mizuchi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 220760]
type = VarRangeSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
value = 0

[State 220760]
type = VarRangeSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
fvalue = 0

[State 220760]
type = VarSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
sysvar(1) = 0

[State 220760]
type = VarSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
sysvar(2) = 0

[State 220760]
type = VarSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
sysvar(3) = 0

[State 220760]
type = VarSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
sysvar(4) = 0

[State 220760]
type = NotHitBy
trigger1 = enemynear,name="Voltec thunder mizuchi"&&!ishelper
trigger1 = enemynear,palno=12
value = SCA

[State 220760]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 220760]
type = ChangeAnim
Trigger1 = Time = 0
value = 5070

[State 220760]
type = Trans
trigger1 = 1
trans = add1
alpha = 250,70

[State 220760] 
type = changestate
trigger1 = time >= 8
value = 220761

;---------------------------------------------------------------------------
;相手落下1
;---------------------------------------------------------------------------

[Statedef 220761]
type    = A
movetype= H
physics = N
sprpriority = 4

[state 220761]
type = destroyself
trigger1 = ishelper

[State 220761]
type = lifeadd
trigger1 = time = 0
ignorehitpause = 1
value = -(Ceil(0.01 * Const(data.life)))
absolute = 1

[State 220761]
type = lifeset
triggerall = enemynear,name="Voltec thunder mizuchi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 220761]
type = powerset
triggerall = enemynear,name="Voltec thunder mizuchi"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 220761]
type = VarRangeSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
value = 0

[State 220761]
type = VarRangeSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
fvalue = 0

[State 220761]
type = VarSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
sysvar(1) = 0

[State 220761]
type = VarSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
sysvar(2) = 0

[State 220761]
type = VarSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
sysvar(3) = 0

[State 220761]
type = VarSet
trigger1 = enemynear,name="Voltec thunder mizuchi"&&enemynear,fvar(37)=1&&!ishelper&&name!="Voltec thunder mizuchi"
trigger1 = enemynear,palno=12&&alive
sysvar(4) = 0

[State 220761]
type = PlayerPush
trigger1 = 1
value = -1

[State 220761]
type = NotHitBy
trigger1 = enemynear,name="Voltec thunder mizuchi"&&!ishelper
trigger1 = enemynear,palno=12
value = SCA

[State 220761]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 220761]
type = ChangeAnim
trigger1 = time = 0
value = 5052

[state 220761]
type = velset
trigger1 = time = 0
x = IfElse((p2dist x< 0 ),6.32,-6.32)
y = -6.8

[State 220761]
type = VelAdd
Trigger1 = time > 0
y = .39

[State 220761]
type = selfstate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100