;------------------------------------------------------------------------
[Statedef 7005]
type = S
movetype = I
physics = N
ctrl = 0
anim = 7005
sprpriority = 5
juggle = 0

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = nobardisplay

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 901: NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA,AA,AT
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S7001,1
volume = 255
channel = 15

[State 0, EnvColor]
type = BGPalFX
;trigger1 = animelem = 1
trigger1 = time <= 50
add = -200,-200,-200
;sinadd=-255,-255,-255,160
;mul = 10-((time)*10),10-((time)*10),10-((time-45)*10)
;mul = ceil(1-((animtime-15)*10)),ceil(10-((animtime)*15)),ceil(140-((animtime-30)*10))
time = 1
;invertall = 1
;ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = time =0
anim = 7005
ID =  7000
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove =999999
pausemove =999999
supermovetime=9999
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = parent,stateno !=[2900,3000]
trigger1 = time =0
anim = 7009
ID =  7009
pos = 73,133
postype = back ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = 0,0
accel = 0,0
random = 0,0
removetime = 10
supermove =999999
pausemove =999999
scale = .5,.5
sprpriority = -3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
triggerall = parent,stateno !=[2900,3000]
trigger1 = time =10
anim = 7009
ID =  7010
pos = 73,133
postype = back ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = -.15,0
accel = 0,0
random = 0,0
removetime = 33
supermove =999999
pausemove =999999
scale = .5,.5
sprpriority = -3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7009) && time <=10
ID=7009
scale = 2.5-(.21*(time)),2.5-(.21*(time))

[State 4300, shrink]
type=modifyexplod
trigger1=numexplod(7009) && time >10
ID=7010
scale = .5,.5

[State -3, StopSnd]
type = StopSnd
trigger1 = time >=50
trigger2 = parent,movetype=H
channel = 15
ignorehitpause = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time >=50
trigger2 = parent,movetype=H

[State 901:destroyself]
type = destroyself
trigger1 = time >=50
trigger2 = parent,movetype=H

;-------------------------------------------------------------------------------
;Shield
[Statedef 702]
type     = U
movetype = I
physics  = N
ctrl     = 1
velset   = 0,0
anim     = 5

[State -2, 無敵]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 150

[State 702]
type = targetlifeadd
trigger1 = 1
value = -3
kill = 1

[State 702]
type = lifeadd
trigger1 = 1
value = (lifemax)
kill = 1

[State 702, Effect]
type = Explod
trigger1 = time = 1
anim = 2791
scale = 0.5, 0.5
postype = p1
pos = 0, -30
sprpriority = 3
supermove = 999999999
ownpal = 1
bindtime = -1
removeongethit = 1

[State 702, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0, 26

[State 702]
type = SelfState
trigger1 = animtime = 0
value = 37564
ctrl = 1
anim = 0

[State 702, ステート変更] ;立ちとしゃがみ
type = ChangeState
triggerall = StateType != A
trigger1 = AnimTime = 0
value = ifelse(StateType=C,37564,37564)
ctrl = 1

[State 702, ステート変更] ;空中のみ
type = ChangeState
triggerall = StateType = A
trigger1 = Time >= 20
value = 37564 ;common1.cns参照
ctrl = 1

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

[Statedef 195020]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 3072
ownpal = 1

[State 195020]
type = BindToroot
trigger1 = 1
pos = -8,0

[State 195020]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 195020]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,AA,AT,AP
hitflag = M-
priority = 7
pausetime = 0,0
numhits = 0
sparkno = s7005
hitsound = s0,26
p1stateno = 195022
p2stateno = 195023
getpower = 0

[state 195020]
type = nothitby
trigger1 = 1
value = SCA

[state 195020]
type = targetdrop
trigger1 = 1

[state 195020]
type = destroyself
trigger1 = enemy,life<enemy,lifemax*0.9||EnemyNear,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
trigger2 = root,var(55)>=2||(root,stateno=[2000,2005])

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

[Statedef 195021]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 3072
ownpal = 1

[State 195021]
type = BindToroot
trigger1 = 1
pos = -8,0

[State 195021]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 195021]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA,AA,AT,AP
hitflag = M-
priority = 7
pausetime = 0,0
numhits = 0
sparkno = s7005
hitsound = s0,26
p1stateno = 195022
p2facing = ifelse(enemynear,vel x>0,-1,1)
getpower = 0

[state 195021]
type = nothitby
trigger1 = 1
value = SCA

[state 195021]
type = targetdrop
trigger1 = 1

[state 195021]
type = destroyself
trigger1 = enemy,life<enemy,lifemax*0.9||!(EnemyNear,HitDefAttr=SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT)
trigger2 = root,var(55)>=2||(root,stateno=[2000,2005])

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

[Statedef 195022]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 3073
ownpal = 1

[State 195022]
type = BindToroot
trigger1 = 1
pos = -8,0

[State 195022]
type = AssertSpecial
trigger1 = 1
flag = invisible

[state 195022]
type = nothitby
trigger1 = 1
value = SCA

[state 195022]
type = targetdrop
trigger1 = 1

[state 195022]
type = changestate
trigger1 = time >= 1
value = prevstateno

