; CNSファイルはカンフーマンの定数（基本データ）と
; 状態（各動作）を記述するものです。
; キャラクターの心臓とも言える部分なのでとても重要です。
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;基本データ部分
[Data]
life              = 1000    ;体力ゲージの最大値を決めます
power             = 5000    ;パワーゲージ最大値（デフォルトは 3000 = Lv.3 になります・オプション）
attack            = 100     ;攻撃力パーセンテージ（デフォルトは 100% になります）
defence           = 100     ;防御力パーセンテージ（デフォルトは 100% になります）
fall.defence_up   = 50      ;一時的に上昇するダウン時の防御力パーセンテージ
liedown.time      = 50      ;倒れてから起き上がるまでの時間
airjuggle         = 15      ;ジャグルポイント限界値　★１
sparkno           = 1       ;デフォルトのヒットスパーク番号（fightfx.airか、キャラのairから呼び出す）
guard.sparkno     = 40      ;デフォルトのガードスパーク番号（fightfx.airか、キャラのairから呼び出す）
KO.echo           = 0       ;ＫＯ時の声にエコーを掛けるかどうか（0=しない・1=する）
volume            = 255      ;キャラの音量　255が最高
intpersistindex   = 5,20    ;Varを次のラウンドへ持ち越しが可能 (最小=0, 最大=59)  ★２
floatpersistindex = 40      ;FVarを次のラウンドへ持ち越しが可能 (最小=0, 最大=39) ★２

