;================================================================================
;                    超必殺技
;================================================================================
;---------------------デスビーム
[Statedef 2900]
type = S
movetype = A
physics = S
anim = 2900
poweradd = -200
velset = 0
ctrl = 0
juggle = 1

[State 2900, dust]
type = Explod
trigger1 = AnimElem = 3
anim = 8106
postype = p1
pos = 7,5
bindtime = -1
sprpriority = 2
removetime = 33
ownpal = 1
removeongethit = 1
facing = -1
scale = .5, .5

[State 2900, 1];『撃つ音』
type = PlaySnd
trigger1 = AnimElem = 3
value = 2900,0

[State 2900, 1];『くらえ』
type = PlaySnd
trigger1 = AnimElem = 1
value = 1000,0

[State 2900, proj]
type = Explod
trigger1 = animelem = 4
anim = 2901
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
removetime = 30
removeongethit = 1
;supermove = 1
ownpal = 1

[State 2900, 3]
type = Projectile
trigger1 = AnimElem = 4
projanim = 2902
projhitanim = -1;1221
projID = 2902
projremove = 0
projremovetime = 30
velocity = 0
projhits = 45
projmisstime = 10
projshadow = 150,150,150
attr = S, SP
projpriority = 5
postype = p1
offset = 0,0
attr = S, SP
damage = 60, 20
animtype = heavy
hitflag = MAF
guardflag = MA
sparkno = s8400
guard.sparkno = s8000
sparkxy = ceil (p2dist x) + 0, -80
hitsound = S1,7
getpower = 0
guardsound = S3,0
pausetime = 0,15
ground.hittime = 15
ground.type = high
ground.slidetime = 15
ground.velocity = -12.5
air.velocity = -12,-4
air.fall = 1
fall.recover = 0
air.juggle = 10
envshake.time = 10
envshake.ampl = 4
yaccel = .5
removeongethit = 1

[State 2900, 3]
type = Projectile
trigger1 = time = 36
projanim = 2902
projhitanim = -1;1221
projID = 2902
projremove = 0
projremovetime = 10
velocity = 0
projshadow = 150,150,150
attr = S, SP
projpriority = 5
postype = p1
offset = 0,0
attr = S, SP
damage = 60, 20
animtype = heavy
hitflag = MAF
guardflag = MA
sparkno = s8400
guard.sparkno = s8000
sparkxy = ceil (p2dist x) + 10, -80
hitsound = S1,6
getpower = 0
guardsound = S3,0
pausetime = 0,20
ground.hittime = 15
ground.type = high
ground.slidetime = 15
ground.velocity = -10.5, -6
air.velocity = -12,-4
air.fall = 1
fall=1
fall.recover = 0
air.juggle = 10
envshake.time = 10
envshake.ampl = 4
yaccel = .5
removeongethit = 1

[State 2900, dust]
type = explod
trigger1 = animelem = 4
anim = 8104
pos = 85,5
sprpriority = 2
bindtime = 1
ownpal = 1
removeongethit = 1
facing = 1
removetime = 24
velocity = 10.5

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

;============================================================
;---------------------超かめはめ波
;============================================================

[Statedef 3200]
type = S
movetype = A
physics = S
anim = 3200
poweradd = -1000
velset = 0
ctrl = 0
juggle = 1
sprpriority = 2