[state 195022]
type = destroyself
trigger1 = enemy,life<enemy,lifemax*0.9
trigger2 = root,var(55)>=2||(root,stateno=[2000,2005])

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

[Statedef 195023]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = -4,-6

[state 195023]
type = destroyself
trigger1 = ishelper

[State 195023]
type = ChangeAnim
trigger1 = time=0
value = 5070

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

[State 195023]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
;体の周りの発光体
;---------------------------------------------------------------------------

[Statedef 2793]
type    = A
movetype= I
physics = N
velset = 0,0
juggle = 8
poweradd= 0
sprpriority = 9
anim = 3023
ctrl = 0

[State 2793]
type = AssertSpecial
trigger1 = 1
flag = noshadow

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

[State 2793]
type = Trans
trigger1 = 1
trans = add
alpha = 250,250

[state 2793]
type = velset
trigger1 = time = 0
y = -3

[State 2793]
type = veladd
trigger1 = Time > 10
x = -0.5 + (random%2)

[state 2793]
type = destroyself
trigger1 = time >= 30
;-------------------------------------------------------------------------------
;Hit Override
[Statedef 703]
type     = U
movetype = I
physics  = N
ctrl     = 1
velset   = 0,0
anim     = 5

[State -2, 無敵]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 150

[State 702]
type = lifeadd
trigger1 = 1
value = -3
kill = 1

[State 702, Effect]
type = Explod
trigger1 = time = 1
anim = 2791
scale = 0.5, 0.5
postype = p1
pos = 0, -30
sprpriority = 3
supermove = 999999999
ownpal = 1
bindtime = -1
removeongethit = 1

