; これはカンフーマンのＣＮＳファイルです。
; コメントを参考にしてＣＮＳを理解してください

; これはKFMの定数と状態のファイルです。
; 絶対記入し、削除はしないでください。
[Data]
  ;体力ゲージの初期値
life = 1000
  ;攻撃力（これ以上に設定すると強くなる）
power             = 9000    
  ;パワーゲージ最大値（デフォルトは 3000 = Lv.3 になります・オプション）
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 = 0      ;空中でジャンプする回数
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

[State 170 , 2]
type = PlaySnd
trigger1 = AnimElem = 11
value = s0, 22

[State 170 , 3]
type = PlaySnd
trigger1 = AnimElem = 5
value = s40, 0

;---------------------------------------------------------------------------
; PREINTRO
[Statedef 180]
type = S
ctrl = 0
velset = 0,0

[State m];ミノタウロス
type = ChangeState
trigger1 = Time = 0
trigger1 = p1name = "Minotaur" || p3name = "Minotaur"
value = ifelse(MatchOver,184,183)

[State samchay];ミノタウロス
type = ChangeState
trigger1 = Enemy,AuthorName = "ショクシュスキー&UJI" && Enemy,Name = "Minotaur"
trigger1 = Matchover = 0
trigger1 = Time = 0
value = 183

[State samchay];ミノタウロス
type = ChangeState
trigger1 = Enemy,AuthorName = "ショクシュスキー&UJI" && Enemy,Name = "Minotaur"
trigger1 = Matchover = 1
trigger1 = Time = 0
value = 184

[State samchay];サムチャイ
type = ChangeState
trigger1 = Enemy,AuthorName = "laiso_7" && Enemy,Name = "SAMCHAY"
trigger1 = Matchover = 0
trigger1 = Time = 0
value = 185

[State samchay];サムチャイ
type = ChangeState
trigger1 = Enemy,AuthorName = "laiso_7" && Enemy,Name = "SAMCHAY"
trigger1 = Matchover = 1
trigger1 = Time = 0
value = 186

[State 180, 2]
type = ChangeState
trigger1 = Time = 0
value = ifelse(random>=500,181,182)

[State 180, 1]
type = ChangeAnim
trigger1 = SelfAnimExist(180)
value = 190

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

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

[State 181 , 2]
type = PlaySnd
trigger1 = Time = 1
value = s1, 3

;---------------------------------------------------------------------------
; 勝った動作2
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 181, 0]
Type = PosSet
Trigger1 = !Time
y = 0

[State 182, 1]
Type = NotHitBy
Trigger1 = 1
value = SCA
Time = 1

[State 182, PlaySnd1]
type = PlaySnd
trigger1 = AnimElem = 6
value = s1,4

[State  182, 黄色エフェクト]
Type = Helper
TriggerAll = NumHelper(2080) = 0
Trigger1 = AnimElem = 3
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State  182, notend]
Type = AssertSpecial
Trigger1 = Time=[0,120]
flag = roundnotover
;---------------------------------------------------------------------------
; 勝った動作3
[Statedef 183]
type = S
ctrl = 0
anim = 194
velset = 0,0

[State  183, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 194
Trigger1 = AnimElem = 1
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 183, アニメ固定]
type = ChangeAnim
trigger1 = Anim = 194
trigger1 = AnimElem = 5,99
value = 194
elem = 5

[State 183, 終わらない]
type = AssertSpecial
trigger1 = Time < 125
flag = roundnotover

[State 183, ういー]
type = PlaySnd
trigger1 = Time = 25
value = s1,12

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

;---------------------------------------------------------------------------
; 勝った動作4
[Statedef 184]
type = S
ctrl = 0
anim = 183

[State  184, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 183
Trigger1 = AnimElem = 3
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 184, 終わらない]
type = AssertSpecial
trigger1 = Time < 320
flag = roundnotover

[State 184, 特殊効果]
type = AssertSpecial
trigger1 = AnimElem = 5,>0
flag = NoMusic

[State 184, 鳴き声]
type = PlaySnd
trigger1 = AnimElem = 13
value = 190,(Random % 4)

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

;---------------------------------------------------------------------------
;サムチャイ勝った動作 1ROUND
[Statedef 185]
type = S
ctrl = 0
anim = 184
velset = 0,0

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

[State 185, 2]     ;WINS
type = explod
trigger1 = time = 90
anim = 8000
postype = left
pos = 51,70
ontop = 1
facing = 1
ownpal = 1
bindtime = -1

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

[State 185, 4]
type = PlaySnd
trigger1 = time = 90
value = s20, 0
volume = 200

;---------------------------------------------------------------------------
;サムチャイ勝った動作 2ROUND
[Statedef 186]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 186, 0]
Type = PosSet
Trigger1 = !Time
y = 0

[State 186, 1]
Type = NotHitBy
Trigger1 = 1
value = SCA
Time = 1

[State 186, PlaySnd1]
type = PlaySnd
trigger1 = AnimElem = 6
value = s1,4
volume = 200

[State 186, 2]
type = PlaySnd
trigger1 = time = 90
value = s20, 0
volume = 200

[State 186, 3]     ;WINS
type = explod
trigger1 = time = 90
anim = 8000
postype = left
pos = 51,70
ontop = 1
facing = 1
ownpal = 1
bindtime = -1

[State  186, 黄色エフェクト]
Type = Helper
TriggerAll = NumHelper(2080) = 0
Trigger1 = AnimElem = 3
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State  186, notend]
Type = AssertSpecial
Trigger1 = Time=[0,120]
flag = roundnotover

;---------------------------------------------------------------------------
;うを！まぶしっ！！
[StateDef 2080]
Type = A
MoveType = I
Physics = N
Anim = 2090
SprPriority = 9999

[State 182, PlaySnd2]
type = PlaySnd
trigger1 = AnimElem = 1
value = s0,20

[State 2080, AssertSpecial]
Type = AssertSpecial
Trigger1 = 1
Flag = NoShadow

[State 2080, Varset] 
Type = Varadd
Trigger1 = Time > 20
fvar(1) = 4

[State 2080]
Type     = AngleAdd
Trigger1 = time > 19 
Value    = 10

[State 2080, Angledrow]
Type     = AngleDraw
Trigger1 = time <= 20
Scale    = 1.5 - time * 0.05 , 1.5 - time * 0.05

[State 2080, Angledrow]
Type     = AngleDraw
Trigger1 = time > 20
Scale    = 1 + fvar(1) * 0.05 , 1 + fVar(1) * 0.05

[State 2080, Angleset]
type = Angleadd
Trigger1 = time > 20
value = 25

[State 2080, 0]
Type = SprPriority
Trigger1 = Time = 20
Value = -1

[State 2080, VarSet] 
Type = VarSet
Trigger1 = Time = 0
V = 1
Value = 255

[State 801, VarAdd] 
Type = VarAdd
Trigger1 = Time > 20
Trigger1 = Var(1) > 0
V = 1
Value = -20

[State 2080, VarSet] 
Type = VarSet
Trigger1 = Var(1) < 0
V = 1
Value = 0

[State 2080, Trans]
Type = Trans
Trigger1 = time <= 20
trans = add

[State 2080, Trans]
Type = Trans
Trigger1 = time > 20
trans = addalpha
alpha = var(1) , 256

[State 2080, DestroySelf]
Type = DestroySelf
Trigger1 = var(1) <= 0

;---------------------------------------------------------------------------
; PREINTRO
[Statedef 190]
type = S
ctrl = 0
velset = 0,0
anim = 0
sprpriority = 1

[State 190, 1]
type = ChangeAnim
trigger1 = SelfAnimExist(190)
value = 190

[State 190, 2]
type = ChangeState
trigger1 = Time = 1
value = ifelse(random>=500,191,192)

[State m];ミノタウロス
type = ChangeState
trigger1 = Time = 0
trigger1 = p2name = "Minotaur" || p4name = "Minotaur"
trigger2 = p1name = "Minotaur" || p3name = "Minotaur"

value = 193

[State os];対OS
type = ChangeState
trigger1 = Time = 0
trigger1 = p2name = "2k" || p4name = "2k"
trigger2 = p2name = "95" || p4name = "95"
trigger3 = p2name = "95ani" || p4name = "95ani"
trigger4 = p2name = "98" || p4name = "98"
trigger5 = p2name = "98SE" || p4name = "98SE"
trigger6 = p2name = "me" || p4name = "me"
trigger7 = p2name = "XP(pro)" || p4name = "XP(pro)"
trigger8 = p2name = "komepo" || p4name = "komepo"
trigger9 = p2name = "Komelu" || p4name = "Komelu"
value = 194

[State haruhi]
type = ChangeState
trigger1 = Time = 0
trigger1 = p2name = "Haruhi Suzumiya" || p4name = "Haruhi Suzumiya"
value = 4003

[State oraora];＆承太郎
type = ChangeState
trigger1 = (P2Name = "Jotaro Kujo" || P4Name = "Jotaro Kujo") && EnemyNear,AuthorName = "warusaki3"
value = 4004

[State oraora];対ディオ
type = ChangeState
trigger1 = (P2Name = "DIO" || P4Name = "DIO") && EnemyNear,AuthorName = "warusaki3"
value = 4005

[State oraora];モモメノ
type = ChangeState
trigger1 = (P2Name = "Momomeno" || P4Name = "Momomeno") && EnemyNear,AuthorName = "Peke"
value = 4006

[State samchay];サムチャイ
type = ChangeState
trigger1 = (P2Name = "SAMCHAY" || P4Name = "SAMCHAY") && EnemyNear,AuthorName = "laiso_7"
value = 4007

[State unyuho];うにゅほ
type = ChangeState
trigger1 = (P2Name = "Unyuho" || P4Name = "Unyuho") && EnemyNear,AuthorName = "Ohgaki"
value = 4008
;---------------------------------------------------------------------------
; 開始前の動作
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

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

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

[State 191, 3]
type = PlaySnd
trigger1 = Time = 56
value = s9,0

[State 191 , 3]
type = PlaySnd
trigger1 = Time = 1
value = s1, 2 

[State 191, 5] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0

; この下のステートがKFMが蹴る木の板です。KFMのCNSを貴方のキャラに利用しているなら、
; 下にあるステート（191）を消したらいいです。
[State 191, Wood 1]
type = Explod
trigger1 = RoundState != 0
persistent = 0
anim = 191
postype = p1
pos = 260, -90
velocity = -4.2, -7
accel = 0, .32
removetime = 56

[State 191, Wood 2]
type = Explod
trigger1 = AnimElemTime(13) = 1
anim = 192
postype = p1
pos = 60, -70
velocity = 2, -4
accel = 0, .32
removetime = 35

[State 191, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = s5,2
volume = -40

[State 191, 6]
type = PlaySnd
trigger1 = AnimElemTime(7) = 3
value = s5,3
volume = -80

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

[State 192, 無敵]
type = NotHitBy
trigger1 = Time < 380
value = SCA

[State 192, イントロ用フラグ]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 192, 透明化]
type = AssertSpecial
trigger1 = Time < 380
flag = Invisible  ;これを使うと自キャラが見えなくなる

[State 192, 立ちのまま]
type = ChangeAnim
trigger1 = Time < 380
value = 0

[State 192, ヘルパーを出す]
type = Helper
trigger1 = Time = 1
name = "kaishi192"
stateno = 1920
ID = 1920
pos = -200, 0 ;自分の後方200から出現

[State 192, ステート変更]
type = ChangeState
trigger1 = Time = 380
value = 0

[Statedef 1920]
type = S
ctrl = 0
anim = 193
velset = 2.5,0
sprpriority = 4

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

[State 1920, 停止]
type = Velset
trigger1 = time = 84
x = 0

[State 1920, Effect]
Type     = DestroySelf
Trigger1 = Time >= 380

[State 1920, ボイス0]
type = PlaySnd
trigger1 = Time = 90
value = s0,11

[State 1920, ボイス1]
type = PlaySnd
trigger1 = Time = 126
value = s0,12

[State 1920, ボイス2]
type = PlaySnd
trigger1 = Time = 310
value = s0,13

[State 1920, ボイス3]
type = PlaySnd
trigger1 = Time = 120
value = s0,14

[State 1920, ボイス4]
type = PlaySnd
trigger1 = Time = 220
value = s0,15

[State 1920, ヘルパーを出す1]
type = Helper
trigger1 = AnimElem = 20
name = "kaishi192Effect1"
stateno = 1930
ID = 1930
pos = 0, 0 

[State 1920, ヘルパーを出す2]
type = Helper
trigger1 = AnimElem = 20
name = "kaishi192Effect2"
stateno = 1940
ID = 1940
pos = 0, 0 

[State 1920, ヘルパーを出す3]
type = Helper
trigger1 = AnimElem = 20
name = "kaishi192Effect1"
stateno = 1960
ID = 1960
pos = 0, 0 

[State 1920, ヘルパーを出す4]
type = Helper
trigger1 = AnimElem = 20
name = "kaishi192Effect2"
stateno = 1970
ID = 1970
pos = 0, 0 

[State 1920, ヘルパーを出す5]
type = Helper
trigger1 = AnimElem = 20
name = "kaishi192Effect3"
stateno = 1950
ID = 1950
pos = 0, 0 

[State  182, 黄色エフェクト]
Type = Helper
TriggerAll = NumHelper(2080) = 0
Trigger1 = AnimElem = 32
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[Statedef 1930]
Type        = A 
Physics     = N 
anim = 2052
velset = 0,0
sprpriority = 6

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

[State 1930,Effect]
Type     = DestroySelf
Trigger1 = Time >= 160

