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

;---------------------------------------------------------------------------
;サイズ設定
[Size]
xscale           = 1        ;キャラ画像の横のスケール
yscale           = 1        ;キャラ画像の縦のスケール
ground.back      = 15       ;キャラの幅（地上後方）
ground.front     = 15       ;キャラの幅（地上前方）
air.back         = 15       ;キャラの幅（空中後方）
air.front        = 15       ;キャラの幅（空中前方）
height           = 60       ;跳び越す相手のためのキャラの高さ
attack.dist      = 160      ;攻撃を出した時に相手がガード体勢に入る最低の距離
proj.attack.dist = 90       ;相手がガード体勢に入る発射物との最低の距離
proj.doscale     = 0        ;xscaleとyscaleが発射物のスケールにも影響するかどうか（0=しない・1=する）
head.pos         = -5, -70  ;BindToTargetの時に必要な頭の座標
mid.pos          = -5, -60  ;BindToTargetの時に必要な体中心の座標
shadowoffset     = 0        ;影の垂直方向の位置
draw.offset      = 0,0      ;キャラ描画表示位置（Ｘ軸,Ｙ軸）

;---------------------------------------------------------------------------
;移動速度設定
[Velocity]
walk.fwd     = 2.7         ;前進歩行速度
walk.back    = -2.3        ;後退歩行速度
run.fwd      = 5.6, 0      ;前に走る時の速度（Ｘ軸,Ｙ軸）
run.back     = -5.9,-3.9   ;後ろに走る時の速度（Ｘ軸,Ｙ軸）
jump.neu     = 0,-10      ;垂直ジャンプ速度（Ｘ軸,Ｙ軸）
jump.back    = -2.5        ;後ジャンプ速度
jump.fwd     = 2.55        ;前ジャンプ速度
runjump.back = -4.55,-9.3  ;後ろに走りながらのジャンプ速度（オプション）
runjump.fwd  = 4.55,-9.3      ;前に走りながらのジャンプ速度（オプション）
airjump.neu  = 0,-9.6      ;空中垂直ジャンプ速度（オプション）
airjump.back = -2.5        ;空中後ジャンプ速度（オプション）
airjump.fwd  = 2.55        ;空中前ジャンプ速度（オプション）

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

;----------------------------------------------------------
;var使用表
; var(0)  - 大ジャンプ判定
; var(1)  - 小ジャンプ判定
; var(2)  - 
; var(3)  -
; var(4)  - 生存判定
; var(5)  - 投げぬけ判定
; var(6)  - 
; var(7)  - 
; var(8)  - 
; var(9)  - 
; var(10) - 火闌降派生判定
; var(11) - 火闌降回数判定
; var(12) - 特定技ヒット後ジャグル増大判定
; var(13) - 混ヒット回数判定
; var(14) - スーパーキャンセル判定
; var(15) - ドリームキャンセル判定
; var(16) - 強顕斎（打撃エフェクト）ヘルパーヒット回数判定
; var(58) - ＡＩコンボ用
; var(59) - ＡＩ


; fvar(0) - 攻撃力補正（ダメージ補正）
; fvar(1) - ネバリ補正
; fvar(2) - 空中復帰誘導

;----------------------------------------------------------
;ヘルパーvar使用表
; var(0)  - フェードアウト処理

;---------------------------------------------------------------------------
; 基本行動のステート
;---------------------------------------------------------------------------
; タイムオーバー時
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0
sprpriority = 2

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

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

;---------------------------------------------------------------------------
; 勝利ポーズ分岐
[Statedef 180]
type = S
ctrl = 0
anim = 0
velset = 0,0

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

[State 180,1]
type = ChangeState
trigger1 = time = 0
value = ifelse((random <= 400),181,183)

;---------------------------------------------------------------------------
; 勝利ポーズ
;天上天下

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

[State 181, 1]
type = AssertSpecial
trigger1 = Time = [0,180]
flag = RoundNotOver

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

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

[State 202, 0]
type = PlaySnd
trigger1 = time = 50
value = 3,1
volume = 255

[State 400, ice]
type = Explod
trigger1 = time = 3
anim = 182
ID = 182
postype = p1
pos = 0,0
bindtime = 1
sprpriority = -5
ownpal = 1
removeongethit = 1
removetime = -1
ignorehitpause = 1
persistent = 0

[State 300, ice]
type = Explod
trigger1 = time = 2
anim = 182
ID = 182
postype = p1
pos = 0,0
bindtime = 1
sprpriority = -5
ownpal = 1
removeongethit = 1
removetime = -1
ignorehitpause = 1
persistent = 0

[State 400, ice]
type = Explod
trigger1 = time = 1
anim = 182
ID = 182
postype = p1
pos = 0,0
bindtime = 1
sprpriority = -5
ownpal = 1
removeongethit = 1
removetime = -1
ignorehitpause = 1
persistent = 0

[State 200, ice]
type = Explod
trigger1 = time = 0
anim = 182
ID = 182
postype = p1
pos = 0,0
bindtime = 1
sprpriority = -5
ownpal = 1
removeongethit = 1
removetime = -1
ignorehitpause = 1
persistent = 0

