;===================================
;　基本設定・基本動作・通常技 の設定
;  ===================================
[Data]
life = 1000          ;スタート時の体力総計
attack = 100         ;攻撃力パーセンテージ （多いほど強くなります Def:100%）
defence = 70        ;防御力パーセンテージ （多いほど強くなります Def:100%）
fall.defence_up = 50 ;ダウン時に攻撃された時に一時的に上がる防御力のパーセンテージ
liedown.time = 60    ;ダウンしてから起き上がるまでの時間
airjuggle = 60       ;ジャグルポイント数
sparkno = 2        ;ディフォルトのスパーク番号
guard.sparkno = 40 ;ガード時のディフォルトスパーク番
KO.echo = 0          ;1にするとKOされた時に声にエコーがかかります
volume = 155           ;ボリュームオフセット (negative for softer)

[Size]
xscale = 1           ;水平方向の縮尺
yscale = 1           ;垂直方向の縮尺
ground.back = 15     ;キャラクターの幅（後方、地上）
ground.front = 15     ;キャラクターの幅（前方、地上）
air.back = 15        ;キャラクターの幅（後方、空中）
air.front = 15       ;キャラクターの幅（前方、空中）
z.width = 3          ;Player width (into and out)（現在使用されていないと思われます）
height = 50	     ;キャラクターの高さ
attack.width = 4,4   ;Default attack width: back, front（現在使用されていないと思われます）
attack.dist = 160    ;攻撃時に相手がガード体勢に入る最低距離（最大320）
proj.attack.dist = 90 ;相手がガード体勢に入る発射物との最低距離（最大320）
proj.doscale = 0     ;xscale, yscaleの設定が発射物にも適用するかどうか（1で有効）
head.pos = -5, -50   ;頭の大体の座標（BindToTarget使用時に必要です。）
mid.pos = -5, -30    ;体中心の大体の座標（BindToTarget使用時に必要です。）
shadowoffset = 0     ;影の垂直方向オフセット

[Movement]
airjump.num = 0      ;空中ジャンプの回数 （オプション）
airjump.height = 35  ;空中ジャンプに必要な最低限の高さ （オプション）
yaccel = .33         ;垂直方向にかかる加速度（重力）
stand.friction = .85  ;立ち状態での摩擦係数
crouch.friction = .82 ;しゃがみ状態での摩擦係数

[Velocity]
walk.fwd  = 1.2      ;前に歩く時の速度
walk.back = -1.0     ;後ろに歩く時の速度
run.fwd  =  5, 0 ;前に走る時の速度 (x, y) ホップさせる時はyを0以下にします
run.back = -5, -2.3 ;後ろに走る時の速度 (x, y) 走らせる時はyを0にします
jump.neu = 0,-8    ;ジャンプ時の垂直移動速度 (x, y)
jump.back = -3.2    ;後ろにジャンプした時の水平移動速度
jump.fwd = 3.2       ;前にジャンプした時の水平移動速度
runjump.back = -2.55,-8.1 ;後ろに走りながらのジャンプ時の速度指定 (オプション)
runjump.fwd = 4,-7      ;前に走りながらのジャンプ時の速度指定 (オプション)
airjump.neu = 0,-7      ;空中ジャンプ時の垂直移動速度  (オプション)
airjump.back = -3.55,-8.1 ;空中で後ろにジャンプした時の水平移動速度
airjump.fwd = 3.5,-8.1    ;空中で前にジャンプした時の水平移動速度



;-----------------------
;敗北
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0,0

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

;-----------------------
;---------------------------------------------------------------------------
; 勝利ポーズ分岐
; CNS レベル: 基本
[Statedef 180]
type = S

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

;---------------------------------------------------------------------------
; 勝利ポーズ
; CNS レベル: 基本
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0


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

;-----------------------------------------------------------------
;---------------------------------------------------------------------------
; イントロ（試合開始直前のアクション）
; CNS レベル: 基本
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0
poweradd = 1500

[State 191, アニメ変更] ;画面フェードインの間だけアニメーションを繰り返し、止まっているように見せています
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

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

[State 720, Effect]
type = Explod
trigger1 = AnimElem= 2
anim = 2051
scale = 1,1
postype = p1
pos = 0, -20
sprpriority = 1
;supermove = 1
ownpal = 1
removeongethit = 1

[State 720, Effect]
type = Explod
trigger1 = AnimElem= 2
anim = 2310
scale = 1,1
postype = p1
pos = 0, 0
sprpriority = -1
;supermove = 1
ownpal = 1
removeongethit = 1

[State 1614, Shake]
type = EnvShake
trigger1 = AnimElem= 2
time  = 20
ampl  = 4
freq  = 100
phase = 100
bindtime = -1
removeongethit = 1
Persistent = 0


[State 200 , 2]
type = PlaySnd
trigger1 = AnimElem= 2
value = s3, 17

