; 仮面ライダーアギト　ver.090204

; 基本設定
[Data]
  ;体力ゲージの初期値
life = 1000
  ;攻撃力（これ以上に設定すると強くなる）
attack = 100
  ;防御力（これ以上に設定すると強くなる）
defence = 100
  ;コンボをくらっている時にあがる防御力
fall.defence_up = 50
  ;倒れてから起上がるまでのフレーム数
liedown.time = 60
  ;空中でどれだけコンボが繋がるか（高くすると無限コンボになるので注意）
airjuggle = 15
  ;hitdefで設定していない時の基本ヒットスパークナンバー
sparkno = 2
  ;設定してない時のガードナンバー
guard.sparkno = 40
  ;KOした時に声にエコーをかけるか（１でＯＮ）
KO.echo = 0
 volume = 0
  IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1           ;水平方向の縮尺（通常１）
yscale = 1           ;垂直方向の縮尺（通常１）
ground.back = 15     ;キャラの幅(後方,地上)
ground.front = 16    ;キャラの幅(前方,地上)
air.back = 12        ;キャラの幅(後方,空中)
air.front = 12       ;キャラの幅(前方,空中)
height = 60          ;キャラの高さ
attack.dist = 160    ;攻撃をした時相手がガード体制に入る最低距離
proj.attack.dist = 90;攻撃をした時相手がガード体制に入る最低距離（飛び道具）
proj.doscale = 0     ;上で設定した縮尺を飛び道具にも適用するか（１でＯＮ）   
head.pos = -5, -90   ;頭の大体の座標
mid.pos = -5, -60    ;体の中心の大体の座標
shadowoffset = 0     ;影の垂直方向のオフセット
draw.offset = 0,0    ;使用しない

[Velocity]
walk.fwd  = 2.4      ;前進の速度
walk.back = -2.2     ;後退の速度
run.fwd  = 4.6, 0    ;前ダッシュの速度（ホップする時はyを-にする）
run.back = -4.5,-3.8 ;後ダッシュの速度（ホップする時はyを-にする）
jump.neu = 0,-8.4    ;垂直ジャンプの速度
jump.back = -2.55    ;後ジャンプの速度
jump.fwd = 2.5       ;前ジャンプの速度
runjump.back = -2.55,-8.1 ;後ダッシュしながらのジャンプ速度(オプション)
runjump.fwd = 4,-8.1      ;前ダッシュしながらのジャンプ速度(オプション)
airjump.neu = 0,-8.1      ;２段ジャンプ以降の垂直ジャンプの速度(オプション)
airjump.back = -2.55      ;２段ジャンプ以降の後ジャンプの速度(オプション)
airjump.fwd = 2.5         ;２段ジャンプ以降の前ジャンプの速度

[Movement]
airjump.num = 1      ;空中でジャンプする回数
airjump.height = 35  ;空中でジャンプする最低限の高さ
yaccel = .44         ;重力
stand.friction = .85  ;立ち状態の摩擦係数
crouch.friction = .82 ;屈み状態の摩擦係数

;---------------------------------------------------------------------------
; ステイトの解説
; [Statedef STATENO]
; type = ?      S/C/A/L  Ｓ：立ち/Ｃ：屈み/Ａ：空中/Ｌ：ダウン
; movetype = ?  I/A/H    Ｉ：通常状態/Ａ：攻撃状態/Ｈ：ダメージをくらってる状態
; physics = ?   S/C/A/N  Ｓ：立ち/Ｃ：屈み/Ａ：空中/Ｎ：無し
; juggle = ?             その攻撃に使うジャグル数
;

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

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

;---------------------------------------------------------------------------
; 勝った動作１
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = 181

;---------------------------------------------------------------------------
; 勝った動作２
[Statedef 181]
type = S
ctrl = 0
anim = 180
velset = 0,0

[State 181, 2] 
type = AssertSpecial
trigger1 = Time = [0,200]
flag = roundnotover

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 181, 3]
type = PlaySnd
trigger1 = time = 0
value = 100, 1

[State 181, 3]
type = PlaySnd
trigger1 = AnimElem = 9
value = 100, 2

;---------------------------------------------------------------------------
; 開始前の動作
[Statedef 190]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 190, 1] 
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 191, Visual effect]
type = Explod
trigger1 = Animelem = 8
anim = 195
pos = -3,-60
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = 1,1
shadow = 100,50,0