[State 3200, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 12

[state 3200, super a]
type = superpause
trigger1 = animelem = 3
time = 130
anim = -1

[State 3200, ]
type = EnvShake
trigger1 = animelem = 3
time = 130
freq = 120
ampl = 3

[State 3200, Aura0]
type = Explod
trigger1 = animelem = 3
anim = 4000
sprpriority = 1
postype = p1
pos = 3,3
bindtime = -1
removetime = 130
removeongethit = 1
supermove = 1

[State 3200, Aura1]
type = Explod
trigger1 = animelem = 3
anim = 3250
sprpriority = 3
postype = p1
pos = 0,0
bindtime = -1
removetime = 130
removeongethit = 1
supermove = 1

[State 3200, Aura2]
type = Explod
trigger1 = animelem = 3
anim = 2006
sprpriority = 3
postype = p1
pos = -10,-55
bindtime = -1
removetime = 137
removeongethit = 1
supermove = 1

[State 3200, dust]
type = Explod
trigger1 = AnimElem = 1
anim = 8103
ID = 8103
postype = p1
pos = -10,3
bindtime = -1
sprpriority = 3
supermovetime = 130
ownpal = 1
removeongethit = 1
facing = -1

[State 3200, 1];『溜める音』
type = PlaySnd
trigger1 = AnimElem = 1
value = 3000,0
channel = 4

[State 3200, 1];『撃つ音』
type = PlaySnd
trigger1 = AnimElem = 5;time = 7
value = 3250,0

[State 3200, 1];『かめはめ波！』
type = PlaySnd
trigger1 = animelem = 1
value = 3200,0
channel = 7

[State 2000, StopSnd]
type = StopSnd
trigger1 = animelem = 4
channel = 4

[State 3200, proj]
type = Explod
trigger1 = animelem = 5
anim = 3201
sprpriority = 5
postype = p1
pos = -8,0
bindtime = -1
removetime = 48
removeongethit = 1
;supermove = 1
ownpal = 1

[State 3200, proj]
type = Projectile
trigger1 = AnimElem = 5
projanim = 3202
projhitanim = -1
projID = 3202
projremove = 0
projremovetime = 30
attr = S, HP
velocity = 0
projshadow = 150,150,150
projpriority = 5
postype = p1
offset = 0,0
attr = S, SP
damage = 75, 20
projhits = 45
projmisstime = 10
animtype = heavy
attr = s, sp
guardflag = MA
sparkno = s2003
guard.sparkno = s8000
sparkxy = ceil (p2dist x) + -10, -60
hitsound = S1,1
getpower = 0
guardsound = S3,0
pausetime = 0,15
ground.hittime = 35
ground.type = high
ground.slidetime = 20
ground.velocity = -12.5
air.velocity = -14,-4
air.fall = 1
;fall=1
;fall.recover = 0
air.juggle = 10
envshake.time = 10
envshake.ampl = 4
yaccel = .5
guard.kill = 0

[State 3200, proj]
type = Projectile
trigger1 = Time = 33
projanim = 3202
projhitanim = -1;1221
projID = 3202
projremove = 0
projremovetime = 9
attr = S, HP
velocity = 0
projshadow = 150,150,150
projpriority = 5
postype = p1
offset = 0,0
attr = S, SP
damage = 75, 20
;projhits = 45
;projmisstime = 11
animtype = heavy
attr = s, sp
guardflag = MA
sparkno = s8005
guard.sparkno = s8000
sparkxy = ceil (p2dist x) + -10, -70
hitsound = S1,1
getpower = 0
guardsound = S3,0
pausetime = 0,15
ground.hittime = 35
ground.type = high
ground.slidetime = 20
ground.velocity = -12.5
air.velocity = -14,-4
air.fall = 1
fall=1
fall.recover = 0
air.juggle = 10
envshake.time = 10
envshake.ampl = 4
yaccel = .5

[State 3200, Aura0]
type = Explod
trigger1 = time = 6
anim = 4001
sprpriority = 1
postype = p1
pos = 3,3
bindtime = -1
removetime = 6
removeongethit = 1
supermove = 1

[State 3200, dust]
type = explod
trigger1 = animelem = 5;time = 25
anim = 8106
pos = 32,5
sprpriority = 3
bindtime = 1
ownpal = 1
removeongethit = 1
facing = -1
removetime = 33

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


;============================================================
;---------------------空中超かめはめ波
;============================================================

[Statedef 3260]
type = A
movetype = A
physics = S
anim = 3260
poweradd = -1000
velset = 0,0
ctrl = 0
juggle = 1

[State 3260, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 124

[state 3260, pause]
type = superpause
trigger1 = time = 0
time = 120
anim = -1
movetime = 120

[State 3260, shake]
type = EnvShake
trigger1 = animelem = 3
time = 130
freq = 120
ampl = 3

[State 3260, Aura1]
type = Explod
trigger1 = animelem = 1
anim = 4000
sprpriority = 1
postype = p1
pos = 5,2
bindtime = -1
removetime = 114
removeongethit = 1
supermove = 1

[State 3260, Aura2]
type = Explod
trigger1 = time = 114
anim = 4001
sprpriority = 1
postype = p1
pos = 5,2
bindtime = -1
removetime = 6
removeongethit = 1
supermove = 1

[State 3260, ki1]
type = Explod
trigger1 = time = 16
anim = 2006
sprpriority = 2
postype = p1
pos = -32,-99
bindtime = 1
removetime = 104
removeongethit = 1
supermove = 1
ownpal = 1

[State 3260, ki1]
type = Explod
trigger1 = time = 16
anim = 2006
sprpriority = 2
postype = p1
pos = -32,-99
bindtime = 1
removetime = 104
removeongethit = 1
supermove = 1
ownpal = 1

[State 3260, effect1]
type = Explod
trigger1 = time = 16
anim = 3250
sprpriority = 2
postype = p1
pos = -18,-41
bindtime = 1
removetime = 104
removeongethit = 1
supermove = 1
ownpal = 1

[State 3260, effect2]
type = Explod
trigger1 = time = 16
anim = 3250
sprpriority = 2
postype = p1
pos = 44,-43
bindtime = 1
removetime = 104
removeongethit = 1
supermove = 1
ownpal = 1

[State 3260, snd1];『溜める音』
type = PlaySnd
trigger1 = AnimElem = 1
value = 3000,0
channel = 4

[State 2260, StopSnd]
type = StopSnd
trigger1 = animelem = 8
channel = 4

[State 3260, snd2];『撃つ音』
type = PlaySnd
trigger1 = AnimElem = 7
value = 3250,0

[State 3260, voice1];『はあぁ〜！』
type = PlaySnd
trigger1 = time = 16
value = 4000,0

[State 3260, voice2];『くらえ〜！』
type = PlaySnd
trigger1 = AnimElem = 7
value = 1000,1

[State 3260, proj]
type = Explod
trigger1 = animelem = 8
anim = 3261
sprpriority = 2
postype = p1
pos = 0,0
bindtime = -1
removetime = 48
removeongethit = 1
ownpal = 1

[State 3260, hit]
type = Projectile
trigger1 = AnimElem = 8
projanim = 3262
projhitanim = -1
projID = 3202
projremove = 0
projremovetime = 48
velocity = 0
projshadow = 0
projpriority = 5
postype = p1
offset = 0,0
attr = A, HP
damage = 280, 20
animtype = heavy
hitflag = MAFd
guardflag = MA
sparkno = s8005
guard.sparkno = s8000
sparkxy = ceil (p2dist x) + -10, 0
hitsound = S1,1
getpower = 0
guardsound = S3,0
pausetime = 0,13
ground.hittime = 15
ground.type = high
ground.slidetime = 15
ground.velocity = -12.5
air.velocity = -12,-4
air.fall = 1
fall=1
fall.recover = 0
air.juggle = 10
envshake.time = 10
envshake.ampl = 4
yaccel = .5
removeongethit = 1

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


;============================================================
;---------------------セルジュニアアタック
;============================================================

[Statedef 3100]
type = S
movetype = A
physics = S
anim = 3100
poweradd = -2000
velset = 0,0
ctrl = 0
juggle = 1
sprpriority = 3

[state 3100, super a]
type = superpause
trigger1 = time = 0
time = 182
movetime = 182
anim = -1
;darken = 0

[State 3200, ]
type = EnvShake
trigger1 = time = 4
time = 80
freq = 120
ampl = 3

[State 3100, Aura1]
type = Explod
trigger1 = time = 0
anim = 4000
sprpriority = 2
postype = p1
pos = 4,0
bindtime = -1
removetime = 74
removeongethit = 1
supermove = 1

[State 3100, Aura2]
type = Explod
trigger1 = time = 80
anim = 4001
sprpriority = 2
postype = p1
pos = 5,0
bindtime = 1
removetime = 6
removeongethit = 1
supermove = 1
ownpal = 1

[State 3100, dust]
type = explod
removetime = 74;26
trigger1 = time = 4
anim = 8103
pos = -10,5
sprpriority = 5
bindtime = -1
ownpal = 1
removeongethit = 1
ignorehitpause = 1
supermove = 1
facing = -1

[State 3100, !];『！』
type = Explod
trigger1 = time = 105
anim = 8800
sprpriority = 5
postype = p2
pos = 45,-95
bindtime = -1
removetime = 75
removeongethit = 1
supermove = 1
ontop = 1

[State 3100, aura]
type = PlaySnd
trigger1 = time = 0
value = 3000,1

[State 3100, voice];『はーー』
type = PlaySnd
trigger1 = time = 0
value = 4000,0

[State 3100, sound];『セルジュニアの飛ぶ音』
type = PlaySnd
trigger1 = time = 66
trigger2 = time = 68
trigger3 = time = 71
trigger4 = time = 73
value = 100,0

[State 3100, sound];『！』
type = PlaySnd
trigger1 = time = 100
value = 3000,2

[State 3100, sound];『くらえ！』
type = PlaySnd
trigger1 = animelem = 8
value = 1000,0

[State 3100, flash]
type = PalFX
trigger1 = TimeMod = 4,0
triggerall = animelem = 2, >= 1 && animelem = 3, <= 1
time = 1
add = 100,100,100

[State 3100, palfx]
type = PalFX
trigger1 = animelem = 6
time = 10
add = 100,100,100
mul = 256,256,256
sinadd = -100,-100,-100,40
invertall = 0
color = 256

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

;--------------------セルジュニア
[State 3101, 1];後ろ
type = Helper
trigger1 = time = 68;AnimElem = 3 
pos = -50, -47
postype = p1
stateno = 3103
helpertype = normal
name = "celljunior"
id = 3101
ownpal = 0;1
supermovetime = 114
pausemovetime = 114

[State 3101, 2];左下
type = Helper
trigger1 = time = 69;AnimElem = 3 
pos = -35, -20
postype = p1
stateno = 3103;4
helpertype = normal
name = "celljunior"
id = 3102
ownpal = 0;1
supermovetime = 113
pausemovetime = 113

[State 3101, 3];右下
type = Helper
trigger1 = time = 70;AnimElem = 3 
pos = 13, -10
postype = p1
stateno = 3104;3
helpertype = normal
name = "celljunior"
id = 3103
ownpal = 0;1
supermovetime = 112
pausemovetime = 112

[State 3101, 4];先頭
type = Helper
trigger1 = time = 71;AnimElem = 3 
pos = 35, -45
postype = p1
stateno = 3101
helpertype = normal
name = "celljunior"
id = 3104
ownpal = 0;1
supermovetime = 111
pausemovetime = 111

[State 3101, 5];右上
type = Helper
trigger1 = time = 72;AnimElem = 3 
pos = 15, -70
postype = p1
stateno = 3101
helpertype = normal
name = "celljunior"
id = 3105
ownpal = 0;1
supermovetime = 110
pausemovetime = 110

[State 3101, 6];中央
type = Helper
trigger1 = time = 73;AnimElem = 3 
pos = -10, -40
postype = p1
stateno = 3104
helpertype = normal
name = "celljunior"
id = 3106
ownpal = 0;1
supermovetime = 109
pausemovetime = 109

[State 3101, 7];左上
type = Helper
trigger1 = time = 74;AnimElem = 3 
pos = -35, -70
postype = p1
stateno = 3102
helpertype = normal
name = "celljunior"
id = 3107
ownpal = 0;1
supermovetime = 108
pausemovetime = 108

;------------------------------へるぱー
[Statedef 3101]
type = A
movetype = A
physics = N
anim = 3101
velset = 0

[State 3101, 0]
type = Turn
trigger1 = p2Dist X < 0

[State 3101, Seek 1]
type = VelAdd
trigger1 = P2Dist X < 0
trigger1 = time >= 120
x = -.5

[State 3101, Seek 2]
type = VelAdd
trigger1 = P2Dist X > 0
trigger1 = time >= 120
x = .5

[State 3101, Seek 3]
type = VelAdd
trigger1 = P2Dist Y < 50
trigger1 = time >= 120
y = -.5

[State 3101, Seek 4]
type = VelAdd
trigger1 = P2Dist Y > 50
trigger1 = time >= 120
y = .5

[State 3101, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(1) = parent,fvar(1)

[State 3101, VarSet]
type = VarSet
trigger1 = animelem = 54
fvar(2) = ifelse((root,P2dist x=[0,1]),1,ifelse((root,P2dist x=[-1,0]),-1,root,P2dist x))

[State 3101, VarSet]
type = VarSet
trigger1 = animelem = 54
fvar(3) = ifelse((root,P2dist y=[0,1]),1,ifelse((root,P2dist y=[-1,0]),-1,root,P2dist y))+20

[State 3101, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
var(0) = ceil((atan(fvar(2)/fvar(3))*180)/pi)-(90*ifelse(root,P2dist Y<0,-1,1))

[State 3101, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
var(0) = ifelse(var(0)>60,60,ifelse(var(0)<-60,-60,var(0)))

[State 3101, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(0) = atan(fvar(2)/fvar(3))-(.5*pi*ifelse(root,P2dist Y <0,-1,1))

[State 3101, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(0) = ifelse(fvar(0)>(.33*pi),.33*pi,ifelse(fvar(0)<(-.33*pi),-.33*pi,fvar(0)))

[State 3101, 1]
type = angleset
trigger1 = animelem = 54
value = var(0)

[State 3101, 1]
type = angledraw
trigger1 = animelem = 54

[State 3101, 1]
type = VelSet
trigger1 = animelem = 54
x = abs(20*cos(fvar(0)))
y = -10*sin(fvar(0))


[State 3101, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 3101, sound];『ウッキャー』
type = PlaySnd
trigger1 = animelem = 44
value = 1000,5

[State 3101, HitDef]
type = HitDef
trigger1 = !time
attr = S, HP
animtype = Medium
damage = 60,7
hitflag = MAFD
guardflag = MA
pausetime = 0, 10
sparkno = s8005
guard.sparkno = s8000
sparkxy = 10,-10
hitsound = s1000,6
guardsound = s1000,6
ground.type = High
ground.slidetime = 13
ground.hittime = 26
ground.velocity = -3,-6
guard.velocity = -6
air.velocity = -3,-6
airguard.velocity = -6,-1
down.velocity = -12,0
down.hittime = 26
palfx.color = 0
fall = 1
fall.recover = 0
envshake.time = 30
envshake.freq = 55
envshake.ampl = 6
getpower = 0
projID = 3100

[State 3101, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NT, ST, HT
ignorehitpause = 1

[State 3101, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 3150
attr = SCA, NP, SP, HP, NA, SA, HA
ignorehitpause = 1

[State 3101, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP, NA, SA, HA
time = 1
ignorehitpause = 1

[State 3101, ChangeState]
type = ChangeState
trigger1 = MoveContact = 1
trigger2 = parent, lose
value = 3150

[State 3101, 1]
type = DestroySelf
trigger1 = MoveContact = 1

;----------------へるぱー2
[Statedef 3102]
type = A
movetype = A
physics = N
anim = 3102
velset = 0

[State 3202, 0]
type = Turn
trigger1 = p2Dist X < 0

[State 3202, Seek 1]
type = VelAdd
trigger1 = P2Dist X < 0
trigger1 = time >= 120
x = -.5

[State 3202, Seek 2]
type = VelAdd
trigger1 = P2Dist X > 0
trigger1 = time >= 120
x = .5

[State 3202, Seek 3]
type = VelAdd
trigger1 = P2Dist Y < 50
trigger1 = time >= 120
y = -.5

[State 3202, Seek 4]
type = VelAdd
trigger1 = P2Dist Y > 50
trigger1 = time >= 120
y = .5

[State 3202, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(1) = parent,fvar(1)

[State 3102, VarSet]
type = VarSet
trigger1 = animelem = 54
fvar(2) = ifelse((root,P2dist x=[0,1]),1,ifelse((root,P2dist x=[-1,0]),-1,root,P2dist x))

[State 3102, VarSet]
type = VarSet
trigger1 = animelem = 54
fvar(3) = ifelse((root,P2dist y=[0,1]),1,ifelse((root,P2dist y=[-1,0]),-1,root,P2dist y))+20

[State 3102, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
var(0) = ceil((atan(fvar(2)/fvar(3))*180)/pi)-(90*ifelse(root,P2dist Y<0,-1,1))

[State 3102, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
var(0) = ifelse(var(0)>60,60,ifelse(var(0)<-60,-60,var(0)))

[State 3102, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(0) = atan(fvar(2)/fvar(3))-(.5*pi*ifelse(root,P2dist Y <0,-1,1))

[State 3102, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(0) = ifelse(fvar(0)>(.33*pi),.33*pi,ifelse(fvar(0)<(-.33*pi),-.33*pi,fvar(0)))

[State 3102, 1]
type = angleset
trigger1 = animelem = 54
value = var(0)

[State 3102, 1]
type = angledraw
trigger1 = animelem = 54

[State 3102, 1]
type = VelSet
trigger1 = animelem = 54
x = abs(18*cos(fvar(0)))
y = -10*sin(fvar(0))

[State 3102, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 3102, sound];『ウッキャー』
type = PlaySnd
trigger1 = animelem = 46
value = 1000,5

[State 3102, HitDef]
type = HitDef
trigger1 = !time
attr = S, HP
animtype = Medium
damage = 60,7
hitflag = MAFD
guardflag = MA
pausetime = 0, 10
sparkno = s8005;s8450
guard.sparkno = s8000
sparkxy = 10,-10
hitsound = s1000,6
guardsound = s1000,6
ground.type = High
ground.slidetime = 13
ground.hittime = 26
ground.velocity = -3,-6
guard.velocity = -6
air.velocity = -3,-6
airguard.velocity = -6,-1
down.velocity = -12,0
down.hittime = 26
palfx.color = 0
fall = 1
fall.recover = 0
envshake.time = 30
envshake.freq = 55
envshake.ampl = 6
getpower = 0
projID = 3100

[State 3102, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NT, ST, HT
ignorehitpause = 1

[State 3102, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 3150
attr = SCA, NP, SP, HP, NA, SA, HA
ignorehitpause = 1

[State 3102, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP, NA, SA, HA
time = 1
ignorehitpause = 1

[State 3102, ChangeState]
type = ChangeState
trigger1 = MoveContact = 1
trigger2 = parent, lose
value = 3151

[State 3102, 2]
type = DestroySelf
trigger1 = MoveContact = 1

;----------------へるぱー3
[Statedef 3103]
type = A
movetype = A
physics = N
anim = 3101
velset = 0
sprpriority = 5

[State 3103, 0]
type = Turn
trigger1 = p2Dist X < 0

[State 3103, Seek 1]
type = VelAdd
trigger1 = P2Dist X < 0
trigger1 = time >= 120
x = -.5

[State 3103, Seek 2]
type = VelAdd
trigger1 = P2Dist X > 0
trigger1 = time >= 120
x = .5

[State 3103, Seek 3]
type = VelAdd
trigger1 = P2Dist Y < 50
trigger1 = time >= 120
y = -.5

[State 3103, Seek 4]
type = VelAdd
trigger1 = P2Dist Y > 50
trigger1 = time >= 120
y = .5

[State 3103, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(1) = parent,fvar(1)

[State 3103, VarSet]
type = VarSet
trigger1 = animelem = 54
fvar(2) = ifelse((root,P2dist x=[0,1]),1,ifelse((root,P2dist x=[-1,0]),-1,root,P2dist x))

[State 3103, VarSet]
type = VarSet
trigger1 = animelem = 54
fvar(3) = ifelse((root,P2dist y=[0,1]),1,ifelse((root,P2dist y=[-1,0]),-1,root,P2dist y))+20

[State 3103, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
var(0) = ceil((atan(fvar(2)/fvar(3))*180)/pi)-(90*ifelse(root,P2dist Y<0,-1,1))

[State 3103, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
var(0) = ifelse(var(0)>60,60,ifelse(var(0)<-60,-60,var(0)))

[State 3103, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(0) = atan(fvar(2)/fvar(3))-(.5*pi*ifelse(root,P2dist Y <0,-1,1))

[State 3103, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(0) = ifelse(fvar(0)>(.33*pi),.33*pi,ifelse(fvar(0)<(-.33*pi),-.33*pi,fvar(0)))

[State 3103, 1]
type = angleset
trigger1 = animelem = 54
value = var(0)

[State 3103, 1]
type = angledraw
trigger1 = animelem = 54

[State 3103, 1]
type = VelSet
trigger1 = animelem = 54
x = abs(16*cos(fvar(0)))
y = -10*sin(fvar(0))

[State 3103, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 3103, sound];『ウッキャー』
type = PlaySnd
trigger1 = animelem = 48
value = 1000,5

[State 3103, HitDef]
type = HitDef
trigger1 = !time
attr = S, HP
animtype = Medium
damage = 60,7
hitflag = MAFD
guardflag = MA
pausetime = 0, 10
sparkno = s8005;s8450
guard.sparkno = s8000
sparkxy = 10,-10
hitsound = s1000,6
guardsound = s1000,6
ground.type = High
ground.slidetime = 13
ground.hittime = 26
ground.velocity = -3,-6
guard.velocity = -6
air.velocity = -3,-6
airguard.velocity = -6,-1
down.velocity = -12,0
down.hittime = 26
palfx.color = 0
fall = 1
fall.recover = 0
envshake.time = 30
envshake.freq = 55
envshake.ampl = 6
getpower = 0
projID = 3100

[State 3103, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NT, ST, HT
ignorehitpause = 1

[State 3103, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 3150
attr = SCA, NP, SP, HP, NA, SA, HA
ignorehitpause = 1

[State 3103, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP, NA, SA, HA
time = 1
ignorehitpause = 1

[State 3103, ChangeState]
type = ChangeState
trigger1 = MoveContact = 1
trigger2 = parent, lose
value = 3152

[State 3103, 3]
type = DestroySelf
trigger1 = MoveContact = 1

;----------------へるぱー4
[Statedef 3104]
type = A
movetype = A
physics = N
anim = 3102
velset = 0
sprpriority = 5

[State 3104, 0]
type = Turn
trigger1 = p2Dist X < 0

[State 3104, Seek 1]
type = VelAdd
trigger1 = P2Dist X < 0
trigger1 = time >= 120
x = -.5

[State 3104, Seek 2]
type = VelAdd
trigger1 = P2Dist X > 0
trigger1 = time >= 120
x = .5

[State 3104, Seek 3]
type = VelAdd
trigger1 = P2Dist Y < 50
trigger1 = time >= 120
y = -.5

[State 3104, Seek 4]
type = VelAdd
trigger1 = P2Dist Y > 50
trigger1 = time >= 120
y = .5

[State 3104, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(1) = parent,fvar(1)

[State 3104, VarSet]
type = VarSet
trigger1 = animelem = 54
fvar(2) = ifelse((root,P2dist x=[0,1]),1,ifelse((root,P2dist x=[-1,0]),-1,root,P2dist x))

[State 3104, VarSet]
type = VarSet
trigger1 = animelem = 54
fvar(3) = ifelse((root,P2dist y=[0,1]),1,ifelse((root,P2dist y=[-1,0]),-1,root,P2dist y))+20

[State 3104, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
var(0) = ceil((atan(fvar(2)/fvar(3))*180)/pi)-(90*ifelse(root,P2dist Y<0,-1,1))

[State 3104, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
var(0) = ifelse(var(0)>60,60,ifelse(var(0)<-60,-60,var(0)))

[State 3104, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(0) = atan(fvar(2)/fvar(3))-(.5*pi*ifelse(root,P2dist Y <0,-1,1))

[State 3104, VarSet]
type = VarSet
trigger1 = animelem = 54
ignorehitpause = 1
fvar(0) = ifelse(fvar(0)>(.33*pi),.33*pi,ifelse(fvar(0)<(-.33*pi),-.33*pi,fvar(0)))

[State 3104, 1]
type = angleset
trigger1 = animelem = 54
value = var(0)

[State 3104, 1]
type = angledraw
trigger1 = animelem = 54

[State 3104, 1]
type = VelSet
trigger1 = animelem = 54
x = abs(14*cos(fvar(0)))
y = -10*sin(fvar(0))

[State 3104, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 3104, sound];『ウッキャー』
type = PlaySnd
trigger1 = animelem = 50
value = 1000,5

[State 3104, HitDef]
type = HitDef
trigger1 = !time
attr = S, HP
animtype = Medium
damage = 60,7
hitflag = MAFD
guardflag = MA
pausetime = 0, 10
sparkno = s8005;s8450
guard.sparkno = s8000
sparkxy = 10,-10
hitsound = s1000,6
guardsound = s1000,6
ground.type = High
ground.slidetime = 13
ground.hittime = 26
ground.velocity = -3,-6
guard.velocity = -6
air.velocity = -3,-6
airguard.velocity = -6,-1
down.velocity = -12,0
down.hittime = 26
palfx.color = 0
fall = 1
fall.recover = 0
envshake.time = 30
envshake.freq = 55
envshake.ampl = 6
getpower = 0
projID = 3100

[State 3104, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NT, ST, HT
ignorehitpause = 1

[State 3104, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 3150
attr = SCA, NP, SP, HP, NA, SA, HA
ignorehitpause = 1

[State 3104, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP, NA, SA, HA
time = 1
ignorehitpause = 1

[State 3104, ChangeState]
type = ChangeState
trigger1 = MoveContact = 1
trigger2 = parent, lose
value = 3153

[State 3104, 4]
type = DestroySelf
trigger1 = MoveContact = 1

;------------------爆発・頭部
[Statedef 3150]
type = S
movetype = A
physics = N
velset = 0,0
anim = 3104
sprpriority = 4
ctrl = 0

[State 3150, vel1]
type = Velset
trigger1 = animelem = 1
x = -4
y = -4

[State 3150, vel2]
type = Velset
trigger1 = animelem = 2
x = -3
y = 0

[State 3150, vel3]
type = Velset
trigger1 = animelem = 3
x = -2
y = 4

[State 3150, vel4]
type = Velset
trigger1 = animelem = 4
x = -1
y = 6

[State 3150, explo]
type = Explod
trigger1 = time = 0
anim = 8900
sprpriority = 5
postype = p1
pos = 20,-10
bindtime = -1
removetime = 19
supermove = 1
facing = -1

[State 3150, 0]
type = AssertSpecial
trigger1 = Time >= 0
flag = NoShadow

[State 3150, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

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

;------------------爆発・腕
[Statedef 3151]
type = S
movetype = A
physics = N
velset = 0,0
anim = 3105
sprpriority = 4
ctrl = 0

[State 3151, vel1]
type = Velset
trigger1 = animelem = 1
x = 4
y = -4

[State 3151, vel2]
type = Velset
trigger1 = animelem = 2
x = 3
y = 0

[State 3151, vel3]
type = Velset
trigger1 = animelem = 3
x = 2
y = 4

[State 3151, vel4]
type = Velset
trigger1 = animelem = 4
x = 1
y = 6

[State 3151, explo]
type = Explod
trigger1 = time = 0
anim = 8900
sprpriority = 5
postype = p1
pos = 20,-10
bindtime = -1
removetime = 19
supermove = 1
facing = -1

[State 3151, 0]
type = AssertSpecial
trigger1 = Time >= 0
flag = NoShadow

[State 3151, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

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

;------------------爆発・胴体
[Statedef 3152]
type = S
movetype = A
physics = N
velset = 0,0
anim = 3106
sprpriority = 4
ctrl = 0

[State 3152, vel1]
type = Velset
trigger1 = animelem = 1
x = 3
y = -4

[State 3152, vel2]
type = Velset
trigger1 = animelem = 2
x = 2
y = 0

[State 3152, vel3]
type = Velset
trigger1 = animelem = 3
x = 1
y = 4

[State 3152, vel4]
type = Velset
trigger1 = animelem = 4
x = 1
y = 6

[State 3152, explo]
type = Explod
trigger1 = time = 0
anim = 8900
sprpriority = 5
postype = p1
pos = 20,-10
bindtime = -1
removetime = 19
supermove = 1
facing = -1

[State 3152, 0]
type = AssertSpecial
trigger1 = Time >= 0
flag = NoShadow

[State 3152, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

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

;------------------爆発・脚
[Statedef 3153]
type = S
movetype = A
physics = N
velset = 0,0
anim = 3107
sprpriority = 4
ctrl = 0

[State 3153, vel1]
type = Velset
trigger1 = animelem = 1
x = -3
y = -4

[State 3153, vel2]
type = Velset
trigger1 = animelem = 2
x = -2
y = 0

[State 3153, vel3]
type = Velset
trigger1 = animelem = 3
x = -1
y = 4

[State 3153, vel4]
type = Velset
trigger1 = animelem = 4
x = -1
y = 6

[State 3153, explo]
type = Explod
trigger1 = time = 0
anim = 8900
sprpriority = 5
postype = p1
pos = 20,-10
bindtime = -1
removetime = 19
supermove = 1
facing = -1

[State 3153, 0]
type = AssertSpecial
trigger1 = Time >= 0
flag = NoShadow

[State 3153, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

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


;============================================================
; ちきしょおおおおおおおおおおおおおおおお
;============================================================

[Statedef 3000]
type    = A
movetype= A
physics = n
velset = 0,0
ctrl = 0
poweradd = -3000
anim = 3000
sprpriority = 4

[State 3005, dust1]
type = Explod
trigger1 = AnimElem = 1
anim = 8106
postype = p1
pos = 13,10
bindtime = 1
sprpriority = 2
ownpal = 1
facing = -1
removeongethit = 1

[State 3005, dust2]
type = Explod
trigger1 = time = 33
anim = 8106
postype = p1
pos = 13,35
bindtime = 1
sprpriority = 2
ownpal = 1
facing = -1
supermove = 1
removetime = 221
removeongethit = 1

[State 3000, pause]
type = SuperPause
trigger1 = Animelem = 18
time = 120
movetime = 120
anim = -1
darken = 1
p2defmul = 1
supermove = 1

[State 3200, Aura1]
type = Explod
trigger1 = animelem = 18
anim = 4000
sprpriority = 3
postype = p1
pos = 0,-25
bindtime = -1
removetime = 100
removeongethit = 1
supermove = 1

[State 3200, Aura2]
type = Explod
trigger1 = time = 238
anim = 4001
sprpriority = 3
postype = p1
pos = 3,50
bindtime = 1
removetime = 6
removeongethit = 1
supermove = 1

[state 3001, speedlines]
type = explod
trigger1 = Animelem = 18
anim = 8600
postype = back
pos = 0,10
bindtime = 1
supermove = 1
sprpriority = -1
ontop = 0
ownpal = 0
removetime = 120
facing = -1

[state 3001, speedlines]
type = explod
trigger1 = Animelem = 18
anim = 8700
postype = back
pos = 0,0;10
bindtime = 1
supermove = 1
sprpriority = -1
ontop = 0
ownpal = 0
removetime = 120

[State 3001, bg]
type = assertspecial
trigger1 = time = [138,258]
flag = noFG
flag2 = noBG
flag3 = nobardisplay
ignorehitpause = 1

[State 4500, flash]
type = PalFX
;triggerall = Time >= 5
trigger1 = TimeMod = 4,0
triggerall = animelem = 18, >= 1
time = 1
add = 100,100,100

[State 3000, spark]
type = PlaySnd
trigger1 = AnimElem = 1
value = 700,1
channel = 5

[State 3000, voice];『ちきしょう・・・』
type = PlaySnd
trigger1 = time = 10;AnimElem = 1
value = 3000,3
volume = 255
channel = 0

[State 3000, aura]
type = PlaySnd
trigger1 = AnimElem = 17
value = 3000,1

[State 3000, ]
type = PalFX
trigger1 = time < 50
time = 1
add = 256-(time*5),256-(time*5),256-(time*5)

[State 3000, ]
type = VelSet
trigger1 = !time
y = -1

[State 3000, ]
type = VelSet
trigger1 = time = 35
y = 0

[State 3000, ];すぱーきん
type = Explod
triggerall = Time < 120
trigger1 = random < 200
anim = 8950
ID = 8950
pos = 0,-65
postype = p1
facing = ifelse(random<500,-1,1)
vfacing = ifelse(random<500,-1,1)
bindtime = 1
random = 0,80
scale = 1,1
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 3002, helper];すぱーきん
type = Helper
trigger1 = time = 1
trigger2 = time = 8
trigger3 = time = 15
trigger4 = time = 22
trigger5 = time = 29
trigger6 = time = 36
trigger7 = time = 43
trigger8 = time = 50
trigger9 = time = 57
trigger10 = time = 64
trigger11 = time = 71
trigger12 = time = 78
trigger13 = time = 85
trigger14 = time = 92
trigger15 = time = 99
trigger16 = time = 106
trigger17 = time = 113
trigger18 = time = 120
trigger19 = time = 127
trigger20 = time = 134
pos = 0, 7
postype = p1
stateno = 3002
helpertype = normal
name = "sparking"
id = 3002
ownpal = 0
supermovetime = 999999
pausemovetime = 999999

[State 3000, ]
type = BGPalFX
triggerall = Time < 140
trigger1 = Random < 100
time = 2
add = 200,0,0
invertall = 1

[State 3000, ]
type = Explod
trigger1 = AnimElem = 10
anim = 8950
ID = 8950
pos = 0,0
postype = p1
sprpriority = 3
ownpal = 1
removeongethit = 1

[State 3200, ]
type = EnvShake
trigger1 = time = 0
time = 138
freq = 120
ampl = 2

[State 3000, ]
type = EnvShake
trigger1 = animelem = 18
time = 120
freq = 120
ampl = 6

[State 3000, ]
type = ChangeAnim
trigger1 = Anim = 3000 && !AnimTime
value = 44
elem = 2

;-----------------振ってくる
[State 3000, ]
type = Gravity
trigger1 = Anim = 44

[State 3000, ]
type = VelSet
trigger1 = Pos Y >= 0 && Vel Y > 0
y = 0

[State 3000, ]
type = PosSet
trigger1 = Pos Y >= 0
y = 0

[State 3000, ];着地
type = Explod
trigger1 = Anim = 44 && pos Y = 0
anim = 8102
pos = 0,4
scale = .75, .75
postype = p1
sprpriority = 0
ownpal = 1
ignorehitpause = 1
facing = -1

[State 3000, ]
type = PlaySnd
trigger1 = Anim = 44 && pos Y = 0
value = 1,5

[State 3000, ]
type = ChangeState
trigger1 = Anim = 44 && pos Y = 0
value = 3001

;--------------------------すぱーきんへるぱ
[Statedef 3002]
type = A
movetype = A
physics = N
anim = 3002
velset = 0
sprpriority = 5

[State 3000, hit]
type = hitdef
trigger1 = !time
projhits = 45
projmisstime = 7
postype = p1
offset = 0,0
attr = S, SP
damage = 2,1
animtype = medium
hitflag = MAFP
guardflag = MA
sparkno = -1;S8003
guard.sparkno = -1;S8000
sparkxy = -10, -65
hitsound = S1,0
getpower = 0
guardsound = S3,0
pausetime = 0,5
ground.hittime = 15
ground.type = high
ground.slidetime = 15
ground.velocity = 0,-1
air.velocity = -.3,-1.3
air.fall = 1
fall.recover = 0
fall=1
;air.juggle = 10
yaccel = .5
envshake.time = 20
envshake.freq = 10
envshake.ampl = -7
kill = 0

[state 3103, hitspark]
type = explod
trigger1 = movehit = 1
anim = 8003
pos = 0,-70
postype = p2
bindtime = 1
ontop = 1
ownpal = 1
facing = -1
supermove = 1

[state 3103, guardspark]
type = explod
trigger1 = moveguarded = 1
anim = 8000
pos = 0,-70
postype = p2
bindtime = 1
ontop = 1
ownpal = 1
facing = -1
supermove = 1

[State 3103, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 3103, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 3002
attr = SCA, NP, SP, HP, NA, SA, HA
ignorehitpause = 1

[State 3103, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 3103, 2]
type = DestroySelf
trigger1 = time = 7;MoveContact = 1

;-----------------------------突進
[Statedef 3001]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3001

[State 3001, 0]
type = Turn
trigger1 = p2Dist X < 0

[State 3001, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 100,0

[State 3001, 1]
type = PosAdd
trigger1 = Time > 2
x = 6

[State 3001, 2]
type = VelSet
trigger1 = Time = 3
x = 9.5

[State 3001, 3]
type = VelAdd
trigger1 = Time > 2
x = .15

[State 3001, AfterImage]
type = AfterImage
trigger1 = Time = 0
time = 20
FrameGap = 2
length = 12
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
Trans = Add1

[State 3001, dust1]
type = Explod
trigger1 = AnimElem = 1
anim = 8100
postype = p1
pos = 0,3
bindtime = 1
sprpriority = 2
ownpal = 1

[state 3001, dust2]
type = explod
;trigger1 = 1
trigger1 = time = 0;> 0
pos = 0,3
pos2 = -2,0
spacing = 1
anim = 8104
bindtime = -1
ownpal = 1

[State 3001, hit]
type = hitdef
trigger1 = AnimElem = 3
attr = S, ha; SP
damage = 0,0
animtype = light
hitflag = maf
guardflag = ma
numhits = 0
sparkno = -1
guard.sparkno = s8000
sparkxy = 0,-70
hitsound = -1
guardsound = S3,0
pausetime = 0,5
ground.hittime = 15
ground.type = high
ground.slidetime = 5
ground.velocity = 0,0
air.velocity = 0,0
p2facing = 1
kill = 0
guard.kill = 0
;p2stateno= 3011
getpower = 0

[State 3005, 4]
type = ChangeState
trigger1 = movecontact = 1;movehit = 1
value = 3005

[State 3001, superarmor]
type = HitOverRide
trigger1 = Alive = 1
trigger1 = animtime != 0
time = 1
attr = SCA,NA,NP,SA,SP
slot = 0
stateno = 4001

[State 3001, end]
type = ChangeState
trigger1 = Animtime = 0
value = 3005

;-----------------------乱舞
[Statedef 3005]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3005

[State 3005, MUTEKI]
type = NotHitBy 
trigger1 = movehit = 1
value = SCA, AA, AP
time = 146

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

[State 3005, pos]
type = Velset
trigger1 = time > 0
x = 4

[State 3005, width]
type = width
trigger1 = 1
edge = 70,0

[State 3005, bind]
type = TargetBind
Trigger1 = AnimElem = 1
pos =  70,0
time = 1

[state 3005, voice1]
type = PlaySnd
trigger1 = time = 0
trigger2 = AnimElem = 24
trigger3 = AnimElem = 48
value = 200,5

[state 3005, voice2]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 29
trigger3 = AnimElem = 54
value = 200,4

[state 3005, voice3]
type = PlaySnd
trigger1 = AnimElem = 10
trigger2 = AnimElem = 36
value = 200,3

[state 3005, voice4]
type = PlaySnd
trigger1 = AnimElem = 15
trigger2 = AnimElem = 40
value = 200,2

[state 3005, sound]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 16
trigger4 = AnimElem = 25
trigger5 = AnimElem = 30
trigger6 = AnimElem = 37
trigger7 = AnimElem = 41
trigger8 = AnimElem = 49
trigger9 = AnimElem = 55
value = 0,2

[State 3005, hit]
type = hitdef
trigger1 = AnimElem = 1
attr = S, ha;SP
damage = 40,20
animtype = heavy
hitflag = maf
snap = 70,0,0
sparkno = s8004
guard.sparkno = s8000
sparkxy = -15,-60
guardflag = MA
hitsound = S1,4
guardsound = S3,0
pausetime = 25,24
ground.type = low
ground.slidetime = 25
guard.slidetime = 25
ground.hittime = 30
guard.hittime = 30
ground.velocity = -10.5,0
air.velocity = -5,-5
envshake.time = 20
envshake.ampl = 6
p2facing = 1
yaccel = 0.5
kill = 0
guard.kill = 0
fall.recover = 0
getpower = 0

[State 3005, hit]
type = hitdef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 20
trigger3 = AnimElem = 27
trigger4 = AnimElem = 51
trigger5 = AnimElem = 58
attr = S, ha;SP
damage = 40,20
animtype = heavy
hitflag = maf
snap = 70,0,0
sparkno = s8004
guard.sparkno = s8000
sparkxy = -13,-70
guardflag = MA
hitsound = S1,4
guardsound = S3,0
pausetime = 25,24
ground.type = high
ground.slidetime = 25
guard.slidetime = 25
ground.hittime = 30
guard.hittime = 30
ground.velocity = -10.5,0
air.velocity = -5,-5
envshake.time = 20
envshake.ampl = 6
p2facing = 1
yaccel = 0.5
kill = 0
guard.kill = 0
fall.recover = 0
getpower = 0

[State 3005, hit]
type = hitdef
trigger1 = AnimElem = 13
trigger2 = AnimElem = 32
trigger3 = AnimElem = 38
trigger4 = AnimElem = 43
attr = S, ha;SP
damage = 40,20
animtype = heavy
hitflag = maf
snap = 70,0,0
sparkno = s8004
guard.sparkno = s8000
sparkxy = -8,-60
guardflag = MA
hitsound = S1,4
guardsound = S3,0
pausetime = 25,24
ground.type = low
ground.slidetime = 25
guard.slidetime = 25
ground.hittime = 30
guard.hittime = 30
ground.velocity = -10,0
air.velocity = -5.5,-5
envshake.time = 20
envshake.ampl = 6
p2facing = 1
yaccel = 0.5
kill = 0
guard.kill = 0
fall.recover = 0
getpower = 0

[State 3005, AfterImage]
type = AfterImage
trigger1 = Time = 0
time = 150
FrameGap = 2
length = 12
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
Trans = Add1

[State 3005, env]
type = EnvColor
trigger1 = AnimElem = 1
trigger2 = AnimElem = 5
trigger3 = AnimElem = 13
trigger4 = AnimElem = 20
trigger5 = AnimElem = 27
trigger6 = AnimElem = 32
trigger7 = AnimElem = 38
trigger8 = AnimElem = 43
trigger9 = AnimElem = 51
trigger10 = AnimElem = 58
value = 245,245,245
ignorehitpause = 1
time = 1

[State 3005, dust1]
type = Explod
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 16
trigger4 = AnimElem = 25
trigger5 = AnimElem = 30
trigger6 = AnimElem = 37
trigger7 = AnimElem = 41
trigger8 = AnimElem = 49
trigger9 = AnimElem = 55
anim = 8100
postype = p1
pos = -15,3
bindtime = 1
sprpriority = 2
ownpal = 1

[state 3005, dust2]
type = explod
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 16
trigger4 = AnimElem = 25
trigger5 = AnimElem = 30
trigger6 = AnimElem = 37
trigger7 = AnimElem = 41
trigger8 = AnimElem = 49
trigger9 = AnimElem = 55
pos = 10,3
pos2 = 0,3
spacing = 1
anim = 8104
bindtime = -1
ownpal = 1
loop = 1

[State 3005, e]
type = ChangeState
trigger1 = AnimTime = 0
value = 3006

;--------------------掴む
[Statedef 3006]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0             
ctrl = 0                   
anim = 3006
poweradd = 40 
sprpriority = 2

[State 3006, pos]
type = Velset
trigger1 = time > 0
x = 5

[State 3006, hit]
type = hitdef
trigger1 = AnimElem = 2
attr = S, ha;SP
damage = 0,1
animtype = heavy
hitflag = maf
snap = 70,0,0
sparkno = -1
guard.sparkno = -1
sparkxy = -15,-60
guardflag = MA
hitsound = S800,0
guardsound = -1
ground.hittime = 15
ground.type = low
ground.slidetime = 5
ground.velocity = 0,0
air.velocity = 0,0
p1stateno = 3010
p2stateno = 802
;guard.kill = 0
getpower = 0

[State 3006, e]
type = ChangeState
trigger1 = AnimTime = 0
value = 3050

;----------------------持ち上げる
[Statedef 3010]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0             
ctrl = 0                   
anim = 801        
poweradd = 0 
sprpriority = 2

[State 3010, grab]
type = Explod
trigger1 = time = 3
anim = 8007
pos = 50,-100
postype = p1
bindtime = 10
sprpriority = 5
ownpal = 1
removetime = 24

[State 3010, Width]
type = Width
trigger1 = 1
edge = 55,0

[State 3010, Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 3010, Turn]
type = Turn
triggerall = Time < 4
trigger1 = command = "holdback"
;ignorehitpause = 0
;persistent = 1

[State 3010, Facing]
type = TargetFacing
trigger1 = time < 4
value = -1
;ignorehitpause = 0
;persistent = 1

[State 3010, Bind1];１枚目
type = TargetBind
trigger1 = time = 0
pos = 55,-71
time = 6

[State 3010, Bind2];２枚目
type = TargetBind
trigger1 = time = 6
pos = 40,-108
time = 6

[State 3010, Bind3];３枚目
type = TargetBind
trigger1 = time = 12
pos = 45,-109
time = 24

[State 3010, Target]
type = TargetState
trigger1 = AnimElem = 805
value = 803

[State 3010, Change]
type = ChangeState
trigger1 = time = 36;AnimTime = 0 
value = 805
ctrl = 0

;-----------------------空振った
[Statedef 3050]
type = S
movetype = I
physics = S
anim = 3050
velset = 0
ctrl = 0

[State 3050, 1];『馬鹿な・・・』
type = PlaySnd
trigger1 = time = 0
value = 170,0
volume = 255

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

;-----------------------ハイパーアーマー
[Statedef 4001];-------------突進
type    = S
movetype= H
physics = S
ctrl = 0

[State 4001, 10]
type = EnvColor
trigger1 = Time = 0
value = 255,255,255
time = 1

[State 4001, MUTEKI]
type = NotHitBy 
trigger1 = 1
value = SCA, AA, AP
time = 1

[State 4001, attack]
type = ChangeState
trigger1 = Time > 0
value = 3001

;------------------------------------------------------------
;--------------------残像拳---------------------------------
;------------------------------------------------------------

[Statedef 700]
type = a
movetype = A
physics = S
anim = 700
poweradd = -1000
velset = 0,0
ctrl = 0

[State 700, pause]
type = SuperPause
trigger1 = Animelem = 1
time = 20
movetime = 20
anim = -1
darken = 0
p2defmul = 1

[state 700, screenbound]
type = screenbound
trigger1 = anim = 700 && animelem = 10
value = 0
movecamera = 0,0
ignorehitpause = 1

[State 700, behind]
type = Turn
trigger1 = Animelem = 2

[State 700, pos]
type = Posadd
trigger1 = Animelem = 1 , =1
x = p2bodydist X + 85;60

[State 700, color]
type = EnvColor
trigger1 = animelem = 1
value = 200,200,200
time = 3

[State 700, nothit]
type = NotHitBy
trigger1 = 1
value = SCA

[State 700, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 700,0

[State 700, voice]
type = PlaySnd
trigger1 = AnimElem = 7
value = 200,5

[State 700, dust]
type = Explod
trigger1 = AnimElem = 1
anim = 8100
postype = p1
pos = -30,4
bindtime = 1
sprpriority = 2
ownpal = 1
scale = .7, .7
supermovetime = 20

[State 700, zanzou1]
type = Explod
trigger1 = AnimElem = 1
anim = 701
ID = 701
postype = p1
pos = -5,0
bindtime = 1
sprpriority = 2
ownpal = 1
removetime = 12
supermovetime = 12

[State 700, zanzou2]
type = Explod
trigger1 = Movehit && animelem = 14
anim = 702
ID = 702
postype = p1
pos = 0,0
bindtime = 1
sprpriority = 2
ownpal = 1
removetime = 12
supermovetime = 12

[State 700, dust]
type = Explod
trigger1 = Movehit && AnimElem = 14
anim = 8101
postype = p1
pos = 0,2
bindtime = 1
sprpriority = 2
ownpal = 1
facing = 1
removetime = 23

[State 700, hit]
type = HitDef
trigger1 = Animelem = 9
attr = S, NA
damage = 75,10
animtype = diagup;hard
hitflag = MAF
guardflag = MA
sparkxy = -30,-70
sparkno = s8003
guard.sparkno = s8000
hitsound = s1,3
guardsound = S3,0
pausetime = 16,16
ground.hittime = 20
ground.type = high
ground.slidetime = 20
ground.velocity = -3, -8
air.velocity = -3, -8
airguard.velocity = -1, -8
fall = 1
fall.recover = 0
air.juggle = 10
yaccel = .2
envshake.time = 20
envshake.freq = 90
envshake.ampl = -7
kill = 0
p2facing = -1

[state 700, change1]
type = changestate
trigger1 = animtime = 0 && Movehit
value = 710

[state 700, change2]
type = changestate
trigger1 = Moveguarded; && animelem = 11
value = 712

[state 700, change3];missed
type = changestate
triggerall = movecontact = 0
trigger1 = animelem = 15
value = 2460

;-------------------------追い討ち
[Statedef 710]
type = a
movetype = A
physics = S
anim = 710
velset = 0,0
ctrl = 0

[State 710, nojuggle]
type = AssertSpecial
trigger1 = 1
flag = nojugglecheck

[state 710, screenbound]
type = screenbound
trigger1 = anim = 710 && animelem = 5
value = 0
movecamera = 0,0
ignorehitpause = 1

[State 710, muteki]
type = NotHitBy
trigger1 = 1
value = SCA

[state 710, teleport]
type = bindtotarget
trigger1 = anim = 710 && animelem = 1
time = -1
pos = 45,100,head
;pos = -50,70,head

[state 710, followup]
type = hitdef
trigger1 = anim = 710 && animelem = 13
attr = A, SA
damage = 75, 10
animtype = hard
guarDFlag = ma
hitflag = maf
pausetime = 10,7
sparkno = s8003
guard.sparkno = s8000
sparkxy = -10,-30
hitsound = s1,4
guardsound = s3,0
ground.hittime = 20
ground.type = high
ground.slidetime = 20
ground.velocity = 6,22
air.velocity = 6,22
fall = 1
air.fall = 1
fallrecover = 0
envshake.time = 20
envshake.freq = 90
envshake.ampl = -7
fall.envshake.time = 30
fall.envshake.freq = 70
fall.envshake.ampl = -5
fall.envshake.phase = 20
p2stateno = 7010

[State 710, sound]
type = PlaySnd
trigger1 = anim = 710 && AnimElem = 1
value = 700,0

[State 710, voice]
type = PlaySnd
trigger1 = anim = 710 && AnimElem = 8
value = 200,6

[State 710, p2]
type = TargetState
trigger1 = movehit && p2stateno = 5101  && win != 1
value = 750
elem = 1
ignorehitpause = 1

[State 710, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 711;950
ctrl = 0

[state 710, explod]
type = explod
trigger1 = movecontact && p2stateno = 5100
anim = 8105
id = 8105
pos = -5,15
postype = p2
ontop = 1
ownpal = 1
removetime = 40
removeongethit = 0
ignorehitpause = 1
persistent = 0

[state 710, explod2]
type = explod
trigger1 = movecontact && p2stateno = 5100
anim = 8120
pos = -25,12
postype = p2
ontop = 1
ownpal = 1
removetime = 16
removeongethit = 0
ignorehitpause = 1
persistent = 0

[State 710, snd]
type = playsnd
trigger1 = movehit && p2stateno = 5100
value = s1,5
volume = 255
ignorehitpause = 1
persistent = -1


;---------------------------叩きつけられた２Ｐ

[Statedef 750]
type    = L
movetype= H
physics = N
velset = 0,0

[State 750, 1]
type = NotHitBy
trigger1 = 1;Time = 0
value = SCA
time = 80

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

[State 750, p2]
type = ChangeAnim2
Trigger1 = Time = 0
value = 750

[State 750, up]
type = SelfState;ChangeAnim
Trigger1 = Time = 60
value = 5120
ctrl = 1;0

[State 750, dead]
type = SelfState
trigger1 = time = 10 && !alive
value = 5150
ctrl = 0

;[State 750, end]
;type = SelfState
;Trigger1 = animtime = 0
;value = 0
;ctrl = 1

;----------------------------振ってくる１Ｐ
[Statedef 711]
type    = A
physics = A
anim = 44

[State 711, turn]
type = turn
trigger1 = anim = 44 && animelem <= 1

[state 711, 1]
type = VelAdd
trigger1 = Time = 0
y = -0.08

;-----------------------ガードされちった・・・
[Statedef 712]
type = S
movetype = A
physics = S
anim = 712
velset = 0,0
ctrl = 0

[State 712, Land]
type = PlaySnd
trigger1 = Time = 12
value = 52,0

;[State 712, pos]
;type = posset
;trigger1 = time = 0
;y = 0

[State 712, targetbind]
type = targetbind
trigger1 = time = 0
pos = 30,0

[State 712, landdust1]
type = explod
trigger1 = Time = 12
postype = p1
pos = -17,0
spacing = 1
anim = 8100
ownpal = 1
scale = .5, .5

[State 712, landdust]
type = explod
trigger1 = Time = 12
postype = p1
pos = 20,0
facing = -1
spacing = 1
anim = 8100
ownpal = 1
scale = .5, .5

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


;---------------------------override states
; HITC_SHAKE
[Statedef 7010]
type    = C
movetype= H
physics = N
velset = 0,0

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

[State 7010, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
triggerall = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a
phics = a

[State 7010, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 7030


------------------------------------------------
; HITA_UP (initial going up)
[Statedef 7030]
type    = A
movetype= H
physics = N
ctrl = 0

[State 7030, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 7030, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 7030, 1]
type = VelAdd;Gravity
trigger1 = time > 5
y = GetHitVar(yaccel)

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

[State 7030, 4]
type = ChangeState
trigger1 = HitOver
trigger2 = Vel Y > 0 ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 7050 ;HITA_FALL

[State 7030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 7035 ;HITA_UP (transition)


;------------------------------------------------
; HITA_UP_T (transition)
[Statedef 7035]
type    = A
movetype= H
physics = N

[State 7035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

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

[State 7035, 2]
type = VelMul
trigger1 = 1
x = .99

[State 7035, 4]
type = ChangeState
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0 ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0  ;No transition anim
trigger4 = Anim != 5035 ;.
value = 7050 ;HITA_FALL


;-------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 7050]
type    = A
movetype= H
physics = N

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

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

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

[State 7035, 2]
type = VelMul
trigger1 = 1
x = .99

[State 7050, Vel]
type = VelSet
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
trigger1 = Vel X < -5
x = -5

[State 7050, 6]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100 ;HIT_BOUNCE