[Statedef 1940]
Type        = A 
Physics     = N 
anim = 2053
velset = 0,0
sprpriority = -4

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

[State 1940,Effect]
Type     = DestroySelf
Trigger1 = Time >= 160

[Statedef 1960]
Type        = A 
Physics     = N 
anim = 2054
velset = 0,0
sprpriority = 6

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

[State 1960,Effect]
Type     = DestroySelf
Trigger1 = Time >= 160

[Statedef 1970]
Type        = A 
Physics     = N 
anim = 2055
velset = 0,0
sprpriority = -4

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

[State 1970,Effect]
Type     = DestroySelf
Trigger1 = Time >= 160

[Statedef 1950]
Type        = A 
Physics     = N 
Anim        = 2056
SprPriority = -6 
VelSet      = 0,0 

[state angle]
type = angledraw
trigger1 = 1
scale = 0.5,0.5
sprpriority = 2

[State 1950, Effect]
Type     = NotHitBy 
Trigger1 = 1 
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP 
Time     = 1 

[State 1950, Effect]
Type     = Trans
Trigger1 = 1
Trans    = Add

[State 1950, Effect]
Type     = AngleDraw
Trigger1 = time <= 10
Scale    = 2*(time*0.1),0.4*(time*0.1)

[State 1950, Effect]
Type     = AngleDraw
Trigger1 = time >= 11
Scale    = 2,0.4


[State 1950, Effect]
Type = AssertSpecial
Trigger1       = 1
Flag           = Noshadow
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999


[State 1950, Effect]
Type     = VarAdd
Trigger1 = time > 10
V        = 7
Value    = 25

[State 1950, Effect]
Type     = PalFx
Trigger1 = 256-Var(7) > 0
Time     = 1
Add      = 0,0,0
Mul      = ceil(256-Var(7)),ceil(256-Var(7)),ceil(256-Var(7))

[State 1950, Effect]
Type     = PalFx
Trigger1 = 256-Var(7) <= 0
Time     = 1
Add      = 0,0,0
Mul      = 0,0,0

[State 1950, Effect]
Type     = DestroySelf
Trigger1 = Time >= 160

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

[State 193, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 193, 消しておく]
type = AssertSpecial
trigger1 = Time < 480
flag = Invisible

[State 193, 特殊効果]
type = AssertSpecial
trigger1 = Time > 0
flag = NoMusic

[State 191, 入場テーマ]
type = PlaySnd
triggerall =enemy,name ="Komelu"
trigger1 = Time = 0
value = 191,2

[State 193, 歩いてくる]
type = Explod
trigger1 = Time = 150
anim = 196
pos = -165, 0
postype = p1
vel = .5,0
removetime = 330
sprpriority = 2

[State 193, アニメ変更]
type = ChangeAnim
trigger1 = Time = 480
value = 197

[State 193, アニメ変更]
type = ChangeAnim
trigger1 = Time = 660
value = 194

[State  193, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 194
Trigger1 = AnimElem = 28
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 193, ういー]
type = PlaySnd
trigger1 = Anim = 194
trigger1 = AnimElem = 5
value = S1,12

[State 193, ステート変更]
type = ChangeState
trigger1 = Anim = 194
trigger1 = AnimTime = 0
value = 0

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

[State 194, イントロ]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 194, 1]
type = PlaySnd
trigger1 = Time = 40
value = s0,23

[State 194, 2]
type = PlaySnd
trigger1 = Time = 130
value = s0,24

[State 194, 3]
type = PlaySnd
trigger1 = Time = 170
value = 191,(Random % 2)

[State 194, 4]
type = PlaySnd
trigger1 = Time = 290
value = s0,26

[State  194, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 197
Trigger2 = AnimElem = 46
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 194, 6] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0

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

[State 4000, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 4000, 消しておく]
type = AssertSpecial
trigger1 = Time < 110
flag = Invisible

[State 4000, 特殊効果]
type = AssertSpecial
trigger1 = Time > 0
flag = NoMusic

[State 4000, 歩いてくる]
type = Explod
trigger1 = Time = 0
anim = 4000
pos = -200, 0
postype = p1
vel = 1.8,0
removetime = 110
sprpriority = 2

[State 4000, 1]
type = ChangeAnim
trigger1 = Time = 110
value = 4001

[State 4000, 3]
type = PlaySnd
triggerall = Time = 226
trigger1 = Alive
value = 0,25
channel = 0

[State 4000, 1]
type = ChangeAnim
trigger1 =  Time = 226
trigger1 = Anim = 4001
value = 4002

[State 4000, 1]
type = ChangeAnim
trigger1 =  Time = 288
trigger1 = Anim = 4002
value = 4003

[State 4000, 1]
type = ChangeAnim
trigger1 =  Time = 313
trigger1 = Anim = 4003
value = 4004

[State  4000, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 4004
Trigger1 = AnimElem = 12
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 4000, end] 
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Anim = 4004
value = 0

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

[State 4000, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 4000, 消しておく]
type = AssertSpecial
trigger1 = Time < 110
flag = Invisible

[State 4000, 特殊効果]
type = AssertSpecial
trigger1 = Time > 0
flag = NoMusic

[State 4000, 歩いてくる]
type = Explod
trigger1 = Time = 0
anim = 4000
pos = -200, 0
postype = p1
vel = 1.8,0
removetime = 110
sprpriority = 2

[State 4000, 1]
type = ChangeAnim
trigger1 = Time = 110
value = 4001

[State 192, 1]
type = VarRandom
trigger1 = 1
v = 21
range = 0,2

[State 4000, 3]
type = PlaySnd
triggerall = Time = 226
trigger1 = Alive
value = 0,27
channel = 0

[State 4000, 1]
type = ChangeAnim
trigger1 =  Time = 226
trigger1 = Anim = 4001
value = 4005

[State 4000, 1]
type = ChangeAnim
trigger1 = Time = 277
trigger1 = Anim = 4005
value = 4003

[State 4003, 6]
type = ChangeAnim
trigger1 = Time = 306
trigger1 = Anim = 4003
value = 4006

[State  4000, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 4006
Trigger1 = AnimElem = 24
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 4000, end] 
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Anim = 4006
value = 0


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

[State 4002, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 4002, 消しておく]
type = AssertSpecial
trigger1 = Time < 110
flag = Invisible

[State 4002, 特殊効果]
type = AssertSpecial
trigger1 = Time > 0
flag = NoMusic

[State 4002, 歩いてくる]
type = Explod
trigger1 = Time = 0
anim = 4000
pos = -200, 0
postype = p1
vel = 1.8,0
removetime = 110
sprpriority = 2

[State 4002, 1]
type = ChangeAnim
trigger1 = Time = 110
value = 4001

[State 4004, 3]
type = PlaySnd
triggerall = Time = 246
trigger1 = Alive
value = 0,27
channel = 0

[State 4004, 1]
type = ChangeAnim
trigger1 =  Time = 246
trigger1 = Anim = 4001
value = 4005

[State 4004, 1]
type = ChangeAnim
trigger1 = Time = 277
trigger1 = Anim = 4005
value = 4003

[State 4004, 1]
type = ChangeAnim
trigger1 =  Time = 306
trigger1 = Anim = 4003
value = 4006

[State  4004, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 4006
Trigger1 = AnimElem = 24
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 4004, end] 
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Anim = 4006
value = 0

;---------------------------------------------------------------------------
; 開始前の動作8 ;ハルヒ
[Statedef 4003]
type = S
ctrl = 0
anim = 4001
velset = 0,0

[State 4001, イントロ]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 4004, 1]
type = ChangeAnim
trigger1 =  Time = 197
trigger1 = Anim = 4001
value = 4005

[State 4004, 1]
type = ChangeAnim
trigger1 =  Time = 217
trigger1 = Anim = 4005
value = 4006

[State 4001, 1]
type = PlaySnd
trigger1 = Time = 197
value = 0,27
channel = 2

[State  4001, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 4006
Trigger1 = AnimElem = 24
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 4001, 3]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Anim = 4006
value = 0

;---------------------------------------------------------------------------
;対承太郎
[Statedef 4004]
type = S
ctrl = 0
anim = 4003

[State 4004, 1]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 4004, 2]
type = VelSet
trigger1 = Time = 30
x = 2.5

[State 4004, 3]
type = VelSet
trigger1 = Time = 50
x = 0.5

[State 4004, 4]
type = VelSet
trigger1 = Time = 58
x = 0

[State 4004, 5]
type = VelSet
trigger1 = Time = 179
x = -2.5

[State 4004, 6]
type = VelSet
trigger1 = Time = 191
x = -1.5

[State 4004, 7]
type = VelSet
trigger1 = Time = 207
x = 0

[State  4004, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 4003
Trigger1 = AnimElem = 6
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 4004, 8]
type = ChangeAnim
trigger1 =  Time = 30
trigger1 = Anim = 4003
value = 4008

[State 4004, 9]
type = ChangeAnim
trigger1 =  Time = 50
trigger1 = Anim = 4008
value = 4009

[State 4004, 10]
type = ChangeAnim
trigger1 =  Time = 63
trigger1 = Anim = 4009
value = 4010

[State 4004, 11]
type = ChangeAnim
trigger1 =  Time = 165
trigger1 = Anim = 4010
value = 4011

[State 4004, 12]
type = ChangeAnim
trigger1 =  Time = 224
trigger1 = Anim = 4011
value = 4012

[State 4004, 13]
type = ChangeAnim
trigger1 =  Time = 390
trigger1 = Anim = 4012
value = 4013

[State 4004, 14]
type = PlaySnd
trigger1 = Time = 565
value = 192,(Random % 3)
channel = 2
volume = 150

[State 4004, 15]
type = PlaySnd
trigger1 = Time = 390
value = 191,3
channel = 2
volume = 150

[State 4004, 16]
type = PlaySnd
trigger1 = Time = 164 
value = 4228,22
volume = 100
channel = 0

[State 4004, 17]
type = PlaySnd
trigger1 = Time = 25 
volume = 200
value = 2,5
channel = 1

[State 4004, 18]
type = PlaySnd
trigger1 = Time = 60
trigger2 = Time = 72
trigger3 = Time = 84
trigger4 = Time = 96
trigger5 = Time = 108
trigger6 = Time = 120
trigger7 = Time = 132
trigger8 = Time = 144
value = 1, 0
volume = 150

[State 4004, 19]
type = PlaySnd
trigger1 = Time = 46
volume = 150
value = 1,9
channel = 0

[State  4004, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 4013
Trigger1 = AnimElem = 56
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 4004, end]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Anim = 4013
value = 0

;---------------------------------------------------------------------------
;対ディオ
[Statedef 4005]
type = S
ctrl = 0
anim = 4003

[State 4005, 1]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 4005, 2]
type = VelSet
trigger1 = Time = 30
x = 2.5

[State 4005, 3]
type = VelSet
trigger1 = Time = 50
x = 0.5

[State 4005, 4]
type = VelSet
trigger1 = Time = 58
x = 0

[State 4005, 6]
type = VelSet
trigger1 = Time = 179
x = -2.5

[State 4005, 7]
type = VelSet
trigger1 = Time = 191
x = -1.5

[State 4005, 8]
type = VelSet
trigger1 = Time = 207
x = 0

[State  4004, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 4003
Trigger1 = AnimElem = 6
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 4005, 9]
type = ChangeAnim
trigger1 =  Time = 30
trigger1 = Anim = 4003
value = 4008

[State 4005, 10]
type = ChangeAnim
trigger1 =  Time = 50
trigger1 = Anim = 4008
value = 4009

[State 4005, 11]
type = ChangeAnim
trigger1 =  Time = 63
trigger1 = Anim = 4009
value = 4010

[State 4005, 12]
type = ChangeAnim
trigger1 =  Time = 165
trigger1 = Anim = 4010
value = 4011

[State 4005, 13]
type = ChangeAnim
trigger1 =  Time = 224
trigger1 = Anim = 4011
value = 4012

[State 4005, 14]
type = ChangeAnim
trigger1 =  Time = 350
trigger1 = Anim = 4012
value = 4014

[State 4005, 15]
type = PlaySnd
trigger1 = Time = 392
value = 5120,1
channel = 2
volume = 150

[State 4005, 16]
type = PlaySnd
trigger1 = Time = 170 
value = 4228,22
volume = 100
channel = 0

[State 4005, 17]
type = PlaySnd
trigger1 = Time = 25 
volume = 200
value = 2,5
channel = 1

[State 4005, 18]
type = PlaySnd
trigger1 = Time = 60
trigger2 = Time = 72
trigger3 = Time = 84
trigger4 = Time = 96
trigger5 = Time = 108
trigger6 = Time = 120
trigger7 = Time = 132
trigger8 = Time = 144
value = 1, 0
volume = 150

[State 4005, 19]
type = PlaySnd
trigger1 = Time = 50
volume = 150
value = 1,9
channel = 0

[State 4005, Effect1]
type = PlaySnd
trigger1 = Time = 63
trigger2 = Time = 71
trigger3 = Time = 75
trigger4 = Time = 81
trigger5 = Time = 87
trigger6 = Time = 93
trigger7 = Time = 99 
trigger8 = Time = 105 
trigger9 = Time = 111 
trigger10 = Time = 117
trigger11 = Time = 123 
trigger12 = Time = 129
trigger13 = Time = 135
trigger14 = Time = 141
trigger15 = Time = 147
trigger16 = Time = 153
value = 2, 3
volume = 200

[State 4005, Effect2]
type = PlaySnd
trigger1 = Time = 170
value = 2, 4
volume = 200