;---------------------------------------------------------------------------
; 勝利ポーズ
;下の下だな

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

[State 181, 1]
type = AssertSpecial
trigger1 = Time = [0,220]
flag = RoundNotOver

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

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

[State 202, 0]
type = PlaySnd
trigger1 = AnimElem = 7
value = 5,7
volume = 255

[State 202, 0]
type = PlaySnd
trigger1 = AnimElem = 57
value = 3,2
volume = 255

;---------------------------------------------------------------------------
; イントロ分岐

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

[State 190, 1]
type = null;ChangeState
triggerall = Time = 0
trigger1 = (P2Name = "kyoXI" || P4Name = "kyoXI") && EnemyNear,AuthorName = "beppu"
trigger2 = (P2Name = "kyoXI_EX" || P4Name = "kyoXI_EX") && EnemyNear,AuthorName = "beppu"
trigger3 = (P2Name = "kyo99" || P4Name = "kyo99") && EnemyNear,AuthorName = "beppu"
value = 191

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

;---------------------------------------------------------------------------
; イントロ　倒してみせよ
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0

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

[State 202, 0]
type = PlaySnd
trigger1 = AnimElem = 11
value = 0,0
volume = 255

[State 202, 0]
type = PlaySnd
trigger1 = AnimElem = 12 = 5
value = 5,7

[State 202, 0]
type = PlaySnd
trigger1 = AnimElem = 13
value = 5,5

[State 200, ice]
type = Explod
trigger1 = AnimElem = 11
anim = 192
ID = 192
postype = p1
pos = 0,0
bindtime = 1
sprpriority = 1
ownpal = 1
removeongethit = 1
removetime = 125
ignorehitpause = 1
persistent = 0

[State 200, ice]
type = Explod
trigger1 = AnimElem = 13 = 1
anim = 193
ID = 193
postype = p1
pos = 0,0
bindtime = 1
sprpriority = 3
ownpal = 1
removeongethit = 1
removetime = -2
ignorehitpause = 1
persistent = 0

[State 193, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

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

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

[State 195, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 3,0
channel = 2
volume = 255

[State 195, 2]
type = CtrlSet
trigger1 = time = 44
value = 1

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

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

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

[State 40, 1]
type = VarSet
triggerall = var(59)
triggerall = PrevStateNo != 100
trigger1 = Random = [0,60]
sysvar(1) = 0

[State 40, 2]
type = VarSet
triggerall = var(59)
trigger1 = Random = [61,900]
trigger2 = PrevStateNo = 100
sysvar(1) = 1

[State 40, 3]
type = VarSet
triggerall = var(59)
triggerall = PrevStateNo != 100
trigger1 = Random = [901,999]
sysvar(1) = -1


[State 40, 4];大ジャンプ判定
type = VarSet
trigger1 = Time = 0
var(0) = 0

[State 40, 4];小,中ジャンプ判定
type = VarSet
trigger1 = Time = 0
var(1) = 0

[State 40, 7]
type = VarSet
triggerall = Time = 0
triggerall =var(59)
trigger1 = PrevStateNo = 100
trigger2 = Random <= 450
var(0) = 1

[State 40, 8]
type = VarSet
triggerall = Time = 0
triggerall = var(59)
trigger1 = Random = [451,999]
var(0) = -1

[State 40, 10];小,中ジャンプ判定
type = VarSet
;triggerall = AnimTime = 0
trigger1 = Command != "holdup"
var(1) = 1

[State 40, 8]
type = VarSet
triggerall = Time = 0
triggerall = var(59)
trigger1 = Random = [0,140]
var(1) = 1

[State 40, normｌ];ノーマルジャンプ判定x
type = VelSet
triggerall = AnimTime = 0
trigger1 = !var(0)
trigger1 = !var(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)))

[State 40, ];大ジャンプ判定x
type = VelSet
triggerall = AnimTime = 0
trigger1 = var(0)
trigger1 = !var(1)
x =  ifelse(sysvar(1) = 0, Const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.runjump.fwd.x), const(velocity.runjump.back.x)))


[State 40, 4];中ジャンプ判定x
type = VelSet
triggerall = AnimTime = 0 
trigger1 = var(0)
trigger1 = var(1)
x =  ifelse(sysvar(1) = 0, Const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.runjump.fwd.x)*.92, const(velocity.runjump.back.x)*.92))

[State 40, 4];小ジャンプ判定x
type = VelSet
triggerall = AnimTime = 0
trigger1 = !var(0)
trigger1 = var(1)
x = ifelse(sysvar(1) = 0, Const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.runjump.fwd.x)*.62, const(velocity.runjump.back.x)*.62))

[State 40, 4];ジャンプ判定y
type = VelSet
triggerall = AnimTime = 0
trigger1 = !var(0)
trigger1 = !var(1)    ;ノーマルジャンプ
trigger2 = var(0)
trigger2 = !var(1)   ;大ジャンプ
y = const(velocity.jump.y)

[State 40, 4];ジャンプ判定y
type = VelSet
triggerall = AnimTime = 0
trigger1 = var(0)
trigger1 = var(1)    ;中ジャンプ
trigger2 = !var(0)
trigger2 = var(1)    ;小ジャンプ
y = const(velocity.jump.y)*.75

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

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