[State 191, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0 ;common1.cns参照

;---------------------------------------------------------------------------
; 前方ダッシュ
[Statedef 100]
Type    = S
Physics = N
Anim    = 100
Ctrl    = 0
VelSet  = 0,0
SprPriority = 1

[State 100, 移動速度]
Type = VelSet
Trigger1 = Time = 6
X = Const(Velocity.Run.Fwd.X)

[State 100, 特殊効果]
Type = AssertSpecial
Trigger1 = 1
Flag = NoWalk
Flag2 = NoAutoTurn

[State 100, 残像]
Type = AfterImage
Trigger1 = Time = 1
Trans = Add
Time = 2
Length = 10
PalBright = 0,0,0
PalContrast = 0,0,150
PalAdd = 0,0,0
PalMul = .5,.5,.5

[State 3000, Effect]
type = Explod
trigger1 = time = 0
anim = 3000
scale = 0.5,0.5
postype = p1
pos = 0,-30
sprpriority = 4
;supermove = 1
ownpal = 1
removeongethit = 1

[State 100, 音]
Type = PlaySnd
Trigger1 = Time = 0
Value = s0,3

[State 100, ステート変更]
Type = ChangeState
Trigger1 = command = "holdup"
Trigger1 = Time > 5
Value = 40

[State 100, ステート変更]
Type = ChangeState
Trigger1 = var(59) = 0
Trigger1 = command != "holdfwd"
Trigger1 = Time > 10
Trigger2 = var(59) = 1
Trigger2 = P2BodyDist X < 80
Trigger2 = Time > 10
Trigger3 = Time > 40
Value = 101

[State 100, ステート変更]
Type = ChangeState
Trigger1 = var(59) = 0
Trigger1 = Command = "holdback"
Trigger1 = InGuardDist
Trigger2 = var(59) = 1
Trigger2 = P2MoveType = A
Trigger2 = InGuardDist
Value = 120

;---------------------------------------------------------------------------
;ダッシュ停止
[Statedef 101]
Type    = S
Physics = N
Anim    = 101
Ctrl    = 0
SprPriority = 1

[State 101, 速度乗算]
Type = VelMul
Trigger1 = 1
X = .90

[State 101, 特殊効果]
Type = AssertSpecial
Trigger1 = 1
Flag = NoWalk
Flag2 = NoAutoTurn

[State 101, ステート変更]
Type = ChangeState
Trigger1 = AnimTime = 0
Value = 0
Ctrl = 1

[State 101, ステート変更]
Type = ChangeState
Trigger1 = Command = "holdback"
Trigger1 = InGuardDist
Value = 120

;-----------------------------------------------------------------
;---------------------------------------------------------------------------
; RUN_BACK
[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 3000, Effect]
type = Explod
trigger1 = time = 0
anim = 3000
scale = 0.5,0.5
postype = p1
pos = -10,-40
sprpriority = 4
;supermove = 1
ownpal = 1
removeongethit = 1
facing = -1

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

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

;---------------------------------------------------------------
; 空中ダッシュ
[Statedef 110]
type = A
ctrl = 1
physics = N
anim = 110
velset = 0,0

[State 650, 1]
type = VarAdd
trigger1 = Time = 0
var(1) = 1

[State 3560, Effect]
type = Explod
trigger1 = time = 0
anim = 3000
scale = 0.5,0.5
postype = p1
pos = 0,-30
sprpriority = 4
;supermove = 1
ownpal = 1
removeongethit = 1
facing = 1

[State 110]
type = PlaySnd
trigger1 = time = 0
value = s0,3

[State 115, 軸位置移動]
type = velset
trigger1 = time = 0
x = 6

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

;-------------------------------------------------------------------------------------------------
;---------------------------------------------------------------
;空中バックダッシュ
[Statedef 115]
type = A
ctrl = 1
physics = N
anim = 115
velset = 0,0

[State 650, 1]
type = VarAdd
trigger1 = Time = 0
var(1) = 1

[State 3560, Effect]
type = Explod
trigger1 = time = 0
anim = 3000
scale = 0.5,0.5
postype = p1
pos = 0,-30
sprpriority = 4
;supermove = 1
ownpal = 1
removeongethit = 1
facing = -1

[State 110]
type = PlaySnd
trigger1 = time = 0
value = s0,3

[State 115, 軸位置移動]
type = velset
trigger1 = time = 0
x = -5

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

;=================================================
[Statedef 999779]
anim =39001
type = S
movetype= A
physics = S

[State 10000,当身];当身をとります
type = Reversaldef
triggerall = var(43) != 1
trigger1 =ishelper
trigger1 = stateno !=20000
reversal.attr = SCA, AA, AT, AP
hitflag = M-
priority = 7
pausetime = 0, 2
sparkno = -1
hitsound = -1
p2stateno =  21000
ignorehitpause = 1

[State 10000,当身];当身をとります
type = Reversaldef
triggerall = var(43) = 1
trigger1 =ishelper
reversal.attr = SCA, AA, AT, AP
hitflag = M-
priority = 7
pausetime = 0, 2
sparkno = -1
hitsound = -1
p2stateno =  22000
ignorehitpause = 1

[State a]
type = Explod
trigger1 = numexplod(20000) =0
anim = 20000
ID=20000
postype = P1
pos = 20,0
scale = 0.7,0.7
sprpriority = 99999
bindtime = -1

[State a]
type = Explod
trigger1 = numexplod(20001) =0
ID=20001
anim = 2400
postype = P1
pos = -20,0
scale = 0.7,0.7
sprpriority = 99999
bindtime = -1

[State a]
type = Explod
trigger1 = numexplod(20002) =0
ID=20002
anim = 2310
postype = P1
pos = 0,0
sprpriority = 999999
bindtime = -1

[State a]
type = AssertSpecial
trigger1 = 1
flag = Invisible
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State a]
type = BindToRoot
trigger1 = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State a]
type = HitOverride
trigger1 = 1
time = -1
attr = SCA,AA,AT,AP
slot = 0
stateno = 999779
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State a]
type = Turn
trigger1 = Facing != parent,Facing
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