[State 702, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0, 26

[State 702]
type = SelfState
trigger1 = animtime = 0
value = 0
ctrl = 1
anim = 0

[State 702, ステート変更] ;立ちとしゃがみ
type = ChangeState
triggerall = StateType != A
trigger1 = AnimTime = 0
value = ifelse(StateType=C,11,0)
ctrl = 1

[State 702, ステート変更] ;空中のみ
type = ChangeState
triggerall = StateType = A
trigger1 = Time >= 20
value = 51 ;common1.cns参照
ctrl = 1


;----------------------------------------
[Statedef 18102]
;type = StateTypeSet
;trigger1 = ishelper(18102)
statetype = S
movetype = I
physics = N
persistent = 0
ignorehitpause = 1

[State 0]
type = VelSet
trigger1 = ishelper(18102)
x = 0
y = 0
persistent = 0
ignorehitpause = 1

[State 0]
type = changeanim
trigger1 = ishelper(18102)
value = 18106
persistent = 0
ignorehitpause = 1

[State 0]
type = ctrlset
trigger1 = ishelper(18102)
value = 0
persistent = 0
ignorehitpause = 1

[State 0]
type = HitOverride
trigger1 = ishelper(18102)
time = 1
attr = SCA,AA,AT,AP
slot = 0
stateno = 130
ignorehitpause = 1

[State 0]
type = ScreenBound
triggerall = ishelper(18102)
trigger1 = 1
value = 0
movecamera = 0,0
ignorehitpause = 1

[State 0]
type = trans
triggerall = ishelper(18102)
trigger1 = anim = 18102 || anim = 18103 || anim = 18104
trans = add
ignorehitpause = 1

[State 0]
type = NotHitBy
trigger1 = ishelper(18102)
value = SCA
ignorehitpause = 1

[State 0]
type = AngleDraw
trigger1 = ishelper(18102)
scale = 1.0,1.0

[State 0]
type = AngleAdd
trigger1 = ishelper(18102)
value = -7

[state 0]
type = AssertSpecial
trigger1 = ishelper(18102)
flag = noshadow
ignorehitpause = 1

[State 0]
type = VarRandom
triggerall = ishelper(18102)
trigger1 = time = 36 || time = 52 || time = 72 || time = 92 || time = 112 || time = 132 || time = 152
v = 48
range = 0,5

[State 0]
type = Projectile
triggerall = ishelper(18102)
trigger1 = time = 36 || time = 52 || time = 72 || time = 92 || time = 112 || time = 132 || time = 152
attr = S, SP
animtype  = hard
damage    = 68,10
getpower = 61,61
guardflag = M
projanim = 19000 + (random%3)
projid = 18102
projpriority = 2147483647
projsprpriority = 2147483647
projheightbound = -2000,1
projremove = 0
projremovetime = 30
projscale = 0.5,0.5
postype = p1
offset = 0,150
velocity = 0,-10
numhits = 1
pausetime = 16,16
sparkno = 2
guard.sparkno = 2
sparkxy = 0,(ceil(p2bodydist Y)-170)
hitsound   = s225,1
guardsound = s121,0
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -4,-6
air.velocity = -4,-6.5
fall = 1
air.fall = 1
fall.recover = 0
supermovetime = 2147483647
pausemovetime = 2147483647

[State 0]
type = Projectile
triggerall = ishelper(18102)
trigger1 = time = 36 || time = 52 || time = 72 || time = 92 || time = 112 || time = 132 || time = 152
attr = S, SP
animtype  = hard
damage    = 68,10
getpower = 61,61
guardflag = M
projanim = 19000 + (random%3)
projid = 18102
projpriority = 2147483647
projsprpriority = 2147483647
projheightbound = -2000,1
projremove = 0
projremovetime = 30
projscale = 0.5,0.5
postype = p1
offset = 120,150
velocity = 0,-10
numhits = 1
pausetime = 16,16
sparkno = 2
guard.sparkno = 2
sparkxy = 0,(ceil(p2bodydist Y)-170)
hitsound   = s225,1
guardsound = s121,0
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -4,-6
air.velocity = -4,-6.5
fall = 1
air.fall = 1
fall.recover = 0
supermovetime = 2147483647
pausemovetime = 2147483647

[State 0]
type = Projectile
triggerall = ishelper(18102)
trigger1 = time = 36 || time = 52 || time = 72 || time = 92 || time = 112 || time = 132 || time = 152
attr = S, SP
animtype  = hard
damage    = 68,10
getpower = 61,61
guardflag = M
projanim = 19000 + (random%3)
projhitanim = -1
projid = 18102
projpriority = 2147483647
projsprpriority = 2147483647
projheightbound = -2000,1
projremove = 0
projremovetime = 30
projscale = 0.5,0.5
postype = p1
offset = -120,150
velocity = 0,-10
numhits = 1
pausetime = 16,16
sparkno = 2
guard.sparkno = 2
sparkxy = 0,(ceil(p2bodydist Y)-170)
hitsound   = s225,1
guardsound = s121,0
ground.type = high
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -4,-6
air.velocity = -4,-6.5
fall = 1
air.fall = 1
fall.recover = 0
supermovetime = 2147483647
pausemovetime = 2147483647

[State 0]
type = targetlifeadd
triggerall = ishelper(18102)
triggerall = numtarget > 0
trigger1 = !target,ishelper
trigger1 = root,palno = 11
value = -2147483648
absolute = 1
ignorehitpause = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[state 0]
type = playsnd
triggerall = ishelper(18102)
trigger1 = time = 36 || time = 52 || time = 72 || time = 92 || time = 112 || time = 132 || time = 152
value = 801,1
ignorehitpause = 1

[state 0]
type = destroyself
triggerall = ishelper(18102)
trigger1 = time = 178
ignorehitpause = 1

;---------------------------------
[Statedef 18103]
;type = StateTypeSet
;trigger1 = ishelper(16500)
statetype = S
movetype = I
physics = N
persistent = 0
ignorehitpause = 1

[State 0]
type = VelSet
trigger1 = ishelper(16500)
x = 0
y = 0
persistent = 0
ignorehitpause = 1

[State 0]
type = changeanim
trigger1 = ishelper(16500)
value = 40001
persistent = 0
ignorehitpause = 1

[State 0]
type = ctrlset
trigger1 = ishelper(16500)
value = 0
persistent = 0
ignorehitpause = 1

[State 150]
type = nothitby
trigger1 = ishelper(16500)
value = SCA
time = -1
ignorehitpause = 1

[State 150]
type = hitoverride
trigger1 = ishelper(16500)
time = 1
attr = SCA,AA,AT,AP
slot = 0
stateno = 130
ignorehitpause = 1

[State 150]
type = posset
trigger1 = ishelper(16500)
x = 0
y = -90
ignorehitpause = 1

[State 150]
type = AngleDraw
trigger1 = ishelper(16500)
scale = 1.0,1.0

[State 150]
type = AngleAdd
trigger1 = ishelper(16500)
value = -7

[State 150]
type = AssertSpecial
trigger1 = ishelper(16500)
flag = noshadow

[State 150]
type = PlaySnd
triggerall = ishelper(16500)
trigger1 = Time = 0
value = 5,17
volume = 255
freqmul = 0.4

[State 150]
type = Explod
triggerall = ishelper(16500)
trigger1 = numexplod(26000) = 0
trigger1 = time = 0
anim = 18106
id = 26001
sprpriority = 2147483648
postype = p1
pos = 0,0
removetime = 280
bindtime = -1
ontop = 1
ownpal = 1
scale = 0.5,0.5
pausemovetime = 2147483647
supermovetime = 2147483647

[State 150]
type = ModifyExplod
triggerall = ishelper(16500)
trigger1 = time <= 20
scale = 0.02*time,0.02*time
id = 26001

[State 150]
type = ModifyExplod
triggerall = ishelper(16500)
trigger1 = time > 260
scale = 0.02*(280-time),0.02*(280-time)
id = 26001

[State 150]
type = Explod
triggerall = ishelper(16500)
trigger1 = numexplod(22138)=0&&time=0
anim = 2791
id = 22138
sprpriority = 214748364
postype = p1
pos = 0,0
bindtime = -1
supermove = 0
removetime = 280
under = 1
ownpal = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 150]
type = Explod
triggerall = ishelper(16500)
trigger1 = numexplod(221380)=0&&time=10
anim = 2791
id = 221380
sprpriority = 214748364
postype = p1
pos = 0,0
bindtime = -1
supermove = 0
removetime = 270
under = 1
ownpal = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 150]
type = Explod
triggerall = ishelper(16500)
trigger1 = numexplod(221381)=0&&time=20
anim = 2791
id = 221381
sprpriority = 214748364
postype = p1
pos = 0,0
bindtime = -1
supermove = 0
removetime = 260
under = 1
ownpal = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 150]
type = Explod
triggerall = ishelper(16500)
trigger1 = numexplod(221382)=0&&time=30
anim = 2791
id = 221382
sprpriority = 214748364
postype = p1
pos = 0,0
bindtime = -1
supermove = 0
removetime = 250
under = 1
ownpal = 1
supermovetime = 2147483647
pausemovetime = 2147483647

