; 基本データ
;---------------------------------------------------------------------------
[Data]
life              = 1000   ;ライフ（体力ゲージ）最大値
power             = 3000   ;パワーゲージ最大値（オプション・デフォルトは3000=Lv.3）
attack            = 100    ;攻撃力（デフォルトは１００％）
defence           = 100    ;防御力（デフォルトは１００％）
fall.defence_up   = 50     ;横に倒れている時に一時的に加える防御力（％）
liedown.time      = 60     ;横に倒れている時間（フレーム）
airjuggle         = 15     ;ジャグルポイント限界値
sparkno           = 2      ;デフォルトのヒットスパーク（fightfxから）
guard.sparkno     = 40     ;デフォルトのガードスパーク（fightfxから）
KO.echo           = 0      ;ＫＯ時の音声（11,0）にエコーを掛けるか否か（0=掛けない,1=掛ける）
volume            = 155      ;キャラの標準の音量（最小-255・最大255）
IntPersistIndex   = 59
FloatPersistIndex = 40



; サイズ
;---------------------------------------------------------------------------
[Size]
xscale           = 2       ;キャラの横の大きさ（絶対値・float）
yscale           = 2       ;キャラの縦の大きさ（絶対値・float）
ground.back      = 12      ;地上にいる時の「後方の物理的な幅」
ground.front     = 20      ;地上にいる時の「前方の物理的な幅」
air.back         = 12      ;空中にいる時の「後方の物理的な幅」
air.front        = 20      ;空中にいる時の「前方の物理的な幅」
height           = 35     ;キャラの物理的な高さ（高いほど相手は飛び越しにくくなる）
attack.dist      = 160     ;相手がガード態勢に入る最低の距離
proj.attack.dist = 90      ;自分の「Projectile」に対して相手がガード態勢に入る最低の距離
proj.doscale     = 1       ;xscaleとyscaleを「Projectile」にも影響させるか否か（0=させない・1=させる）
head.pos         = 2,-54  ;キャラの標準の頭の座標
mid.pos          = 2,-50  ;キャラの標準の体中心の座標
shadowoffset     = 0       ;影のＹ軸方向の位置座標
draw.offset      = 0,0     ;キャラの表示座標（Ｘ軸,Ｙ軸）


; 移動速度
;---------------------------------------------------------------------------
[Velocity]
walk.fwd     = 6         ;前進速度
walk.back    = -6        ;後退速度
run.fwd      = 11.2,-5       ;前方に走る速度
run.back     = -11.2,-5   ;後方に走る速度
jump.neu     = 0,-13      ;垂直ジャンプの速度
jump.back    = -4,-13       ;後方ジャンプの速度
jump.fwd     = 4,-13         ;前方ジャンプの速度
runjump.back = -8,-13  ;後方に走ってからのジャンプ速度
runjump.fwd  = 8,-13      ;前方に走ってからのジャンプ速度
airjump.neu  = 0,-11      ;空中垂直ジャンプ速度
airjump.back = -4.55,-11       ;空中後方ジャンプ速度
airjump.fwd  = 4.5,-11         ;空中前方ジャンプ速度


; 運動関係
;---------------------------------------------------------------------------
[Movement]
airjump.num     = 0        ;空中ジャンプが出来る回数
airjump.height  = 35       ;空中ジャンプが出来る最低の高度
yaccel          = .57      ;Ｙ軸加速度（重力）
stand.friction  = .85      ;立っている時の摩擦係数
crouch.friction = .82      ;しゃがんでいる時の摩擦係数



; ステート
;===========================================================================
;---------------------------------------------------------------------------
;タイムオーバー（負けた時）
[Statedef 170]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 170, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
;勝利ポーズ選択
[Statedef 180]
type = S

[State 191, 1]
type = varrandom
trigger1 = time = 0
v = 4
range = 1,2

[State 191, 3]
type = ChangeState
trigger1 = var(4) = 1
value = 181

[State 191, 3]
type = ChangeState
trigger1 = var(4) = 2
value = 182

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

[Statedef 181]
type = S
anim = 181
ctrl = 0

[State 191, 1]
type = varrandom
trigger1 = time = 0
v = 5
range = 1,2

[state 4060,1]
type = playsnd
trigger1 = time = 1
trigger1 = var(5) = 1
value = s0,28
volume = 255

[state 4060,1]
type = playsnd
trigger1 = time = 1
trigger1 = var(5) = 2
value = s0,1
volume = 255

[state 180]
type = changeanim
trigger1 = time = 0 && anim != 181
trigger2 = time = 120 && anim != 181
value = 181

[state 180]
type = assertspecial
trigger1 = time < 240
flag = roundnotover

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

[Statedef 182]
type = S
anim = 182
ctrl = 0

[State 191, 1]
type = varrandom
trigger1 = time = 0
v = 5
range = 1,4

[state 4060,1]
type = playsnd
trigger1 = time = 1
trigger1 = var(5) = 1
value = s0,7
volume = 255

[state 4060,1]
type = playsnd
trigger1 = time = 1
trigger1 = var(5) = 2
value = s0,11
volume = 255

[state 4060,1]
type = playsnd
trigger1 = time = 1
trigger1 = var(5) = 3
value = s0,16
volume = 255

[state 4060,1]
type = playsnd
trigger1 = time = 1
trigger1 = var(5) = 4
value = s0,24
volume = 255


[state 180]
type = changeanim
trigger1 = time = 0 && anim != 182
trigger2 = time = 120 && anim != 182
value = 182

[state 180]
type = assertspecial
trigger1 = time < 240
flag = roundnotover


;---------------------------------------------------------------------------
;イントロ選択
[Statedef 190]
type = S

[State 191, 1]
type = varrandom
trigger1 = time = 0
v = 3
range = 1,2

[state 190, 0]
type = null;varset
trigger1 = time = 0
var(3) = 2

[State 191, 3]
type = ChangeState
trigger1 = var(3) = 1
value = 191

[State 191, 3]
type = ChangeState
trigger1 = var(3) = 2
value = 192
;---------------------------------------------------------------------------
;イントロ1
[Statedef 191]
type = S
ctrl = 0
anim = 0
velset = 0,0,0

[State 191, 1]
type = varrandom
trigger1 = time = 0
v = 5
range = 1,4

[state 4060,1]
type = playsnd
trigger1 = anim = 190
trigger1 = animelem = 32
trigger1 = var(5) = 1
value = s0,13
volume = 255

[state 4060,1]
type = playsnd
trigger1 = anim = 190
trigger1 = animelem = 32
trigger1 = var(5) = 2
value = s0,17
volume = 255

[state 4060,1]
type = playsnd
trigger1 = anim = 190
trigger1 = animelem = 32
trigger1 = var(5) = 3
value = s0,18
volume = 255

[state 4060,1]
type = playsnd
trigger1 = anim = 190
trigger1 = animelem = 32
trigger1 = var(5) = 4
value = s0,19
volume = 255

[State 191, アニメ変更];バトル画面に切り替わった瞬間のフェードインの時、アニメを固定している
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 191, 特殊効果];試合が開始するまではこのコントローラを使おう
type = AssertSpecial
trigger1 = 1
flag = Intro ;イントロの状態

[State 191, ステート変更];アニメーションが終われば「通常立ち」のステートに変更する
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;----------------------------------------------------------------------------
;イントロ2
[Statedef 192]
type    = A
physics = N
poweradd= 0
ctrl = 0
anim = 1040
velset = 0,12

[State 610, 2]
type = PlaySnd
trigger1 = anim = 1040
trigger1 = time = 0
value = s1, 10

[State 100,00]
type = Afterimage
trigger1 = anim = 1040
trans = add1
TimeGap = 1
FrameGap = 2
time = 1
PalBright = 0,0,0
PalContrast = 70,70,70
PalAdd = 0,0,200
PalMul = 1,1,1

[State 3300, 軸位置]
type = PosSet
trigger1 = Time = 0
y = floor(239-ScreenPos Y)-299

[State 191, 特殊効果];試合が開始するまではこのコントローラを使おう
type = AssertSpecial
trigger1 = 1
flag = Intro ;イントロの状態

[state 4060,1]
type = Changeanim
trigger1 = anim = 1040
trigger1 = pos Y >= 0
value = 192

[State 191, 1]
type = varrandom
trigger1 = time = 0
v = 5
range = 1,2

[state 4060,1]
type = playsnd
trigger1 = anim = 192
trigger1 = animelem = 1
trigger1 = var(5) = 1
value = s0,0
volume = 255

[state 4060,1]
type = playsnd
trigger1 = anim = 192
trigger1 = animelem = 1
trigger1 = var(5) = 2
value = s0,9
volume = 255

[state 192,0]
type = velset
trigger1 = anim = 192
trigger1 = animelem = 1
y = -12

[state 192,0]
type = velset
trigger1 = anim = 192
trigger1 = animelem = 1
y = -12

[state 192,1]
type = veladd
trigger1 = anim = 192
y = 0.5

[state 4060,1]
type = Changeanim
trigger1 = anim = 192
trigger1 = vel Y >= 0
trigger1 = pos Y >= 0
value = 191

[state 4060,1]
type = velset
trigger1 = anim = 192
trigger1 = vel Y >= 0
trigger1 = pos Y >= 0
y = 0

[state 4060,1]
type = posset
trigger1 = anim = 192
trigger1 = vel Y >= 0
trigger1 = pos Y >= 0
y = 0

[state 4060,1]
type = velset
trigger1 = anim = 191
trigger1 = pos Y >= 0
y = 0

[state 4060,1]
type = posset
trigger1 = anim = 191
trigger1 = pos Y >= 0
y = 0

[State 191, ステート変更];アニメーションが終われば「通常立ち」のステートに変更する
type = ChangeState
trigger1 = anim = 191
trigger1 = AnimTime = 0
value = 0

;--------------------------------------
[statedef 195];挑発
type    = S
movetype= I
physics = S
juggle  = 20
velset = 0,0
ctrl = 0
anim = 195
poweradd = 0
sprpriority = 2

[State 191, 1]
type = playsnd
trigger1 = time = 1
value = S0,29

[State 200, 7]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------
;空中ダッシュ
[statedef 110]
type = A
movetype = I
physics = A
ctrl = 0
velset = 12.8 , -5
anim = 1000

[state 110,0]
type = playsnd
trigger1 = time = 0
value = s1,14
volume = 255

[state 110,1]
type = veladd
trigger1 = 1
x = -0.2

[State 100, エフェクト]
type = Explod
trigger1 = AnimElem = 1
trigger1 = NumExplod(4010) = 0
anim = 4010
postype = p1
sprpriority = 2
ID = 4010
removetime = 12
pos = 14, -20
scale = 2,2
ownpal = 1
removeongethit = 1

[state 110,2]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1

;----------------------------------------------------------------------------
;空中ダッシュ
[statedef 115]
type = A
movetype = I
physics = A
ctrl = 0
velset = -12.8 , -5
anim = 1000

[state 110,0]
type = playsnd
trigger1 = time = 0
value = s1,14
volume = 255

[state 110,1]
type = veladd
trigger1 = 1
x = 0.2

[State 100, エフェクト]
type = Explod
trigger1 = AnimElem = 1
trigger1 = NumExplod(4015) = 0
anim = 4015
postype = p1
sprpriority = 2
ID = 4015
removetime = 12
pos = -14, -20
scale = 2,2
ownpal = 1
removeongethit = 1

[state 110,2]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1


;======================================
[statedef 900];緊急回避・前
type = S
movetype = I
physics = S
juggle  = 20
velset = 0,0
ctrl = 0
anim = 900
sprpriority = -1

[State 191, 1]
type = playsnd
trigger1 = time = 0
value = S0,23

[State 191, 1]
type = playsnd
trigger1 = time = 1
value = S1,0

[state 850,0]
type = nothitby
trigger1 = time = [0,12]
value = SCA

[state 3000,2]
type = afterimage
trigger1 = time = 0
time = 12
palmul = 1,1,1
palcontrast = 175,175,175
palbrigth = 0,0,0
paladd = 20,20,20
length = 7
framegap = 3
trans = none

[state 850,1]
type = playerpush
trigger1 = 1
value = 0

[State 100]
type = velset
trigger1 = time = [5,12]
x = 10

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


;------------------------------------
[statedef 910];緊急回避・後ろ
type = S
movetype = I
physics = S
juggle  = 20
velset = 0,0
ctrl = 0
anim = 910
sprpriority = -1

[State 191, 1]
type = playsnd
trigger1 = time = 0
value = S0,23

[State 191, 1]
type = playsnd
trigger1 = time = 1
value = S1,0

[state 850,0]
type = nothitby
trigger1 = time = [0,12]
value = SCA

[state 3000,2]
type = afterimage
trigger1 = time = 0
time = 12
palmul = 1,1,1
palcontrast = 175,175,175
palbrigth = 0,0,0
paladd = 20,20,20
length = 7
framegap = 3
trans = none

[state 850,1]
type = playerpush
trigger1 = 1
value = 0

[State 100]
type = velset
trigger1 = time = [5,12]
x = -10

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

;----------------------------------------------------------------
;ここから攻撃
;----------------------------------------------------------------
;---------------------------------
;ソニックパンチ
[Statedef 200]
type = S
movetype = A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 200
poweradd = 20

[State 200, 1]
type = PlaySnd
trigger1 = Time = 5
value = s1, 22