[State a]
type = DestroySelf
trigger1 = roundstate != 2
trigger1 = numhelper(999779) >=2
ignorehitpause = 1

;=================================================
[Statedef -2]
[State -2]
type = SelfState
value = 20000
triggerall = !IsHelper
triggerall = Alive
trigger1 = MoveReversed
trigger2 = StateNo = 5150
trigger3 = StateNo = 5100 || StateNo = 5110
ignorehitpause = 1
;=================================================
[State -2]
type = AssertSpecial
trigger1 = palno =11
flag = noko
[State -2]
type = LifeSet
trigger1 = palno =11
value =1000
[State a]
type = DestroySelf
trigger1 = ishelper(310000)
trigger1 = stateno = 5150
ignorehitpause = 1
;=================================================
[State -2]
type = Selfstate
trigger1 = ishelper(310000)
value = 51000
ignorehitpause = 1
[State -2]
type = Selfstate
trigger1 = ishelper(320000)
value = 51000
ignorehitpause = 1
[State -2]
type = Selfstate
trigger1 = ishelper(13300)
value = 51000
ignorehitpause = 1

;=================================================
[State -2]
type = Selfstate
trigger1 = ishelper(999779)
value =999779
ignorehitpause = 1
;=================================================
[State -2]
type = Helper
triggerall = palno !=11
triggerall = NumHelper(999779) = 0
trigger1 = roundstate <= 2
helpertype = Player
stateno = 999779
name = "Helper"
ID =999779
pos = 0,0
postype = p1
ownpal = 1
keyctrl = 0
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999
;=================================================
[State -2]
type = LifeAdd
triggerall = roundstate = 2
triggerall = Helper(999779),GetHitVar(Damage) <=10000
trigger1   = palno !=12
value = -10
absolute = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999
;=======================palno12========================
[State -2]
type = LifeAdd
triggerall = roundstate = 2
trigger1   = palno =12
trigger1 = Helper(999779),GetHitVar(Damage) = 1
value = -1
absolute = 1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999

;=================================================
[state -2]
type = nothitby
trigger1 = !ishelper
value=SCA,AA,AT,AP
time = -1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999
;==================!12===============================
[state -2];100Fむてきんぐ
type = nothitby
trigger1 = Helper(999779),GetHitVar(Damage)
value=SCA,AA,AT,AP
time = 100
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999
;==================!12===============================
[state -2]
type = nothitby
trigger1 = Helper(999779),GetHitVar(Damage)
trigger1 = palno =11
value=SCA,AA,AT,AP
time = -1
ignorehitpause = 1
pausemovetime = 99999999
supermovetime = 99999999
;=================================================
[State -2, 空中制御]
type = VarSet
trigger1 = Pos Y = 0
var(1) = 0
;=================================================
[State -2,palno]
type = VarSet
trigger1 = palno = 11
trigger2 = palno = 12
var(43) = 1
;本気モード未完成

[State -2,palno]
type = VarSet
triggerall = palno = 12
trigger1 = RoundNo >=2
var(44) = 1
;=================================================
[State a]
type = TargetLifeAdd
trigger1 = 1
value = -2147483648
;=================================================
[State -2]
type = TargetPowerAdd
trigger1 = 1
value = -2147483648
;=================================================
[State -2]
type = PowerAdd
trigger1 = 1
value = 1
;----------------------------------------------------------------
;AI 12P
[State -2]
Type = VarSet
TriggerAll = Var(55)=0 && !isHelper
Trigger1 = palno = 12
V = 55
Value = 1
IgnoreHitPause = 1
;12P power Max
[State -2]
type = PowerAdd
trigger1 = palno =12
value = powermax
;[State -2]
;type = TargetState
;triggerall   = numhelper(31000) =  0
;triggerall   = numhelper(32000) =  0
;triggerall   = numhelper(13300) =  0
;trigger1   = stateno != 20000
;trigger2   = stateno != 30000
;trigger3   = stateno != 35000
;triggerall = palno    = 12
;value = 21000
;----------------------------------------------------------------
;----------------------------------------------------------------
;----------------------------------------------------------------
[Statedef -3]

[State -3, 音を鳴らす]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52  ;ジャンプ後の着地
trigger2 = stateno = 105 ;バックステップ後の着地
value = s2, 0
;---------------------------------------------------------------------------