[State 150]
type = Projectile
triggerall = ishelper(16500)
triggerall = (GameTime%6) = 1
trigger1 = time >= 33
trigger1 = time <= 270
projanim = 19000 + (random%3)
projid = 26150
projremove = 1
projpriority = 1
projscale = 0.5,0.5
projsprpriority = 5
projshadow = 0,0,0
projremovetime = -1
getpower = 100
velocity = 3.5,-5
attr = S, SP
animtype = Hard
damage = 30+random%10,10+random%10
numhits = 1
guardflag = M
hitsound = s10000,43
guardsound = s120,0
pausetime = 0,10
sparkno = -1
guard.sparkno = s22184
sparkxy = 20,0
ground.type = high
ground.hittime = 21
ground.slidetime = 21
ground.velocity = -9
air.juggle = 8
air.velocity = -3.6,-3.8
air.fall = 1
envshake.time = 4
envshake.freq = 180
envshake.ampl = 3
p2stateno = 9000
supermovetime = 2147483647
pausemovetime = 2147483647

[State 150]
type = Projectile
triggerall = ishelper(16500)
triggerall = (GameTime%6) = 1
trigger1 = time >= 33
trigger1 = time <= 270
projanim = 19000 + (random%3)
projid = 26150
projremove = 1
projpriority = 1
projscale = 0.5,0.5
projsprpriority = 5
projshadow = 0,0,0
projremovetime = -1
getpower = 100
velocity = -3.5,5
attr = S, SP
animtype = Hard
damage = 30+random%10,10+random%10
numhits = 1
guardflag = M
hitsound = s10000,43
guardsound = s120,0
pausetime = 0,10
sparkno = -1
guard.sparkno = s22184
sparkxy = 20,0
ground.type = high
ground.hittime = 21
ground.slidetime = 21
ground.velocity = -9
air.juggle = 8
air.velocity = -3.6,-3.8
air.fall = 1
envshake.time = 4
envshake.freq = 180
envshake.ampl = 3
p2stateno = 9000
supermovetime = 2147483647
pausemovetime = 2147483647

[State 150]
type = Projectile
triggerall = ishelper(16500)
triggerall = (GameTime%6) = 1
trigger1 = time >= 33
trigger1 = time <= 270
projanim = 19000 + (random%3)
projid = 26150
projremove = 1
projpriority = 1
projscale = 0.5,0.5
projsprpriority = 5
projshadow = 0,0,0
projremovetime = -1
getpower = 100
velocity = -3.5,-5
attr = S, SP
animtype = Hard
damage = 30+random%10,10+random%10
numhits = 1
guardflag = M
hitsound = s10000,43
guardsound = s120,0
pausetime = 0,10
sparkno = -1
guard.sparkno = s22184
sparkxy = 20,0
ground.type = high
ground.hittime = 21
ground.slidetime = 21
ground.velocity = -9
air.juggle = 8
air.velocity = -3.6,-3.8
air.fall = 1
envshake.time = 4
envshake.freq = 180
envshake.ampl = 3
p2stateno = 9000
supermovetime = 2147483647
pausemovetime = 2147483647

[State 150]
type = destroyself
triggerall = ishelper(16500)
trigger1 = time = 280
ignorehitpause = 1

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

[State 910013]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 24640
ctrl = 1
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 13121]
type = lifeadd
triggerall = name != "White Kyurem"
trigger1 = time = 0
ignorehitpause = 1
value = -(Ceil(0.01 * Const(data.life)))
absolute = 1

[State 13121]
type = lifeset
triggerall = name != "White Kyurem"
triggerall = enemynear,name="White Kyurem"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = name != "White Kyurem"
triggerall = enemynear,name="White Kyurem"&&enemynear,palno=12
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = lifeadd
triggerall = name != "White Kyurem"
trigger1 = life <= (Ceil(0.05 * Const(data.life)))
value = -9999999
absolute = 1

[State 13121]
type = VarRangeSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
value = 0

[State 1]
type = VarRangeSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(4) = 0
IgnoreHitPause = 1

[state a]
type = destroyself
triggerall = name != "White Kyurem"
triggerall = root,name != "White Kyurem"
trigger1 = ishelper

[State 9000, 2]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 9000, 3]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 9000, 4]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 9000, 5]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time > 0
value = anim

[State 9000, 6]
type = StateTypeSet
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
value = a

[State 9000, 7]
type = ChangeState
triggerall = name != "White Kyurem"
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 9001