[State 200 , 2]
type = HitDef
trigger1 = time = 4
attr = S,NA
damage = 15
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 10,10
sparkno = s10002
sparkxy = 0,-30 
hitsound = s2,0
guardsound = s6,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -2
air.velocity = -1.5,-0.5

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


;---------------------------------
;ソニックキック
[Statedef 201]
type = S
movetype = A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 201
poweradd = 32

[State 200, 1]
type = PlaySnd
trigger1 = Time = 3
value = s1, 23

[State 200 , 2]
type = HitDef
trigger1 = time = 4
attr = S,NA
damage = 24
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 10,10
sparkno = s10002
sparkxy = 0,-36 
hitsound = s2,3
guardsound = s6,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -2
air.velocity = -1.5,-0.5

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

;---------------------------------
;ベストキック
[Statedef 202]
type = S
movetype = A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 202
poweradd = 40

[State 200, 1]
type = PlaySnd
trigger1 = Time = 3
value = s1, 24

[State 200, 3]
type = PlaySnd
trigger1 = Time = 3
value = s0, 30

[State 200 , 2]
type = HitDef
trigger1 = time = 4
attr = S,NA
damage = 30
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 10,10
sparkno = s10002
sparkxy = 0,-36 
hitsound = s2,3
guardsound = s6,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -3
air.velocity = -2.25,-0.75

[state 202,0]
type = posadd
trigger1 = time = 14
x = 22

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

;-------------------------
;ソニックフレアー
[Statedef 210]
type = S
movetype = A
physics = S
juggle  = 8
velset = 0,0
ctrl = 0
anim = 203
poweradd = 60

[State 210 , 1]
type = PlaySnd
trigger1 = Time = 0
value = s0, 5

[State 210 , 2]
type = HitDef
trigger1 = time = 12
attr = S,NA
damage = 45
animtype = back
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 3,10
sparkno = s10003
sparkxy = 3,-28 
hitsound = s2,1
guardsound = s6,0
ground.type = low
ground.slidetime = 20
ground.hittime = 50
ground.velocity = -12.5, -2.5
air.velocity = -12.5, -2.5
fall = 1
id = 210
;p2stateno = 215

[state 2700,4]
type = targetstate
trigger1 = time > 1 && movehit && numtarget(210)
value = 215
persistent = 0

[State 210, 4]
type = Explod
trigger1 = AnimElem = 4
anim = 4020
postype = p1
sprpriority = 2
bindtime = -1
ID = 4020
removetime = 20
pos = -5, -10
scale = 2,2
ownpal = 1
removeongethit = 1

[state 210,6]
type = statetypeset
trigger1 = time > 50
statetype = A
movetype = I
physics = A

[state 210,7]
type = velset
trigger1 = time = 51
x = -1
y = -7

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

-------------------------
;ソニックフレアー(ガーキャン)
[Statedef 211]
type = S
movetype = A
physics = S
juggle  = 8
velset = 0,0
ctrl = 0
anim = 203
poweradd = -1000

[State 210 , 1]
type = PlaySnd
trigger1 = Time = 0
value = s0, 5

[State 210 , 2]
type = HitDef
trigger1 = time = 12
attr = S,NA
damage = 22
animtype = back
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 3,10
sparkno = s10003
sparkxy = 3,-28 
hitsound = s2,1
guardsound = s6,0
ground.type = low
ground.slidetime = 20
ground.hittime = 50
ground.velocity = -12.5,-2.5
air.velocity = -12.5, -2.5
fall = 1
id = 210
;p2stateno = 215

[state 2700,4]
type = targetstate
trigger1 = time > 1 && movehit && numtarget(210)
value = 215
persistent = 0

[State 210, 4]
type = Explod
trigger1 = AnimElem = 4
anim = 4020
postype = p1
sprpriority = 2
bindtime = -1
ID = 4020
removetime = 20
pos = -5, -10
scale = 2,2
ownpal = 1
removeongethit = 1

[State 3008, 無敵]
type = NotHitBy
trigger1 = time = [0,16]
value = SCA
time = 1

[state 210,6]
type = statetypeset
trigger1 = time > 50
statetype = A
movetype = I
physics = A

[state 210,7]
type = velset
trigger1 = time = 51
x = -1
y = -7

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1
;--------------------------
;ソニックフレアー：相手側（ヒット硬直）
[Statedef 215]
type    = A
movetype= H
physics = N
velset = 0,0

[State 215, 相手のアニメ変更]
type = ChangeAnim2
trigger1 = 1
value = 1025

[State 215, ステート変更]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 216



;ソニックフレアー：相手側（吹っ飛び）
[Statedef 216]
type    = A
movetype = H
physics = N

[State 216, 食らい中の速度]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 216, スクロール]
type = ScreenBound
;triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 216, 食らい中の速度]
type = Veladd
trigger1 = Time > 0
y = .45

[State 216, ステート変更];壁に激突するステートへ
type = ChangeState
;triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 10
trigger2 = FrontEdgeBodyDist <= 10
value = 217

[State 216, 相手ステートに戻す]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100


;ソニックフレアー：相手側（壁に激突）
[Statedef 217]
type    = A
movetype= H
physics = N

[State 217, 相手のアニメ変更]
type = ChangeAnim2
trigger1 = Time = 0
value = 1028

[State 217, 振り返る]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist < 30)

[State 1000, 3]
type = EnvShake
trigger1 = time = 0
time = 20

[state 217,0]
type = lifeadd
trigger1 = time = 0
value = -50

[State 217, 位置固定]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 217, スクロール]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 217, エフェクト]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor(screenpos y) - 50
postype = back
sprpriority = 3

[State 217, 相手のアニメ変更]
type = ChangeAnim2
trigger1 = anim != 1028
;trigger1 = Time = 0
value = 1028

[State 217, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 217, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 218


;ソニックフレアー：相手側（壁からのバウンド）
[Statedef 218]
type    = A
movetype= H
physics = N

[State 218, 移動速度]
type = VelSet
trigger1 = Time = 0
y = -8
x = 1.6

[State 218, 振り返る]
type = null;Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 218, 速度加算];重力
type = VelAdd
trigger1 = 1
y = 0.35

[State 218, アニメ変更]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052) 
value = 5050

[State 218, アニメ変更]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 218, アニメ変更]
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 218, アニメ変更]
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 218, 相手ステートに戻す]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;-------------------------
;追撃
[Statedef 90]
type = A
movetype = I
physics = N
ctrl = 0
anim = 90
velset = 0,0

[state 90,4]
type = nothitby
trigger1 = 1
value = SCA

[State 90, 0]
type = PlaySnd
trigger1 = AnimElem = 1
value = s1, 9

[State 90, 2]
type = VelSet
trigger1 = 1
x = 9*((P2dist x)/180)

[State 90, 2]
type = VelSet
trigger1 = time = 0
y = -8

[State 7000, VelSet]
type = Velmul
trigger1 = time > 0
y = 0.95

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

;-------------------------
;ソニックイーグル
[Statedef 695]
type    = A
movetype= A
physics = N
juggle  = 2
velset = 0, 0
poweradd= 0
ctrl = 0
anim = 602

[State 695, 1]
type = PlaySnd
trigger1 = Time = 0
value = s1, 5

[State 695, 2]
type = HitDef
trigger1 = Time = 5
attr = A, NA
damage    = 90
animtype = hard
hitflag = MAFD
guardflag = HA 
priority = 5
pausetime = 10,10
sparkno = s10004
sparkxy = 0,-20
hitsound   = s2,5
guardsound = s6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 0, 20
air.velocity = 0, 20
fall.yvelicity = -20
fall = 1
fall.recover = 0
envshake.time = 10
envshake.ampl = 5
envshake.freq = 90
getpower = 120

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

;-------------------------
;ソニックアップドラフト
[Statedef 230]
type = S
movetype = A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 204
poweradd = 40

[State 230, 1]
type = PlaySnd
trigger1 = time = 10
value = s1, 25

[State 230 , 2]
type = HitDef
trigger1 = time = 9
attr = S,NA
damage = 30
animtype = up
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s10003
sparkxy = 3,-36 
hitsound = s2,1
guardsound = s6,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = 0,-11.5
air.velocity = 0,-11.5
fall = 1
fall.recovertime = 36

[state 230,2]
type = ChangeState
triggerall = movehit
trigger1 = var(59) = 0
trigger1 = command = "holdup"
trigger2 = var(59)
trigger2 = Random <= var(59)*100
value = 40

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

;-------------------------
;ウィンドミル
[Statedef 205]
type = A
movetype = A
physics = A
juggle  = 1
;velset = 0,0
ctrl = 0
anim = 601
poweradd = 60

[state 205,0]
type = veladd
trigger1 = time = 0
y = -6

[State 230, 1]
type = PlaySnd
trigger1 = time = 5
value = s1, 25

[State 230 , 2]
type = HitDef
trigger1 = time = 9
attr = A,NA
damage = 45
animtype = back
guardflag = M
hitflag = MAF
priority = 5, Hit
pausetime = 10,10
sparkno = s10003
sparkxy = 20,-20
hitsound = s2,1
guardsound = s6,0
ground.type = high
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -6,-4.5
air.velocity = -5.4,-5
fall = 1
fall.recovertime = 36

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

;-------------------------
;足払い
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 1
velset = 0, 0
poweradd= 0
ctrl = 0
anim = 400

[State 230, 1]
type = PlaySnd
trigger1 = time = 5
value = s1, 22

[State 230 , 2]
type = HitDef
trigger1 = animelem = 3
attr = C,NA
damage = 24
animtype = Diagup
guardflag = LA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s10003
sparkxy = 0,0
hitsound = s2,1
guardsound = s6,0
ground.type = Trip
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -1.4,2.4
air.velocity = -1.1,-3.4
fall = 1

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


;-------------------------
;スライディング
[Statedef 401]
type    = C
movetype= A
physics = N
juggle  = 1
velset = 0, 0
poweradd= 0
ctrl = 0
anim = 205