[State 4005, Spark1]
type = Explod
trigger1 = Time = 63
trigger2 = Time = 87
trigger3 = Time = 111
trigger4 = Time = 135
Anim = 8204
id = 8204
pos = ceil(70*const(size.xscale)),ceil(-96*const(size.yscale))
random = 20,20
postype = P2
ownpal = 1
ontop = 1
pausemovetime = 9999

[State 4005, Spark2]
type = Explod
trigger1 = Time = 71
trigger2 = Time = 93
trigger3 = Time = 117
trigger4 = Time = 141
Anim = 8204
id = 8204
pos = ceil(70*const(size.xscale)),ceil(-70*const(size.yscale))
random = 20,20
postype = P2
ownpal = 1
ontop = 1
pausemovetime = 9999

[State 4005, Spark3]
type = Explod
trigger1 = Time = 75
trigger2 = Time = 99
trigger3 = Time = 123
trigger4 = Time = 147
Anim = 8204
id = 8204
pos = ceil(70*const(size.xscale)),ceil(-112*const(size.yscale))
random = 20,20
postype = P2
ownpal = 1
ontop = 1
pausemovetime = 9999

[State 4005, Spark4]
type = Explod
trigger1 = Time = 81
trigger2 = Time = 105
trigger3 = Time = 129
trigger4 = Time = 153
Anim = 8204
id = 8204
pos = ceil(70*const(size.xscale)),ceil(-58*const(size.yscale))
random = 20,20
postype = P2
ownpal = 1
ontop = 1
pausemovetime = 9999

[State 4005, Spark5]
type = Explod
trigger1 = Time = 170
Anim = 8204
id = 8204
pos = ceil(70*const(size.xscale)),ceil(-46*const(size.yscale))
postype = P2
ownpal = 1
ontop = 1
pausemovetime = 9999

[State 4005, EnvShake1]
type = EnvShake
trigger1 = Time = 63
trigger2 = Time = 71
trigger3 = Time = 75
trigger4 = Time = 81
trigger5 = Time = 87
trigger6 = Time = 93
trigger7 = Time = 99 
trigger8 = Time = 105 
trigger9 = Time = 111 
trigger10 = Time = 117
trigger11 = Time = 123 
trigger12 = Time = 129
trigger13 = Time = 135
trigger14 = Time = 141
trigger15 = Time = 147
trigger16 = Time = 153
time = 12
ampl = 3

[State 4005, EnvShake2]
type = EnvShake
trigger1 = Time = 170
time = 30
ampl = 8

[State  4005, 黄色エフェクト]
Type = Helper
trigger1 = Anim = 4014
Trigger1 = AnimElem = 24
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 4005, end]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Anim = 4014
value = 0

;---------------------------------------------------------------------------
;対モモメノ
[Statedef 4006]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 4006, 1]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 4006, 2]
type = ChangeAnim
trigger1 =  Time = 155
trigger1 = Anim = 0
value = 4015

[State 4006, 3]
type = PlaySnd
trigger1 = Time = 155
value = 191,3
channel = 2
volume = 150

[State 4006, 4]
type = PlaySnd
trigger1 = Time = 330
value = 192,(Random % 3)
channel = 2
volume = 150

[State 4006, end]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Anim = 4015
value = 0

;---------------------------------------------------------------------------
;対サムチャイ
[Statedef 4007]
type = S
ctrl = 0
anim = 4016
velset = 0,0

[State 4007, 1]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 4007, end]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = Anim = 4016
value = 0

;---------------------------------------------------------------------------
;対うにゅほ
[Statedef 4008]
type = S
ctrl = 0
anim = 9999
velset = 0,0



[State 4009, 2] ;登場A
type = ChangeState
trigger1 = P2StateNo = 500
value = 4009

[State 4009, 3] ;登場B
type = ChangeState
trigger1 = P2StateNo = 501
value = 4014

[State 4009, 4] ;エレキマン
type = ChangeState
trigger1 = P2StateNo = 503
value = 4018

;---------------------------------------------------------------------------
;登場A
[Statedef 4009]
type = S
ctrl = 0
anim = 9999
velset = 0,0

[State 4009, 1]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nomusic

[State  4009, うにゅと_こぴ〜1]
Type = Helper
trigger1 = Anim = 9999
trigger1 = time = 2
Pos = -10,0
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 4012
StateNo = 4012
Name = "unyu"

[State 4009, ふぇいと1]
type = ChangeState
trigger1 = Anim = 9999
trigger1 = time = 332
value = 4010

;---------------------------------------------------------------------------
;F2登場1
[Statedef 4010]
type = S
ctrl = 0
anim = 4029
velset = 0,0
sprpriority = 2

[State 4010, 1]
type = posset
trigger1 = time = 0
y = -240

[State 4010, 2]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

[State 4010, 3]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nomusic

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

[State 4010, 5]
type = veladd
trigger1 = animelemtime(1)>=0
y = 0.3

[State 4010, 6] 
type = ChangeState
trigger1 = pos Y >= 0
trigger1 = vel Y > 0
value = 4011

;---------------------------------------------------------------------------
;F2登場2
[Statedef 4011]
type = S
ctrl = 0
anim = 4030
velset = 0,0
sprpriority = 2

[State 4011, 1]
type = posset
trigger1 = time = 0
y = 0

[State 4011, 2] 
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nomusic

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

[State 4011, 4]
type = velset
trigger1 = time = 0
y = 0

[State 4011, 5]
type = playsnd
trigger1 = animelem = 1
value = 40,0
volume = 250

[State 4011, 6]
type = PlaySnd
trigger1 = Time = 80
value = 0,33
channel = 2


[State 4011, 7]
type = PlaySnd
trigger1 = Time = 200
value = 0,34
channel = 2


[State 4011, 8]
type = ChangeAnim
trigger1 =  Time = 90
value = 4031

[State 4011, 9]
type = ChangeAnim
trigger1 =  Time = 100
trigger1 = Anim = 4031
value = 4032

[State 4011, 10]
type = ChangeAnim
trigger1 =  Time = 216
trigger1 = Anim = 4032
value = 4033

[State 40011, 11]
type = ChangeAnim
trigger1 =  Time = 310
trigger1 = Anim = 4033
value = 4034

[State  4011, 黄色エフェクト]
Type = Helper
Trigger1 = AnimElem = 13
trigger1 = Anim = 4034
Pos = 0,-40
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 2080
StateNo = 2080
Name = "SkillCard"

[State 4011, end] 
type = ChangeState
trigger1 = Anim = 4034
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;うにゅと_こぴ〜1
[Statedef 4012]
type = S
ctrl = 0
anim = 9999
velset = 0,0

[State 4012, 1]
type = bgpalfx
trigger1 = time <= 120
add = 0-(time*6),0-(time*6),0-(time*6)
time = 2

[State 4012, 2]
type = palfx
trigger1 = time <= 120
add = 0-(time*6),0-(time*6),0-(time*6)
time = 2

[State 4012, 3]
type = bgpalfx
trigger1 = time = [120,180]
add = 0-(256-(time-119)*4),0-(256-(time-119)*4),0-(256-(time-119)*4)
time = 2

[State 4012, 4]
type = palfx
trigger1 = time = [120,180]
add = 0-(256-(time-119)*4),0-(256-(time-119)*4),0-(256-(time-119)*4)
time = 2

[State 4010, 5] 
type = ChangeAnim
trigger1 = time = [110,150]
value = 4018

[State 4012, 6] 
type = explod
trigger1 = time = 50
anim = 4017
id = 4017
pos = 0,0
postype = p1
bindtime = -1
ownpal = 1
ontop = 1
trans = addalpha
alpha = 256,256
persistent = 0

[State 4012, 7]
type = ChangeAnim
trigger1 =  Time = 500
trigger1 = Anim = 4018
value = 4024

[State 4012, 8]
type = ChangeAnim
trigger1 =  Time = 586
trigger1 = Anim = 4024
value = 4025

[State 4012, 9]
type = ChangeAnim
trigger1 =  Time = 650
trigger1 = Anim = 4025
value = 4026

[State 4012, 10]
type = ChangeAnim
trigger1 =  Time = 750
trigger1 = Anim = 4026
value = 4027

[State 4012, 11]
type = veladd
trigger1 =  Time = 750
x = 7
y = -7

[State 4012, 12]
type = PlaySnd
trigger1 = Time = 650
value = 0,31
channel = 2
volume = 150

[State 4012, 13]
type = PlaySnd
trigger1 = Time = 750
value = 0,3
channel = 2
volume = 150

[State 4012, 14]
type = PlaySnd
trigger1 = Time = 800
value = 0,32
channel = 2
volume = 150

[State 4012, 15]
type = PlaySnd
trigger1 = Time = 850
value = 0,35
channel = 2
volume = 150


[State 4012, end]
type = DestroySelf
trigger1 = Anim = 4027
trigger1 = time = 900

;---------------------------------------------------------------------------
;登場B
[Statedef 4014]
type = S
ctrl = 0
anim = 9999
velset = 0,0

[State 4014, 1]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nomusic

[State  4014, うにゅと_こぴ〜2]
Type = Helper
trigger1 = Anim = 9999
trigger1 = time = 4
Pos = 0,0
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 4016
StateNo = 4016
Name = "unyu"

[State 4014, ふぇいと2]
type = ChangeState
trigger1 = Anim = 9999
trigger1 = time = 306
value = 4015

;---------------------------------------------------------------------------
;F2登場3
[Statedef 4015]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 4015, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 4015, 消しておく]
type = AssertSpecial
trigger1 = Time < 20
flag = Invisible

[State 4015, 特殊効果]
type = AssertSpecial
trigger1 = Time > 0
flag = NoMusic

[State 4015, 歩いてくる]
type = Explod
trigger1 = Time = 0
anim = 100
pos = -200, 0
postype = p1
vel = 7,0
removetime = 20
sprpriority = 2

[State 4015, 1]
type = playsnd
trigger1 = Time = 10
value = 0,3
volume = 250

[State 4015, 2]
type = playsnd
trigger1 = Time = 10
value = 1,10
channel = 2
volume = 150

[State 4015, end]
type = ChangeState
trigger1 = Time = 20
value = 0

;---------------------------------------------------------------------------
;うにゅと_こぴ〜2
[Statedef 4016]
type = S
ctrl = 0
anim = 4019
velset = 0,0
sprpriority = 2

[State 4016, 1]
type = posset
trigger1 = time = 0
y = -240

[State 4016, 2]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

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

[State 4016, 4]
type = velset
trigger1 = vel Y  >= 2
y = 2

[State 4016, 5]
type = velmul
trigger1 = animelemtime(1) = 1
y = 0.2

[State 4016, 6]
type = veladd
trigger1 = 1
y = 0.3

[State 4016, 7]
type = playsnd
trigger1 = animelemtime(1) = 1
value = 0,30
volume = 250

[State 4016, 8] 
type = ChangeState
trigger1 = pos Y >= 0
trigger1 = vel Y > 0
value = 4017

;---------------------------------------------------------------------------
[Statedef 4017]
type = S
ctrl = 0
anim = 4020
velset = 0,0
sprpriority = 2

[State 4017, 1]
type = posset
trigger1 = time = 0
y = 0

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

[State 4017, 3]
type = velset
trigger1 = time = 0
y = 0

[State 4017, 4]
type = playsnd
trigger1 = animelem = 8
value = 0,29
volume = 250

[State 4017, 5]
type = ChangeAnim
trigger1 = time = 195
value = 4024

[State 4017, 6]
type = veladd
trigger1 = time = 195
x = 10
y = -6

[State 4017, 7]
type = playsnd
trigger1 = time = 195
value = 9,0
volume = 250

[State 4017, 8]
type = PlaySnd
trigger1 = Time = 350
value = 0,35
channel = 2
volume = 150


[State 4017, end]
type = DestroySelf
trigger1 = Anim = 4024
trigger1 = time = 400

;---------------------------------------------------------------------------
;登場C
[Statedef 4018]
type = S
ctrl = 0
anim = 9998
velset = 0,0

[State 40018, 1]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nomusic

[State 4018, 2] 
type = lifeset
trigger1 = 1
trigger1 = time <=10
value = 1

[State 4018, 3] 
type = lifeadd
triggerall = animelemtime(8) >=20
trigger1 = (time%2) = 0
value = ceil(lifemax/32)

[State  4018, うにゅと_こぴ〜3]
Type = Helper
trigger1 = Anim = 9998
trigger1 = time = 60
Pos = 80,0
PosType = P1
Ownpal = 1
SprPriority = 4
bindtime = -1
IgnoreHitPause = 1
Persistent = 1
ID = 4021
StateNo = 4021
Name = "unyu"

[State 4018, ふぇいと3]
type = ChangeState
trigger1 = Anim = 9998
trigger1 = time = 480
value = 4019

;---------------------------------------------------------------------------
;F2登場4
[Statedef 4019]
type = S
ctrl = 0
anim = 4035
velset = 0,0
sprpriority = 2

[State 4019, 1]
type = posset
trigger1 = time = 0
y = -240

[State 4019, 2]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0

[State 4019, 3]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nomusic

[State 4019, Afterimage1]
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 4019, Afterimage2]
type = AfterImageTime
trigger1 = 1
time = 2

[State 4019, 4]
type = PlaySnd
trigger1 = Time = 1
value = 2,7
volume = 150
channel = 2

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

[State 4019, 6]
type = veladd
trigger1 = animelemtime(1)>=0
y = 1

[State 4019, 7] 
type = ChangeState
trigger1 = pos Y >= 0
trigger1 = vel Y > 0
value = 4020

;---------------------------------------------------------------------------
;F2登場5
[Statedef 4020]
type = S
ctrl = 0
anim = 4036
velset = 0,0
sprpriority = 2