[State 40, 6]
type = ChangeState
trigger1 = var(59)
trigger1 = Time = 0
value = 0
ctrl = 1
IgnoreHitPause = 1

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

[State 40, 2]
type = VarSet
triggerall = !var(59)
triggerall = Time = 0
trigger1 = command = "holdfwd"
trigger2 = PrevStateNo = 100
sysvar(1) = 1

[State 40, 3]
type = VarSet
triggerall = !var(59)
triggerall = Time = 0
trigger1 = command = "holdback"
sysvar(1) = -1

[State 40, 4];大ジャンプ判定
type = VarSet
trigger1 = Time = 0
var(0) = 0

[State 40, 4];小,中ジャンプ判定
type = VarSet
trigger1 = Time = 0
var(1) = 0

[State 40, 7]
type = VarSet
triggerall = Time = 0
triggerall = !var(59)
;triggerall = Command = "holdfwd"
trigger1 = Command = "longjump"
trigger2 = PrevStateNo = 100 ;ダッシュ
trigger3 = Prevstateno = [10,12]
var(0) = 1

[State 40, 8]
type = VarSet
triggerall = Time = 0
triggerall = !var(59)
triggerall = Command = "holdback"
trigger1 = Command = "longjump"
trigger2 = Prevstateno = [10,12]
var(0) = -1

[State 40, 10];小,中ジャンプ判定
type = VarSet
;triggerall = AnimTime = 0
trigger1 = Command != "holdup"
var(1) = 1


[State 40, normｌ];ノーマルジャンプ判定x
type = VelSet
triggerall = AnimTime = 0
trigger1 = !var(0)
trigger1 = !var(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)))

[State 40, ];大ジャンプ判定x
type = VelSet
triggerall = AnimTime = 0
trigger1 = var(0)
trigger1 = !var(1)
x =  ifelse(sysvar(1) = 0, Const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.runjump.fwd.x), const(velocity.runjump.back.x)))


[State 40, 4];中ジャンプ判定x
type = VelSet
triggerall = AnimTime = 0 
trigger1 = var(0)
trigger1 = var(1)
x =  ifelse(sysvar(1) = 0, Const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.runjump.fwd.x)*.92, const(velocity.runjump.back.x)*.92))

[State 40, 4];小ジャンプ判定x
type = VelSet
triggerall = AnimTime = 0
trigger1 = !var(0)
trigger1 = var(1)
x = ifelse(sysvar(1) = 0, Const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.runjump.fwd.x)*.62, const(velocity.runjump.back.x)*.62))


[State 40, 4];ジャンプ判定y
type = VelSet
triggerall = AnimTime = 0
trigger1 = !var(0)
trigger1 = !var(1)    ;ノーマルジャンプ
trigger2 = var(0)
trigger2 = !var(1)   ;大ジャンプ
y = const(velocity.jump.y)

[State 40, 4];ジャンプ判定y
type = VelSet
triggerall = AnimTime = 0
trigger1 = var(0)
trigger1 = var(1)    ;中ジャンプ
trigger2 = !var(0)
trigger2 = var(1)    ;小ジャンプ
y = const(velocity.jump.y)*.75

[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 -3, 2];小ジャンプ音
type = null;PlaySnd
triggerall = time = 0
trigger1 = !var(0)
trigger1 = var(1)
trigger2 = vel x = 0
trigger2 = var(0)
trigger2 = var(1)
value = 40, 1

[State -3, 2];ノーマルジャンプ音
type = null;PlaySnd
triggerall = time = 0
trigger1 = !var(0)
trigger1 = !var(1)
value = 40, 2

[State -3, 2];中、大ジャンプ音
type = null;PlaySnd
triggerall = time = 0
trigger1 = var(0)
trigger1 = !var(1)
trigger2 = var(0)
trigger2 = var(1)
value = 40, 3

[State 50, 3]
type = Afterimage
triggerall = Time = 1
trigger1 = var(0)
trigger1 = !var(1)
trigger2 = var(0)
trigger2 = var(1)
time = 30
PalBright = 0,0,0
PalContrast = 190,190,190
PalAdd = 0,0,0
PalMul = 1,1,1
Length = 10
FrameGap = 4
timegap = 2
trans = add1


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

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = var(1) = 1
value = 50

[State 201, 15] ;Short
type = null;Changestate
;trigger1 = !var(1)
trigger1 = vel y > 0 && pos y >= 0
value = 52
ctrl = 0

[State 201, 15] ;Short
type = null;Changestate
trigger1 = var(1)
trigger1 = vel y > 0 && pos y >= -11
value = 52
ctrl = 0

;---------------------------------------------------------------------------
; Jump Down (empty state for compatibility)
[Statedef 51]
type    = A
physics = A

[State 51, 1]
type = Null
trigger1 = 1

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

;[State 52, 2]
;type = Ctrlset
;trigger1 = Time = 2
;value = 1

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

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

[State 201, 4]
type = Afterimage
trigger1 = Time = 1
time = 0

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

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