[State 9000, 8]
type = ChangeState
triggerall = name != "White Kyurem"
trigger1 = HitShakeOver
value = 9030

[State 9000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 9000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 9000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
[Statedef 9001]
type    = S
movetype= H
physics = S

[State 910013]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 24640
ctrl = 1
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 9001]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 9001]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 9001]
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 9001]
type = VelSet
trigger1 = HitOver
x = 0

[State 9001]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 9001]
type = SelfState
trigger1 = HitOver
value = 0
ctrl = 1

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

[State 910013]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 24640
ctrl = 1
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 13121]
type = lifeadd
triggerall = name != "White Kyurem"
trigger1 = time = 0
ignorehitpause = 1
value = -(Ceil(0.1 * Const(data.life)))
absolute = 1

[State 13121]
type = lifeset
triggerall = name != "White Kyurem"
triggerall = enemynear,name="White Kyurem"&&enemynear,palno=11
trigger1 = life <= (Ceil(0.1 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = powerset
triggerall = name != "White Kyurem"
triggerall = enemynear,name="White Kyurem"&&enemynear,palno=11
trigger1 = life <= (Ceil(0.3 * Const(data.life)))
ignorehitpause = 1
value = 0

[State 13121]
type = lifeadd
triggerall = name != "White Kyurem"
trigger1 = life <= (Ceil(0.05 * Const(data.life)))
value = -9999999999
absolute = 1

[State 13121]
type = VarRangeSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
value = 0

[State 1]
type = VarRangeSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
fvalue = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(1) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(2) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(3) = 0
IgnoreHitPause = 1

[State 1]
type = VarSet
triggerall = name != "White Kyurem"
trigger1 = enemynear,name="White Kyurem"&&enemynear,fvar(37)=1&&!ishelper&&name!="White Kyurem"
sysvar(4) = 0
IgnoreHitPause = 1

[state a]
type = destroyself
triggerall = name != "White Kyurem"
triggerall = root,name != "White Kyurem"
trigger1 = ishelper

[State 9000, 2]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 9000, 3]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 9000, 4]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 9000, 5]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time > 0
value = anim

[State 9000, 6]
type = StateTypeSet
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
value = a

[State 9000, 7]
type = ChangeState
triggerall = name != "White Kyurem"
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 9001

[State 9000, 8]
type = ChangeState
triggerall = name != "White Kyurem"
trigger1 = HitShakeOver
value = 9030

[State 9000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 9000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 9000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
[Statedef 9010]
type    = C
movetype= H
physics = N
velset = 0,0

[State 910013]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 24640
ctrl = 1
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 9010, 2]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5020 + GetHitVar(animtype)

[State 9010, 3]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 9010, 4]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 9010, 5]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time > 0
value = anim

[State 9010, 6]
type = ChangeState
triggerall = name != "White Kyurem"
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 9011

[State 9010, 7]
type = ChangeState
triggerall = name != "White Kyurem"
trigger1 = HitShakeOver
value = 9030

[State 9010, FFB Light]
type = ForceFeedback
trigger1 = anim = 5020
persistent = 0
time = 6
waveform = square

[State 9010, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5021
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 9010, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
[Statedef 9011]
type    = C
movetype= H
physics = C

[State 910013]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 24640
ctrl = 1
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

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

[State 9011, 3]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = AnimTime = 0
value = 5025 + GetHitVar(animtype)

[State 9011, 4]
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 9011, 5]
type = VelSet
trigger1 = HitOver
x = 0

[State 9011, 6]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 9011, 7]
type = SelfState
trigger1 = HitOver
value = 11
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 9020]
type    = A
movetype= H
physics = N
velset = 0,0

[State 910013]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 24640
ctrl = 1
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 9020, 2]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 9020, 3]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 9020, 4]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype)

[State 9020, 5]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time > 0
value = anim

[State 9020, 6]
type = ChangeState
triggerall = name != "White Kyurem"
trigger1 = HitShakeOver
value = 9030

[State 9020, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 9020, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 9020, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
[Statedef 9030]
type    = A
movetype= H
physics = N
ctrl = 0

[State 910013]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 24640
ctrl = 1
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 9030, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 9030, 3]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 9030, 4]
type = SelfState
triggerall = name != "White Kyurem"
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0
trigger2 = Pos Y >= 10
value = 5040

[State 9030, 5]
type = ChangeState
triggerall = name != "White Kyurem"
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0
trigger2 = Pos Y >= 10
value = 9050

[State 9030, 6]
type = ChangeState
triggerall = name != "White Kyurem"
trigger1 = AnimTime = 0
value = 9035

;---------------------------------------------------------------------------
[Statedef 9035]
type    = A
movetype= H
physics = N

[State 910013]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 24640
ctrl = 1
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 9035, 2]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059]
trigger1 = Anim != 5090
value = 5035

[State 9035, 3]
type = VelAdd
triggerall = name != "White Kyurem"
trigger1 = 1
y = GetHitVar(yaccel)