[State 4020, 1]
type = posset
trigger1 = time = 0
y = 0

[State 4020, 2] 
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nomusic

[State 4020, Afterimage1]
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 4020, Afterimage2]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 4020, 4]
type = velset
trigger1 = time = 0
y = 0

[State 4020, 5]
type = playsnd
trigger1 = animelem = 1
value = 40,0
volume = 250

[State 4020, 6]
type = PlaySnd
trigger1 = Time = 1
value = 2,6

[State 4020, 7]
type = PlaySnd
trigger1 = Time = 60
value = 0,15
channel = 2

[State 4020, 8]
type = PlaySnd
trigger1 = Time = 154
value = 3,(Random % 2)
channel = 2

[State 4020, EnvShake]
type = EnvShake
trigger1 = Time = 1
time = 30
ampl = 8

[State 4020, 9]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 4036
value = 4038

[State 4020, end]
type = ChangeState
trigger1 = Anim = 4038
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;エレキマン1
[Statedef 4021]
type = S
ctrl = 0
anim = 9999
velset = 0,0
sprpriority = 2

[State 4021, 1] 
type = lifeset
trigger1 = 1
value = 1

[State 4021, 2] 
type = varset
trigger1 = 1
var(25) = 10

[State 4021, 3]
type = helper
trigger1 = time = 0
stateno = 4022
id = 4022
postype = left
pos = 0,24

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

[State 4021, 5]
type = veladd
trigger1 = animelemtime(7)>=0
y = 0.3

[State 4021, 6] ;Change to stand state when done
type = ChangeState
trigger1 = numhelper(4022)
trigger1 = helper(4022),stateno = 4023
value = 4023

;---------------------------------------------------------------------------
;エレキマン2
[Statedef 4022]
type = S
ctrl = 0
anim = 4021
velset = 0,0
sprpriority = 2

[State 4022, 1] 
type = posset
trigger1 = 1
x = parent,pos X

[State 4022, 2] 
type = posadd
trigger1 = time = 0
y = -screenpos y +210

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

[State 4022, 4]
type = bgpalfx
trigger1 = time = [20,200]
add = 0-((time-20)*6),0-((time-20)*6),0-((time-20)*6)
time = 2

[State 4022, 5]
type = bgpalfx
trigger1 = time = [200,224]
add = -256+((time-200)*10),-256+((time-200)*10),-256+((time-200)*10)
time = 2

[State 4022, 6]
type = posset
trigger1 = time = 0
y = screenpos y - 390

[State 4022, 7]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

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

[State 4022, 9]
type = veladd
trigger1 = animelemtime(13)>=0
y = 0.3

[State 4022, 10] 
type = ChangeState
trigger1 = pos Y >= 0
trigger1 = vel Y > 0
value = 4023

;---------------------------------------------------------------------------
;エレキマン3
[Statedef 4023]
type = S
ctrl = 0
anim = 4022
velset = 0,0
sprpriority = 2

[State 4023, 1]
type = posset
trigger1 = time = 0
y = 0

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

[State 4022, 4]
type = velset
trigger1 = time = 0
y = 0

[State 4022, 5]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 4022
value = 4028

;---------------------------------------------------------------------------
; 挑発の動作
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 195, 1]
type = CtrlSet
trigger1 = Time = 40
value = 1

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

[State 195 , 3]
type = PlaySnd
trigger1 = Time = 1
value = s1, 6

;---------------------------------------------------------------------------
; 立ち・弱・パンチ・の動作
[Statedef 200]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                      
;Commonly-used controllers:
velset = 0,0                     ;このステートが始まった時に移動するか（0,0で動かない）
ctrl = 0                         ;このステート中に他のコマンドを受け付けるか(1で受け付ける)
anim = 200                       ;このステートで表示するスプライトステート番号(0で変化無し)
poweradd = 20                    ;このステートを使った時のパワー増加量(0で変化無し)
sprpriority = 2                  ;表示した絵の重なり具合(2一番前　0通常　-1奥)

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA                     ;立ち状態で、通常の攻撃(ｓは立ち、ｎは通常、aは攻撃を表す)
damage = 23, 0                   ;ダメージ量（左が当たった時、右はガードした時）
animtype = Light                 ;当てた時の相手のポーズ（light/midium/hard/back）から選択
guardflag = MA                   ;ガードできる状態（ｍaは全ての状態でガード可能）
hitflag = MAF                    ;当てる事のできる条件
priority = 3, Hit                ;攻撃の優先権（0弱い　4通常　7強い
pausetime = 8, 8                 ;攻撃が当たった時の硬直時間（左が自分、右が相手）
sparkno = 0                      ;ヒットエフェクトのスプライトステート（無ければ0）
sparkxy = -10, -76               ;ヒットエフェクトを表示する場所（相手の座標で）
hitsound = 5, 0                  ;ヒットした時の音（ｓ*,*にすると自分の音を使う）
guardsound = 6, 0                ;ガードした時の音（同上）
ground.type = High               ;相手のくらった場所（High：頭、体, Low：足, Trip：足払い）
ground.slidetime = 6             ;相手が後にすべる時間
getpower　=　10，　5
ground.hittime  = 16             ;コンボが繋がる時間（高くしすぎない事）
ground.velocity = -4             ;地上で攻撃をくらった場合の相手の移動状況（ｘとｙで小数点可）
airguard.velocity = -1.9,-.8     ;空中で攻撃をくらった場合の相手の移動状況（ｘとｙで小数点可）
air.type = High                  ;空中で相手がくらった場所（上と同じ）
air.velocity = -1.4,-3           ;空中で攻撃をくらった場合の相手の移動状況（ｘとｙで小数点可）
air.hittime = 12                 ;空中でコンボが繋がる時間

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

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

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

;---------------------------------------------------------------------------
; 立ち・強・パンチ・の動作
; 強パンチの設定は上とほぼ同じです。
; 違うのはsprpriority（表示順位）が-1になっている事です。
; これでは攻撃を出しても絵は相手の後ろに隠れてしまいます
; これはカンフーマンの強パンチを見れば分かるように奥から手前に手を振っている事を
; 表現するためです、最初は手が相手より奥、振り切った時は相手より手前になる
; 投げの場合もこういうことが必要です（掴んでいるようにみせたりするため）
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 210
sprpriority = -1

[State 210, Width]
type = Width
trigger1 = (AnimElemTime (2) >= 0) && (AnimElemTime (7) < 0)
value = 15,0

[State 210, 1]
type = PlaySnd
trigger1 = Time = 16
value = s0, 4

[State 210, 3]
type = HitDef
trigger1 = AnimElem = 10
attr = S, NA
animtype  = Medium
damage    = 57
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
getpower　=　10，　5
ground.type = High
ground.slidetime = 12
ground.hittime  = 18
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 210, 3]
type = HitDef
trigger1 = AnimElem = 11
attr = S, NA
animtype  = Medium
damage    = 57
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
ground.type = High
getpower　=　10，　5
ground.slidetime = 12
ground.hittime  = 18
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 210, 4]
type = ChangeAnim
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 210
elem = 6

; 下のステートで表示順位を２にして相手より手前にしています。
[State 210, 5]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

[State 210, 6]
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, Width]
type = Width
trigger1 = (AnimElemTime (2) >= 0) && (AnimElemTime (7) < 0)
value = 15,0

[State 220, 1]
type = PlaySnd
trigger1 = Time = 25
value = s0, 4

[State 220, 2]
type = PlaySnd
trigger1 = Time = 20
value = s1, 12

[State 220, 3]
type = HitDef
trigger1 = AnimElem = 12
attr = S, NA
animtype  = Medium
damage    = 57
guardflag = HA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
getpower　=　10，　5
ground.slidetime = 12
ground.hittime  = 18
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 220, 3]
type = HitDef
trigger1 = AnimElem = 13
attr = S, NA
animtype  = Medium
damage    = 57
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
getpower　=　10，　5
ground.slidetime = 12
ground.hittime  = 18
ground.velocity = -5.5
air.velocity = -2.5,-4
fall = 1

[State 220, 4]
type = ChangeAnim
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 210
elem = 6

; 下のステートで表示順位を２にして相手より手前にしています。
[State 220, 5]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

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

;--------------------------------------------------------------------------
; 立ち・弱・キック
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = Time = 7
value = s0, 1