[State 610, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 15
animtype = medium
hitflag = MAF
guardflag = L
priority = 3
pausetime = 10,10
sparkno = s10002
sparkxy = 0,-20
hitsound   = s2,0
guardsound = s6,0
ground.type = low
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -1;,-0.3
air.velocity = -1

[state 220,0]
type = velset
trigger1 = animelem = 2
x = 10

[state 220,1]
type = veladd
trigger1 = time = [3,8]
x = -0.5

[state 220,0]
type = velset
trigger1 = animelem = 4
x = 0

[State 420, VelSet]
Type = VelSet
Trigger1 = Time = 15
X = 9

[State 420, VelMul]
Type = Velmul
Trigger1 = Time >= 17
X = 0.92

[State 106, 3]
type = MakeDust
trigger1 = AnimElem = 8
trigger2 = AnimElem = 10
trigger3 = AnimElem = 12
trigger4 = AnimElem = 14
trigger5 = AnimElem = 16
trigger6 = AnimElem = 18
trigger7 = AnimElem = 20
trigger8 = AnimElem = 22
trigger9 = AnimElem = 24
trigger10 = AnimElem = 26
trigger11 = AnimElem = 28
trigger12 = AnimElem = 30
pos = -5,-2
spacing = 1

[State 610, 3]
type = HitDef
trigger1 = AnimElem = 8
trigger2 = AnimElem = 10
trigger3 = AnimElem = 12
trigger4 = AnimElem = 14
trigger5 = AnimElem = 16
trigger6 = AnimElem = 18
trigger7 = AnimElem = 20
trigger8 = AnimElem = 22
trigger9 = AnimElem = 24
trigger10 = AnimElem = 26
trigger11 = AnimElem = 28
;trigger12 = AnimElem = 30
attr = C, NA
damage    = 3
animtype = Hard
hitflag = MAF
guardflag = L 
priority = 5,hit
pausetime = 10,0
sparkno = s10002
sparkxy = 0,-15
hitsound   = s2,0
guardsound = s6,0
ground.type = low;trip
ground.slidetime = 44
ground.hittime  = 44
ground.velocity = -1;,-0.3
air.velocity = -1

[State 610, 3]
type = HitDef
trigger1 = animelem = 30
attr = C, NA
damage    = 18
animtype = Hard
hitflag = MAF
guardflag = L 
priority = 5,hit
pausetime = 3,3
sparkno = s10002
sparkxy = 0,-15
hitsound   = s2,0
guardsound = s6,0
ground.type = trip
ground.slidetime = 44
ground.hittime  = 44
ground.velocity = -0.8,0
air.velocity = -0.5,-1.8
fall = 1

[State 420, ChangeState]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 11
Ctrl = 1

;---------------------------
;スピンアタック
[statedef 402]
type = C
movetype = A
physics = N
juggle  = 1
ctrl = 0
anim = 402
poweradd = 32
velset = 9,0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 5
value = s1, 0

[state 205, 0]
type = velmul
trigger1 = time <= 30
x = 0.95

[state 205, 0]
type = velset
trigger1 = time > 30
x = 0

[State 230 , 2]
type = HitDef
trigger1 = animelem = 2
trigger2 = animelem = 4
trigger3 = animelem = 6
trigger4 = animelem = 8
trigger5 = animelem = 10
trigger6 = animelem = 12
trigger7 = animelem = 14
attr = C,NA
damage = 9
animtype = medium
guardflag = LA
hitflag = MAF
priority = 4, Hit
pausetime = 10,0
sparkno = s10002
sparkxy = 0,-26
hitsound = s2,1
guardsound = s6,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -1,0
air.velocity = -1,-1.8

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

;------------------------------------------------------
;つかみ
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
poweradd= 0
ctrl = 0
anim = 800

[State 800]
type = HitDef
trigger1 = animelem = 1
attr = S, NT
damage    = 0
priority = 1,miss
hitflag = M-
sparkno = -1
sparkxy = 999,999
hitsound   = S1,17
numhits = 0
guardsound = -1
fall = 1
fall.recover = 0
p1facing = ifelse(command = "holdback",-1,1)
p2facing = 1
p1stateno = 801
p2stateno = 802

[State 800]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;なげ
[Statedef 801]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
poweradd= 0
ctrl = 0
anim = 801
sprpriority = 1

[State 801]
type = targetbind
trigger1 = time = 0
pos = 32,0

[State 210, 4]
type = Explod
trigger1 = time = 40
anim = 10003
postype = p1
sprpriority = 2
;bindtime = -1
ID = 800
;removetime = -2
pos = 30,-34
ontop = 1
ownpal = 1
removeongethit = 1

[State 800]
type = PlaySnd
trigger1 = time = 40
value = s2,1

[State 800]
type = PlaySnd
trigger1 = time = 40
value = s0,26

[State 3008, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA

[state 801,0]
type = targetlifeadd
trigger1 = time = 40
value = -60

[state 801,0]
type = targetstate
trigger1 = time = 40
value = 803

[state 210,6]
type = statetypeset
trigger1 = time > 40
statetype = A
movetype = I
physics = A

[state 210,7]
type = velset
trigger1 = time = 40
x = -3.5
y = -5

[State 801]
type = null;ChangeState
trigger1 = animtime = 0
value = 50
ctrl = 1

;投げ(相手)1
[Statedef 802]
type    = L
movetype= H
physics = N
juggle  = 0
velset = 0,0
poweradd= 0
ctrl = 0
sprpriority = 2

[State 801]
type = Posadd
trigger1 = facing = enemynear,facing
x = P2dist X + 32

[State 801]
type = changeanim2
trigger1 = time = 0
value = 5017

[State 801]
type = nothitby
trigger1 = 1
value = SCA

;投げ(相手)2
[Statedef 803]
type    = L
movetype= H
physics = N
juggle  = 0
velset = -5,-7
poweradd= 0
ctrl = 0
sprpriority = 2

[State 532, 重力]
type = veladd
trigger1 = 1
y = const(movement.yaccel)

[State 801]
type = changeanim2
trigger1 = time = 0
value = 802

[State 532, 重力]
type = selfstate
trigger1 = Vel Y > 0 && Pos Y > 0
value = 5110
ctrl = 0

;---------------------------------
;空投げ
[Statedef 850]
type     = A
movetype = A
physics  = A
juggle   = 0
ctrl     = 0
anim     = 850
poweradd = 0
sprpriority = 1

[State 530, ヒット定義]
type = HitDef
trigger1 = time = 0
trigger1 = enemynear,stateno != [120,155]
attr = A, NT
damage = 0, 0
animtype = Hard
hitflag = AF
priority = 0, Hit
hitsound = s1,17
pausetime = 0, 0
sparkno = -1
guard.sparkno = -1
sparkxy = 999, 999
guard.dist = 0
id = 850
fall = 1
fall.recover = 0
p2facing = 1
p1stateno = 851
p2stateno = 852

[State 530, 0へ]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1

;くうなげ
[Statedef 851]
type     = A
movetype = A
physics  = A
juggle   = 0
ctrl     = 0
anim     = 851
velset = 0,0
poweradd = 0
sprpriority = 1

[State 531, 敵引き寄せ]
type = TargetBind
trigger1 = animelem = 1
time = 1
pos = 36, -40
ID = 850

[State 531, 敵引き寄せ]
type = TargetBind
trigger1 = animelem = 2
time = 1
pos = 18, -42
ID = 850

[State 531, 敵引き寄せ]
type = TargetBind
trigger1 = animelem = 3
time = 1
pos = 26, -44
ID = 850

[State 531, ダメージ]
type = targetlifeadd
trigger1 = time = 24
value = -40

[State 530, 固定]
type = velset
trigger1 = time < 24
x = 0
y = 0

[State 530, 慣性]
type = velset
trigger1 = time = 24
x = -3
y = -5

[State 531, 固定]
type = PosFreeze
trigger1 = time < 24
value = 1

[State 521, 無敵]
type = nothitby
trigger1 = 1
value = SCA

[State 530, 0へ]
type = changestate
trigger1 = animtime = 0
value = 51
ctrl = 1


;空投げられ
[Statedef 852]
type     = A
movetype = H
physics  = N
juggle   = 0
ctrl     = 0
velset = 0,0
poweradd = 0
sprpriority = 2

[State 532, アニメ変更]
type = changeanim2
trigger1 = time = 0
value = 852

[State 532, 勢い]
type = velset
trigger1 = time = 23
x = -4
y = 8

[State 532, 重力]
type = veladd
trigger1 = time >= 23
y = const(movement.yaccel)

[State 532, 重力]
type = selfstate
trigger1 = Vel Y > 0 && Pos Y > 0
value = 5110
ctrl = 0

;---------------------------
;スピンアタック
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 40
ctrl = 0
anim = 603

[State 630, 2]
type = HitDef
trigger1 = animelem = 3
trigger2 = animelem = 6
trigger3 = animelem = 10
attr = A, NA
damage    = 10
animtype = light
hitflag = MAF
guardflag = HA 
priority = 7
pausetime = 10,10
sparkno = s10002
sparkxy = 0,-20
hitsound   = s2,0
guardsound = s6,0
ground.type = High
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -1
air.velocity = -0.75,-0.25

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

[State 600, 1]
type = PlaySnd
trigger1 = Time = 7
value = s1, 0

;-------------------------
;ハミングトップ
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 40
ctrl = 0
anim = 605

[State 610, 2]
type = PlaySnd
trigger1 = time = 0
value = s1, 9

[State 610, 3]
type = HitDef
trigger1 = animelem= 3
attr = A, NA
damage    = 15
animtype = medium
hitflag = MAF
guardflag = HA 
priority = 3
pausetime = 10,10
sparkno = s10002
sparkxy = 0,-20
hitsound   = s2,0
guardsound = s6,0
ground.type = High
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -2,-1.5
air.velocity = -1.6,-1.9
fall = 1

[State 610, 4]
type = VelSet
trigger1 = time = 0
x = 10
y = -4

;-------------------------
;ソニックロケット
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 40
ctrl = 0
anim = 600

[State 600, 1]
type = PlaySnd
trigger1 = Time = 7
value = s1, 25

[state 220,0]
type = velset
trigger1 = animelem = 3
y = -4

[State 600, 2]
type = HitDef
trigger1 = Time = 6
attr = A, NA
damage    = 30
animtype = light
hitflag = MAF
guardflag = HA 
priority = 3
pausetime = 10,10
sparkno = s10002
sparkxy = 0,0
hitsound   = s2,3
guardsound = s6,0
ground.type = High
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -2,0
air.velocity = -4

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

;-------------------------
;ホーミングアタック
[Statedef 630]
type    = A
movetype= A
physics = N
juggle  = 8
velset = 0, 0
poweradd= 0
ctrl = 0
anim = 604

[State 100,00]
type = Afterimage
trigger1 = time = 0
trans = add
TimeGap = 1
FrameGap = 2
time = 20
PalBright = 70,70,70
PalContrast = 70,70,70
PalAdd = 0,80,200
PalMul = 1,1,1

[State 630, 2]
type = HitDef
trigger1 = animelem = 3
attr = A, NA
damage    = 75
animtype = light
hitflag = MAF
guardflag = HA 
priority = 7
pausetime = 5,15
sparkno = s10003
sparkxy = 0,-20
hitsound   = s2,2
guardsound = s6,0
ground.type = High
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -5,-2.5
air.velocity = -10,-2.5
fall = 1

[State 610, 2]
type = PlaySnd
trigger1 = time = 6
value = s1, 20

[State 7000, VarSet]
type = VarSet
trigger1 = time = [6,22]
fvar(2) = ifelse((P2dist x=[0,1]),1,ifelse((P2dist x=[-1,0]),-1,P2dist x))

[State 7000, VarSet]
type = VarSet
trigger1 = time = [6,22]
fvar(3) = ifelse((P2dist y=[0,1]),1,ifelse((P2dist y=[-1,0]),-1,P2dist y))+20

[State 7000, VarSet]
type = VarSet
trigger1 = time = [6,22]
ignorehitpause = 1
fvar(0) = atan(fvar(2)/fvar(3))-(.5*pi*ifelse(P2dist Y <0,-1,1))

[State 7000, VarSet]
type = VarSet
trigger1 = time >= 6
ignorehitpause = 1
fvar(0) = ifelse(fvar(0)>(.33*pi),.33*pi,ifelse(fvar(0)<(-.33*pi),-.33*pi,fvar(0)))

[State 7000, VelSet]
type = VelSet
trigger1 = time = [6,22]
x = abs(16*cos(fvar(0)))
y = -16*sin(fvar(0))

[State 7000, VelSet]
type = Velmul
trigger1 = time > 15
x = 0.95
y = 0.95

[State 7000, VelSet]
type = Velset
trigger1 = animelem = 13
x = 0
y = 0

[state 630,3]
type = ChangeState
trigger1 = movecontact
value = 635

[State 600, 2]
type = ChangeState
trigger1 = Pos y > 0
value = 52

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

;-------------------------
;ホーミングアタック(hit)
[Statedef 635]
type    = A
movetype= A
physics = A
juggle  = 2
velset = 0, -10
poweradd= 0
ctrl = 0
anim = 604

[state 635,0]
type = ctrlset
trigger1 = vel y >= 0
value = 1

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

;=============================================================
;ここから必殺技
;=============================================================
;-------------------------
;ソニックウェーブA
[Statedef 1600]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd= 0
ctrl = 0
anim = 1010
velset = 0,0

[State 610, 2]
type = PlaySnd
trigger1 = time = 13
value = s1, 15

[State 210, 4]
type = Explod
trigger1 = time = 2
anim = 4040
postype = p1
sprpriority = 2
ID = 4040
removetime = 23
pos = -5, 0
scale = 2,2
ownpal = 1

[State 630, 2]
type = HitDef
trigger1 = time = 0
attr = S, SA
damage    = 15
animtype = light
hitflag = MAF
guardflag = MA 
priority = 7,hit
pausetime = 10,10
sparkno = s10002
sparkxy = 60,-30
hitsound   = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1
air.velocity = -0.75,-0.25


[State 1000,0]
type = projectile
trigger1 = time = 13
projanim = 4030
projremovetime = 40
projremove = 0
projid = 1600
offset = 0,-20
velocity = 8,0
projhits = 9999999
projmisstime = 18
attr = S,SP
animtype = back
damage = 90,9
guardflag = MA
pausetime = 0,16
sparkno = s10003
sparkky = -30,-30
hitsound = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -14,-3
air.velocity = -12,-5
getpower = 120
fall = 1
air.fall = 1
fall.recover = 0

[state 210,6]
type = statetypeset
trigger1 = time > 12
statetype = A
movetype = I
physics = A

[state 210,7]
type = velset
trigger1 = time = 13
x = -1
y = -11

;-------------------------
;ソニックウェーブB
[Statedef 1610]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd= 0
ctrl = 0
anim = 1010
velset = 0,0

[State 610, 2]
type = PlaySnd
trigger1 = time = 13
value = s1, 15

[State 210, 4]
type = Explod
trigger1 = time = 2
anim = 4040
postype = p1
sprpriority = 2
ID = 4040
removetime = 23
pos = -5, 0
scale = 2,2
ownpal = 1

[State 630, 2]
type = HitDef
trigger1 = time = 0
attr = S, SA
damage    = 15
animtype = light
hitflag = MAF
guardflag = MA 
priority = 7,hit
pausetime = 10,10
sparkno = s10002
sparkxy = 60,-30
hitsound   = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1
air.velocity = -0.75,-0.25

[State 1000,0]
type = projectile
trigger1 = time = 13
projanim = 4030
projremovetime = 40
projremove = 0
projid = 1600
offset = 0,-20
velocity = 12,0
projhits = 9999999
projmisstime = 18
attr = S,SP
animtype = back
damage = 90,9
guardflag = MA
pausetime = 0,16
sparkno = s10003
sparkky = -30,-30
hitsound = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -14,-3
air.velocity = -12,-5
getpower = 120
fall = 1
fall.recover = 0

[state 210,6]
type = statetypeset
trigger1 = time > 12
statetype = A
movetype = I
physics = A

[state 210,7]
type = velset
trigger1 = time = 13
x = -2
y = -12

;-------------------------
;ソニックウェーブC
[Statedef 1620]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd= -1000
ctrl = 0
anim = 1020
velset = 0,0

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 1
anim = s10000 
pos = 0, -70 
sound = s3, 0

[State 610, 2]
type = PlaySnd
trigger1 = time = 2
value = s1, 15

[State 630, 2]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage    = 15
animtype = light
hitflag = MAF
guardflag = MA 
priority = 7,hit
pausetime = 10,10
sparkno = s10002
sparkxy = 60,-30
hitsound   = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1,0
air.velocity = -0.75,-0.25


[State 1000,0]
type = projectile
trigger1 = time = 2
trigger2 = time = 4
trigger3 = time = 6
projanim = 4030
projremovetime = 40
projremove = 0
projid = 1600
offset = 0,-20
velocity = 10,0
projhits = 9999999
projmisstime = 18
attr = S,HP
animtype = back
damage = 60,6
guardflag = MA
pausetime = 0,16
sparkno = s10003
sparkky = -30,-30
hitsound = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -14,-3
air.velocity = -12,-5
getpower = 90
fall = 1
fall.recover = 0

[state 210,6]
type = statetypeset
trigger1 = time > 2
statetype = A
movetype = I
physics = A

[state 210,7]
type = velset
trigger1 = time = 2
x = -3
y = -12

;======================================================
;-------------------------
;ソニックストームA
[Statedef 1700]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 0
ctrl = 0
anim = 1020

[State 610, 2]
type = PlaySnd
trigger1 = time = 9
value = s1, 15

[State 630, 2]
type = HitDef
trigger1 = time = 0
attr = A, SA
damage    = 15
animtype = light
hitflag = MAF
guardflag = MA 
priority = 7,hit
pausetime = 10,10
sparkno = s10002
sparkxy = 60,-30
hitsound   = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1,0
air.velocity = -0.75,-0.25

[State 1000,0]
type = projectile
trigger1 = time = 9
projanim = 4050
projremovetime = 40
projremove = 0
projid = 1600
offset = 0,0
velocity = 6, 6
projremanim = 4055
projhits = 999
projmisstime = 18
attr = A,SP
animtype = back
damage = 90,9
guardflag = MA
pausetime = 0,16
sparkno = s10003
sparkky = -30,-30
hitsound = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -14,-3
air.velocity = -12,-5
getpower = 120
fall = 1
fall.recover = 0

[state 210,7]
type = velset
trigger1 = time = 9
x = -1
y = -4

[State 600, 2]
type = ChangeState
trigger1 = Time = 24
value = 50
ctrl = 0

;-------------------------
;ソニックストームB
[Statedef 1710]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 0
ctrl = 0
anim = 1020

[State 610, 2]
type = PlaySnd
trigger1 = time = 9
value = s1, 15

[State 630, 2]
type = HitDef
trigger1 = time = 0
attr = A, SA
damage    = 15
animtype = light
hitflag = MAF
guardflag = MA 
priority = 7,hit
pausetime = 10,10
sparkno = s10002
sparkxy = 60,-30
hitsound   = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1,0
air.velocity = -0.75,-0.25

[State 1000,0]
type = projectile
trigger1 = time = 9
projanim = 4050
projremovetime = 40
projremove = 0
projid = 1600
offset = 0,0
velocity = 9, 9
projremanim = 4055
projhits = 999
projmisstime = 18
attr = A,SP
animtype = back
damage = 90,9
guardflag = MA
pausetime = 0,16
sparkno = s10003
sparkky = -30,-30
hitsound = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -14,-3
air.velocity = -12,-5
getpower = 120
fall = 1
fall.recover = 0

[state 210,7]
type = velset
trigger1 = time = 9
x = -2
y = -5

[State 600, 2]
type = ChangeState
trigger1 = Time = 26
value = 50
ctrl = 0

;-------------------------
;ソニックストームC
[Statedef 1720]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= -1000
ctrl = 0
anim = 1020

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 1
anim = s10000 
pos = 0, -35 
sound = s3, 0

[State 610, 2]
type = PlaySnd
trigger1 = time = 9
value = s1, 15

[State 630, 2]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage    = 15
animtype = light
hitflag = MAF
guardflag = MA 
priority = 7,hit
pausetime = 10,10
sparkno = s10002
sparkxy = 60,-30
hitsound   = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1,0
air.velocity = -0.75,-0.25

[State 1000,0]
type = projectile
trigger1 = time = 9
trigger2 = time = 12
trigger3 = time = 15
projanim = 4050
projremovetime = 40
projremove = 0
projid = 1600
offset = 0,0
velocity = 7.5, 7.5
projremanim = 4055
projhits = 9999
projmisstime = 18
attr = A,SP
animtype = back
damage = 60,6
guardflag = MA
pausetime = 0,16
sparkno = s10003
sparkky = -30,-30
hitsound = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -14,-3
air.velocity = -12,-5
getpower = 120
fall = 1
fall.recover = 0

[state 210,7]
type = velset
trigger1 = time = 9
trigger2 = time = 12
trigger3 = time = 15
x = -1
y = -4

[State 600, 2]
type = ChangeState
trigger1 = Time = 24
value = 50
ctrl = 0

;=========================================================
;-------------------------
;ソニックドライブA(準備)
[Statedef 1200]
type    = S
movetype= I
physics = S
juggle  = 2
poweradd= 0
ctrl = 0
anim = 1030
velset = 0,0

[State 610, 2]
type = PlaySnd
trigger1 = time = 13
value = s0, 3

[State 210, 4]
type = Explod
trigger1 = Animelem = 2
anim = 4065
postype = p1
ID = 4065
removetime = 5
pos = -40, -20
scale = 2,2
ownpal = 1
removeongethit = 1
bindtime = 4

[State 210, 4]
type = Explod
trigger1 = Animelem = 3
anim = 4065
postype = p1
ID = 4065
removetime = 5
pos = -40, -22
scale = 2,2
ownpal = 1
removeongethit = 1
bindtime = 4

[State 210, 4]
type = Explod
trigger1 = Animelem = 4
anim = 4065
postype = p1
ID = 4065
removetime = 6
pos = -40, -24
scale = 2,2
ownpal = 1
removeongethit = 1
bindtime = 5

[State 210, 4]
type = Explod
trigger1 = Animelem = 5
anim = 4065
postype = p1
ID = 4065
removetime = 5
pos = -10, -4
scale = 2,2
ownpal = 1
removeongethit = 1
bindtime = 4

[state 1030]
type = removeexplod
trigger1 = animelem = 6
ID = 4065

[state 2200,0]
type = helper
trigger1 = animelem = 6
helpertype = normal
name = "ring"
ID = 1200
pos = 14,-11
stateno = 1203
keyctrl = 0
ownpal = 1

[State 600, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 1201
ctrl = 0

;-------------------------
;ソニックドライブA(投げてから待機)
[Statedef 1201]
type    = S
movetype= I
physics = S
juggle  = 2
poweradd= 0
ctrl = 0
anim = 1031
velset = 0,0

[State 600, 2]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = command = "a"
value = 1202
ctrl = 0

[state 1201]
type = changestate
trigger1 = numhelper(1200)=0
value = 0
ctrl = 1

;------------------------
;ソニックドライブ（発射）
[Statedef 1202]
type    = A
movetype= A
physics = A
juggle  = 2
velset = 0, 0
poweradd= 0
ctrl = 0
anim = 1040

[State 630, 2]
type = HitDef
trigger1 = time = 0
attr = S, SA
damage    = 180,20
animtype = back
hitflag = MAF
guardflag = M
priority = 7
pausetime = 10,10
sparkno = s10004
sparkxy = 0,-20
hitsound   = s2,2
guardsound = s6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6,-12
air.velocity = -6,-12
fall = 1
getpower = 240

[State 610, 2]
type = PlaySnd
trigger1 = time = 0
value = s1, 10

[State 100,00]
type = Afterimage
trigger1 = time= 0
trans = add1
TimeGap = 1
FrameGap = 2
time = 30
PalBright = 0,0,0
PalContrast = 70,70,70
PalAdd = 0,0,200
PalMul = 1,1,1


[state 1033]
type = varset
trigger1 = time >= 30
v = 2
value = 0

[state 1033]
type = velset
trigger1 = time = 0 && var(2) = 1
y = -6

[state 1033]
type = velset
trigger1 = time = 0 && var(2) = 2
y = -10

[state 1033]
type = velset
trigger1 = time = 0 && var(2) = 3
y = -18

[state 1033]
type = velset
trigger1 = time = 0
x = 12

[state 1021]
type = playerpush
trigger1 = time > 5
value = 0

[State 600, 2]
type = ChangeState
trigger1 = Time = 30
value = 50
ctrl = 1

;------------------------
;ソニックドライブ（リングヘルパー）
[Statedef 1203]
type    = A
movetype= A
physics = A
poweradd= 0
ctrl = 0
anim = 4060
velset = 5,-13

[state 1031]
type = parentvarset
trigger1 = Pos y > -70
v = 2
value = 1

[state 1031]
type = parentvarset
trigger1 = pos y = [-139, -71]
v = 2
value = 2

[state 1031]
type = parentvarset
trigger1 = pos y < -140
v = 2
value = 3

[state 4060,0]
type = destroyself
trigger1 = parent,stateno=1202
trigger1 = parent,time >= 4

[state 4060,1]
type = ChangeState
trigger1 = pos Y > -10
value = 1204
ctrl = 0

;----------------------------
;ソニックドライブ（ヘルパーその２）
[statedef 1204]
type    = S
movetype= I
physics = S
poweradd= 0
ctrl = 0
anim = 4060
velset = 5,0

[state 4060,0]
type = posset
trigger1 = time = 0
y = 0

[state 1031]
type = parentvarset
trigger1 = 0
v = 2
value = 1

[state 210,7]
type = veladd
trigger1 = pos y = 0 && vel X> 0
x = -1.1

[state 210,7]
type = velset
trigger1 = vel x < 0
x = 0

[state 4060,0]
type = destroyself
trigger1 = parent,stateno=1202
trigger1 = parent,time>=4
trigger2 = time>240


;------------------------
;ソニックドライブB
[Statedef 1210]
type    = A
movetype= A
physics = A
juggle  = 2
velset = 0, 0
poweradd= -1000
ctrl = 0
anim = 1040

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 0
anim = s10000 
pos = 0, -35 
sound = s3, 0

[State 100, エフェクト]
type = Explod
trigger1 = time = 0
trigger1 = NumExplod(4000) = 0
anim = 4000
postype = p1
sprpriority = 2
ID = 4000
removetime = 20
pos = 0, 0
scale = 2,2
ownpal = 1
removeongethit = 1

[State 630, 2]
type = HitDef
trigger1 = time = 1
attr = S, HA
damage    = 240,30
animtype = back
hitflag = MAF
guardflag = M
priority = 7
pausetime = 15,15
sparkno = s10004
sparkxy = 0,-20
hitsound   = s2,5
guardsound = s6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-18
air.velocity = 0,-18
fall = 1
envshake.time = 20
envshake.ampl = 5
envshake.freq = 90
getpower = 240

[State 610, 2]
type = PlaySnd
trigger1 = time = 0
value = s1, 10

[State 100,00]
type = Afterimage
trigger1 = time= 0
trans = add1
TimeGap = 1
FrameGap = 2
time = 30
PalBright = 0,0,0
PalContrast = 70,70,70
PalAdd = 0,0,200
PalMul = 1,1,1

[state 1033]
type = velset
trigger1 = time = 0
x = 25
y = -6

[state 1033]
type = velset
trigger1 = vel y>0 && pos y>=0
x = 0
y = 0

[State 1000,00]
type = Afterimagetime
trigger1 = vel y>0 && pos y>=0
time = 0

[state 1021]
type = playerpush
trigger1 = 1
value = 0

;============================================================
;------------------------------------------
;ソニックメテオA
[statedef 1300]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim = 1040
velset = vel X,18

[State 610, 2]
type = PlaySnd
trigger1 = time = 0
value = s1, 10

[State 100,00]
type = Afterimage
trigger1 = time= 0
trans = add1
TimeGap = 1
FrameGap = 2
time = 30
PalBright = 0,0,0
PalContrast = 70,70,70
PalAdd = 0,0,200
PalMul = 1,1,1

[State 630, 2]
type = HitDef
trigger1 = time = 3
attr = A, SA
damage    = 60,6
animtype = hard
hitflag = MAF
guardflag = HA
priority = 7
pausetime = 10,10
sparkno = s10003
sparkxy = 0,-20
hitsound   = s2,1
guardsound = s6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-10
air.velocity = 0,-10
getpower = 80

[state 4060,1]
type = ChangeState
trigger1 = pos Y >= 0
value = 1301
ctrl = 0

;------------------
;バウンドアタック（跳ねる）
[statedef 1301]
type    = A
movetype= A
physics = A
poweradd= 0
ctrl = 0
anim = 1040
velset = vel X,-12

[State 100,00]
type = Afterimage
trigger1 = time= 0
trans = add1
TimeGap = 1
FrameGap = 2
time = 40
PalBright = 0,0,0
PalContrast = 70,70,70
PalAdd = 0,0,200
PalMul = 1,1,1

[State 630, 2]
type = HitDef
trigger1 = time = 0
attr = A, SA
damage    = 45,5
animtype = hard
hitflag = MAF
guardflag = HA
priority = 7
pausetime = 3,10
sparkno = s10003
sparkxy = 0,-20
hitsound   = s2,1
guardsound = s6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1.5,-8
air.velocity = -1.5,-8
fall = 1
getpower = 60

[state 4060,1]
type = ChangeState
trigger1 = time > 40
value = 50
ctrl = 1

;----------------------------------
;ソニックメテオB
[statedef 1310]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim = 1040
velset = 0,18

[State 610, 2]
type = PlaySnd
trigger1 = time = 0
value = s1, 10

[State 100,00]
type = Afterimage
trigger1 = time= 0
trans = add1
TimeGap = 1
FrameGap = 2
time = 30
PalBright = 0,0,0
PalContrast = 70,70,70
PalAdd = 0,0,200
PalMul = 1,1,1

[State 630, 2]
type = HitDef
trigger1 = time = 3
attr = A, SA
damage    = 75,8
animtype = hard
hitflag = MAF
guardflag = HA
priority = 7
pausetime = 10,10
sparkno = s10003
sparkxy = 0,-20
hitsound   = s2,1
guardsound = s6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-10
air.velocity = 0,-10
getpower = 80

[state 4060,1]
type = ChangeState
trigger1 = pos Y >= 0
value = 1311
ctrl = 0

[State 7000, VarSet]
type = VarSet
trigger1 = 1
fvar(2) = ifelse((P2dist x=[0,1]),1,ifelse((P2dist x=[-1,0]),-1,P2dist x))

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

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

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

[State 7000, VelSet]
type = VelSet
trigger1 = time = [0,10]
x = abs(16*cos(fvar(0)))
;y = -16*sin(fvar(0))

[State 7000, VelSet]
type = Velmul
trigger1 = time > 10
x = 0.95

;------------------
;バウンドアタックB（跳ねる）
[statedef 1311]
type    = A
movetype= A
physics = A
poweradd= 0
ctrl = 0
anim = 1040
velset = vel X,-12

[State 7000, VelSet]
type = Velmul
trigger1 = 1
x = 0.95

[State 100,00]
type = Afterimage
trigger1 = time= 0
trans = add1
TimeGap = 1
FrameGap = 2
time = 40
PalBright = 0,0,0
PalContrast = 70,70,70
PalAdd = 0,0,200
PalMul = 1,1,1

[State 630, 2]
type = HitDef
trigger1 = time = 0
attr = A, SA
damage    = 60,6
animtype = hard
hitflag = MAF
guardflag = HA
priority = 7
pausetime = 3,10
sparkno = s10003
sparkxy = 0,-20
hitsound   = s2,1
guardsound = s6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1.5,-8
air.velocity = -1.5,-8
fall = 1
getpower = 60

[state 4060,1]
type = ChangeState
trigger1 = time > 40
value = 50
ctrl = 0


;------------------------------------------
;ソニックメテオC落下
[statedef 1320]
type    = A
movetype= A
physics = N
poweradd= -1000
ctrl = 0
anim = 1040
velset = 0,16

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 0
anim = s10000 
pos = 0, -35 
sound = s3, 0

[State 610, 2]
type = PlaySnd
trigger1 = time = 0
value = s1, 10

[State 100,00]
type = Afterimage
trigger1 = time= 0
trans = add1
TimeGap = 1
FrameGap = 2
time = 30
PalBright = 0,0,0
PalContrast = 70,70,70
PalAdd = 0,0,200
PalMul = 1,1,1

[State 630, 2]
type = HitDef
trigger1 = time = 1
attr = A, HA
damage    = 60,6
animtype = hard
hitflag = MAF
guardflag = HA
priority = 7
pausetime = 10,10
sparkno = s10003
sparkxy = 0,-20
hitsound   = s2,1
guardsound = s6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -12,0
air.velocity = -12,-5
getpower = 80
air.fall = 1

[state 4060,1]
type = ChangeState
trigger1 = pos Y >= -5
value = 1321
ctrl = 0

;------------------
;ソニックメテオC横
[statedef 1321]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim = 1040
velset = 12,0

[state 1021]
type = playerpush
trigger1 = 1
value = 0

[State 610, 2]
type = PlaySnd
trigger1 = time = 0
value = s1, 10

[State 7000, VelSet]
type = Veladd
trigger1 = vel x > 0
x = -0.3

[State 100,00]
type = Afterimage
trigger1 = time= 0
trans = add1
TimeGap = 1
FrameGap = 2
time = 40
PalBright = 0,0,0
PalContrast = 70,70,70
PalAdd = 0,0,200
PalMul = 1,1,1

[State 630, 2]
type = HitDef
trigger1 = time = 1
attr = A, HA
damage    = 60,6
animtype = hard
hitflag = MAF
guardflag = L
priority = 7
pausetime = 10,10
sparkno = s10003
sparkxy = 0,-20
hitsound   = s2,1
guardsound = s6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 2,-12
air.velocity = 2,-12
getpower = 80
fall = 1

[state 4060,1]
type = ChangeState
trigger1 = time > 40
value = 1322

;------------------
;ソニックメテオC上昇
[statedef 1322]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
anim = 1040
velset = -16,-17

[state 1021]
type = playerpush
trigger1 = 1
value = 0

[State 610, 2]
type = PlaySnd
trigger1 = time = 0
value = s1, 10

[State 100,00]
type = Afterimage
trigger1 = time= 0
trans = add1
TimeGap = 1
FrameGap = 2
time = 40
PalBright = 0,0,0
PalContrast = 70,70,70
PalAdd = 0,0,200
PalMul = 1,1,1

[State 630, 2]
type = HitDef
trigger1 = time = 1
attr = A, HA
damage    = 60,6
animtype = hard
hitflag = MAF
guardflag = H
priority = 7
pausetime = 10,10
sparkno = s10003
sparkxy = 0,-20
hitsound   = s2,1
guardsound = s6,0
ground.type = High
ground.slidetime = 20
getpower = 80
ground.hittime = 50
ground.velocity = -12.5,-2.5
air.velocity = -12.5, -2.5
fall = 1
id = 1320
;p2stateno = 215

[state 2700,4]
type = targetstate
trigger1 = time > 1 && movehit && numtarget(1320)
value = 215
persistent = 0

[state 4060,1]
type = ChangeState
trigger1 = time > 40
value = 50
ctrl = 1

;======================================================
;------------------------------
;ソニッククラッカーA
[Statedef 1400]
type    = S
movetype= I
physics = S
juggle  = 2
poweradd= 0
ctrl = 0
anim = 1050
velset = 0,0

[State 610, 2]
type = PlaySnd
trigger1 = time = 13
value = s0, 4

[State 210, 4]
type = Explod
trigger1 = Animelem = 4
anim = 4073
postype = p1
ID = 4073
removetime = 3
pos = -20, -30
scale = 2,2
ownpal = 1
removeongethit = 1
bindtime = 2

[state 1030]
type = removeexplod
trigger1 = animelem = 5
ID = 4073

[state 2200,0]
type = helper
trigger1 = time = 15
helpertype = normal
name = "cracker"
ID = 1400
pos = 40,0
stateno = 1401
keyctrl = 0
ownpal = 1

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

;----------------------------------
;クラッカー
[Statedef 1401]
type = C
movetype = A
physics = N
ctrl = 0
anim = 4070
SprPriority = 4

[State 1000,影]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 2401, 1]
type = Posset
trigger1 = Pos Y >= -3
y = 0

[State 2401, 1]
type = velset
trigger1 = Pos Y >= -3
y = 0

[State 2401, 1]
type = velset
trigger1 = time = 0
trigger1 = Pos Y < -3
y = 10

[State 2401, 1]
type = velset
trigger1 = time = 0
trigger1 = ishelper(1410)||ishelper(1425)
x = 6.5

[State 2401, 1]
type = velset
triggerall = time = 0
trigger1 = ishelper(1510)
trigger2 = ishelper(1525)
x = 4

[State 2401, 1]
type = velset
triggerall = Pos Y >= -3
trigger1 = ishelper(1510)
trigger2 = ishelper(1525)
x = 0

[State 2401, 1]
type = veladd
trigger1 = ishelper(1410)||ishelper(1425)
trigger1 = vel x>0
x = -0.5

[State 820, 1]
type = hitoverride
Trigger1 = 1
time = 2
attr = SCA,AP,AA,AT
stateno = 1402
ignorehitpause = 1

[State 2401, 3]
type = ChangeState
triggerall = vel y = 0
trigger1 = (numhelper(1400)>=1)||(numhelper(1410)>=1)||(numhelper(1510)>=1)  
trigger1 = (parent,stateno=[1400,1410])||(parent,stateno=[1500,1510])
trigger1 = parent,AnimTime <= -20
trigger2 = EnemyNear,StateType != L
trigger2 = P2dist x = [-60,60]
trigger2 = P2dist y = [-40,40]
trigger3 = time >= 600
value = 1402

;------------------------------------
;クラッカー(爆発)
[Statedef 1402]
type = C
movetype = A
physics = N
ctrl = 0
anim = 4081

[State 610, 2]
type = PlaySnd
trigger1 = time = 0
value = s1, 1

[State 2401, 0]
type = projectile
trigger1 = time = 0
projanim = 4080
projremovetime = 44
projid = 2401
projremove = 0
offset = 0, -15
projheighbound = -240, 2
attr = S, SP
animtype = up
damage = 30, 6
guardflag = LA
sparkno = s4081
pausetime = 0, 10
guardsound = s6,1
ground.type = low
ground.slidetime = 5
ground.hittime = 20
ground.velocity = 0,-9
air.velocity = 0,-9
getpower = 80
ownpal = 1

[State 2401, 0]
type = projectile
trigger1 = time = 0
projanim = 4080
projremovetime = 44
projid = 2401
projremove = 0
offset = 50, -35
projheighbound = -240, 2
attr = S, SP
animtype = up
damage = 30, 6
guardflag = LA
sparkno = s4081
pausetime = 0, 10
guardsound = s6,1
ground.type = low
ground.slidetime = 5
ground.hittime = 20
ground.velocity = 0,-9
air.velocity = 0,-9
getpower = 80
ownpal = 1

[State 2401, 0]
type = projectile
trigger1 = time = 0
projanim = 4080
projremovetime = 44
projid = 2401
projremove = 0
offset = -50, -35
projheighbound = -240, 2
attr = S, SP
animtype = up
damage = 30, 6
guardflag = LA
sparkno = s4081
pausetime = 0, 10
guardsound = s6,1
ground.type = low
ground.slidetime = 5
ground.hittime = 20
ground.velocity = -2,-8
air.velocity = -2,-8
getpower = 80
ownpal = 1

[State 2401, 3]
type = Destroyself
trigger1 = time = 1

;------------------------------
;ソニッククラッカーB
[Statedef 1410]
type    = S
movetype= I
physics = S
juggle  = 2
poweradd= 0
ctrl = 0
anim = 1051
velset = 0,0

[State 610, 2]
type = PlaySnd
trigger1 = time = 13
value = s0, 4

[State 210, 4]
type = Explod
trigger1 = Animelem = 4
anim = 4073
postype = p1
ID = 4073
removetime = 3
pos = -20, -30
scale = 2,2
ownpal = 1
removeongethit = 1
bindtime = 2

[state 1030]
type = removeexplod
trigger1 = animelem = 5
ID = 4073

[state 2200,0]
type = helper
trigger1 = time = 15
helpertype = normal
name = "cracker"
ID = 1410
pos = 40,0
stateno = 1401
keyctrl = 0
ownpal = 1

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

;------------------------------
;ソニッククラッカーC
[Statedef 1420]
type    = S
movetype= I
physics = S
juggle  = 2
poweradd= -1000
ctrl = 0
anim = 1051
velset = 0,0

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 0
anim = s10000 
pos = 0, -35 
sound = s3, 0

[State 610, 2]
type = PlaySnd
trigger1 = time = 13
value = s0, 4

[State 210, 4]
type = Explod
trigger1 = Animelem = 4
anim = 4073
postype = p1
ID = 4073
removetime = 3
pos = -20, -30
scale = 2,2
ownpal = 1
removeongethit = 1
bindtime = 2

[state 1030]
type = removeexplod
trigger1 = animelem = 5
ID = 4073

[state 2200,0]
type = helper
trigger1 = time = 15
helpertype = normal
name = "cracker"
ID = 1420
pos = 40,0
stateno = 1401
keyctrl = 0
ownpal = 1

[state 2200,0]
type = helper
trigger1 = time = 15
helpertype = normal
name = "cracker"
ID = 1425
pos = 40,0
stateno = 1401
keyctrl = 0
ownpal = 1

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


;=====================================================
;----------------------------
;ソニックエアクラッカーA
[Statedef 1500]
type = A
movetype = I
physics = A
ctrl = 0
anim = 1060

[State 2500, 0]
type = PlaySnd
trigger1 =  AnimElem = 4
value = s0, 4

[State 2500, 3]
type = velset
trigger1 =  AnimElem = 4
y = -5

[State 2500, 1]
type = helper
trigger1 = time = 16
helpertype = normal
name = "Bomb"
ID = 1400
pos = 30, 0
stateno = 1401
ownpal = 1

[State 2500, 2]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1

;----------------------------
;ソニックエアクラッカーB
[Statedef 1510]
type = A
movetype = I
physics = A
ctrl = 0
anim = 1061

[State 2500, 0]
type = PlaySnd
trigger1 =  AnimElem = 4
value = s0, 4

[State 2500, 3]
type = velset
trigger1 =  AnimElem = 4
y = -7
x = -2

[State 2500, 1]
type = helper
trigger1 = time = 16
helpertype = normal
name = "Bomb"
ID = 1510
pos = 30, 0
stateno = 1401
ownpal = 1

[State 2500, 2]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1

;----------------------------
;ソニックエアクラッカーC
[Statedef 1520]
type = A
movetype = I
physics = A
ctrl = 0
poweradd = -1000
anim = 1061

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 0
anim = s10000 
pos = 0, -35 
sound = s3, 0

[State 2500, 0]
type = PlaySnd
trigger1 =  AnimElem = 4
value = s0, 4

[State 2500, 3]
type = velset
trigger1 =  AnimElem = 4
y = -7
x = -2

[State 2500, 1]
type = helper
trigger1 = time = 16
helpertype = normal
name = "Bomb"
ID = 1520
pos = 30, 0
stateno = 1401
ownpal = 1

[State 2500, 1]
type = helper
trigger1 = time = 16
helpertype = normal
name = "Bomb"
ID = 1525
pos = 30, 0
stateno = 1401
ownpal = 1

[State 2500, 2]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1

;==================================================
;---------------------
;サマーソルトA
[Statedef 1000]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 204
juggle = 2

[state 1000,0]
type = nothitby
trigger1 = time = 0
value = SCA
time = 10

[State 2600, 1]
type = HitDef
trigger1 = time = 9
attr = A, SA
damage    = 54, 6
animtype = up
hitflag = MAF
guardflag = M
priority = 7, Hit
pausetime = 10,10
sparkno = s10003
sparkxy = 0,-40
hitsound   = s2,1
guardsound = s6,0
ground.type = High
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -1.5,-9.5
air.velocity = -1.5,-9.5
getpower = 72
fall = 1

[state 210,6]
type = statetypeset
trigger1 = animelem = 3
statetype = A
movetype = A
physics = A

[State 2600, 2]
type = velset
trigger1 = AnimElem = 3
x = 2
y = -10

[State 2600, 3]
type = PlaySnd
trigger1 = AnimElem = 3
value = s0, 27

[State 2600, 4]
type = ChangeState
trigger1 = Animelem = 8
value = 50
ctrl = 0

;---------------------
;サマーソルトB
[Statedef 1010]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 204
juggle = 2

[state 1000,0]
type = nothitby
trigger1 = time = 0
value = SCA
time = 10

[State 2600, 1]
type = HitDef
trigger1 = time = 9
attr = A, SA
damage    = 81, 9
animtype = up
hitflag = MAF
guardflag = M
priority = 7, Hit
pausetime = 10,10
sparkno = s10003
sparkxy = 0,-40
hitsound   = s2,1
guardsound = s6,0
ground.type = High
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -2.2,-10.2
air.velocity = -2.2,-10.2
getpower = 108
fall = 1

[state 210,6]
type = statetypeset
trigger1 = animelem = 3
statetype = A
movetype = A
physics = A

[State 2600, 2]
type = velset
trigger1 = AnimElem = 3
x = 3
y = -12

[State 2600, 3]
type = PlaySnd
trigger1 = AnimElem = 3
value = s0, 27

[State 2600, 4]
type = ChangeState
trigger1 = Animelem = 8
value = 50
ctrl = 0

;---------------------
;サマーソルトC
[Statedef 1020]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 204
juggle = 2
poweradd = -1000

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 0
anim = s10000 
pos = 0, -35 
sound = s3, 0

[state 1000,0]
type = nothitby
trigger1 = time = 0
value = SCA
time = 10

[State 2600, 1]
type = HitDef
trigger1 = time = 9
attr = A, SA
damage    = 158,16
animtype = up
hitflag = MAF
guardflag = M
priority = 7, Hit
pausetime = 10,10
sparkno = s10003
sparkxy = 0,-40
hitsound   = s2,1
guardsound = s6,0
ground.type = High
ground.slidetime = 4
ground.hittime  = 15
ground.velocity = -2,-11
;air.velocity = -2,-9
getpower = 120
fall = 1

[state 210,6]
type = statetypeset
trigger1 = animelem = 3
statetype = A
movetype = A
physics = A

[State 2600, 2]
type = velset
trigger1 = AnimElem = 3
x = 3
y = -12

[State 2600, 3]
type = PlaySnd
trigger1 = AnimElem = 3
value = s0, 27

[State 2600, 4]
type = ChangeState
trigger1 = movehit
trigger1 = Animelem = 6
value = 695
ctrl = 0

[State 2600, 4]
type = ChangeState
trigger1 = Animelem = 8
value = 50
ctrl = 0

;===============================================
;ここから超必殺技
;===============================================
;===============================================
;ソニックブラスター
[Statedef 2000]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 0
ctrl = 0
anim = 1020

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 1
anim = s10000 
pos = 0, -35 
sound = s3, 2

[State 610, 2]
type = PlaySnd
trigger1 = time%9 = 0
value = s1, 15

[State 630, 2]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage    = 15
animtype = light
hitflag = MAF
guardflag = MA 
priority = 7,hit
pausetime = 10,10
sparkno = s10002
sparkxy = 60,-30
hitsound   = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1,0
air.velocity = -0.75,-0.25

[State 600, 2]
type = ChangeState
triggerall = power <= 0
trigger1 = Time%9 = 0
value = 50
ctrl = 0

[State 191, 1]
type = varrandom
trigger1 = power > 0
v = 6
range = -50,-40

[State 1000,0]
type = projectile
triggerall = power > 0
triggerall = time >= 9
trigger1 = time%9 = 0 
projanim = 4050
projremovetime = 80
projremove = 0
projid = 1600
offset = 0,0
velocity = abs(9*cos(var(6))),4.5-(var(6)*1.1)/19.2
projremanim = 4055
projhits = 9999
projmisstime = 18
attr = A,HP
animtype = back
damage = 45,5
hitflag = MAFD
guardflag = MA
pausetime = 0,16
sparkno = s10003
sparkky = -30,-30
hitsound = s2,6
guardsound = s6,1
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -8,8
air.velocity = -8,8
;getpower = 120
fall = 1
fall.recover = 0

[state 210,7]
type = velset
trigger1 = time < 9
x = 0
y = 0

[state 210,7]
type = velset
triggerall = power > 0
triggerall = time >= 9
trigger1 = time%9= 0 
x = -1
y = -4

[state 2000,0]
type = poweradd
triggerall = power > 0
triggerall = time >= 9
trigger1 = time%9 = 0
value = -350


;==============================================
;トルネード
[statedef 2200]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd= -1000
ctrl = 0
anim = 3000
velset = 0,0
SprPriority = -1

[State 1021]
type = Screenbound
trigger1 = 1
value = 0

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 1
anim = s10000 
pos = 0, -70 
sound = s3, 0

[State 210, 4]
type = Explod
trigger1 = time = 1
anim = 10001
postype = p1
sprpriority = 2
bindtime = -1
ID = 10001
removetime = 20
pos = 0, 0
ownpal = 1
removeongethit = 1
supermovetime = 999999

[State 610, 2]
type = PlaySnd
trigger1 = time = 3
value = s0,20
volume = 255

[state 210,6]
type = statetypeset
trigger1 = time > 2
statetype = A
movetype = A
physics = N

[state 210,7]
type = velset
trigger1 = time = 3
y = -4

[state 210,7]
type = velmul
trigger1 = time > 3
y = 0.85

[state 210,7]
type = velset
trigger1 = animelem = 5
y = 0

[State 2500, 1]
type = helper
trigger1 = time = 13
helpertype = normal
name = "kaze"
ID = 4090
pos = 0, 0
Size.XScale = 1
Size.YScale = 1
stateno = 4090
ownpal = 1

[State 610, 2]
type = PlaySnd
trigger1 = time = 16
value = s1, 10

[State 210, 3]
type = PlayerPush
trigger1 = 1
value = 0

[State 100,00]
type = Afterimage
trigger1 = time= 13
trans = add1
TimeGap = 1
FrameGap = 2
time = 100
PalBright = 0,0,0
PalContrast = 70,70,70
PalAdd = 0,0,200
PalMul = 1,1,1

[State 9000, 1];時計回り（キャラ右向きの場合）
type = velset
trigger1 = time = [13,110]
x = 40*cos(time*0.5)
y = 4*sin(time*0.5)

[state 210,7]
type = velset
trigger1 = time > 110
x = 0
y = 0

[State 3007, スクロール]
type = ScreenBound
trigger1 = 1
value = 0
MoveCamera = 0,0

[state 2200,0]
type = nothitby
trigger1 = time = [13,110]
value = SCA

[State 600, 2]
type = ChangeState
trigger1 = Time = 170
value = 50
ctrl = 0

;-------------------------
;トルネード（竜巻）
[statedef 4090]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 0
ctrl = 0
anim = 4090
velset = 0,0
SprPriority = 4

[state 210,6]
type = statetypeset
trigger1 = animelem = 31
movetype = I 

[state 4090,0]
type = velset
trigger1 = 1
x = 0
y = 0

[state 2701,2]
type = playsnd
trigger1 = animelem = 2
trigger2 = animelem = 4
trigger3 = animelem = 6
trigger4 = animelem = 8
trigger5 = animelem = 10
trigger6 = animelem = 12
trigger7 = animelem = 14
trigger8 = animelem = 16
trigger9 = animelem = 18
trigger10 = animelem = 20
trigger11 = animelem = 22
trigger12 = animelem = 24
trigger13 = animelem = 26
trigger14 = animelem = 28
trigger15 = animelem = 30
value = s1,16

[State 2500, 1]
type = helper
trigger1 = time%4 = 0
trigger1 = time <= 85
helpertype = normal
name = "wind1"
ID = 4091
pos = 350, 0
Size.XScale = 1
Size.YScale = 1
stateno = 4091
ownpal = 1

[State 2500, 1]
type = helper
trigger1 = time%4 = 0
trigger1 = time <= 85
helpertype = normal
name = "wind2"
ID = 4092
pos = -350, 0
Size.XScale = 1
Size.YScale = 1
stateno = 4092
ownpal = 1

[State 6421, HitDef]
Type = HitDef
trigger1 = animelem = 2
trigger2 = animelem = 4
trigger3 = animelem = 6
trigger4 = animelem = 8
trigger5 = animelem = 10
trigger6 = animelem = 12
trigger7 = animelem = 14
trigger8 = animelem = 16
trigger9 = animelem = 18
trigger10 = animelem = 20
trigger11 = animelem = 22
trigger12 = animelem = 24
trigger13 = animelem = 26
trigger14 = animelem = 28
Attr = S, HA
AnimType  = Hard
Air.AnimType = Back
Damage = 12, 3
GuardFlag = M
Priority = 6, Hit
PauseTime = 0, 4
sparkno = s10002
hitsound = s2,6
guardsound = s6,1
SparkXY = 0, Floor((P2Dist Y)-40)
Ground.Type = High
Ground.SlideTime = 24
Ground.HitTime  = 32
Ground.Velocity = 0,-4
Air.Velocity = 0,-4
Fall = 1
air.fall = 1
fall.recover = 0

[State 6421, HitDef]
Type = HitDef
trigger1 = animelem = 30
Attr = S, HA
AnimType  = Hard
Air.AnimType = Back
Damage = 48, 10
GuardFlag = M
Priority = 6, Hit
PauseTime = 0, 4
sparkno = s10002
hitsound = s2,6
guardsound = s6,1
SparkXY = 0, Floor((P2Dist Y)-40)
Ground.Type = High
Ground.SlideTime = 24
Ground.HitTime  = 32
Ground.Velocity = -2,-12
Air.Velocity = -2,-12
Fall = 1
fall.recover = 0

[State 210, 3]
type = PlayerPush
trigger1 = 1
value = 0

[State 6423, DestroySelf]
Type = DestroySelf
Trigger1 = AnimTime = 0

;-------------------------
;トルネード（風1）
[statedef 4091]
Type = A
MoveType = I
Physics = N
Ctrl = 0
Anim = 4091
SprPriority = 0

[State 6338, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = -10

[State 6338, DestroySelf]
Type = DestroySelf
Trigger1 = time >= 35

[State 6338, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA

[State 6338, PlayerPush]
Type = PlayerPush
Trigger1 = P2movetype != H
Value = 1

[State 6338, PlayerPush]
Type = PlayerPush
Trigger1 = P2movetype = H
Value = 0

[State 3338, Width]
Type = Width
Trigger1 = 1
edge = 5, 5

;-------------------------
;トルネード（風2）
[statedef 4092]
Type = A
MoveType = I
Physics = N
Ctrl = 0
Anim = 4091
SprPriority = 0

[State 6338, VelSet]
Type = VelSet
Trigger1 = Time = 0
X = 10

[State 6338, VelSet]
Type = VelAdd
Trigger1 = 1
X = -0.35

[State 6338, DestroySelf]
Type = DestroySelf
Trigger1 = time >= 35

[State 6338, NotHitBy]
Type = NotHitBy
Trigger1 = 1
Value = SCA

[State 6338, PlayerPush]
Type = PlayerPush
Trigger1 = 1
Value = 1

[State 3338, Width]
Type = Width
Trigger1 = 1
edge = 5, 5

;===========================================
;ソニックコンビネーション
[Statedef 2100]
type = S
movetype = A
physics = S
juggle  = 0
ctrl = 0
anim = 3100
poweradd = -2000

[State 3100, 0]
type = PlaySnd
trigger1 = time = 1
value = s0, 6

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 1
anim = s10000 
pos = 0, -70 
sound = s3, 0

[State 210, 4]
type = Explod
trigger1 = time = 1
anim = 10001
postype = p1
sprpriority = 2
bindtime = -1
ID = 10001
removetime = 20
pos = 0, 0
ownpal = 1
removeongethit = 1
supermovetime = 999999

[State 200, 1]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
trigger3 = AnimElem = 7
trigger4 = AnimElem = 9
trigger5 = AnimElem = 11
trigger6 = AnimElem = 13
trigger7 = AnimElem = 15
trigger8 = AnimElem = 17
trigger9 = AnimElem = 19
trigger10 = AnimElem = 21
trigger11 = AnimElem = 23
trigger12 = AnimElem = 25
trigger13 = AnimElem = 27
trigger14 = AnimElem = 29
trigger15 = AnimElem = 31
trigger16 = AnimElem = 33
trigger17 = AnimElem = 35
trigger18 = AnimElem = 37
trigger19 = AnimElem = 39
trigger20 = AnimElem = 41
trigger21 = AnimElem = 43
trigger22 = AnimElem = 45        
value = s1, 5

[State 3110, 8]
type = envcolor
triggerall = movehit
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
trigger3 = AnimElem = 7
trigger4 = AnimElem = 9
trigger5 = AnimElem = 11
trigger6 = AnimElem = 13
trigger7 = AnimElem = 15
trigger8 = AnimElem = 17
trigger9 = AnimElem = 19
trigger10 = AnimElem = 21
trigger11 = AnimElem = 23
trigger12 = AnimElem = 25
trigger13 = AnimElem = 27
trigger14 = AnimElem = 29
trigger15 = AnimElem = 31
trigger16 = AnimElem = 33
trigger17 = AnimElem = 35
trigger18 = AnimElem = 37
trigger19 = AnimElem = 39
trigger20 = AnimElem = 41
trigger21 = AnimElem = 43
trigger22 = AnimElem = 45
ignorehitpause = 1
time = 1
under = -1
value = 255,255,255

[State 200 , 2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 7
trigger3 = AnimElem = 15
trigger4 = AnimElem = 23
trigger5 = AnimElem = 29
trigger6 = AnimElem = 37
trigger7 = AnimElem = 41
trigger8 = AnimElem = 45
attr = S,HA
damage = 10, 2
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 0,10
sparkno = s10002
sparkxy = 3,-36 
hitsound = s2,0
guardsound = s6,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = 0
air.velocity = 0

[State 200 , 2]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 11
trigger3 = AnimElem = 17
trigger4 = AnimElem = 21
trigger5 = AnimElem = 27
trigger6 = AnimElem = 31
trigger7 = AnimElem = 35
attr = S,HA
damage = 16, 3
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 0,18
sparkno = s10002
sparkxy = 3,-18
hitsound = s2,0
guardsound = s6,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = 0
air.velocity = 0

[State 200 , 2]
type = HitDef
trigger1 = AnimElem = 9
trigger2 = AnimElem = 13
trigger3 = AnimElem = 19
trigger4 = AnimElem = 25
trigger5 = AnimElem = 33
trigger6 = AnimElem = 39
trigger7 = AnimElem = 43
attr = S,HA
damage = 20, 3
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 0,18
sparkno = s10002
sparkxy = 3,-54
hitsound = s2,0
guardsound = s6,0
ground.type = low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = 0
air.velocity = 0

[State 3100, NotHitby]
type = NotHitBy
trigger1 = MoveHit
value = SCA

[State 230 , 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 1600
ctrl = 0

;====================================================
;ライトスピードアタック
[Statedef 2300]
type     = S
movetype = A
physics  = N
juggle   = 0
poweradd = -3000
ctrl     = 0
anim = 3200
velset   = 0,0

[State 2000]
type = Explod
trigger1 = time = 0
anim = 8010
pos = ifelse(facing=1,-320,320),0
ownpal = 1
postype = front
bindtime = -1
supermove = 1
sprpriority = -15
facing = ifelse(facing=-1,-1,1)

[State 2000]
type = Explod
trigger1 = time = 0
anim = 8020
pos = ifelse(facing=1,-320,320),0
ownpal = 1
postype = front
bindtime = -1
supermove = 1
sprpriority = -10
facing = ifelse(facing=-1,-1,1)
scale = 1,1

[State 702, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 0
value = s1,0
volume = 255

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 0
anim = s10000 
pos = 0, -70 
sound = s3, 2
time = 60
movetime = 60

[State 210, 4]
type = Explod
trigger1 = time = 0
anim = 10001
postype = p1
sprpriority = 2
bindtime = -1
ID = 10001
removetime = 20
pos = 0, 0
ownpal = 1
removeongethit = 1
supermovetime = 999999

[State 702, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 60
value = s0,8
volume = 255

[State 3504, 残像]
type = AfterImage
trigger1 = Time = 60
Time = 60
Trans = Add
FrameGap = 2
palcolor = 256
PalBright   = 90,90,150
PalContrast = 180,180,256
PalAdd = 0,0,160
PalMul = 1,1,1

[state 2300,1]
type = velset
trigger1 = time = 61
x = 40

[State 3505, エフェクト]
type = Explod
trigger1 = time = 61
trigger1 = numexplod(6030) = 0
anim = 6030
postype = p1
pos = 10,-10
scale = 2,2
sprpriority = 2
ownpal = 1
bindtime = -1
ID = 6030

[state 2300,0]
type = changeanim
trigger1 = anim = 3200
trigger1 = time >= 60
value = 3201

[State 1020]
type = Screenbound
trigger1 = 1
value = 0

[State 1020]
type = HitDef
triggerall = anim = 3201
trigger1 = !movecontact && time > 61
trigger2 = movecontact > 5
attr = S, HA
damage    = 50,10
guardflag = MA
priority = 7,Hit
pausetime = 0,0
sparkno = S10003
sparkxy = -30,-40
hitsound   = S2,4
guardsound = s6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = 0,-12
air.type = High
air.velocity = 0,-12
air.hittime = 20
fall = 1
fall.recover = 0
id = 2300

[State 1021]
type = targetstate
trigger1 = anim = 3201
Trigger1 = numtarget
trigger1 = movehit = 1
value = 2302
id = 2300

[State 1020]
type = changestate
trigger1 = anim = 3201
trigger1 = movehit = 5
value = 2301
ctrl = 0

[State 1020]
type = changestate
triggerall = anim = 3201
trigger1 = ScreenPos X < -120
trigger1 = facing = -1
trigger1 = !movehit
trigger2 = ScreenPos X > 419
trigger2 = facing = 1
trigger2 = !movehit
trigger3 = time > 120
value = 2501
ctrl = 0

;---------------------------------------------------
[Statedef 2301];ライトアタック攻撃
type = A
movetype = A
physics = N
ctrl = 0
anim = 3201
juggle   = 0
sprpriority = 1
facep2 = 1

[State 181, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG
flag3 = noshadow

[State 3504, 残像]
type = AfterImage
trigger1 = Time = 0
Time = 300
Trans = Add
FrameGap = 2
palcolor = 256
PalBright   = 90,90,150
PalContrast = 180,180,256
PalAdd = 0,0,160
PalMul = 1,1,1

[State 3504, ヘルパーを出す]
type = null;Helper
triggerall = NumHelper(2303) = 0
trigger1 = Time = 1
name = "strike"
stateno = 2304
ID = 2303
pos = 0,0
keyctrl = 0
postype = p1
ownpal = 1
IgnoreHitPause = 1
Persistent = 0

[State 1021]
type = nothitby
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1021]
type = playerpush
trigger1 = 1
value = 0

[State 1021]
type = Screenbound
trigger1 = 1
value = 0

[State 702, 音を鳴らす]
type = PlaySnd
trigger1 = time = 0
value = s0,15
volume = 255

[state 2300,1]
type = velset
trigger1 = time > 1
x = 90

[State 7000, VelSet]
type = VelSet
trigger1 = 1
y = -16*sin(fvar(0))

[State 7000, VarSet]
type = VarSet
trigger1 = 1
fvar(2) = ifelse((P2dist x=[0,1]),1,ifelse((P2dist x=[-1,0]),-1,P2dist x))

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

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

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

[State 191, 1]
type = varrandom
trigger1 = ScreenPos X < -100
trigger1 = facing = -1
trigger2 = ScreenPos X > 419
trigger2 = facing = 1
v = 7
range = -75,75

[State 1021]
type = Posset
;triggerall = time > 40
trigger1 = ScreenPos X < -100
trigger1 = facing = -1
trigger2 = ScreenPos X > 419
trigger2 = facing = 1
y = ceil(enemynear,Pos Y)+var(7)

[State 1021]
type = turn
trigger1 = ScreenPos X < -100
trigger1 = facing = -1
trigger2 = ScreenPos X > 419
trigger2 = facing = 1

[State 1021]
type = HitDef
;triggerall = time > 40
trigger1 = !movecontact && time > 0
trigger2 = movecontact > 5
attr = A, HA
hitflag = MAFD
damage    = 15,2
priority = 7,Hit
pausetime = 0,120
sparkno = S10003
sparkxy = -30,-40
hitsound   = S2,2
guardsound = s6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = 0,-2.8
air.type = High
air.velocity = 0,-2.8
air.hittime = 20
fall = 1
fall.recover = 0

[State 1021]
type = targetstate
Trigger1 = numtarget
trigger1 = movehit = 1
value = 2302

[State 1021]
type = null;changestate
triggerall = time > 40
trigger1 = ScreenPos X < -120
trigger1 = facing = -1
trigger1 = !movecontact
trigger2 = ScreenPos X > 419
trigger2 = facing = 1
trigger2 = !movecontact
value = 50
ctrl = 0

[State 1021]
type = changestate
trigger1 = ScreenPos X<-120||ScreenPos X>419
trigger1 = time > 300
value = 2303
ctrl = 0

;---------------------------------------------------
;ライトアタックフィニッシュ
[Statedef 2303]
type     = A
movetype = A
physics  = N
juggle   = 0
poweradd = 0
ctrl     = 0
anim     = 3201
velset   = 0,0

[State 702, 音を鳴らす]
type = PlaySnd
trigger1 = time = 0
value = s0,20
volume = 255

[State 702, 音を鳴らす]
type = PlaySnd
trigger1 = time = 0
value = s0,20
volume = 255

[State 702, 音を鳴らす]
type = PlaySnd
trigger1 = time = 0
value = s0,20
volume = 255

[State 702, 音を鳴らす]
type = PlaySnd
trigger1 = time = 0
value = s0,20
volume = 255

[State 3005, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 2

[State 1021]
type = Screenbound
trigger1 = 1
value = 0

[State 181, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG
flag3 = noshadow

[State 3504, 残像]
type = AfterImage
trigger1 = Time = 0
Time = 40
PalBright   = 90,90,150
PalContrast = 180,180,256
Trans = Add1

[State 3504, 押し判定]
type = PlayerPush
trigger1 = 1
value = 0
IgnoreHitPause = 1

[State 3504, 軸位置]
type = PosSet
trigger1 = Time = 1
x = (EnemyNear,Pos X)
y = (EnemyNear,Pos Y-240)

[State 3504, 移動速度]
type = VelSet
trigger1 = Time = 2
y = 24

[State 3504, ヘルパーを出す]
type = Helper
;triggerall = NumHelper(2405) = 0
trigger1 = Time = 2
name = "strike"
stateno = 2405
ID = 2405
pos = 0,0
keyctrl = 0
postype = p1
ownpal = 1
IgnoreHitPause = 1
Persistent = 0

[State 3504, ヒット定義]
type = HitDef
trigger1 = Time = 2
attr             = A, HA
animtype         = Back
damage           = 60,10
getpower         = 0,0
hitflag          = MAFD
guardflag        = HA
priority         = 7
pausetime        = 0,6
sparkno 	 = s10003
sparkxy          = -10,-20 
hitsound         = s2,5
guardsound       = s6,0
ground.type      = High
ground.slidetime = 16
ground.hittime   = 19
ground.velocity  = 0,0
guard.velocity   = -7
air.velocity     = 0,20
airguard.velocity= -6,-1.5
yaccel           = 0.8
fall             = 1
fall.recover     = 0
id = 2400

[State 3504, 掴んだ相手のステート変更]
type = TargetState
triggerall = (NumEnemy != 0)
trigger1 = (EnemyNear,StateType != A)
trigger1 = movehit
trigger1 = numtarget(2400) != 0
value = 2404
id = 2400
Persistent = 0

[State 3504, ステート変更]
type = ChangeState
trigger1 = (Time > 2) && (Pos Y >= 0)
value = 2401

;--------------------------------------------------
;ライトアタックやられ
[Statedef 2302]
type    = A
movetype= H
physics = N
velset = 0,-2.8

[State 1021]
type = changeanim2
Trigger1 = 1
value = 15004

[State 1021]
type = Velset
Trigger1 = enemy,stateno = 2301 && !enemy,movecontact
y = -16
persistent = 0

[State 1021]
type = Velset
Trigger1 = enemy,stateno != 2301 && !enemy,movecontact
y = -12
persistent = 0

[State 1021]
type = nothitby
Trigger1 = enemy,stateno != [2301,2303]
value = SCA,AA,AT,AP

[State 1021]
type = VelAdd
Trigger1 = 1
y = .44

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

;--------------------------------------------------
;ライトアタックエフェクト
[Statedef 2304]
type     = A
movetype = I
physics  = N
ctrl     = 0
anim     = 6030
velset   = 0,0
sprpriority = 5

[State 3504, 残像]
type = AfterImage
trigger1 = Time = 0
Time = 300
Trans = Add
FrameGap = 2
length = 2
palcolor = 256
PalBright   = 45,45,75
PalContrast = 90,90,128
PalAdd = 0,0,80
PalMul = 1,1,1

[State 1021]
type = turn
trigger1 = ScreenPos X < -100
trigger1 = facing = -1
trigger2 = ScreenPos X > 419
trigger2 = facing = 1

[state 2405,0]
type = trans
trigger1 = 1
trans = Add

[State 1000, 3]
type = BindToParent
trigger1 = 1
time = 2
pos = 0,-24

[State 2101, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 2

[State 2301, 押し判定]
type = PlayerPush
trigger1 = 1
value = 0
IgnoreHitPause = 1
Persistent = 1

[State 2301, 角度を有効にする]
type = AngleDraw
trigger1 = 1

[State 2301, 角度]
type = AngleSet
trigger1 = time >= 1
value = atan((root,vel y)/((root,vel x)+0.01))*(-180/pi)+(((root,vel x)<0)*180)

[State 2101, このヘルパーを消す]
type = DestroySelf
trigger1 = root,stateno!=2301
trigger2 = root,stateno=2303

;===================================================
;メテオストライク
[Statedef 2400]
type     = S
movetype = A
physics  = N
juggle   = 1
poweradd = -1000
ctrl     = 0
anim     = 2400
velset   = 0,0

[state 2400,0]
type = removeexplod
trigger1 = time = 0
id = 6030

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = var(6) = 0
trigger1 = time = 0
anim = s10000 
pos = 0, -35 
sound = s3, 0

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = var(6) = 1
trigger1 = time = 1
anim = s10000 
pos = 0, -35 
sound = s3, 0

[State 3504, 状態変更]
type = StateTypeSet
trigger1 = animelem = 2
StateType = A
IgnoreHitPause = 1

[State 702, 音を鳴らす]
type = PlaySnd
trigger1 = time = 3
value = s0,3
volume = 255

[State 702, 音を鳴らす]
type = PlaySnd
trigger1 = time = 3
value = s0,3
volume = 255

[State 3005, 無敵]
type = NotHitBy
trigger1 = time = [0,20]
value = SCA
time = 2

[State 3504, 残像]
type = AfterImage
trigger1 = Time = 1
Time = 40
PalBright   = 90,90,150
PalContrast = 180,180,256
Trans = Add1

[State 3504, 押し判定]
type = PlayerPush
trigger1 = 1
value = 0
IgnoreHitPause = 1

[State 3504, スクロール]
type = ScreenBound
trigger1 = 1
value = 1
;MoveCamera = 1,0

[State 3504, 軸位置]
type = null;PosSet
trigger1 = Time = 0
y = 0

[State 3504, 軸位置]
type = PosSet
trigger1 = time = 20
trigger2 = var(6) = 1
trigger2 = time = 0
x = (EnemyNear,Pos X)
y = (EnemyNear,Pos Y-240)

[State 3504, 移動速度]
type = VelSet
trigger1 = var(6) = 0
trigger1 = time = 1
y = -24

[State 3504, 移動速度]
type = VelSet
trigger1 = time = 20
y = 24

[State 3504, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 1
value = s1,3
Persistent = 0

[State 3504, ヘルパーを出す]
type = Helper
triggerall = NumHelper(2405) = 0
trigger1 = animelem = 3
name = "strike"
stateno = 2405
ID = 2405
pos = 0,0
keyctrl = 0
postype = p1
ownpal = 1
IgnoreHitPause = 1
Persistent = 0

[State 3504, ヒット定義]
type = HitDef
trigger1 = time = 20
attr             = A, HA
animtype         = Back
damage           = 190,20
getpower         = 0,0
guardflag        = HA
priority         = 7
pausetime        = 0,6
sparkno 	 = s10003
sparkxy          = -10,-20 
hitsound         = s2,5
guardsound       = s6,0
ground.type      = High
ground.slidetime = 16
ground.hittime   = 19
ground.velocity  = 0,0
guard.velocity   = -7
air.velocity     = 0,20
airguard.velocity= -6,-1.5
yaccel           = 0.8
fall             = 1
fall.recover     = 0
id = 2400

[State 3504, 掴んだ相手のステート変更]
type = TargetState
triggerall = (NumEnemy != 0)
trigger1 = (EnemyNear,StateType != A)
trigger1 = movehit
trigger1 = numtarget(2400) != 0
value = 2404
id = 2400
Persistent = 0

[State 3504, ステート変更]
type = ChangeState
trigger1 = (Time > 20) && (Pos Y >= 0)
value = 2401

;---------------------------------------------------------------------------
;メテオ着地
[Statedef 2401]
type     = S
movetype = I
physics  = N
ctrl     = 0
anim     = 2401
hitdefpersist = 1
sprpriority = 4

[state 2500,2]
type = varset
trigger1 = time = 0
var(6) = 0

[state 1070,1]
type = envshake
trigger1 = time = 0
time = 40
freq = 120
ampl = 4
phase = 40

[State 3005, 無敵]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 40

[State 3504, スクロール]
type = ScreenBound
trigger1 = 1
value = 1
;MoveCamera = 1,0

[State 3504, 軸位置]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3505, 埃]
type = MakeDust
trigger1 = Time = 0
pos = 15,0
spacing = 1

[State 3505, 軸位置]
type = PosSet
trigger1 = 1
y = 0

[State 3505, 移動速度]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 3505, エフェクト]
type = Explod
trigger1 = Time = 0
anim = 6050
postype = p1
pos = 0,0
scale = 0.5,0.5
sprpriority = -1
ownpal = 1
ID = 6050

[State 3505, エフェクト]
type = Explod
trigger1 = Time = 21
anim = 6050
postype = p1
pos = 0,0
scale = 1.25,0.5
sprpriority = -2
ownpal = 1
ID = 6050

[State 3505, エフェクト]
type = Explod
trigger1 = Time = 1
anim = 6045
postype = p1
pos = -60,0
scale = 0.75,0.75
sprpriority = -1
ownpal = 1
IgnoreHitPause = 1
Persistent = 0
ID = 6040

[State 3505, エフェクト]
type = Explod
trigger1 = Time = 1
anim = 6045
postype = p1
facing = -1
pos = 60,0
scale = 0.75,0.75
sprpriority = 4
ownpal = 1
IgnoreHitPause = 1
Persistent = 0
ID = 6040

[State 700, エフェクト]
type = Explod
trigger1 = prevstateno = 2303
trigger1 = time = 0
anim = 10005
facing = 1
postype = back
pos =-50,-50
sprpriority = -5
ownpal = 1
scale = 1.5, 1.5
removetime = 96
removeongethit = 1
pausemovetime = 30 
ID = 10005

[State 3505, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 0
value = s1,18

[State 3505, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------
;メテオやられ
[Statedef 2404]
type     = S
movetype = H
physics  = S
ctrl     = 0
sprpriority = 3

[State 15103, アニメ変更]
type = ChangeAnim2
trigger1 = time = 0
value = 2403
IgnoreHitPause = 1
Persistent = 0

[State 15103, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 2

[State 15103, ダウン判定]
type = HitFallSet
trigger1 = 1
value = 0

[State 15103, 押し判定]
type = PlayerPush
trigger1 = 1
value = 0

[State 15103, 軸位置]
type = PosSet
trigger1 = 1
y = 0

[State 15103, 移動速度]
type = VelSet
trigger1 = 1
y = 0

[State 15103, 相手ステートに戻す]
type = SelfState
trigger1 = time >= 70
value = 5110

;--------------------------------------------------
;メテオ落下エフェクト
[Statedef 2405]
type     = A
movetype = I
physics  = N
ctrl     = 0
anim     = 6030
velset   = 0,0
sprpriority = 5

[state 2405,0]
type = trans
trigger1 = time = [0,10]
trans = Add

[state 2405,0]
type = trans
trigger1 = time >= 10
trans = AddAlpha
Alpha = 256-(time-10)*7,256

[State 1000, 3]
type = BindToParent
trigger1 = 1
time = 2
pos = 0,-30 

[State 2101, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 2

[State 2301, 押し判定]
type = PlayerPush
trigger1 = 1
value = 0
IgnoreHitPause = 1
Persistent = 1

[State 2301, 角度を有効にする]
type = AngleDraw
trigger1 = time <= 10

[State 2301, 角度を有効にする]
type = AngleDraw
trigger1 = time > 10
scale = 1+(time-10)*0.025,1-(time-10)*0.025

[State 2301, 角度]
type = AngleSet
trigger1 = Time = 0
value = -90

[State 2101, このヘルパーを消す]
type = DestroySelf
trigger1 = root,stateno!=[2300,2401]
trigger2 = root,stateno=2401
trigger2 = root,time>=40

;===================================================
;ブーストアタック
[Statedef 2500]
type     = S
movetype = A
physics  = S
juggle   = 1
poweradd = -2000
ctrl     = 0
anim     = 2500
velset   = 0,0
sprpriority = 1

[state 2500,2]
type = varset
trigger1 = time = 0
var(6) = 0

[State 3000, 超必殺技暗転時間停止]
type = SuperPause
trigger1 = time = 0
anim = s10000 
pos = 0, -35 
sound = s3, 1
movetime = 30

[State 3007, スクロール]
type = ScreenBound
trigger1 = 1
value = 0
MoveCamera = 0,0

[State 2101, 無敵]
type = NotHitBy
trigger1 = 1
value = SCA
time = 2

[state 2500,0]
type = velset
trigger1 = time >= 35
x = 35

[State 3505, エフェクト]
type = Explod
trigger1 = time = 35
anim = 6040
postype = p1
pos = -30,0
scale = 1,1
sprpriority = 2
ownpal = 1
ID = 6040

[State 3505, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 35
value = s1,19
volume = 255

[State 630, 2]
type = HitDef
trigger1 = time = 35
attr = S, HA
damage    = 380,40
animtype = back
hitflag = MAFD
;guardflag = M
priority = 7
pausetime = 0,15
sparkno = s10004
sparkxy = 0,-20
hitsound   = s2,5
guardsound = s6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-18
air.velocity = 0,-18
fall = 1
envshake.time = 20
envshake.ampl = 5
envshake.freq = 120
getpower = 300
fall.recover = 0

[State 3505, エフェクト]
type = Explod
trigger1 = animelem = 3
trigger1 = numexplod(6030) = 0
anim = 6030
postype = p1
pos = 30,-34
scale = 2,2
sprpriority = 2
ownpal = 1
bindtime = -1
ID = 6030

[State 3504, 残像]
type = AfterImage
trigger1 = Time = 35
Time = 60
Trans = Add
FrameGap = 2
palcolor = 256
PalBright   = 90,90,150
PalContrast = 180,180,256
PalAdd = 0,0,160
PalMul = 1,1,1

[State 1000,00]
type = Afterimagetime
trigger1 = (FrontEdgeDist < -120)
time = 0

[state 2500,2]
type = varset
trigger1 = var(59) = 0
trigger1 = command = "a";"meteor"
trigger2 = (var(59)!=0)&&(Random<=var(59)*100)
trigger2 = power >= 1000
trigger2 = enemynear,life<190||Random<=(10-var(59))*100
var(6) = 1

[state 2500,1]
type = changestate
trigger1 = (FrontEdgeDist < -120)
trigger1 = power >= 1000
trigger1 = var(6) = 1
value = 2400

[state 2500,1]
type = changestate
trigger1 = (FrontEdgeDist < -120)
value = 2501

[state 2500,1]
type = changestate
trigger1 = time >= 120
value = 2502

;------------------------------------------------
;ブーストアタック終了
[Statedef 2501]
type     = S
movetype = I
physics  = N
poweradd = 0
ctrl     = 0
anim     = 2501
velset   = 0,0
sprpriority = 1

[state 2500,2]
type = posset
trigger1 = time = 0
y = 0

[state 2500,0]
type = velset
trigger1 = time = 30
x = -24

[State 3007, スクロール]
type = ScreenBound
trigger1 = 1
value = 0

[state 2500,0]
type = velmul
trigger1 = time > 30
x = 0.9

[state 2500,0]
type = velset
trigger1 = animelem = 2
x = 0

[State 106, 3]
type = MakeDust
trigger1 = time < 90
pos = 0,0

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

;------------------------------------------------
;ブーストアタック終了2
[Statedef 2502]
type     = S
movetype = I
physics  = S
juggle   = 1
poweradd = 0
ctrl     = 0
anim     = 2502
velset   = 20,0
sprpriority = 1

[State 1021]
type = Screenbound
trigger1 = 1
value = 0

[state 2500,0]
type = velmul
trigger1 = time > 0
x = 0.8

[state 2500,0]
type = velset
trigger1 = animelem = 2
x = 0

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

;===================================================
;---------------------
;ヒーリング
[Statedef 700]
type     = S
movetype = I
physics  = S
ctrl     = 0
velset   = 0,0
anim     = 950

[State 700, パワーゲージ増]
type = PowerAdd
trigger1 = 1
value = 3

[state 700, 音]
type = playsnd
trigger1 = var(59) = 0
trigger1 = command = "hold_y"
trigger2 = anim = 950
value = s1,11
volume = 200
persistent = 25

[state 700, 音2]
type = playsnd
trigger1 = var(59) = 0
trigger1 = command != "hold_y"
trigger2 = stateno != 700
value = s1,12
volume = 200
persistent = 25

[State 700, 押し判定]
type = PlayerPush
trigger1 = 1
value = 0 

[State 700, エフェクト]
type = Explod
trigger1 = AnimElem = 1
trigger1 = NumExplod(130) = 0 
anim = 6000
facing = -1
postype = p1
pos =0,0
scale = 2, 2
sprpriority = 3
ownpal = 1
removetime = -1
removeongethit = 1 
ID = 130

[State 700, エフェクト消去]
type = removeexplod
triggerall = NumExplod(130) > 0
trigger1 = stateno != 700
trigger2 = var(59) = 0
trigger2 = command != "hold_y"
trigger3 = MoveType != I
trigger4 = anim != 950
ID = 130

[State 700, ステート変更]
type = ChangeState
triggerall = var(59) = 0
trigger1 = command != "hold_y"  
value = 701

;---------------------------
;ヒーリング終了
[Statedef 701]
type     = S
movetype = I
physics  = S
ctrl     = 0
velset   = 0,0
anim     = 951

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