;---------------------------------------------------------------------------
;サイズ設定
[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        ;xscaleとyscaleが発射物のスケールにも影響するかどうか（0=しない・1=する）
head.pos         = 0, -90  ;BindToTargetの時に必要な頭の座標
mid.pos          = 0, -60  ;BindToTargetの時に必要な体中心の座標
shadowoffset     = 0        ;影の垂直方向の位置
draw.offset      = 0,0      ;キャラ描画表示位置（Ｘ軸,Ｙ軸）

;---------------------------------------------------------------------------
;移動速度設定
[Velocity]
walk.fwd     = 2.6          ;前進歩行速度
walk.back    = -2.3         ;後退歩行速度
run.fwd      = 6.7, 0       ;前に走る時の速度（Ｘ軸,Ｙ軸）
run.back     = -6.0,-3.5      ;後ろに走る時の速度（Ｘ軸,Ｙ軸）
jump.neu     = 0,-9         ;垂直ジャンプ速度（Ｘ軸,Ｙ軸）
jump.back    = -3.6         ;後ジャンプ速度
jump.fwd     = 3.7          ;前ジャンプ速度
runjump.back = -2.55,-8.1   ;後ろに走りながらのジャンプ速度（オプション）
runjump.fwd  = 4.2,-8.7     ;前に走りながらのジャンプ速度（オプション）
airjump.neu  = 0,-8.1       ;空中垂直ジャンプ速度（オプション）
airjump.back = -2.5         ;空中後ジャンプ速度（オプション）
airjump.fwd  = 2.55         ;空中前ジャンプ速度（オプション）

;---------------------------------------------------------------------------
;動作設定
[Movement]
airjump.num     = 0      ;空中ジャンプが出来る回数（オプション）
airjump.height  = 35     ;空中ジャンプするために必要な最低限の高さ（オプション）
yaccel          = .54    ;重力（垂直下降加速度）
stand.friction  = .85    ;立ち状態の摩擦係数
crouch.friction = .82    ;しゃがみ状態の摩擦係数


;---------------------------------------------------------------------------
; Varの使用状況
; ここに自分が使ったvarをメモしておくといろいろと好都合です。
; var(1)  - コマンドファイルのコンボ用
; var(2)  - 根性値、逆根性値判定
; var(3)  - ハイジャンプ
; var(4)  - 小ジャンプ
; var(5)  - 対戦キャラ判別
; var(6)  - 受身処理用
; var(12) - ジャグル設定用
; var(20) - 空中ガード設定
; var(21) - Random var用
; var(22) - Lifeの初期値保存用
; var(24) - ブレーキング用
; var(26) - 逆根性値用
; var(30) - シャイン→デッドリーの地上判定用
; var(31) - MAXレイジング用
; var(40) - MAXゲージ用

; var(44) - AI真空投げ追撃用
; var(45) - AIよのかぜ追撃用

; var(53) - AI用起き上がり時投げ無敵測定
; var(54) - 
; var(55) - 
; var(56) - AI反応速度設定
; var(57) - AI難易度設定
; var(58) - AI死亡判定フラグ
; var(59) - AI起動用

;---------------------------------------------------------------------------
;「ステート」の説明と基本的な使い方
;---------------------------------------------------------------------------
;■ステートとは「状態」を意味しますが、
;　ＭＵＧＥＮでは通常攻撃や必殺技などの枠にはまらない
;「ゲーム中における全ての行動を決めるプログラム」の事を指します。
;「ゲージ消費が必要無く、一撃で相手を倒せる攻撃」なども簡単に作成出来るので注意です。
;　１ステート（一つの行動）ずつに対して必ず番号（アドレス）が割り当てられます。
;　俗に「ステートナンバー」と呼ばれています。
;
;■基本的な設定の例
; [Statedef STATENO]       一つの行動を定義する記述です。「STATENO」に必ず番号を設定してください
; type = ?      S/C/A/L/U  キャラの状態を指定
; S=立ち　C=しゃがみ　A=空中　L=倒れている　U=前のステートの状態を引き継ぐ
;
; movetype = ?  I/A/H      キャラの行動内容を指定
; I=何もしない　A=攻撃している　H=攻撃を食らっている
;
; physics = ?   S/C/A/N/U  キャラの物理的な体勢
; S=立ち　C=しゃがみ　A=空中　N=重力や摩擦の影響を受けない　U=前のステートの体勢を引き継ぐ
;
; juggle = ?               攻撃を当てた時に溜まるジャグルポイントの設定
;
; [State STATENO, ?]      「ステートコントローラ」と呼ばれるステートの色々な操作を定義し、設置や追加をします
; type = ?                 ステートコントローラの種類をこの部分に状況に応じて入れます
; 　                       トリガーで条件を指定し、様々な効果を適用させて行きます
;
;
; ※１ステートには必ず一つはステートコントローラを設置する必要があります。
;
; 後は実際に使われているステートを参照してください。（[Statedef 200]に更に詳しい説明もあります）
;
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; 基本行動のステート
;---------------------------------------------------------------------------
; タイムオーバー時
; CNS レベル: 基本

[Statedef 170]
type = S
ctrl = 0     ;ここでCtrlSetを簡略化できます。　1=自由に動かせる
anim = 170
velset = 0,0 ;ここでVelSetを簡略化できます。　x方向,y方向 の順

[State 170, 無敵]
type = NotHitBy
trigger1 = 1 ;1にするといかなる条件でも有効で、0にするといかなる条件でも無効
value = SCA  ;※
time = 1

;---------------------------------------------------------------------------
; 勝利ポーズ分岐
; CNS レベル: 基本
;
;ここで勝利ポーズを選択する。　MatchOverは試合終了を判定するので、
;一回目と二回目勝利を別のポーズにしたい時に便利。

[Statedef 180]
type = S

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

[State 180,]
type = ChangeState
trigger1 = Time = 1
trigger1 = var(21) = 0
value = 181

[State 180,]
type = ChangeState
trigger1 = Time = 1
trigger1 = var(21) = 1
value = 182

;---------------------------------------------------------------------------
; 勝利ポーズ1
; CNS レベル: 基本

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

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

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Alive
value = s10,31
volume = 255

[State 181, 特殊効果]
type = AssertSpecial
trigger1 = time = [0,200]
flag = roundnotover

;---------------------------------------------------------------------------
; 勝利ポーズ2
; CNS レベル: 基本

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

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

[State 181,]
type = Posadd
trigger1 = AnimElem = 8
trigger2 = AnimElem = 9
x = -15

[State 181,]
type = Posadd
trigger1 = AnimElem = 10
x = -10

[State 181,]
type = Posadd
trigger1 = AnimElem = 11
x = -5

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 2
trigger1 = Alive
value = s10,30
volume = 255

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 13
trigger1 = Alive
value = 12,2

[State 700, エフェクト表示]
type = Explod
trigger1 = AnimElem = 13
anim = 184
postype = P1
pos = 0, 0
bindtime = -1
sprpriority = 5
ownpal = 1
scale = 1.3, 1.3

[State 181, 特殊効果]
type = AssertSpecial
trigger1 = time = [0,250]
flag = roundnotover

;---------------------------------------------------------------------------
; チーム戦用イントロ

;画面内へジャンプ
[Statedef 188]
type = A
movetype = I
physics = N
anim = 188
velset = 4.8,-1
ctrl = 0

[State 188, SB]
type = screenbound
trigger1 = 1
value = 0

[State 188, 1]
type = posadd
trigger1 = time = 0
y = -70
x = -100

[State 188, 2]
type = veladd
trigger1 = 1
y = .4

[State 188, AS]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 188, 3]
type = ChangeState
trigger1 = pos y >= 0 && vel y > 0
value = 189