[State 9035, 4]
type = SelfState
triggerall = name != "White Kyurem"
triggerall = !HitFall
trigger1 = HitOver
trigger2 = AnimTime = 0
trigger3 = Vel Y > 0
trigger3 = Pos Y >= 10
trigger4 = Time = 0
trigger4 = Anim != 5035
value = 5040

[State 9035, 5]
type = ChangeState
triggerall = name != "White Kyurem"
triggerall = HitFall
trigger1 = HitOver
trigger2 = AnimTime = 0
trigger3 = Vel Y > 0
trigger3 = Pos Y >= 10
trigger4 = Time = 0
trigger4 = Anim != 5035.
value = 9050

;---------------------------------------------------------------------------
[Statedef 9050]
type    = A
movetype= H
physics = N

[State 910013]
type = SelfState
triggerall = name = "White Kyurem"
trigger1 = time >= 0
trigger2 = var(55) != gametime+123456789
value = 24640
ctrl = 1
ignorehitpause = 1
SuperMoveTime = 9999999
PauseMoveTime = 9999999

[State 9050, 2]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090
value = 5050

[State 9050, 3]
type = ChangeAnim
triggerall = name != "White Kyurem"
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 9050, 4]
type = VelAdd
triggerall = name != "White Kyurem"
trigger1 = 1
y = GetHitVar(yaccel)

[State 9050, 5]
type = SelfState
triggerall = name != "White Kyurem"
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200

[State 9050, 6]
type = SelfState
triggerall = name != "White Kyurem"
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210

[State 9050, 7]
type = SelfState
triggerall = name != "White Kyurem"
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100

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

[Statedef 100000]
type    = S
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 2835
ownpal = 1

[State 1]
type = BindToroot
trigger1 = 1
pos = 0,0

[State 1]
type = ReversalDef
trigger1 = palno = 11
reversal.attr = SCA,AT,AA,AP
hitflag = M-
priority = 7
pausetime = 0,0
numhits = 0
sparkno = s2791
hitsound = s2700,5
getpower = powermax/40
p1stateno = 1000001
p2stateno = 2800

[State 1]
type = ReversalDef
trigger1 = palno = 12
reversal.attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = M-
priority = 7
pausetime = 0,0
numhits = 0
sparkno = s2791
hitsound = s0,26
getpower = powermax/40
p1stateno = 1000001
p2stateno = ifelse(random>500,0,1000050)

[state 2901,1]
type = nothitby
trigger1 = 1
value = SCA

[state 2901,1]
type = hitoverride
trigger1 = 1
attr = SCA,NP,SP,HP
stateno = 0

[state a]
type = destroyself
trigger1 = p2movetype = H && enemynear,time < 2 || root,stateno = 2401 || (EnemyNear,HitDefAttr = SCA,NA,SA,HA,NP,SP,HP)

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

[Statedef 1000001]
type    = S
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 2835
ownpal = 1

[State 1]
type = BindToroot
trigger1 = 1
pos = 0,0

[state 2901,1]
type = nothitby
trigger1 = 1
value = SCA

[state 2901,1]
type = hitoverride
trigger1 = 1
attr = SCA,NP,SP,HP
stateno = 0

[state a]
type = destroyself
trigger1 = time>=1

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

[Statedef 2800]
type    = A
movetype = H
poweradd = 0
velset = 0,0
sprpriority = -1
ctrl = 0

[state a]
type = destroyself
trigger1 = ishelper

[State 2800]
type = statetypeset
trigger1 = time = 0
trigger1 = pos y = 0
value = S

[State 2800]
type = changeanim
trigger1 = selfanimexist(anim)
value = anim
elem = animelemno(-1)

[State 2800]
type = PalFX
trigger1 = time = 0
time = 3
color = 0
add = 0,0,0
ignorehitpause = 1

[State 2800]
type = PalFX
trigger1 = time = 3
time = 3
color = 0
add = 40,40,40
ignorehitpause = 1

[State 2800]
type = PalFX
trigger1 = time = 5
time = 3
color = 0
add = 60,60,60
ignorehitpause = 1

[State 2800]
type = PalFX
trigger1 = Time % 3 = 0
trigger1 = Time >= 100
time = 1
color = 0
add = 35,35,35
ignorehitpause = 1

[State 2800]
type = PalFX
trigger1 = time >= 7
trigger1 = Time < 100
time = 2
color = 0
add = 35,35,35
ignorehitpause = 1

[State 2800]
type = changestate
trigger1 = time = 120
value = 2802


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

[Statedef 2802]
type    = A
movetype= H
physics = N
sprpriority = 4
velset = -4,-6

[State 2407]
type = ChangeAnim
trigger1 = time = 0
value = 5070

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

[State 2802]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;===================================================================================
;ハイパーアーマー（本体は無敵にして当たり判定はヘルパーに任せる）
[Statedef 8888]
type = A
movetype = I
physics  = N

[State 3100]
type = VarSet
trigger1 = time = 0
v = 8
value = -GetHitVar(Damage)
ignorehitpause = 1

[State 3100]
type = ChangeAnim
trigger1 = 1
value = Parent,Anim
elem = Parent,AnimElemNo(0)
ignorehitpause = 1