[State 190, 2] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 190, 3]
type = PlaySnd
trigger1 = AnimElem = 2
value = 100, 0

[State 190, 3]
type = PlaySnd
trigger1 = Time = 120
value = 101, 0

[State 190, 4] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; 立ち弱攻撃
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 200
sprpriority = 2

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

[State 200, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Light
damage    = 25
guardflag = MA
pausetime = 12,12
sparkno = S205
guard.sparkno = S206
sparkxy = -10,-85
hitsound   = s200,1
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 12
ground.velocity = -5
air.velocity = -2.5,-3.5

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

;---------------------------------------------------------------------------
; 立ち中攻撃
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 2

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 400, 0

[State 210, 2] 
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 50
animtype  = Medium
hitflag = MAF
guardflag = MA
pausetime = 12,12
sparkno = S205
guard.sparkno = S206
sparkxy = -10,-83
hitsound   = s400,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -3,-4

[State 210, 3]
type = PosAdd
trigger1 = AnimElem = 7
x = 12

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

;---------------------------------------------------------------------------
; 立ち強攻撃
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 1

[State 220, 1]
type = PlaySnd
trigger1 = Time = 2
value = 600, 0

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Heavy
damage    = 75
guardflag = MA
pausetime = 12,12
sparkno = S225
guard.sparkno = S206
sparkxy = -10,-70
hitsound   = s600,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5.5
air.velocity = -2.5,-4

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


;---------------------------------------------------------------------------
;屈み弱攻撃
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 400
sprpriority = 2

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

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 25
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = S205
guard.sparkno = S206
sparkxy = -5,-55
hitsound   = s200,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 12
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

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

;---------------------------------------------------------------------------
;屈み中攻撃
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 70
ctrl = 0
anim = 410
sprpriority = 2

[State 410, 1]
type = PlaySnd
trigger1 = Time = 2
value = 400, 0

[State 410, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 50
animtype  = Medium
hitflag = MAF
guardflag = L
pausetime = 12,12
sparkno = S205
guard.sparkno = S206
sparkxy = -10,-55
hitsound   = s400,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -4
air.velocity = -3,-4
guard.velocity = -5

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

;---------------------------------------------------------------------------
;屈み強攻撃
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 420
sprpriority = 2

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

[State 420, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 75
animtype  = Heavy
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = S225
guard.sparkno = S206
sparkxy = -5,-10
hitsound   = s600,1
guardsound = 6,0
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -1.5,-2
air.velocity = -1.2,-3
fall = 1

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

;---------------------------------------------------------------------------
;空中弱攻撃
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 20
ctrl = 0
anim = 600
sprpriority = 2

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

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 25
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = S205
guard.sparkno = S206
sparkxy = -5,-35
hitsound   = s200,1
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -4
air.velocity = -2,-3

;---------------------------------------------------------------------------
;空中中攻撃
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 610
sprpriority = 2

[State 610, 1]
type = PlaySnd
trigger1 = Time = 2
value = 400, 0

[State 610, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 50
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = S205
guard.sparkno = S206
sparkxy = -10,-15
hitsound   = s400,1
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -3,-4

;---------------------------------------------------------------------------
;空中強攻撃
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 620
sprpriority = 2

[State 620,１ ]
type = PlaySnd
trigger1 = Time = 2
value = 600, 0

[State 620, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage = 75
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = S225
guard.sparkno = S206
sparkxy = -10,-20
hitsound   = s600,1
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -3,-4

;---------------------------------------------------------------------------
;ライダー投げ
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;ｓ：立ち　ｎ：通常　ｔ：投げ
hitflag = M-          ;コンボの途中から投げが入らないよう設定してある
priority = 1, Miss    ;１は優先順位が低いので技がでないかミスするという設定
sparkno = -1          ;-をつければスパークエフェクトは無い
sprpriority = 1       ;２Ｐより上にカンフーマンが表示される
p1facing = ifelse (command = "holdfwd", -1, 1) ;前を押したらターンする設定
p2facing = 1          ;？
p1stateno = 810       ;投げが成功した場合の移動する１Ｐのステート
p2stateno = 820       ;投げが成功した場合の移動する２Ｐのステート
fall = 1              ;落ちる力を２Ｐにかけるか

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 800, 0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0
pos = 28, 0

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(12) < 0
edge = 60,0

[State 810, Bind 2-4]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(5) < 0
pos = 58, 0

[State 810, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
pos = 47, 0

[State 810, Bind 6]
type = TargetBind
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = 41, -60

[State 810, Bind 7]
type = TargetBind
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 25, -75

[State 810, Bind 8]
type = TargetBind
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
pos = 15, -90

[State 810, Bind 9]
type = TargetBind
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
pos = -5, -96

[State 810, Bind 10]
type = TargetBind
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
pos = -14, -90

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 11
pos = -50, -50

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 11
value = -85

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 11
value = 821

[State 810, Turn 12]
type = Turn
trigger1 = AnimElem = 12

[State 810, Pos 15]
type = PosAdd
trigger1 = AnimElem = 15
x = -10

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

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

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820

;---------------------------------------------------------------------------
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 2.8,-7
poweradd = 40

[State 821, 1] ;これは重力これは毎フレーム事に0.4の力が加わります
type = VelAdd
Trigger1 = 1
y = .4

[State 821, 2] 
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200

[State 821, 3] 
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 

[State 821, 4] 
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 

;---------------------------------------------------------------------------
;ダッシュ       
[Statedef 100]          
type = A             
physics = A           
ctrl = 0
anim = 100
velset = 5, -5

[State 100, 1]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 101

;---------------------------------------------------------------------------
;ダッシュ2
[Statedef 101]
type    = S
physics = S
ctrl = 1

[State 101, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 101, 2]
type = PosSet
trigger1 = Time = 0
y = 0

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

[State 101, 4]
type = MakeDust
trigger1 = Time = 1
pos = -25,3
spacing = 2

[State 101, 5]
type = MakeDust
trigger1 = time >= 8
trigger1 = time <= 25
pos = -15,3


;-----------------------------------------------------------------------
;ライダーキック （弱）開始
[Statedef 1000]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 0.5, -1.5
anim = 1000
velset = 0, 0
PowerAdd = 30

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 1050
pos = -3, 0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = 1,1
shadow = 100,50,0

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1000, 0
channel = 1

[State 1010, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 1001

;---------------------------------------------------------------------------
;ライダーキック （弱）攻撃
[Statedef 1001]
type    = A
movetype= A
physics = N
juggle  = 8
anim = 1001
velset = 0, 0

[State 1011, 1]
type = HitDef
trigger1 = AnimElem= 2
attr = A, SA
animtype = Heavy
damage = 80, 20
guardflag = HA
hitflag = MAF
getpower  = 10,5
givepower = 50,25
pausetime = 20, 27
sparkno = S1060
guard.sparkno = S206
sparkxy = -5,-60
hitsound   = s600,1
guardsound = 6,0
ground.type = High
guard.slidetime = 3
ground.hittime  = 15
ground.velocity = -7, -5
air.velocity = -6.5,-4.5
fall = 1

[State 1011, 2]
type = VelSet
trigger1 = Time > 0
;x = 7
x = 8.5

[State 1011, 3]
type = VelSet
trigger1 = Time > 0
trigger1 = Time < 5
y = -3.5

[State 1011, 4]
type = VelSet
trigger1 = Time > 4   
trigger1 = Time < 15
y = 0

[State 1011, 5]
type = VelSet
trigger1 = Time > 15
trigger1 = Pos Y < -2
y = 7.5

[State 1011, 6]
type = VelSet
trigger1 = Time > 20
x = 0

[State 1011,10]
type = ChangeState
trigger1 = Time > 20
trigger2 = Pos Y > -2 
value = 1002

;---------------------------------------------------------------------------
;ライダーキック  着地
[Statedef 1002]
type    = C
movetype= A
physics = S
anim = 1002
velset = 0.25, 0

[State 1002, 1]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1002, 2]
type = VelAdd
trigger1 = Vel X > 0.2
x = -0.05

[State 1002, 3]
type = VelSet
trigger1 = Vel X <= 0.2
x = 0

[State 1002, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;ライダーキック （強）開始
[Statedef 1010]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 0.5, -1.5
anim = 1010
velset = 0, 0
PowerAdd = 30

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 1050
pos = -3, 0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = 1,1
shadow = 100,50,0

[State 1020, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1000, 0
channel = 1

[State 1020, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 1011

;---------------------------------------------------------------------------
;ライダーキック （強）攻撃
[Statedef 1011]
type    = A
movetype= A
physics = N
juggle  = 8
anim = 1011
velset = 0, 0

[State 1021, 1]
type = VelSet
trigger1 = Time > 0
;x = 7
;x = 8.5
x = 10

[State 1021, 2]
type = VelSet
trigger1 = Time > 0
trigger1 = Time < 5
y = -3.5

[State 1021, 3]
type = VelSet
trigger1 = Time > 4   
trigger1 = Time < 15
y = 0

[State 1021, 4]
type = VelSet
trigger1 = Time > 15
trigger1 = Pos Y < -2
y = 7.5

[State 1021, 5]
type = VelSet
trigger1 = Time > 20
x = 0

[State 1021,7]
type = ChangeState
trigger1 = Time > 20
trigger2 = Pos Y > -2 
value = 1002

[State 1021, 8]
type = HitDef
trigger1 = AnimElem= 2
attr = A, SA
animtype = Hard
damage = 95,32
guardflag = HA
hitflag = MAF
getpower  = 10,5
givepower = 50,25
pausetime = 20, 27
sparkno = S1060
guard.sparkno = S206
sparkxy = -5,-60
hitsound   = s600,1
guardsound = 6,0
ground.type = Low
guard.slidetime = 20
ground.velocity = -8,-7
guard.velocity = -7
air.velocity = -8,-7
airguard.velocity = -5, -4
fall = 1
p2stateno = 1015

; 攻撃をくらった相手の状態

[Statedef 1015]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1025, Anim] ;２Ｐのスプライトステートを変更しています
type = ChangeAnim2
trigger1 = 1
value = 1025

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1016

;------------------
; 飛んでいく相手のステート

[Statedef 1016]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
y = .45

[State 1026, No scroll]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1017

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; 飛んでいった相手の壁に当たる状態のステート

[Statedef 1017]
type    = A
movetype= H
physics = N

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1027, Spark]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1027

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1018

;------------------
; 壁に当たった相手が落ちるステート

[Statedef 1018]
type    = A
movetype= H
physics = N

[State 1028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -6

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] 
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] 
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] 
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;-------------------------------------------------------------------------------
; ストームシュート （弱）
[Statedef 1100]
type = S
movetype = A
physics = S
anim = 1100
velset = 0
ctrl = 0
poweradd = 40
juggle = 4

[State 1100 , 2]
type = PlaySnd
Trigger1 = Time = 0
value = 400,0

[State 1100, 3]
type = Projectile
triggerall = AnimElem = 3
trigger1 = Var(3) = 0
trigger2 = Var(3) = 4
attr = S, SP
projanim = 1150
projhitanim = 1160
projid = 1000
projsprpriority = 2
projedgebound = 120
postype = p1
offset = 52,0
velocity = 6
damage = 50,12
animtype = Hard
guardflag = MA
pausetime = 0,8
sparkno = S3110
guard.sparkno = S3130
sparkxy = -5,-25
hitsound   = 5,4
guardsound = 6,0
ground.type = high
ground.slidetime = 14
ground.hittime = 16
ground.velocity = -8
air.velocity = -2.5,-5

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

;-------------------------------------------------------------------------------
; ストームシュート （強）
[Statedef 1110]
type = S
movetype = A
physics = S
anim = 1110
velset = 0
ctrl = 0
poweradd = 40
juggle = 4

[State 1100 , 2]
type = PlaySnd
Trigger1 = Time = 0
value = 400,0

[State 1100 , 2]
type = PlaySnd
Trigger1 = Time = 20
value = 400,0

[State 1050, 4]
type = Projectile
triggerall = AnimElem = 4
trigger1 = Var(3) = 0
trigger2 = Var(3) = 4
attr = S, SP
projanim = 1170
projhitanim = 1160
projremanim = -1
projremovetime = 11
projid = 1000
projsprpriority = 4
postype = p1
offset = 64,0
velocity = 0
damage = 50,12
animtype = Hard
guardflag = MA
pausetime = 0,8
sparkno = S3110
guard.sparkno = S3130
sparkxy = -10,-25
hitsound   = 5,4
guardsound = 6,0
ground.type = high
ground.slidetime = 14
ground.hittime = 16
ground.velocity = 0
air.velocity = -2.5,-5

[State 1050, 7]
type = Projectile
triggerall = AnimElem = 7
trigger1 = Var(3) = 0
trigger2 = Var(3) = 4
attr = S, SP
projanim = 1171
projhitanim = 1160
projid = 1000
projsprpriority = 5
projedgebound = 80
postype = p1
offset = 64,0
velocity = 6
damage = 75,25
animtype = Hard
guardflag = MA
pausetime = 0,8
sparkno = S3110
guard.sparkno = S3130
sparkxy = -10,-25
hitsound   = 5,4
guardsound = 6,0
ground.type = high
ground.slidetime = 14
ground.hittime = 16
ground.velocity = -8
air.velocity = -2.5,-5

[State 1103 , 2]
type = PlaySnd
Trigger1 = Time = 0
value = 1100,0

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

;-------------------------------------------------------------------------------
; セイバースラッシュ（弱）
[Statedef 1200]
type = S
movetype = A
physics = S
anim = 1200
velset = 0
ctrl = 0
poweradd = 40
juggle = 4

[State 1020, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1000, 0
channel = 1

[State 1103 , 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, SA
damage    = 100,25
animtype = Hard
getpower = 52
givepower = 20
guardflag = MA
hitflag = MAF
pausetime = 32,30
sparkno = S1250
guard.sparkno = S206
sparkxy = -10,-75
hitsound = s600,1
guardsound = 6,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 15
ground.velocity = -6,-3.0
air.velocity = -5.2,-2.5
palfx.time = 75
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
fall.recover = 0
air.recover = 0
recover = 0

[State 1103 , 2]
type = PlaySnd
Trigger1 = Time = 0
value = 1100,0

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

;-------------------------------------------------------------------------------
; セイバースラッシュ（強）
[Statedef 1210]
type = S
movetype = A
physics = S
anim = 1210
velset = 10.0
ctrl = 0
poweradd = 40
juggle = 4

[State 1020, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 1000, 0
channel = 1

[State 1103 , 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, SA
damage    = 120,30
animtype = Hard
getpower = 52
givepower = 20
guardflag = MA
hitflag = MAF
pausetime = 32,30
sparkno = S1250
guard.sparkno = S206
sparkxy = -10,-75
hitsound = s600,1
guardsound = 6,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 15
ground.velocity = -6,-3.0
air.velocity = -5.2,-2.5
palfx.time = 75
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
fall.recover = 0
air.recover = 0
recover = 0

[State 1200 , 2]
type = PlaySnd
Trigger1 = Time = 0
value = 1200,0

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

;---------------------------------------------------------------------------
;クロスホーンライダーキック 前動作
[Statedef 3000]
type = A
ctrl = 0
anim = 3000
velset = 0,0
movetype = A
physics = N


[State 3050, Super A]
type = SuperPause
trigger1 = AnimElem = 1
pos = 20, -95
movetime = 60
time = 60

[State 3050, 1]
type = PlaySnd
trigger1 = Time = 0
value = 3050, 0
channel = 1

[State 3050, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 3010
;---------------------------------------------------------------------------
;クロスホーンライダーキック 開始
[Statedef 3010]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 0.5, -1.5
anim = 3010
velset = 0, 0
PowerAdd = -1000

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 1050
pos = -3, 0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = 1,1
shadow = 100,50,0

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1000, 0
channel = 1

[State 3000, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 3011

;---------------------------------------------------------------------------
;クロスホーンライダーキック 攻撃
[Statedef 3011]
type    = A
movetype= A
physics = N
juggle  = 8
anim = 3011
velset = 0, 0

[State 3001, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 13
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 3001, Friction]
type = VelMul
trigger1 = 1
x = .85 * ifelse (AnimElemTime(6) < 0, 1, .8)

[State 3001, Afterimage]
type = AfterImageTime
trigger1 = AnimElemTime(8) < 0
time = 2

[State 3001, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State 3001, 1]
type = VelSet
trigger1 = Time > 0
;x = 7
;x = 8.5
x = 10

[State 3001, 2]
type = VelSet
trigger1 = Time > 0
trigger1 = Time < 5
y = -7.5

[State 3001, 3]
type = VelSet
trigger1 = Time > 4   
trigger1 = Time < 15
y = 0

[State 3001, 4]
type = VelSet
trigger1 = Time > 15
trigger1 = Pos Y < -2
y = 7.5

[State 3001, 5]
type = VelSet
trigger1 = Time > 20
x = 0

[State 3001,7]
type = ChangeState
trigger1 = Time > 20
trigger2 = Pos Y > -2 
value = 3012


[State 3001, 8]
type = HitDef
trigger1 = AnimElem= 1
attr = A, SA
animtype = Hard
damage = 180,45
guardflag = HA
hitflag = MAF
getpower  = 10,5
givepower = 50,25
pausetime = 20, 27
sparkno = S3050
sparkxy = -5, -38
hitsound   = s3001,0
guardsound = 6,0
ground.type = Low
guard.slidetime = 20
ground.velocity = -8,-7
guard.velocity = -7
air.velocity = -8,-7
airguard.velocity = -5, -4
palfx.time = 100
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1

;---------------------------------------------------------------------------
;クロスホーンライダーキック ヒット着地

[Statedef 3012]
type    = C
movetype= A
physics = S
anim = 3012
velset = 0.25, 0

[State 3002, 1]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3002, 2]
type = VelAdd
trigger1 = Vel X > 0.2
x = -0.05

[State 3002, 3]
type = VelSet
trigger1 = Vel X <= 0.2
x = 0

[State 3002, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; バーニングパンチ
[Statedef 3100]
type = A
ctrl = 0
anim = 3100
velset = 0,0
movetype = A
physics = N
PowerAdd = -2000

[State 3050, Super A]
type = SuperPause
trigger1 = Time = 0
movetime = 95
time = 95
anim = -1


;[State 6220,0]
type = AfterImage
trigger1 = Time = 0
time = 999
timegap = 2
framegap = 4
length = 10

[State 6220,2]
type = Explod
trigger1 = AnimElem = 2
anim = 3105
ID = 3105
pos = 21,-73
postype = p1
sprpriority = -2
supermove = 1
ownpal = 1
removetime = 30
bindtime = -1

[State 6220,3]
type = Explod
trigger1 = AnimElem = 2
anim = 3110
ID = 3110
pos = 21,-73
postype = p1
sprpriority = 4
supermove = 1
ownpal = 1
removetime = 30
bindtime = -1


[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3100, 0

[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 16
value = 3100, 2

[State 1103 , 1]
type = HitDef
trigger1 = AnimElem = 15
attr = S, SA
damage    = 350,55
animtype = Hard
getpower = 52
givepower = 20
hitflag = MAF
pausetime = 32,30
sparkno = S3050
sparkxy = -5, -38
guard.sparkno = S206
hitsound   = s3001,0
guardsound = 6,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 15
ground.velocity = -6,-3.0
air.velocity = -5.2,-2.5
palfx.time = 75
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
fall.recover = 0
air.recover = 0
recover = 0

[State 6220,16]
type = AfterImageTime
trigger1 = AnimTime = 0
time = 0

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

;---------------------------------------------------------------------------
;クロスホーンライダーキック 前動作
[Statedef 3200]
type = A
ctrl = 0
anim = 3200
velset = 0,0
movetype = A
physics = N


[State 6710,7]
type = Explod
trigger1 = AnimElem = 2
anim = 3205
ID = 3205
pos = 21,-73
postype = p1
sprpriority = -2
supermove = 1
ownpal = 1
removetime = 26
bindtime = -1

[State 6710,8]
type = Explod
trigger1 = AnimElem = 3
anim = 3206
ID = 3206
pos = 21,-73
postype = p1
sprpriority = 4
supermove = 1
ownpal = 1
removetime = 26
bindtime = -1

[State 6710,4]
type = Explod
trigger1 = Time = 0
anim = 3215
pos = -320,0
postype = right
sprpriority = -3
supermove = 1
ownpal = 1
removetime = 24
bindtime = -1

[State 6710,9]
type = SuperPause
trigger1 = Time = 0
movetime = 120
time = 120
anim = -1

[State 6220,5]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3200, 0


[State 3050, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 3210
;---------------------------------------------------------------------------
;クロスホーンライダーキック 開始
[Statedef 3210]
type    = A
movetype= A
physics = N
ctrl = 0
velset = 0.5, -1.5
anim = 3210
velset = 0, 0
PowerAdd = -3000

[State 1000, Dust]
type = Explod
trigger1 = Animelem = 1
anim = 1050
pos = -3, 0
sprpriority = 3
postype = p1
supermove = 1
bindtime = 1
ownpal = 1
scale = 1,1
shadow = 100,50,0

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1000, 0
channel = 1

[State 3000, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 3211

;---------------------------------------------------------------------------
;クロスホーンライダーキック 攻撃
[Statedef 3211]
type    = A
movetype= A
physics = N
juggle  = 8
anim = 3211
velset = 0, 0

[State 3001, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 13
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 3001, Friction]
type = VelMul
trigger1 = 1
x = .85 * ifelse (AnimElemTime(6) < 0, 1, .8)

[State 3001, Afterimage]
type = AfterImageTime
trigger1 = AnimElemTime(8) < 0
time = 2

[State 3001, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

[State 3001, 1]
type = VelSet
trigger1 = Time > 0
;x = 7
;x = 8.5
x = 10

[State 3001, 2]
type = VelSet
trigger1 = Time > 0
trigger1 = Time < 5
y = -7.5

[State 3001, 3]
type = VelSet
trigger1 = Time > 4   
trigger1 = Time < 15
y = 0

[State 3001, 4]
type = VelSet
trigger1 = Time > 15
trigger1 = Pos Y < -2
y = 7.5

[State 3001, 5]
type = VelSet
trigger1 = Time > 20
x = 0

[State 3001,7]
type = ChangeState
trigger1 = Time > 20
trigger2 = Pos Y > -2 
value = 3012


[State 3001, 8]
type = HitDef
trigger1 = AnimElem= 1
attr = A, SA
animtype = Hard
damage = 480,75
guardflag = HA
hitflag = MAF
getpower  = 10,5
givepower = 50,25
pausetime = 20, 27
sparkno = S3050
sparkxy = -5, -38
hitsound   = s3001,0
guardsound = 6,0
ground.type = Low
guard.slidetime = 20
ground.velocity = -8,-7
guard.velocity = -7
air.velocity = -8,-7
airguard.velocity = -5, -4
palfx.time = 100
palfx.mul = 240,192,128
palfx.sinadd = 96,128,160,16
palfx.add = 224,128,64
fall = 1
p2stateno = 3230

;---------------------------------------------------------------------------
;クロスホーンライダーキック ヒット着地

[Statedef 3212]
type    = C
movetype= A
physics = S
anim = 3212
velset = 0.25, 0

[State 3002, 1]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3002, 2]
type = VelAdd
trigger1 = Vel X > 0.2
x = -0.05

[State 3002, 3]
type = VelSet
trigger1 = Vel X <= 0.2
x = 0

[State 3002, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------
;クロスホーンライダーキック ヒット時相手動作１
;---------------------
[Statedef 3230]
type = A
movetype = H
physics = N

[State 1010, 1]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0
z = 0

[State 3005, 2]
type = ChangeAnim2
Trigger1 = Time >= 0
value = 3230

[State 3005, 9]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 3231

;---------------------
; クロスホーンライダーキック ヒット時相手動作２
;---------------------
[Statedef 3231]
type = A
movetype = H
physics = N
velset = -2.2,-15.3

[State 3006, 1]
type = VelAdd
trigger1 = Time > 0
y = .6

[State 3006, 2]
type = EnvShake
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
time = 16
ampl = 10
freq = 90
phase = 90
ignorehitpause = 1

[State 3006, 9]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;---------------------------------------------------------------------------
; ここから下に新しいステートを書くと分かりやすくていいと思います
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; ここは-2のステートを書いてください、ヘルパー関係です
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; ここから下は-3のステートを書いてください、ここに書いたものはゲーム中
; に条件が成立すればいつでも開始するステートです。
;---------------------------------------------------------------------------

[Statedef -3]

;ゲーム中に常にいつでも開始したいステート、ここでは「着地音」に使用しています
;下の条件は「52か106のステートに移動して１フレーム目に」と言う事です。
;52と106はバックステップとジャンプの着地のステートです。
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 
trigger2 = stateno = 106 
value = 40, 0