; 着地
[Statedef 189]
type = S
movetype = I
physics = N
anim = 189
velset = 0,0
ctrl = 0

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

[State 189, AS]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191,]
type = PlaySnd
trigger1 = time = 0
value = s4,0

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

;---------------------------------------------------------------------------
; イントロ分岐
; CNS レベル: 基本
;
; ここでは変数(var)を使っていますが、詳しい説明は後ほど。
; VarRandomはrangeで指定された範囲からひとつを選ぶので、
; いろいろな分岐に便利です。

;イントロ選択
[Statedef 190]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 190,]
type = ChangeState
trigger1 = Time = 1
value = 191

[State 190,]
type = ChangeState
trigger1 = p2name = "Rock" | p4name = "Rock"
trigger2 = p2name = "cvsrock" | p4name = "cvsrock"
trigger3 = p2name = "Rock Howard" | p4name = "Rock Howard"
value = 192

[State 190,]
type = ChangeState
trigger1 = p2name = "Yukari Yakumo" | p4name = "Yukari Yakumo"
trigger2 = p2name = "Yukari_Yakumo" | p4name = "Yukari_Yakumo"
value = 193

;---------------------------------------------------------------------------
; イントロ（試合開始直前のアクション）
; CNS レベル: 基本

[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

[State 191, 特殊効果] ;「ROUND1, FIGHT!」のアナウンスが始まるまでは、このコントローラを使ってください
type = AssertSpecial
trigger1 = 1
flag = Intro ;イントロの状態になります

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 1
value = s10,32
volume = 255

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 2
value = s12,0

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

;---------------------------------------------------------------------------
; イントロ vs ロック関係

[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0

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

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 6
value = s10,19
volume = 255

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

;---------------------------------------------------------------------------
; イントロ vs 紫

[Statedef 193]
type = S
ctrl = 0
anim = 191
velset = 0,0

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

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 5
value = s10,33
volume = 255

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

;---------------------------------------------------------------------------
; 挑発
; CNS レベル: 基本
[Statedef 195]
type     = S
movetype = I
physics  = S
anim     = 195
velset   = 0,0
ctrl     = 0
sprpriority = 2 ;ここで表示優先度を決定できます。　範囲は-5〜5、大きいほど手前に表示される
facep2 = 1      ;相手の方を向いてから挑発（結構重要）

[State 195, コントロール可否]
type = CtrlSet
triggerall = !winko
trigger1 = Time = 51
value = 1

[State 181,]
type = PlaySnd
trigger1 = AnimElem = 4
value = s10,34
volume = 255

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

;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

[State -1, AI]
Type = ChangeState
triggerall = var(59) = 1
triggerall = teammode = single || teammode = turns
trigger1 = p2moveType = A
trigger1 = p2bodyDist X < 0
trigger1 = ctrl || stateno = 0
value = 130

;---------------------------------------------------------------------------
; Stand to Crouch
[Statedef 10]
type    = C
physics = C
anim = 10

[State 10, 1]
type = VelMul
trigger1 = Time = 0
x = 0

[State 10, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; Crouching
[Statedef 11]
type    = C
physics = C
anim = 11
sprpriority = 0

[State 11, 0]
type = VelSet
trigger1 = Time = 0
x = 0

[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = !var(59)
trigger1 = command = "holdfwd"
trigger2 = var(59)
trigger2 = (p2bodydist X >= 70 && vel x = 0 ) 
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = !var(59)
trigger1 = command = "holdback"
trigger2 = var(59)
trigger2 = (p2bodydist X < 70 && vel x = 0 ) 
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1
ctrl = 1

[State 100, 1]
type = VelSet
trigger1 = AnimElemtime(4) >= 0
x = const(velocity.run.fwd.x)

[State 191,]
type = PlaySnd
triggerall = time = 1
trigger1 = Alive
loop = 1
value = s5,0
channel = 6

[State 100,]
type = StopSnd
trigger1 = command != "holdfwd"
trigger2 = Anim != 100
channel = 6

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = ChangeState
TriggerAll = var(59) != 1
trigger1 = command != "holdfwd"
value = 101

[State -1,AI]
Type = ChangeState
TriggerAll = var(59) = 1
Trigger1 = time = 60
Trigger2 = P2BodyDist X <= 40
Trigger2 = P2BodyDist Y >= -120
Trigger2 = EnemyNear,MoveType != H
Trigger2 = EnemyNear,facing != facing || P2BodyDist X < 0
Trigger3 = EnemyNear,MoveType = A
Trigger3 = EnemyNear,facing != facing
Trigger4 =(EnemyNear,StateNo = [5100,5299]) || (EnemyNear,StateNo = [4400,4460])
Trigger4 = P2BodyDist X <= 60
Trigger5 = inguarddist
Trigger5 = EnemyNear,facing != facing
Trigger6 = Enemy,NumProj
value = 101
ctrl = 1

[State -1,AI]
Type = ChangeState
TriggerAll = var(59) = 1
TriggerAll = RoundState = 3
TriggerAll = StateType != A
TriggerAll = StateNo = 100
TriggerAll = EnemyNear,StateType != A
Trigger1 = P2BodyDist X <= 50
Trigger2 = Pos X = [-15,15]
value = 101
ctrl = 1

;---------------------------------------------------------------------------
; RUN_FWD STOP
[Statedef 101]
type    = S
physics = S
anim = 101
sprpriority = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = 0

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

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State 191,]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = Alive
value = s5,1

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[State 105, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106

;---------------------------------------------------------------------------
; RUN_BACK2 (land)
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 47

[State 191,]
type = PlaySnd
triggerall = AnimElem = 1
trigger1 = Alive
value = s4,0

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

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

[State 106, 3]
type = MakeDust
trigger1 = Time = 2
pos = -5,-2
spacing = 1

[State 106, 4]
type = ChangeState
trigger1 = Time = 7
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 40, 1]
type = VarSet
trigger1 = time = 0
var(4) = 0

[State 40, 1];小ジャンプ
type = VarSet
trigger1 = !var(59)
trigger1 = command != "holdup"
trigger2 = var(59)
trigger2 = P2BodyDist X <= 80
var(4) = 1

[State 40, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = !var(59)
trigger1 = command = "holdfwd"
trigger2 = var(59)
trigger2 = Random <= 900
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = !var(59)
trigger1 = command = "holdback"
trigger2 = var(59)
trigger2 = EnemyNear,StateType = S
trigger2 = P2MoveType != H
trigger2 = Random <= 20
sysvar(1) = -1

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = Var(4) = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 4];小ジャンプ
type = VelSet
trigger1 = AnimTime = 0
trigger1 = Var(4) = 1
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = -6

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

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

;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A

[State 50, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 191,]
type = PlaySnd
triggerall = time = 0
triggerall = Var(3) != 0
trigger1 = Alive
value = s3,1
channel = 4

[State 191,]
type = PlaySnd
triggerall = time = 0
triggerall = Var(3) = 0
trigger1 = Alive
value = s3,0
channel = 4

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
;trigger1 = Var(4) = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, 2];小ジャンプ
type = null;ChangeAnim
trigger1 = Time = 0
trigger1 = Var(4) = 1
value = 49

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type    = S
physics = S
ctrl = 0
anim = 47
veladd = 0,0

[State 191,]
type = PlaySnd
trigger1 = Time = 0
value = s4,0

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

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

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

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

;---------------------------------------------------------------------------
;ふっとばし
[Statedef 300]
type     = S
movetype = A
physics  = S
juggle   = ifelse(var(12),31,8)
poweradd = 0
ctrl     = 0
velset   = 0,0
anim     = 300
sprpriority = 3

[state 300,]
type = Posset
trigger1 = time = 0
y = 0

[state 300,]
type = Velset
trigger1 = AnimElem = 3
x = 2

[State 300 , 1]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Hard
damage    = 100
priority = 5
pausetime = 12,12
sparkno = s10010
guard.sparkno = s10110
sparkxy = -20,-60
hitsound = s1,4
hitflag = MAF
guardflag = MA
guardsound = s2,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -5,-5
air.velocity = -5,-5
air.animtype = Back
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
getpower = 150,150
givepower = 75,75

[State 300, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 3
value = s0,4

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

;---------------------------------------------------------------------------
;ガードキャンセルふっとばし
[Statedef 305]
type     = S
movetype = A
physics  = S
juggle   = ifelse(var(12),31,8)
poweradd = 0
ctrl     = 0
velset   = 0,0
anim     = 300
sprpriority = 3

[State 300,]
type = PowerAdd
trigger1 = time = 0
value = -1000

[State 300,]
type = NotHitBy
trigger1 = 1
value = SCA

[state 300,]
type = Posset
trigger1 = time = 0
y = 0

[state 300,]
type = Velset
trigger1 = AnimElem = 3
x = 2

[State 300,]
type = palfx
trigger1 = time = 0
time = 5
add = 230,230,230

[State 300,]
type = AfterImage
trigger1 = time = 0
time = 17
trans = add1
timegap = 2
framegap = 2
length = 5
palbright = 12,12,12
palcontrast = 220,220,220
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

[State 300, ヒット定義]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Diagup
damage    = 20
pausetime = 12,15
sparkno = s10010
sparkxy = -20,-60
hitsound   = s1,4
ground.type = High
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -5,-5
air.velocity = -5,-5
fall = 1
fall.recover = 0
kill = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 300, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 3
value = s0,4

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

;---------------------------------------------------------------------------
;空中ふっとばし
[Statedef 650]
type     = A
movetype = A
physics  = A
juggle   = 15
poweradd = 0
ctrl     = 0
anim     = 650
sprpriority = 3

[State 240 , 1]
type = HitDef
trigger1 = time = 0
attr = A, NA
animtype  = Hard
damage    = 100
priority = 5
pausetime = 12,12
sparkno = s10010
guard.sparkno = s10110
sparkxy = -20,-70
hitsound = s1,4
hitflag = MAF
guardflag = MA
guardsound = s2,0
ground.type = High
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -5,-5
air.velocity = -5,-5
air.animtype = Back
fall = 1
fall.recover = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0

[State 200, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 3
value = s0,4

;---------------------------------------------------------------------------
;緊急回避前

[Statedef 700]
type     = S
movetype = I
physics  = S
velset   = 0,0
anim     = 700
ctrl     = 0
sprpriority = -2

[State 700,]
type = Poweradd
triggerall = time = 0
trigger1 = prevstateno = 150
trigger2 = prevstateno = 151
value = -1000

[State 700,];点滅
type = palfx
triggerall = time = 0
trigger1 = prevstateno = 150
trigger2 = prevstateno = 151
time = 5
add = 230,230,230

[State 200, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 2
value = s10, 1
channel = 10
volume = 255

[State 2100, 残像]
type = AfterImage
trigger1 = AnimElem = 2
time = 19
length = 6      ;残像の表示時間
timegap = 3     ;時間差
framegap = 3    ;フレーム差
palbright = 1, 1, 1
palcontrast = 128, 128, 128
paladd = 0, 0, 0
palmul = 1, 1, 1
trans = Add1

[State 2100, 非無敵] ;地上投げ属性は回避できない
type = HitBy
trigger1 = AnimElem = 7, <= 0
value = SC, NT, ST, HT    ;立S、屈C、空A , 通常N、必殺S、超必H ＋ 攻撃A、投げT、飛び道具Pで記述

[State 2100, 移動量]
type = VelSet
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(6) < 0
x = 5

[State 2100, 移動終了]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 2100, 相手と重なった場合]
type = PlayerPush
trigger1 = AnimElemTime(1) > 0
value = 0

[State 2100, 終了]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;緊急回避後

[Statedef 710]
type     = S
movetype = I
physics  = S
velset   = 0,0
anim     = 710
ctrl     = 0
sprpriority = -2

[State 700,]
type = Poweradd
triggerall = time = 0
trigger1 = prevstateno = 150
trigger2 = prevstateno = 151
value = -1000

[State 700,];点滅
type = palfx
triggerall = time = 0
trigger1 = prevstateno = 150
trigger2 = prevstateno = 151
time = 5
add = 230,230,230

[State 200, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 2
value = s10, 1
channel = 10
volume = 255

[State 2110, 残像]
type = AfterImage
trigger1 = AnimElem = 2
time = 19
length = 6
timeGap = 3
frameGap = 3
palBright = 0, 0, 0
palContrast = 128, 128, 128
palAdd = 0, 0, 0
palMul = 1, 1, 1	
trans = Add1

[State 2110, 非無敵]
type = HitBy
trigger1 = AnimElem = 7, <= 0
value = SC, NT, ST, HT

[State 2110, 移動量]
type = VelSet
trigger1 = AnimElemTime(2) > 0 && AnimElemTime(6) < 0
x = -5

[State 2110, 移動終了]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 2110, 相手と重なった時の処理]
type = PlayerPush
trigger1 = AnimElemTime(1) > 0
value = 0

[State 2110, 終了]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;パワー溜め
[Statedef 750]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0,0
anim = 750
sprpriority = 3

[State 750, 1]
type = PowerAdd
trigger1 = Time >= 7
value = 6

[State 750, 2]
type = PlaySnd
trigger1 = Time = 7
value = s8,0
channel = 0

[State 750, 3]
type = PlaySnd
trigger1 = Time = 7
value = s10,3
channel = 10
volume = 255

[State 750, 4]
type = Explod
trigger1 = Time = 7
ignorehitpause = 1
anim = 755
id = 755
pos= 0,0
postype = P1
removetime = 9999
bindtime = -1
supermove = 10
sprpriority = 5
removeongethit = 1
ownpal = 1

[State 750, 5]
type = ChangeState
triggerall = !var(59)
triggerall = Time >= 7
trigger1 = Command != "holdx"
trigger2 = Command != "holdy"
trigger3 = Command != "holda"
value = 751
ctrl = 0

[State 704, 7]
type = ChangeState
triggerall = Power >= PowerMax
trigger1 = Command = "holdx"
trigger1 = Command = "holdy"
trigger1 = Command = "holda"
value = 751
ctrl = 0

[State 704, 8]
type = ChangeState
triggerall = Time >= 7
triggerall = var(59)
trigger1 = P2bodydist X = [-5,200]
trigger1 = EnemyNear(var(58)),MoveType = A
trigger2 = P2bodydist X = [-5,60]
trigger2 = EnemyNear(var(58)),statetype != L
trigger3 = Power >= PowerMax
trigger4 = win
trigger5 = Enemy,numproj
trigger6 = inguarddist
trigger7 = roundstate = 3
trigger8 = Time >= 60
trigger8 = EnemyNear(var(58)),statetype != L
trigger8 = EnemyNear(var(58)),movetype != H
trigger8 = random <= 5
value = 751
ctrl = 0

;+++++++++++++++++++++++++++++++++++++++++++
; CHARGE OVER
[Statedef 751]
type = S
movetype = I
physics = S
anim = 751
ctrl = 0

[State 751, 1]
type = StopSnd
trigger1 = Time = 0
channel = 0
value = s8,0

[State 705, 3]
type = RemoveExplod
trigger1 = Time = 0
id = 755

[State 705, Ctrl]
type = CtrlSet 
trigger1 = Time = 2
value = 1

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

;---------------------------------------------------------------------------
; MAX発動
[Statedef 900]
type = S
ctrl = 0
anim = 900
velset = 0,0
movetype = I
physics = N
sprpriority = 1
poweradd = -1000

;---------------------[効果音]
[State 00];
type = PlaySnd
trigger1 = animelem = 3
value = 8,1

;---------------------[変数]
[state a]
type = varset
trigger1 = time = 0
v = 40
value = 900

;---------------------[演出]
[State 707, 3]
type = Explod
trigger1 = AnimElem = 6 
ignorehitpause = 1
anim = 905
id = 905
pos= 0,0
postype = P1
removetime = 16
supermove = 10
sprpriority = 2
ownpal = 1

[State 1020, 4]
type = EnvShake
trigger1 = animelem = 3
time = 10
ampl = -5
freq = 95
phase = 95

;---------------------[ステート移行]
[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; クイックMAX
[Statedef 901]
type = S
ctrl = 0
anim = 901
velset = 0,0
movetype = I
physics = N
sprpriority = 1
poweradd = -2000

;---------------------[効果音]
[State 00];
type = PlaySnd
trigger1 = time = 0
value = 8,1

;---------------------[変数]
[state a]
type = varset
trigger1 = time = 0
v = 40
value = 900

;---------------------[演出]


;---------------------[ステート移行]
[State 195, 2]
type = ChangeState
triggerall = var(59) = 1
trigger1 = Time = 0
trigger1 = enemynear(var(58)),statetype = C
value = 99
ctrl = 0

[State 195, 2]
type = ChangeState
triggerall = var(59) = 1
trigger1 = Time = 0
value = 34
ctrl = 0

[State 195, 2]
type = ChangeState
triggerall = var(59) != 1
trigger1 = Time = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;受身

[Statedef 52000]
type     = S
movetype = I
physics  = S
velset   = 0,0
anim     = 5200
ctrl     = 0
sprpriority = 2

[State 5200]
type = Posset
trigger1 = time = 0
y = 0

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

[State 750, 3]
type = PlaySnd
trigger1 = Time = 0
value = s10,12
channel = 10
volume = 255

[State 2110,AI]
type = Varset
TriggerAll = var(59) >= 1
TriggerAll = time = 0
Trigger1 = BackEdgeBodyDist <= 15
Trigger1 = P2BodyDist X < 60
Trigger2 = P2Dist X < 0
Trigger3 =!EnemyNear(var(58)),Ctrl
Trigger3 = EnemyNear(var(58)),AnimTime < -31
var(6) = 1

[State 2110, ]
type = Varset
triggerall = var(59) <= 0
trigger1 = time = 0
trigger1 = command = "holdfwd"
var(6) = 1

[State 2110, ]
type = Varset
trigger1 = Animtime = 0
var(6) = 0

[State 2110, 移動量]
type = VelSet
trigger1 = AnimElem = 1
x = -7

[state 300,]
type = Veladd
triggerall = var(6) = 0
trigger1 = AnimElemtime(2) >= 0 && AnimElemtime(4) <= 0
x = .02

[State 2110, 移動量]
type = VelSet
triggerall = var(6) = 1
trigger1 = AnimElemtime(1) >= 0 && AnimElemtime(6) <= 0
x = 7

[State 2110, ]
type = ChangeAnim
triggerall = var(6) = 1
trigger1 = time = 0
value = 52000

[State 2110, 移動終了]
type = VelSet
triggerall = var(6) = 0
trigger1 = AnimElem = 6
x = 0

[State 2110, 移動終了]
type = VelSet
triggerall = var(6) = 1
trigger1 = AnimElem = 7
x = 0

[State 2110, 相手と重なった時の処理]
type = PlayerPush
trigger1 = AnimElemTime(1) > 0
value = 0

[State 2110, 終了]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

----------------------------------------------------------------------


;この下、一行以上空ける事！