[State 3100]
type = AssertSpecial
trigger1 = 1
flag = Invisible
ignorehitpause = 1

[State 3100]
type = BindToParent
trigger1 = 1
ignorehitpause = 1

[State 3100]
type = Turn
trigger1 = Facing != Parent,Facing
ignorehitpause = 1

[State 3100]
type = NotHitBy
trigger1 = time <= 1
value = SCA
ignorehitpause = 1

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

[State 3100]
type = HitOverRide
trigger1 = 1
attr = SCA,AA,AP,AT
stateno = stateno
IgnoreHitPause = 1

[State 3100]
type = DestroySelf
trigger1 = Root,Alive = 0
ignorehitpause = 1

;------------------------------------------------------------------
; Armor mode
[StateDef 10666]
physics = N

[State anim]
type = ChangeAnim
trigger1 = 1
value = parent,anim
elem = parent,animelemno(0)

[State 10000]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State bind]
type = BindToParent
trigger1 = 1

[State turn]
type = turn
trigger1 = facing!= parent,facing

[State hit]
type = NotHitBy
trigger1 = parent,movetype = H
trigger2 = parent,stateno = [3900,4999]
trigger3 = parent,stateno = [5100,5300]
value = SCA, NT, ST, HT, NA, SA, HA ,NP, SP, HP

[State hit]
type = NotHitBy
trigger1 = parent,movetype!= H
value = ,NT, ST, HT

[State hit]
type = HitOverride
trigger1 = parent,movetype!= H
attr = SCA, NT, ST, HT, NA, SA, HA ,NP, SP, HP
slot = 7
stateno = 10666
ignorehitpause = 1

[State end]
type = DestroySelf
trigger1 = parent,life = 0

;---------------------------------------------------------------------------
; AUTO ESCAPE FROM REVERSAL (Standing and Crouching)
[Statedef 1915]
type = S
movetype = I
physics = N
juggle = 4
poweradd= 100
ctrl = 0
anim = 1915
sprpriority = 2
velset = 0,0

[State 0, ]
type = EnvShake
trigger1 = alive
trigger1 = Time = 0
time = 20
freq = 120
ignorehitpause = 1

[State 0, ]
type = SelfState
trigger1 = !alive
trigger2 = life <= 0
value = 5150

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; AUTO ESCAPE FROM REVERSAL (Aerial)
[Statedef 1916]
type    = A
movetype= I
physics = N
juggle  = 4
poweradd= 100
ctrl = 0
anim = 1916
sprpriority = 2
velset = 0,0

[State 0, ]
type = EnvShake
trigger1 = alive
trigger1 = Time = 0
time = 20
freq = 120
ignorehitpause = 1

[State 610, 2]
type = PlaySnd
trigger1 = alive
trigger1 = Time = 0
value = s0, 0
persistent = 0

[State 0, ]
type = StateTypeSet
trigger1 = animelem = 1
movetype = I
physics = A
ignorehitpause = 1

[State 0, ]
type = SelfState
trigger1 = !alive
trigger2 = life <= 0
value = 5150

;-----------------------------------------------------------
;--------------------------------------------
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;------------------
;  アシスト出現（NC）
[Statedef 4350]
type    = A
movetype= I
physics = N
anim = 4341
ctrl = 0
sprpriority = 1

[State 6221]
type = PlaySnd
trigger1 = time = 1
value = 4545,37
ignorehitpause = 1
volume = 255
abspan = 0

[State 10000, 3]
type = NotHitBy
trigger1 = 1
value =  ,NT
time = -1
ignorehitpause = 1

[State 10000, 3]
type = NotHitBy
trigger1 = 1
value =  SCA
time = -1
ignorehitpause = 1


[State 40, 5]
type = playsnd
trigger1 = time = 0
value = 9999,12

[State 1051, 1]
type = playerpush
trigger1 = 1
value = 1
ignorehitpause = 1

[State 1051, 1]
type = velset
trigger1 = 1
trigger1 = root,palno != 11
x = 13
y = 7

[State 1051, 1]
type = velset
trigger1 = 1
trigger1 = root,palno = 11
x = 20
y = 7

[State 409]
Type     = turn
trigger1 = root,palno = 11
Trigger1 = p2dist X < 0
ignorehitpause = 1

[State 1051, 1]
type = posset
trigger1 = time = 0
y = -160

[State 1051, 1]
type = VelAdd
trigger1 = 1
y = .4