[State 230 , 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 8 

[State 230, 2]
type = HitDef
trigger1 = Time = 4
attr = S, NA
animtype  = Medium
damage    = 26
guardflag = MA
pausetime = 12,12
sparkno = 0
sparkxy = -10,-37
hitsound   = 5,1
guardsound = 6,0
ground.type = Low
getpower　=　10，　5
ground.slidetime = 10
ground.hittime  = 16
ground.velocity = -5
air.velocity = -2.5,-3.5

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

;---------------------------------------------------------------------------
; 立ち・強・キック
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = Time = 17
value = s0, 1

[State 240 , 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 9 


[State 240, 2]
type = HitDef
trigger1 = Time = 7
attr = S, NA
animtype  = Medium
damage    = 63
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-60
hitsound   = 5,2
guardsound = 10,0
ground.type = Low
getpower　=　10，　5
ground.slidetime = 12
ground.hittime  = 18
ground.velocity = -6
air.velocity = -2.2,-3.2

[State 240, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 20

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

;---------------------------------------------------------------------------
;屈み・弱・パンチ
;     これも通常の攻撃とはあまり変わらないが、変わった点といえばpriority（優先順位）
;     が３になっている事です。
;     これによって他の大抵の攻撃よりも優先権が下がる事になり相手と攻撃がかち合った
;     時は負けてしまいます。
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 15
ctrl = 0
anim = 400
sprpriority = 2

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

[State 400 , 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 10 

[State 400, 2]
type = HitDef
trigger1 = Time = 4
attr = C, NA
damage    = 23
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkno = 0
sparkxy = -10,-42
hitsound   = 5,0
guardsound = 6,0
ground.type = Low
getpower　=　10，　5
ground.slidetime = 6
ground.hittime  = 12
ground.velocity = -4
air.velocity = -1.5,-3

[State 400, 3]
type = CtrlSet
trigger1 = Time = 5
value = 1

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

;---------------------------------------------------------------------------
;屈み・強・パンチ
; CNS difficulty: easy
; 　    これはパンチが二回当たるようになっています。
;       攻撃を２回当てるには２個のHitDefを書く必要があります
;       一発目の攻撃のHitDefにはguardflagが「M」（middle＝中段ガード）
;       にセットされているので、相手は空中でガードできません。二発目
;       の攻撃のguardflagは「MA」（middle+air＝中段＋空中ガード）で、
;       地上、空中でもガードすることができます。
;       ちなみに一つに統合する事もできますが、内容を変えたい時はやはり２個書くのが
;       いいと思います
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 410
sprpriority = 2

[State 410, 1]
type = PlaySnd
trigger1 = Time = 13
value = s0, 0

[State 410, 2]
type = HitDef
trigger1 = AnimElem = 7
attr = C, NA
damage    = 37
animtype  = Medium
hitflag = MAF
guardflag = M
pausetime = 12,12
sparkno = 1
sparkxy = -10,-55
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
getpower　=　10，　5
ground.slidetime = 12
ground.hittime  = 18
ground.velocity = -4
air.velocity = -3,-4

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

;---------------------------------------------------------------------------
;屈み・弱・キック
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 430
sprpriority = 2

[State 430, 1]
type = PlaySnd
trigger1 = Time = 9
value = s0, 0

[State 430 , 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 12 

[State 430, 2]
type = HitDef
trigger1 = Time = 7
attr = C, NA
damage    = 28
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = 0
sparkxy = -10,-8
hitsound   = 5,1
guardsound = 6,0
ground.type = Low
getpower　=　10，　5
ground.slidetime = 6
ground.hittime  = 16
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

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

;---------------------------------------------------------------------------
;屈み・強・キック
;
;これは足払いの効果を出すためにground.typeがTripになっています。
;それ以外は特にありません。
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 70
ctrl = 0
anim = 440
sprpriority = 2

[State 440, 2]
type = PlaySnd
trigger1 = Time = 19
value = s0, 2

[State 440 , 2]
type = PlaySnd
trigger1 = Time = 1
value = s1, 13 

[State 440, 3]
type = HitDef
trigger1 = Time = 9
attr = C, NA
damage    = 72
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = 1
sparkxy = -5,-10
hitsound   = 5,2
guardsound = 10,0
ground.type = Trip
getpower　=　10，　5
ground.slidetime = 10
ground.hittime  = 18
ground.velocity = -1.5,-2
air.velocity = -1.2,-3
guard.velocity = -5
fall = 1

[State 240, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 20

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

;---------------------------------------------------------------------------
;空中・弱・パンチ
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 11
ctrl = 0
anim = 600
sprpriority = 2

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

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

[State 600, 2]
type = HitDef
trigger1 = Time = 5
attr = A, NA
damage    = 20
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = 0
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
getpower　=　10，　5
ground.slidetime = 6
ground.hittime  = 12
ground.velocity = -4
air.velocity = -1.3,-3

[State 600, 3]
type = CtrlSet
trigger1 = Animtime = 50
value = 1

;---------------------------------------------------------------------------
;空中・強・パンチ
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 610
sprpriority = 2

[State 610]
type = velset
trigger1 = Time = 0
y = -6

[State 610, 2]
type = PlaySnd
trigger1 = Time = 16
value = s0, 1

[State 610 , 2]
type = PlaySnd
trigger1 = Time = 1
value = s1, 14 

[State 610, 3]
type = HitDef
trigger1 = Time = 8
attr = A, NA
damage = 72
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = 1
sparkxy = -10,-55
hitsound   = 5,3
guardsound = 6,0
animtype = Med
ground.type = High
getpower　=　10，　5
ground.slidetime = 17
ground.hittime  = 18
ground.velocity = -5
air.velocity = 0,8
fall = 1

[State 610, 4]
type = CtrlSet
trigger1 = Animtime = 50
value = 1

;---------------------------------------------------------------------------
;空中・弱・キック
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 20
ctrl = 0
anim = 630
sprpriority = 2

[State 630, 1]
type = PlaySnd
trigger1 = Time = 10
value = s0, 0

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

[State 630, 2]
type = HitDef
trigger1 = Time = 3
attr = A, NA
damage = 26
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = 1
sparkxy = -5,-35
hitsound   = 5,0
guardsound = 6,0
ground.type = High
getpower　=　10，　5
ground.slidetime = 6
ground.hittime  = 12
ground.velocity = -4
air.velocity = -2,-3

[State 630, 3]
type = CtrlSet
trigger1 = Animtime = 50
value = 1
;---------------------------------------------------------------------------
;空中・強・キック
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 640
sprpriority = 2

[State 640, 2]
type = PlaySnd
trigger1 = Time = 10
trigger2 = Time = 22
value = s0, 1

[State 640 , 2]
type = PlaySnd
trigger1 = Time = 1
value = s1, 8  

[State 640, 3]
type = HitDef
trigger1 = Time = 3
attr = A, NA
damage    = 70
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = 1
sparkxy = -10,-40
hitsound   = 5,3
guardsound = 6,0
animtype = Med
ground.type = High
getpower　=　10，　5
ground.slidetime = 17
ground.hittime  = 18
ground.velocity = -5
air.velocity = 0,-6

[State 640, 4]
type = HitDef
trigger1 = Time = 20
attr = A, NA
damage    = 70
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = 1
sparkxy = -10,-40
hitsound   = 5,3
guardsound = 6,0
animtype = Med
ground.type = High
getpower　=　10，　5
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = 0,8
fall = 1

[State 640, 5]
type = CtrlSet
trigger1 = Animtime = 50
value = 1
;---------------------------------------------------------------------------
;カンフースロー・発動
;     
;     投げのステートは少し複雑ですが順序良くならべればなんてことありません。
;     800：投げの発生と失敗した時
;     810：投げが成功した時の自分の動き
;     820：投げが成功した瞬間の相手の状態
;     821：投げが成功した時の相手の飛んでいく状態
;     とこんな具合です、投げは自分の他に相手の分も記述しなくてはなりません
;     でもそれだけです。

[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

;---------------------------------------------------------------------------
;カンフースロー・投げている自分
;     このステートでは相手を設定した場所に固定した後、相手を飛ばしています
;     ここで相手の動きを制御しているのはtype = TargetBindというステートです
;     これを一定時間事にやっていくと綺麗に投げ飛ばされているように見えます。
;     そしてここにはHitDefが無いのでダメージはtype = TargetLifeAddで
;     ダメージを減らしています

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

[State 810, Grab Sound]
type = PlaySnd
trigger1 = time = 15
value = s1, 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = time = 31
value = s800, 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 = -78

[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

;---------------------------------------------------------------------------
;カンフースロー・投げられている相手
; 
;     ここは投げられた瞬間の相手のステートです
;     たいしたことは書いてありませんがtypeがAになっている事です。
;     相手が投げれて空中にいる事を設定して次の821ステートに移動します

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

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

;---------------------------------------------------------------------------
;カンフースロー・相手の空中の状態
;     
;     これは投げられている相手の状態ととれる行動を設定しています
;     type = SelfStateは相手のリカバー状態を設定する物でこの状態ならこれ。
;     と言うように地上近く、空中、叩きつけられた時と３つ設定しています。

[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 


;---------------------------------------------------------------------------
; カンフー突き手・弱
; 
;   これは必殺技のステートです、主な違いはattrがS, SAになっているところで
;   意味はＳ：立ち Ｓ：必殺技 Ａ：攻撃となっています。
;   これは相手のとる反応を左右するので正確にする必要があります
;   後、攻撃が近くで当たるのと遠くで当たるのを区別しています
;   1000,5はtrigger1 = p2bodydist X < 40と記述があります
;   意味は「相手の水平位置が40より近い」ということです。
;   1000,6はtrigger1 = p2bodydist X >= 40となっています、すると
;   意味は「相手の水平位置が40以上」となっているので近くなら強く
;   遠くなら弱くダメージがあると言う事です。

[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 16
value = s0, 3

[State 1000, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 1000, 3]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 12
x = 10

[State 1000, 4]
type = PosAdd
trigger1 = AnimElem = 5
x = 5

[State 1000, 5] ;相手が近い時
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 9
trigger1 = p2bodydist X < 40
attr = S, SA
animtype  = Hard
getpower  = 20,10
damage    = 85, 4
priority  = 6
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1

[State 1000, 6] ;相手が遠い時
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 9
trigger1 = p2bodydist X >= 40
attr = S, SA
animtype  = Hard
getpower  = 10,0
damage    = 80, 4
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
getpower　=　10，　5
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -4,-2.5

[State 1000, 6]
type = PosAdd
trigger1 = AnimElem = 8
x = -5

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

;---------------------------------------------------------------------------
; カンフー突き手・強
[Statedef 1010]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 1010
ctrl = 0
sprpriority = 2

[State 1010, 1]
type = PlaySnd
trigger1 = Time = 16
value = s0, 3

[State 1010, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 1010, 3]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 12
x = 10

[State 1010, 4]
type = PosAdd
trigger1 = AnimElem = 5
x = 5

[State 1010, 5]
type = VelSet
trigger1 = AnimElem = 5
x = 4

[State 1010, 6] 
type = HitDef
trigger1 = AnimElem = 5
trigger1 = p2bodydist X < 40
attr = S, SA
animtype  = hard
damage    = 94, 4
priority  = 6
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
getpower　=　20，　10
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 0

[State 1010, 6] 
type = HitDef
trigger1 = AnimElem = 9
trigger1 = p2bodydist X < 40
attr = S, SA
animtype  = diagup
getpower  = 20,10
damage    = 94, 4
priority  = 6
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1

[State 1010, 7] 
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 9
trigger1 = p2bodydist X >= 40
attr = S, SA
animtype  = hard
getpower  = 10,5
damage    = 89, 4
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -4,-2.5

[State 1010, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; カンフー突き手・早い
; 
;     これは少し難しい物を使っています。
;     攻撃が当たった時に相手をp2stateno = 1025で移動しています。
;     あとの移動などは応用なのでそう難しくないですね。

[Statedef 1020]
type    = S
movetype= A
physics = N
juggle  = 6
poweradd= -330
velset = 0,0
anim = 1020
ctrl = 0
sprpriority = 2

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

[State 1020, 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 1020, Afterimage]
type = AfterImageTime
trigger1 = AnimElemTime(8) < 0
time = 2

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

[State 1020, 1]
type = PlaySnd
trigger1 = Time = 16
value = s0, 3

[State 1020, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 1020, 3]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 11
x = 10

[State 1020, 4]
type = PosAdd
trigger1 = AnimElem = 4
x = 5

[State 1020, 5]
type = VelSet
trigger1 = AnimElem = 4
x = 13

[State 1020, 6]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
animtype  = Hard
damage    = 102, 5
getpower  = 30,15
priority  = 5
guardflag = MA
pausetime = 8,7
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -8,-7
guard.velocity = -7
air.velocity = -8,-7
airguard.velocity = -5, -4
fall = 1
p2stateno = 1025

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

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

[Statedef 1025]
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 = 1026

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

[Statedef 1026]
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 = 1027

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

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

[Statedef 1027]
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 = 1
value = F7,0

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

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

[Statedef 1028]
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 1050]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2

[State 1050, 1]
type = PlaySnd
trigger1 = Time = 8
value = s0, 2

[State 1050, 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 12

[State 1050, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 15

[State 1050, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 25

[State 1050, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 95, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 1

[State 1050, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1051

;------------------
; カンフーニー・空中動作・弱
; 
;     ここでひざ蹴りの上昇を滑らかにするためにtype = VelAddが使われています
;     これはまずvelset = 2,-6で「斜め前に移動」しつつVelAddステートで重力を設定し
;     設定した値に達したらチェンジステートしています
;     ここで注目してほしいのがphysicsがNになっている事です。
;     physics（物理学）を無しにする事で自分の決めた重力で動く事ができるのです。

[Statedef 1051]
type    = A
movetype= A
physics = N
velset = 2,-6
anim = 1051
hitdefpersist = 1 ;攻撃が当たった場合その動きのままにするか（１でＯＮ）

[State 1051, 1] ;これがここだけの重力設定
type = VelAdd
trigger1 = 1
y = .45

[State 1051, 2] ;設定した値に達したらチェンジステート
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;------------------
; カンフーニー・着地・弱
; 
;     これが着地した瞬間のステートです。
;     ずれを修正するためにtype = PosSetを0にしています。
;     意味はわかりますね？「地面と接地させる」です。

[Statedef 1052]
type    = S
movetype= I
physics = S
anim = 1052
sprpriority = 1
velset = 0,0

[State 1052, 1] ;地面に設置させるステート
type = PosSet
trigger1 = Time = 0
y = 0

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

[State 1052, 3] ;ここでカンフーマンを操作可能に戻す
type = CtrlSet
trigger1 = AnimElem = 3, -1
value = 1

[State 1052, 4] ;少しキャラを手前に戻す
type = PosAdd
trigger1 = AnimElem = 4
x = -15

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

;---------------------------------------------------------------------------
; カンフーニー・発動・強
[Statedef 1060]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 1060
ctrl = 0
sprpriority = 2

[State 1060, 1]
type = PlaySnd
trigger1 = Time = 8
value = s0, 2

[State 1060, 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 12

[State 1060, 2]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 14

[State 1060, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 25

[State 1060, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 103, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7.5
guard.velocity = -7
air.velocity = -3.5,-7.5
fall = 1

[State 1060, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1061

;------------------
; カンフーニー・空中・強
[Statedef 1061]
type    = A
movetype= A
physics = N
velset = 2.5,-7.5
anim = 1061
hitdefpersist = 1 

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

[State 1061, 2]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;---------------------------------------------------------------------------
; 早いカンフーニー・発動
[Statedef 1070]
type    = S
movetype= A
physics = S
juggle  = 6
poweradd= -330
velset = 0,0
anim = 1070
ctrl = 0
sprpriority = 2

[State 1070, 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 1070, Afterimage]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 1070, 1]
type = PlaySnd
trigger1 = Time = 8
value = s0, 2

[State 1070, 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 12

[State 1070, 2]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 14

[State 1070, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 25

[State 1070, 4]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Medium
getpower  = 20,10
damage    = 40, 3
priority  = 5
hitflag   = MA
guardflag = MA
pausetime = 8,7
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -2,-6
guard.velocity = -7
air.velocity = -2,-6
fall = 1
fall.animtype = Med
fall.recovertime = 30

[State 1070, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1071

;------------------
; 早いカンフーニー
[Statedef 1071]
type    = A
movetype= A
physics = N
velset = 2.5,-9
anim = 1071

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

[State 1071, Afterimage]
type = AfterImageTime
trigger1 = Vel Y < 0
time = 2

[State 1071, 1]
type = VelAdd
trigger1 = 1
y = .5

[State 1071, 2]
type = VelAdd
trigger1 = Vel Y >= -1
y = .2

[State 1071, 3]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
getpower  = 20,10
damage    = 81, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3,-9.5
guard.velocity = -7
air.velocity = -3,-9.5
fall = 1
fall.recovertime = 30

[State 1071, 4]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;---------------------------------------------------------------------------
;昇竜拳もどき（弱） 

[Statedef 1100]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1100, 1]
type = PlaySnd
trigger1 = Time = 8
value = s0, 2

[State 1100, 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 12

[State 1100, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 15

[State 1100, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 25

[State 1100, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 0

[State 1100, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1101

;------------------
; 昇竜拳もどき・空中動作・弱
; 
;     ここでひざ蹴りの上昇を滑らかにするためにtype = VelAddが使われています
;     これはまずvelset = 2,-6で「斜め前に移動」しつつVelAddステートで重力を設定し
;     設定した値に達したらチェンジステートしています
;     ここで注目してほしいのがphysicsがNになっている事です。
;     physics（物理学）を無しにする事で自分の決めた重力で動く事ができるのです。

[Statedef 1101]
type    = A
movetype= A
physics = N
velset = 2,-6
anim = 1101
hitdefpersist = 1 ;攻撃が当たった場合その動きのままにするか（１でＯＮ）

[State 1101, 1] ;これがここだけの重力設定
type = VelAdd
trigger1 = 1
y = .45

[State 1101, 2]
type = HitDef
trigger1 = Time = 0
trigger1 = Time = 6
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 0

[State 1101, 3]
type = HitDef
trigger1 = Time = 9
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 1

[State 1101, 4] ;設定した値に達したらチェンジステート
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;---------------------------------------------------------------------------
; 昇竜拳もどき・発動・強
[Statedef 1110]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 1110
ctrl = 0
sprpriority = 2

[State 1110, 1]
type = PlaySnd
trigger1 = Time = 8
value = s0, 2

[State 1110, 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 12

[State 1110, 2]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 14

[State 1110, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 25

[State 1110, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7.5
guard.velocity = -7
air.velocity = -3.5,-7.5
fall = 0

[State 1110, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1111

;------------------
; 昇竜拳もどき・空中・強
[Statedef 1111]
type    = A
movetype= A
physics = N
velset = 2.5,-7.5
anim = 1111
hitdefpersist = 1 

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

[State 1111, 2]
type = HitDef
trigger1 = Time = 0
trigger2 = Time = 6
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 0

[State 1111, 2]
type = HitDef
trigger1 = Time = 9
attr = A, SA
animtype  = Medium
getpower  = 10,0
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 1

[State 1111, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;---------------------------------------------------------------------------
; 早い昇竜拳もどき・発動
[Statedef 1120]
type    = S
movetype= A
physics = S
juggle  = 6
poweradd= -330
velset = 0,0
anim = 1120
ctrl = 0
sprpriority = 2

[State 1120, 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 1120, Afterimage]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 1120, 1]
type = PlaySnd
trigger1 = Time = 8
value = s0, 2

[State 1120, 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 12

[State 1120, 2]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
x = 14

[State 1120, 3]
type = PosAdd
trigger1 = AnimElem = 4
x = 25

[State 1120, 4]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Medium
getpower  = 20,10
damage    = 40, 3
priority  = 5
hitflag   = MA
guardflag = MA
pausetime = 8,7
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -2,-6
guard.velocity = -7
air.velocity = -2,-6
fall = 0
fall.animtype = Med
fall.recovertime = 30

[State 1120, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1121

;------------------
; 早い昇竜拳もどき
[Statedef 1121]
type    = A
movetype= A
physics = N
velset = 2.5,-9
anim = 1121

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

[State 1121, Afterimage]
type = AfterImageTime
trigger1 = Vel Y < 0
time = 2

[State 1121, 1]
type = VelAdd
trigger1 = 1
y = .5

[State 1121, 2]
type = VelAdd
trigger1 = Vel Y >= -1
y = .2

[State 1121, 3]
type = HitDef
trigger1 = Time = 0
trigger2 = Time = 3
trigger3 = Time = 6
trigger4 = Time = 9
attr = A, SA
animtype  = Medium
getpower  = 20,10
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3,-9.5
guard.velocity = -7
air.velocity = -3,-9.5
fall = 0
fall.recovertime = 30

[State 1121, 4]
type = HitDef
trigger1 = Time = 12
attr = A, SA
animtype  = Medium
getpower　= 20，10
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3,-9.5
guard.velocity = -7
air.velocity = -3,-9.5
fall = 1
fall.recovertime = 30

[State 1121, 5]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;---------------------------------------------------------------------------
;空中昇竜拳もどき（弱） 

[Statedef 1130]
type    = A
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1130, 1]
type = PlaySnd
trigger1 = Time = 8
value = s0, 2

[State 1130, 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 12

[State 1130, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 0

[State 1130, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1131

;------------------
; 昇竜拳もどき・空中動作・弱
; 
;     ここでひざ蹴りの上昇を滑らかにするためにtype = VelAddが使われています
;     これはまずvelset = 2,-6で「斜め前に移動」しつつVelAddステートで重力を設定し
;     設定した値に達したらチェンジステートしています
;     ここで注目してほしいのがphysicsがNになっている事です。
;     physics（物理学）を無しにする事で自分の決めた重力で動く事ができるのです。

[Statedef 1131]
type    = A
movetype= A
physics = N
velset = 2,-6
anim = 1101
hitdefpersist = 1 ;攻撃が当たった場合その動きのままにするか（１でＯＮ）

[State 1131, 1] ;これがここだけの重力設定
type = VelAdd
trigger1 = 1
y = .45

[State 1131, 2]
type = HitDef
trigger1 = Time = 0
trigger1 = Time = 6
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 0

[State 1131, 3]
type = HitDef
trigger1 = Time = 9
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 1

[State 1131, 4] ;設定した値に達したらチェンジステート
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;---------------------------------------------------------------------------
; 空中昇竜拳もどき・発動・強
[Statedef 1140]
type    = A
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 1110
ctrl = 0
sprpriority = 2

[State 1140, 1]
type = PlaySnd
trigger1 = Time = 8
value = s0, 2

[State 1140, 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 12

[State 1140, 4]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7.5
guard.velocity = -7
air.velocity = -3.5,-7.5
fall = 0

[State 1140, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1141

;------------------
; 空中昇竜拳もどき・空中・強
[Statedef 1141]
type    = A
movetype= A
physics = N
velset = 2.5,-7.5
anim = 1111
hitdefpersist = 1 

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

[State 1141, 2]
type = HitDef
trigger1 = Time = 0
trigger2 = Time = 6
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 0

[State 1141, 2]
type = HitDef
trigger1 = Time = 9
attr = A, SA
animtype  = Medium
getpower  = 10,5
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3.5,-7
guard.velocity = -7
air.velocity = -3.5,-7
fall = 1

[State 1141, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;---------------------------------------------------------------------------
; 空中早い昇竜拳もどき・発動
[Statedef 1150]
type    = A
movetype= A
physics = S
juggle  = 6
poweradd= -330
velset = 0,0
anim = 1120
ctrl = 0
sprpriority = 2

[State 1150, 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 1150, Afterimage]
type = AfterImageTime
trigger1 = 1
time = 2

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

[State 1150, 1]
type = PlaySnd
trigger1 = Time = 8
value = s0, 2

[State 1150, 1]
type = PlaySnd
trigger1 = Time = 1
value = s1, 12

[State 1150, 4]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Medium
getpower  = 20,10
damage    = 40, 3
priority  = 5
hitflag   = MA
guardflag = MA
pausetime = 8,7
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -2,-6
guard.velocity = -7
air.velocity = -2,-6
fall = 0
fall.animtype = Med
fall.recovertime = 30

[State 1150, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1151

;------------------
; 空中早い昇竜拳もどき
[Statedef 1151]
type    = A
movetype= A
physics = N
velset = 2.5,-9
anim = 1121

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

[State 1151, Afterimage]
type = AfterImageTime
trigger1 = Vel Y < 0
time = 2

[State 1151, 1]
type = VelAdd
trigger1 = 1
y = .5

[State 1151, 2]
type = VelAdd
trigger1 = Vel Y >= -1
y = .2

[State 1151, 3]
type = HitDef
trigger1 = Time = 0
trigger2 = Time = 3
trigger3 = Time = 6
trigger4 = Time = 9
attr = A, SA
animtype  = Medium
getpower  = 20,10
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3,-9.5
guard.velocity = -7
air.velocity = -3,-9.5
fall = 0
fall.recovertime = 30

[State 1151, 4]
type = HitDef
trigger1 = Time = 12
attr = A, SA
animtype  = Medium
getpower　= 20，10
damage    = 40, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = -10,-70
hitsound   = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -3,-9.5
guard.velocity = -7
air.velocity = -3,-9.5
fall = 1
fall.recovertime = 30

[State 1151, 5]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1052

;---------------------------------------------------------------------------
;ハーケンスラッシュ (弱)
[Statedef 1200]
type    = S
movetype= A
physics = S
velset = 0, 0
ctrl = 0
anim = 1200
poweradd = 110

[State 1200,0]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1200, セリフ]
type = PlaySnd
trigger1 = Time = 6
value = s0,6

[State 1200, 効果音]
type = PlaySnd
trigger1 = Time = 10
value = s0,2

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

[State 1200, 1]
type = Projectile
trigger1 = AnimElem =5
projanim = 2010
projremovetime =2020
projhitanim = 2020
projid = 2010
offset = -40,-35
velocity = 2, 0
accel = 1, 0
remvelocity = 2, 0
attr = A,SP
projscale = 0.7, 0.35
projremovetime = 1
animtype = LIght
damage = 40,3
guardflag = MA
hitflag = MAF
pausetime = 0,12
sprpriority = 4
sparkno = 0
sparkky = 0,0
hitsound = 5,0
guardsound = 6,0
getpower　= 10,5
ground.type = Low
ground.slidetime = 5
ground.hittime = 11
ground.velocity = -4,0
air.velocity = -1.3,-3
air.juggle = 2
ownpal = 1

[State 1200, 2]
type = DestroySelf
trigger1 = time = 50
trigger2 = animtime = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;ハーケンスラッシュ (強)
[Statedef 1210]
type    = S
movetype= A
physics = S
velset = 0, 0
ctrl = 0
anim = 1210
poweradd = 120

[State 1210,0]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1210, セリフ]
type = PlaySnd
trigger1 = Time = 10
value = s0,6


[State 1210, 効果音]
type = PlaySnd
trigger1 = Time = 14
value = s0,3

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

[State 1210, 1]
type = Projectile
trigger1 = AnimElem =9
projanim = 2010
projremovetime =2020
projhitanim = 2040
projid = 2010
offset = 0,-95
velocity = 3, 0
accel = 1, 0
remvelocity = 3, 0
attr = S,SP
projscale = 0.7,0.35
postype = p1
animtype = Medium
damage = 80, 6
guardflag = MAF
pausetime = 0,12
sprpriority = 4
sparkno = 0
sparkky = 0,0
hitsound = 5,0
guardsound = 6,0
ground.type = high
getpower　= 10,5
ground.slidetime = 5
ground.hittime = 11
ground.velocity = -4,0
air.velocity = -1.3,-3
air.juggle = 2
ownpal = 1

[State 1220, 2]
type = DestroySelf
trigger1 = time = 50
trigger2 = animtime = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;早いハーケンスラッシュ (ゲージレベル１／３）
[Statedef 1220]
type    = S
movetype= A
physics = S
poweradd= -330
velset = 0,0
anim = 1220
ctrl = 0
sprpriority = 2

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

[State 1220,0]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1220, セリフ]
type = PlaySnd
trigger1 = Time = 20
value = s0,6


[State 1220, 効果音]
type = PlaySnd
trigger1 = Time = 31
value = s0,4

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

[State 1220, 1]
type = Projectile
trigger1 = AnimElem =11
projanim = 2030
projremovetime =2040
projhitanim = 2040
projid = 2020
offset = 0,-85
velocity = 8, 0
accel = 1, 0
remvelocity = 3, 0
attr = S,SP
projscale = 0.7,0.7
postype = p1
projhits = 2
animtype = diagup
damage = 80, 8
guardflag = MAF
pausetime = 0,12
sprpriority = 4
sparkno = 0
sparkxy = -10,0
hitsound = 5,0
guardsound = 6,0
ground.type = Low
getpower　= 20,10
ground.slidetime = 7
ground.hittime = 13
ground.velocity = -6,0
air.velocity = -1.3,-3
air.juggle = 2
ownpal = 1
fall = 1
fall.recover = 0

[State 1220, 2]
type = DestroySelf
trigger1 = time = 50
trigger2 = animtime = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;空中ハーケンスラッシュ (弱)
[Statedef 1230]
type    = A
movetype= A
physics = A
juggle  = 5
ctrl = 0
anim = 1230
poweradd = 110

[State 1230, セリフ]
type = PlaySnd
trigger1 = Time = 6
value = s0,6

[State 1230, 効果音]
type = PlaySnd
trigger1 = Time = 10
value = s0,2

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

[State 1230, 1]
type = Projectile
trigger1 = AnimElem =4
projanim = 2010
projremovetime =2020
projhitanim = 2020
projid = 2010
offset = -40,-35
velocity = 2, 0
accel = 1, 0
remvelocity = 2, 0
attr = A,SP
projscale = 0.7, 0.35
projremovetime = 1
animtype = LIght
damage = 40,3
guardflag = MA
hitflag = MAF
pausetime = 0,12
sprpriority = 4
sparkno = 0
sparkky = 0,0
hitsound = 5,0
guardsound = 6,0
ground.type = Low
getpower　= 10,5
ground.slidetime = 5
ground.hittime = 11
ground.velocity = -4,0
air.velocity = -1.3,-3
air.juggle = 2
ownpal = 1

[State 1230, 2]
type = DestroySelf
trigger1 = time = 50
trigger2 = animtime = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;空中ハーケンスラッシュ (強)
[Statedef 1240]
type    = A
movetype= A
physics = A
juggle  = 6
velset = 0, 0
ctrl = 0
anim = 1240
poweradd = 120

[State 1240, セリフ]
type = PlaySnd
trigger1 = Time = 10
value = s0,6

[State 1240, セリフ2]
type = PlaySnd
trigger1 = Time = 10
value = s1,10

[State 1240, 効果音]
type = PlaySnd
trigger1 = Time = 14
value = s0,3

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

[State 1240, 1]
type = Projectile
trigger1 = AnimElem =8
projanim = 2010
projremovetime =2020
projhitanim = 2040
projid = 2010
offset = 0,-95
velocity = 3, 5
accel = 1, 0
remvelocity = 3, 5
attr = S,SP
projscale = 0.7,0.35
postype = p1
animtype = Medium
damage = 80, 6
guardflag = MAF
pausetime = 0,12
sprpriority = 4
sparkno = 0
sparkky = 0,0
hitsound = 5,0
guardsound = 6,0
ground.type = high
getpower　= 10,5
ground.slidetime = 5
ground.hittime = 11
ground.velocity = -4,0
air.velocity = -1.3,-3
air.juggle = 2
ownpal = 1

[State 1240, 2]
type = DestroySelf
trigger1 = time = 50
trigger2 = animtime = 0
ignorehitpause = 1

;---------------------------------------------------------------------------
;空中早いハーケンスラッシュ (ゲージレベル１／３）
[Statedef 1250]
type    = A
movetype= A
physics = A
juggle  = 5
poweradd= -330
velset = 0,0
anim = 1250
ctrl = 0
sprpriority = 2

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

[State 1250, セリフ]
type = PlaySnd
trigger1 = Time = 14
value = s0,6

[State 1250, セリフ2]
type = PlaySnd
trigger1 = Time = 14
value = s1,9

[State 1250, 効果音]
type = PlaySnd
trigger1 = Time = 16
value = s0,4

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

[State 1250, 1]
type = Projectile
trigger1 = AnimElem =5
projanim = 2030
projremovetime =2040
projhitanim = 2040
projid = 2020
offset = 0,-85
velocity = 8, 0
accel = 1, 0
remvelocity = 3, 0
attr = S,SP
projscale = 0.7,0.7
postype = p1
projhits = 2
animtype = diagup
damage = 80, 8
guardflag = MAF
pausetime = 0,12
sprpriority = 4
sparkno = 0
sparkxy = -10,0
hitsound = 5,0
guardsound = 6,0
ground.type = Low
getpower　= 20,10
ground.slidetime = 7
ground.hittime = 13
ground.velocity = -6,0
air.velocity = -1.3,-3
air.juggle = 2
ownpal = 1
fall = 1
fall.recover = 0

[State 1250, 2]
type = DestroySelf
trigger1 = time = 50
trigger2 = animtime = 0
ignorehitpause = 1




;---------------------------------------------------------------------------
; 三連カンフー突き手(ゲージレベル１）
; 
;        さて、これは超必殺技のステートです。
;        注目する事はgetpowerが0になっている事です、通常超必殺はゲージを使って
;        発動する物なのでゲージが増えるのは変ですね？なので0になっています
;        攻撃の状態はattr = S, HAですＳ：立ち状態　Ｈ：超必殺　Ａ：攻撃です。
;        後、上でHitDefは一つに統合できると書きましたがここではそれを使用しています。
;        HitDefを見ると
;        trigger1 = AnimElem = 5
;        trigger2 = AnimElem = 12
;        となっていますね？これの意味は「スプライトステートの５枚目と９枚目の絵の時に」
;        という意味になります、triggerが1と2なのは条件を表しもし両方とも1ならば
;        意味が変わってきます。例えば「スプライトステートの１枚目の２０フレーム目」とするなら
;        trigger1 = AnimElem = 1
;        trigger1 = time = 20
;        と書けばＯＫです。
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

[State 3000, Super A0]
type = SuperPause
trigger1 = AnimElem = 2, 1
movetime = 1
pos = 25, -57
anim = 100
sound = 20, 0
poweradd = -1000
time = 66

[State 3000, Super A1]
type = Explod
trigger1 = AnimElem = 2
anim = 9060
id = 9060
postype = back
pos = 0, 0
scale = 0.65,0.65
supermovetime = 66
Removetime = 66
ownpal = 1

[State 3000,Super A2]
type = ExplodBindTime
trigger1 = AnimElem = 10
id = 9060

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

[State 3000, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
value = , NA, SA, AT
time = 12

[State 3000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 30
value2 = C, NA
time = 1

[State 3000, 1]
type = PlaySnd
trigger1 = time = 22
trigger2 = time = 34
trigger3 = time = 46
value = s0, 3

[State 3000, 1]
type = PlaySnd
trigger1 = time = 1
value = s1, 15


[State 3000, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 3000, 3]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 10
trigger3 = AnimElem = 12
trigger4 = AnimElem = 17
trigger5 = AnimElem = 19
trigger4 = AnimElem = 29
x = 10

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 5
trigger2 = AnimElem = 12
trigger3 = AnimElem = 19
x = 6

[State 3000, 4]
type = PosAdd
trigger1 = AnimElem = 5
x = 5

[State 3000, 5]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 9
trigger3 = AnimElem = 12
trigger4 = AnimElem = 15
trigger5 = AnimElem = 17
attr = S, HA
animtype  = Hard
damage    = 72,4
getpower  = 30,15
priority  = 6
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0

[State 3000, 6]
type = HitDef
trigger1 = AnimElem = 21
attr = S, HA
animtype  = diagup
damage    = 75,4
getpower  = 30,15
priority  = 6
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 40
ground.hittime  = 40
ground.velocity = -5, -4
guard.velocity = -12
air.velocity = -5,-4
airguard.velocity = -3,-3
fall.animtype = Hard
fall = 1
fall.recover = 0

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

[State 3000,end]
type = Destroyself
trigger1 = time = 100

;プラズマザンバー（ゲージレベル１）
;==============================================================================
[Statedef 3100]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3010
ctrl = 0
sprpriority = 2

[State 3100, Width]
type = Width
trigger1 = AnimElem = 4, >= 0
value = 15,0

[State 3100, SuperPause]
type = SuperPause
trigger1 = AnimElem = 4
time = 66
movetime = 66
pos = 25, -57
anim = 100
sound = 20, 0
poweradd = -1000

[State 3100, Super A1]
type = Explod
trigger1 = AnimElem = 4
anim = 9061
id = 9061
postype = back
pos = 0, 0
scale = 0.65,0.65
supermovetime = 66
Removetime = 66
ownpal = 1

[State 3100,Super A2]
type = ExplodBindTime
trigger1 = AnimElem = 10
id = 9061

[State 3000, Super A1]
type = Explod
trigger1 = AnimElem = 4
anim = 9062
id = 9062
postype = back
pos = 0, 0
scale = 0.65,0.65
supermovetime = 66
Removetime = 66
ownpal = 1

[State 3100,Super A2]
type = ExplodBindTime
trigger1 = AnimElem = 10
id = 9062

[State 3100, afterimage]
type = afterimage
trigger1 = AnimElem = 4
time = 2

[State 3100, AfterImageTime]
type = afterImageTime
trigger1 = AnimElemTime(2) >= 4 && Time < 60
time = 2

[State 3100, NotHitBy1]
type = NotHitBy
trigger1 = AnimElem = 17
value = , NA, SA, AT
time = 5

[State 3100, NotHitBy2]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 30
value2 = C, NA
time = 1

[State 3100, 1]
type = PlaySnd
trigger1 = time = 13
value = s0, 11

[State 3100, 2]
type = PlaySnd
trigger1 = time = 26
value = s0, 17

[State 3100, 3]
type = PlaySnd
trigger1 = time = 29
trigger2 = time = 99
value = s0, 15

[State 3100, 4]
type = PlaySnd
trigger1 = time = 69
value = s0, 4

[State 3100,helper]
type = helper
trigger1 = AnimElem = 17
name = "zamber1"
id = 2040
pos = 0,0
postype = p1
stateno = 2070
helpertype = normal
ownpal = 1
keyctrl = 1

[State 3100,helper]
type = helper
trigger1 = AnimElem = 17
name = "zamber2"
id = 2041
pos = 0,0
postype = p1
stateno = 2071
helpertype = normal
ownpal = 1
keyctrl = 1

[State 3100,helper]
type = helper
trigger1 = AnimElem = 17
name = "zamber3"
id = 2042
pos = 0,0
postype = p1
stateno = 2072
helpertype = normal
ownpal = 1
keyctrl = 1

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

[Statedef 2070]
type    = S
movetype= H
physics = N
velset = 0,0
anim = 2070
ctrl = 0
sprpriority = 2

[State 2070, 0]
type = HitDef
trigger1 = AnimElem = 3
attr = S, HA
animtype  = Hard
damage    = 80,6
getpower  = 0
priority  = 6
guardflag = MAF
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0

[State a]
type = DestroySelf
trigger1 = time = 100

[Statedef 2071]
type    = S
movetype= H
physics = N
velset = 0,0
anim = 2071
ctrl = 0
sprpriority = 2

[State 2071, 0]
type = HitDef
trigger1 = AnimElem = 1
attr = S, HA
animtype  = Hard
damage    = 80,6
getpower  = 30,15
priority  = 6
guardflag = MAF
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6,-8
air.velocity = -3,-4
air.fall = 1
fall.animtype = Hard
fall.recover = 0

[State a]
type = DestroySelf
trigger1 = time = 100

[Statedef 2072]
type    = S
movetype= H
physics = N
velset = 0,0
anim = 2072
ctrl = 0
sprpriority = 2

[State 2072, 0]
type = HitDef
trigger1 = AnimElem = 2
attr = S, HA
animtype  = diagup
damage    = 220,10
getpower  = 80,40
priority  = 6
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 40
ground.hittime  = 40
ground.velocity = -10, -8
guard.velocity = -12
air.velocity = -10,-8
airguard.velocity = -3,-3
fall.animtype = Hard
fall.recover = 0
fall = 1

[State 2072,end]
type = Destroyself
trigger1 = time = 100

;---------------------------------------------------------------------------
; 新三連カンフー突き手（ゲージレベル2）

[Statedef 3200]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3020
ctrl = 0
sprpriority = 2

[State 3200, Width]
type = Width
trigger1 = AnimElem = 3, >= 0
value = 15,0

[State 3200, Super A0]
type = SuperPause
trigger1 = AnimElem = 3,1
time = 130
movetime = 130
pos = 25, -57
anim = 100
sound = 20, 0
poweradd = -2000

[State 3200, Super A1]
type = Explod
trigger1 = AnimElem = 3
anim = 9063
id = 9063
postype = back
pos = 0, 0
scale = 0.65,0.65
supermovetime = 130
Removetime = 130
ownpal = 1

[State 3200,Super A2]
type = ExplodBindTime
trigger1 = AnimElem = 10
id = 9063

[State 3200, Super A3]
type = Explod
trigger1 = AnimElem = 3
anim = 9064
id = 9064
postype = back
pos = 0, 0
scale = 0.65,0.65
supermovetime = 130
Removetime = 130
ownpal = 1

[State 3200,Super A4]
type = ExplodBindTime
trigger1 = AnimElem = 10
id = 9064

[State 3200, Super B]
type = AfterImage
trigger1 = AnimElem = 3, 1
time = 2

[State 3200, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 3 && Time < 300
time = 2

[State 3200, Super D]
type = NotHitBy
trigger1 = AnimElem = 37
value = , NA, SA, AT
time = 5

[State 3200, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 30
value2 = C, NA
time = 1

[State 3200, 1]
type = PlaySnd
trigger1 = time = 22
trigger2 = time = 34
trigger3 = time = 46
trigger4 = time = 58
trigger5 = time = 70
trigger6 = time = 82
trigger7 = time = 94
trigger8 = time = 106
trigger9 = time = 118
trigger10 = time = 130
trigger11 = time = 142
value = s0, 3

[State 3200, 1]
type = PlaySnd
trigger1 = time = 148
trigger2 = time = 166
trigger3 = time = 184
value = s0, 4

[State 3200, 1]
type = PlaySnd
trigger1 = time = 10
value = s0, 16

[State 3200, 1]
type = PlaySnd
trigger1 = time = 70
value = s0, 21

[State 3200, 5]
type = HitDef
trigger1 = AnimElem = 38
trigger2 = AnimElem = 44
trigger3 = AnimElem = 39
trigger4 = AnimElem = 40
trigger5 = AnimElem = 45
trigger6 = AnimElem = 46
attr = S, HA
animtype  = Hard
damage    = 50,10
getpower  = 40,20
priority  = 6
guardflag = MAF
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = high
ground.slidetime = 5
ground.hittime  = 30
ground.velocity = -6
airguard.velocity = -3,-3
air.velocity = 0,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0

[State 3200, 6]
type = HitDef
trigger1 = AnimElem = 51
attr = S, NA
animtype  = Medium
damage    = 50
guardflag = HA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
getpower　= 30,15
ground.slidetime = 5
ground.hittime  = 30
ground.velocity = -10.8
air.velocity = -3,-3

[State 3200, 7]
type = HitDef
trigger1 = AnimElem = 52
attr = S, HA
animtype  = diagup
damage    = 140,10
getpower  = 60,15
priority  = 6
guardflag = MAF
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
getpower　= 30,15
ground.slidetime = 40
ground.hittime  = 40
ground.velocity = -5, 4
guard.velocity = -12
air.velocity = -10,8
airguard.velocity = -3,-3
fall.animtype = Hard
fall = 1
fall.recover = 0

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

[State 3200,end]
type = Destroyself
trigger1 = time = 100

;　ガード
;==============================================================================
[Statedef 150]
type    = S
movetype= H
physics = N
velset = 0,0

[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150

[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 150, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 150, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3

[State 150,4]
type = Helper
trigger1 = time = 1
id = 4000
name = "karate"
sprpriority = 8
pos = -10, -50
postype = p1
facing = 1
stateno = 2051
helpertype = player
keyctrl = 0          
ownpal = 1

[State -1, Kung Fu Throw]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

[StateDef 2051]
Type        = A 
Physics     = N 
Anim        = 2051
SprPriority = 8 
VelSet      = 0,0 

[state angle]
type = angledraw
trigger1 = 1
scale = 0.3,0.3
sprpriority = 2

[State 150, Effect]
Type     = NotHitBy 
Trigger1 = 1 
Value    = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP 
Time     = 1 

[State 150, Effect]
Type     = Trans
Trigger1 = 1
Trans    = Add

[State 150, Effect]
Type     = AngleDraw
Trigger1 = time <= 10
Scale    = .65*(time*0.1),1*(time*0.1)

[State 150, Effect]
Type     = AngleDraw
Trigger1 = time >= 11
Scale    = .65,1

[State 150, Effect]
Type     = AngleSet
Trigger1 = 1
Value    = 20

[State 150, Effect]
Type = AssertSpecial
Trigger1       = 1
Flag           = Noshadow
IgnoreHitPause = 1
SuperMoveTime  = 9999
PauseMoveTime  = 9999


[State 150, Effect]
Type     = VarAdd
Trigger1 = time > 10
V        = 7
Value    = 25

[State 150, Effect]
Type     = PalFx
Trigger1 = 256-Var(7) > 0
Time     = 1
Add      = 0,0,0
Mul      = ceil(256-Var(7)),ceil(256-Var(7)),ceil(256-Var(7))

[State 150, Effect]
Type     = PalFx
Trigger1 = 256-Var(7) <= 0
Time     = 1
Add      = 0,0,0
Mul      = 0,0,0

[State 150, Effect]
Type     = DestroySelf
Trigger1 = Time >= 22

;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]
type    = S
movetype= H
physics = S
anim = 150

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

[State 151, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 151, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 151, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 151, 4]
type = ChangeState
trigger1 = HitOver
value = 130
ctrl = 1

[State 151, 5]
type = Helper
trigger1 = time = 1
id = 4000
name = "karate"
sprpriority = 8
pos = -5, -50
postype = p1
facing = 1
stateno = 2051
helpertype = player
keyctrl = 0          
ownpal = 1

[State -1, Kung Fu Throw]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 152]
type    = C
movetype= H
physics = N
velset = 0,0

[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 151

[State 152, 3]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 152, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 152, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

[State 152, 5]
type = Helper
trigger1 = time = 1
id = 4000
name = "karate"
sprpriority = 8
pos = -5, -50
postype = p1
facing = 1
stateno = 2051
helpertype = player
keyctrl = 0          
ownpal = 1

[State -1, Kung Fu Throw]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 153]
type    = C
movetype= H
physics = C
anim = 151

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

[State 153, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 153, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 153, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 153, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 153, 4]
type = ChangeState
trigger1 = HitOver
value = 131
ctrl = 1

[State 153, 5]
type = Helper
trigger1 = time = 1
id = 4000
name = "karate"
sprpriority = 8
pos = -5, -50
postype = p1
facing = 1
stateno = 2051
helpertype = player
keyctrl = 0          
ownpal = 1

[State -1, Kung Fu Throw]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 154]
type    = A
movetype= H
physics = N
velset = 0,0

[State 154, 1]
type = ChangeAnim
trigger1 = 1
value = 152

[State 154, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155 ;AGUARDHIT2

[State 154, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

[State 154, 4]
type = Helper
trigger1 = time = 1
id = 4000
name = "karate"
sprpriority = 8
pos = -5, -50
postype = p1
facing = 1
stateno = 2051
helpertype = player
keyctrl = 0          
ownpal = 1

[State -1, Kung Fu Throw]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 155]
type    = A
movetype= H
physics = N
anim = 152

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

[State 155, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 155, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 155, 4]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 155, 5]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command = "holdback"
trigger1 = inguarddist
value = 130

[State 155, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

[State 154, 4]
type = Helper
trigger1 = time = 1
id = 4000
name = "karate"
sprpriority = 8
pos = -5, -50
postype = p1
facing = 1
stateno = 2051
helpertype = player
keyctrl = 0          
ownpal = 1

[State -1, Kung Fu Throw]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; ダッシュ
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 100 , 2]
type = PlaySnd
trigger1 = Time = 1
value = s0, 19

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , AP
Time     = 1

[State 2070, Explod1]
type = Explod
trigger1 = !Time
anim = 2080
ID = 2080
sprpriority = 5
postype = p1
pos = -4,-37
ownpal = 0
ontop = 1

[State 2070, Helper_2]
type = Helper
trigger1 = Time%4 = 0
trigger1 = random = [0,450]
pos = 0,0
postype = p1
ID=2080
pausemovetime = 0
name = "ef2080"
sprpriority = 16
stateno = 2081
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 2070, helper_3]
type = Helper
trigger1 = time = 0
pos = 41,-37
postype = p1
ID=104
pausemovetime = 0
name = "ef2080"
sprpriority = 15
stateno = 2082
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 100, 3] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 4] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 5]
type = ChangeState
trigger1 = command != "holdfwd"
value = 101
ctrl = 1

[Statedef 101]
type    = S
physics = S
anim = 101
sprpriority = 1

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

[State 101, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

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

;---------------------------------------------------------------------------
; バックステップ
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[State 105, 2]
type = CtrlSet
trigger1 = Time = 2
value = 1

[State 105 , 3]
type = PlaySnd
trigger1 = Time = 1
value = s0, 19

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , AP
Time     = 1

[State 2070, Explod1]
type = Explod
trigger1 = !Time
anim = 2080
ID = 2080
sprpriority = 5
postype = p1
pos = 10,-45
facing = -1
ownpal = 0
ontop = 1

[State 2070, Helper_2]
type = Helper
trigger1 = Time%3 = 0
trigger1 = random = [0,450]
pos = 0,0
postype = p1
ID=2080
pausemovetime = 0
name = "ef2080"
sprpriority = 16
stateno = 2081
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 2070, helper_3]
type = Helper
trigger1 = time = 0
pos = -50,-40
postype = p1
ID=2072
pausemovetime = 0
name = "ef2080"
sprpriority = 15
stateno = 2082
helpertype = normal
keyctrl = 0
Facing = -1
ownpal = 1
ontop = 1

[State 105, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106

;---------------------------------------------------------------------------
; 空中ダッシュ
[Statedef 103]
type    = A
physics = N
anim = 103
sprpriority = 1

[State 103, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 103 , 2]
type = PlaySnd
trigger1 = Time = 1
value = s0, 18

[State 103, 3]
type = VelSet
trigger1 = 1
y = const(velocity.run.fwd.y)

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , AP
Time     = 1

[State 2070, Explod1]
type = Explod
trigger1 = !Time
anim = 2080
ID = 2080
sprpriority = 5
postype = p1
pos = -4,-37
ownpal = 0
ontop = 1

[State 2070, Helper_2]
type = Helper
trigger1 = Time%4 = 0
trigger1 = random = [0,450]
pos = 0,0
postype = p1
ID=2080
pausemovetime = 0
name = "ef2080"
sprpriority = 16
stateno = 2081
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 2070, helper_3]
type = Helper
trigger1 = time = 0
pos = 41,-37
postype = p1
ID=104
pausemovetime = 0
name = "ef2080"
sprpriority = 15
stateno = 2082
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 103, 4] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 103, 5] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 103, 6]
type = ChangeState
trigger1 = command != "holdfwd"
value = 104
ctrl = 1

[Statedef 104]
type    = A
physics = A
anim = 104
sprpriority = 1


[State 104, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 104, 3]
type = ChangeState
trigger1 = Time = 18
value = 51
ctrl = 1

;---------------------------------------------------------------------------
; 空中バックダッシュ
[Statedef 107]
type    = A
physics = N
anim = 107
sprpriority = 1

[State 107 , 1]
type = PlaySnd
trigger1 = Time = 1
value = s0, 18

[State 107, 2]
type = VelSet
trigger1 = 1
x = const(velocity.run.back.x)

[State -1]
Type     = NotHitBy
Trigger1 = 1
Value    = , AP
Time     = 1

[State 2070, Explod1]
type = Explod
trigger1 = !Time
anim = 2080
ID = 2080
sprpriority = 5
postype = p1
pos = 10,-45
facing = -1
ownpal = 0
ontop = 1

[State 2070, Helper_2]
type = Helper
trigger1 = Time%3 = 0
trigger1 = random = [0,450]
pos = 0,0
postype = p1
ID=2080
pausemovetime = 0
name = "ef2080"
sprpriority = 16
stateno = 2081
helpertype = normal
keyctrl = 0
ownpal = 1
ontop = 1

[State 2070, helper_3]
type = Helper
trigger1 = time = 0
pos = -50,-40
postype = p1
ID=2072
pausemovetime = 0
name = "ef2080"
sprpriority = 15
stateno = 2082
helpertype = normal
keyctrl = 0
Facing = -1
ownpal = 1
ontop = 1

[State 107, 3]
type = VelSet
trigger1 = 1
y = const(velocity.run.fwd.y)

[State 107, 4] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 107, 5] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 107, 6]
type = ChangeState
trigger1 = command != "holdback"
value = 108
ctrl = 1

[Statedef 108]
type    = A
physics = A
anim = 108
sprpriority = 1

[State 108, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 108, 3]
type = ChangeState
trigger1 = Time = 18
value = 51
ctrl = 1

;---------------------------------------------------------------------------
;ダッシュエフェクト2
;---------------------------------------------------------------------------
[Statedef 2081]
type    = S
physics = S
anim = 2081
ctrl = 0
sprpriority = 4

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

[State a]
Type = Trans
Trigger1 = 1
Trans = Add
IgnoreHitPause = 1

[State 103]
type = AngleDraw
trigger1 = 1
scale = 0.7,0.7

[state a];横位置用変数
type = varrandom
trigger1 = Time = 0
v = 1
range = 80,20

[state a];縦位置用変数
type = varrandom
trigger1 = Time = 0
v = 2
range = 5,-60

[state a];ランダム出現位置
type = posadd
trigger1 = !Time
x = Var(1)
y = Var(2)

[state a]
type = varadd
trigger1 = 1
v = 2
value = 17

[State 1020]
Type     = PalFx
Trigger1 = 1
Time     = 1
Mul      = 256-Var(2),256-Var(2),256-Var(2)
add		 = -(var(2)),-(var(2)),-(var(2))

[State a]
type = DestroySelf
trigger1 = time = 8

;---------------------------------------------------------------------------
;ダッシュエフェクト３
;---------------------------------------------------------------------------
[Statedef 2082]
type    = S
physics = S
anim = 2082
ctrl = 0
sprpriority = 5

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


[State 1020]
Type     = Trans
Trigger1 = 1
trans    = addalpha
Alpha    = 256-var(2),256

[state a]
type = varadd
trigger1 = 1 
v = 1
value = 1

[State 104,]
type = AngleDraw
trigger1 = 1
scale = 0.5*(1+((var(1))*0.2)),0.5*(1+((var(1))*0.2))

[state a]
type = varadd
trigger1 = 1
v = 2
value = 17

[State a]
type = DestroySelf
trigger1 = var(2) <= 0

;---------------------------------------------------------------------------
;ジャギ投げ専用イス（ヘルパー）

[Statedef 2991]
type    = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
anim = 5331
ctrl = 0
sprpriority = -1

[State 1987]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5

[State 1947]
type = BindToParent
trigger1 = 1
time = 1
facing = 0
pos = 0, 0
ignorehitpause = 1

[State 1980, ぶつかり判定]
type = PlayerPush
trigger1 = 1
value = 0

[State 1868]
type = SprPriority
trigger1 = root,stateno = 901
value = -1

[State 1868]
type = SprPriority
trigger1 = root,stateno = 805
value = 3

[State 1848, 消える]
type = DestroySelf
trigger1 = ishelper(2991)
trigger1 = root,anim != 6
trigger2 = time = 180
trigger3 = ishelper(3219)
trigger3 = root,anim != 5330
trigger3 = time >= 11

;----------------------------------------------------------------------
;ドロウィンさん作ジャギ投げ専用ヘルパー（ヘルパー）

[Statedef 3218]
type    = S
movetype= H
physics = S
juggle  = 1
velset = 0,0
anim = 5330
ctrl = 0
sprpriority = 1

[State 1947]
type = BindToParent
trigger1 = 1
time = 1
facing = 0
pos = 0, 0
ignorehitpause = 1

[State 1980, ぶつかり判定]
type = PlayerPush
trigger1 = 1
value = 0

[State 1848, 消える]
type = DestroySelf
trigger1 = root,anim != 6
trigger2 = root,stateno != 901
trigger3 = time = 120

;----------------------------------------------------------------------
;アップルフォーユーエフェクト1（ヘルパー）

[Statedef 3247]
type    = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
anim = 9999
ctrl = 0
sprpriority = 4

[State 1987]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5

[State 1980, ぶつかり判定]
type = PlayerPush
trigger1 = 1
value = 0

[State 1947]
type = BindToParent
trigger1 = root,facing = -1
time = 1
facing = 0
pos = -34, -93
ignorehitpause = 1

[State 1947]
type = BindToParent
trigger1 = root,facing = 1
time = 1
facing = 0
pos = -14, -103
ignorehitpause = 1

[State 200]
type = Turn
trigger1 = root,facing = 1
persistent = 0

[State 1947]
type = AngleAdd
trigger1 = root,facing = 1
value = 0
persistent = 0

[State 3101,9]
type = Changeanim
trigger1 = time = 0
value = 3943

[State 3101,9]
type = Changeanim
trigger1 = time = 42
value = 3942

[State 1848, 消える]
type = DestroySelf
trigger1 = root,stateno != 860
trigger2 = root,movetype != H
trigger3 = root,statetype != S

;----------------------------------------------------------------------
;アップルフォーユーエフェクト2（ヘルパー）

[Statedef 3248]
type    = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
anim = 9999
ctrl = 0
sprpriority = 4

[State 1987]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5

[State 1980, ぶつかり判定]
type = PlayerPush
trigger1 = 1
value = 0

[State 1947]
type = BindToParent
trigger1 = root,facing = -1
time = 1
facing = 0
pos = -30, -93
ignorehitpause = 1

[State 1947]
type = BindToParent
trigger1 = root,facing = 1
time = 1
facing = 0
pos = 0, -103
ignorehitpause = 1

[State 200]
type = Turn
trigger1 = root,facing = 1
persistent = 0

[State 1947]
type = AngleAdd
trigger1 = root,facing = 1
value = 0
persistent = 0

[State 3101,9]
type = Changeanim
trigger1 = time = 0
value = 3943

[State 3101,9]
type = Changeanim
trigger1 = root,anim = 3945
value = 3942
persistent = 0

[State 1848, 消える]
type = DestroySelf
trigger1 = root,stateno != [2003,2004]
trigger2 = root,movetype != H

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