[State 1051, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 4451

;---------------------------------------------------------------------------
; Gun DX
[Statedef 4451]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 4342
sprpriority = 1

[State 10000, 3]
type = NotHitBy
trigger1 = 1
value =  ,NT
time = -1
ignorehitpause = 1

[State 10000, 3]
type = NotHitBy
trigger1 = 1
value =  SCA
time = -1
ignorehitpause = 1

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 4545, 1
volume = 255

[State 1051, 1]
type = playerpush
trigger1 = 1
value = 1
ignorehitpause = 1

[State 1110, posadd]
type = posset
trigger1 = 1
y = 0
ignorehitpause = 1

[State 1600, 物理的なキャラの幅]
type = Width
trigger1 = animelemtime(4) >= 0
player = 40,0
ignorehitpause = 1

[State 6221]
type = PlaySnd
trigger1 = AnimElem = 6
value = 4545,36
ignorehitpause = 1
volume = 255
abspan = 0
channel = 12

[State 3411]
type = Helper
trigger1 = AnimElem = 6
stateno = 6221
id = 6221
ownpal = 1
pos = 60,-107
size.xscale = 0.5
size.yscale = 0.5

[State 3411]
type = Helper
trigger1 = root,palno = 11
trigger1 = AnimElem = 6
stateno = 6221
id = 6221
ownpal = 1
pos = 60,-137
size.xscale = 0.5
size.yscale = 0.5

[State 3411]
type = Helper
trigger1 = root,palno = 11
trigger1 = AnimElem = 6
stateno = 6221
id = 6221
ownpal = 1
pos = 60,-77
size.xscale = 0.5
size.yscale = 0.5

;[State 507, ChangeState]
;type = ChangeState
;trigger1 = root,palno = 12
;trigger1 = prevstateno != 4434
;trigger1 = Animelem = 6
;value = 4451

[State 507, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 4452

;------------------------------------------------------------------------------------------------------------
;Stand Strong Punch Helper
[Statedef 6221]
type = S
movetype = A
physics =N
anim = 4343
ctrl = 0
sprpriority = 2
velset = 0,0

[State 10000, 3]
type = NotHitBy
trigger1 = 1
value =  ,NT
time = -1
ignorehitpause = 1

[State 10000, 3]
type = NotHitBy
trigger1 = 1
value =  SCA
time = -1
ignorehitpause = 1

[State 6221]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 6221]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Hard
damage    = ifelse(root,palno=11,140,60),4
guardflag = MA
pausetime = 0,7
sparkno = S28
guard.sparkno = 40
sparkxy = -10,-10
hitsound   = -1
guardsound = -1
ground.type = High
ground.slidetime = 25
ground.hittime  = 30
ground.velocity = -9
air.velocity = -9
palfx.time = 30
palfx.add = 255,63,-255
color = 0
fall = 1
fall.recover = 0

[State 500, Projectile]
type = Projectile
trigger1 = time = 0
projanim = 4344
projscale = 1,1
projremove = 1
projremovetime = -1
velmul = 1
velocity = 40,0
projhits = 1
projpriority = 1
projsprpriority = 3
offset = 0,7
projshadow = 0,0,0
supermovetime = 0
pausemovetime = 0
attr = S,SP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 0,0
animtype  = Hard
damage    = ifelse(root,palno=11,160,80),4
guardflag = MA
pausetime = 0,7
sparkno = S27
guard.sparkno = 40
sparkxy = 10,0+floor(enemy,pos y)
hitsound   = S2,21
guardsound = 6,0
ground.type = High
ground.slidetime = 25
ground.hittime  = 30
ground.velocity = -9
air.velocity = -9
palfx.time = 30
palfx.add = 255,63,-255
color = 0
air.fall = 1
fall = 1
fall.recover = 0

[State 6221]
type = PlaySnd
trigger1 = time = 0
value = 666,29
volume = 255
ignorehitpause = 1

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

;------------------
;   アシスト退場（nc）
[Statedef 4452]
type    = S
movetype= I
physics = N
anim = 4341
ctrl = 0
velset = 0,0
sprpriority = 1

[State 10000, 3]
type = NotHitBy
trigger1 = 1
value =  ,NT
time = -1
ignorehitpause = 1

[State 10000, 3]
type = NotHitBy
trigger1 = 1
value =  SCA
time = -1
ignorehitpause = 1

[State 40, 5]
type = playsnd
trigger1 = time = 0
value = 120,7

[State 1051, 1] ;Gravity
type = Velset
trigger1 = time = 0
x = -14
y = -7

[State 1051, 1] ;Gravity
type = VelAdd
trigger1 = time >= 0
y = .30

[State 1051, 3] ;Change state when KFM is close to ground
type = destroyself
trigger1 = Time >= 10
trigger1 = backedgedist < -75

;===========< POSSY >==========  ;Borrowed from Rare Akuma.
;--- Chase ---
[Statedef 6180]
type = S
physics = N
anim = 12345+random%4
sprpriority = -1
ctrl = 0

[State 6180]
type = turn
trigger1 = time = 120
[State 6180]
type = velset
trigger1 = 1
x = 10


;--- Mini Chaser ---
[Statedef 6181]
type = S
physics = N
anim = 12345;Random-sized people ;10020 ;Breloom
sprpriority = -1
ctrl = 0
[State 6181]
type = velset
trigger1 = !time
x = 8 + (random / 250.0)

[Statedef 6182]
type = S
physics = N
anim = 6001 ;Homer
sprpriority = -1
ctrl = 0
[State 6182]
type = velset
trigger1 = !time
x = 8 + (random / 250.0)

[Statedef 6183]
type = S
physics = N
anim = 34567 ;Normal DIO
sprpriority = -1
ctrl = 0
[State 6183]
type = velset
trigger1 = !time
x = 8 + (random / 250.0)
