; 教材用カンフーマン（ちょっとこ丸版）のコンスタンツファイルです。
;===========================================================================
; コンスタンツ（定数）
;===========================================================================
;---------------------------------------------------------------------------
; ここがキャラの心臓部とも言うべき場所。
; １キャラ単位のライフや大きさなど、標準のステータスを予め決めておく部分。
; このコーナー自体省略出来ません。
;---------------------------------------------------------------------------
; 基本データ
;---------------------------------------------------------------------------
[Data]
life              = 1500   ;ライフ（体力ゲージ）最大値
power             = 3000   ;パワーゲージ最大値
attack            = 100    ;攻撃力（デフォルトは１００％）
defence           = 100    ;防御力（デフォルトは１００％）
fall.defence_up   = 100     ;横に倒れている時に一時的に加える防御力（％）
liedown.time      = 0     ;横に倒れている時間（フレーム）
airjuggle         = 15     ;ジャグルポイント限界値（「小ネタ.txt」参照）
sparkno           = 2      ;デフォルトのヒットスパーク（fightfxから）
guard.sparkno     = 40     ;デフォルトのガードスパーク（fightfxから）
KO.echo           = 0      ;ＫＯ時の音声（11,0）にエコーを掛けるか否か（0=掛けない,1=掛ける）
volume            = 0      ;キャラの標準の音量（最小-255・最大255）
IntPersistIndex = 59       ;次のラウンドへ持ち越せる「Var」のアドレスの範囲を決める（※１）
FloatPersistIndex = 39  ;次のラウンドへ持ち越せる「FVar」のアドレスの範囲を決める（※１）

;---------------------------------------------------------------------------
; ※１：変数のラウンド持ち越し方法
;
; 　変数を次のラウンドへ持ち越したい場合は、↑の
; 　「IntPersistIndex」と「FloatPersistIndex」を使う。
; 　そのやり方はM.U.G.E.Nの説明書にすら載ってないので、ここで例を元に解説。
;
; 　①IntPersistIndex = 23　（Var(23)～Var(59)までを全て次のラウンドへ持ち越せる）
; 　②FloatPersistIndex = 18（FVar(18)～FVar(39)までを全て次のラウンドへ持ち越せる）
;
; 　つまり「Var(**)（Fvar(**)）以降全ての変数を持ち越す」という命令になる。
; 　それ以前のアドレスの変数は全て持ち越さなくなる。
;
; 　全ての変数を持ち越さない場合は、
; 　IntPersistIndexは60以上、FloatPersistIndexは40以上にしておこう。
;
; 　×これはダメ×
; 　　①IntPersistIndex = 10,15,20,25　（15,20,25の部分は意味無し）
; 　　②FloatPersistIndex = 4,16 　　　（16の部分は意味無し）
; 　　これらは最初の数字以外全て無効。
; 
; 　なお、現在kfmcはIntPersistIndexを0にしているので、
;　『全ての「Var」を次のラウンドに持ち越せる』ようになってます。
;---------------------------------------------------------------------------
; 改訂前の和訳ＫＦＭではPersistIndexの解釈が無茶苦茶間違ってました。
; 大変失礼致しました。(人・ω・｀)ごめんなさい
; 今回はちゃんと調べて正確な情報を載せてるんで安心してください（苦笑
;---------------------------------------------------------------------------
; サイズ
;---------------------------------------------------------------------------
[Size]
xscale           = 0.5       ;キャラの横の大きさ（絶対値・float）
yscale           = 0.5       ;キャラの縦の大きさ（絶対値・float）
ground.back      = 20       ;地上にいる時の「後方の物理的な幅」
ground.front     = 20       ;地上にいる時の「前方の物理的な幅」
air.back         = 20      ;空中にいる時の「後方の物理的な幅」
air.front        = 20      ;空中にいる時の「前方の物理的な幅」
height           = 110      ;キャラの物理的な高さ（高いほど相手は飛び越しにくくなる）
attack.dist      = 1000     ;相手がガード態勢に入る最低の距離
proj.attack.dist = 1000      ;自分の「Projectile」に対して相手がガード態勢に入る最低の距離
proj.doscale     = 0       ;xscaleとyscaleを「Projectile」にも影響させるか否か（0=させない・1=させる）
head.pos         = 15,-100  ;キャラの標準の頭の座標（Bind系で適用される）
mid.pos          = 5,-70  ;キャラの標準の体中心の座標（Bind系で適用される）
shadowoffset     = 0       ;影のＹ軸方向の位置座標
draw.offset      = 0,0     ;キャラの表示座標（Ｘ軸,Ｙ軸）

;---------------------------------------------------------------------------
; 移動速度
;---------------------------------------------------------------------------
[Velocity]
walk.fwd     = 2.4         ;前進速度（Ｘ軸・[Statedef 20]に適用される）
walk.back    = -2.2        ;後退速度（Ｘ軸・[Statedef 20]に適用される）
run.fwd      = 9.5,0       ;前方に走る速度（Ｘ軸,Ｙ軸・[Statedef 100]に適用される）
run.back     = -6.5,-3.8   ;後方に走る速度（Ｘ軸,Ｙ軸・[Statedef 105]に適用される）
jump.neu     = 0,-12      ;垂直ジャンプの速度（Ｘ軸,Ｙ軸・[Statedef 40]に適用される）
jump.back    = -3       ;後方ジャンプの速度（Ｘ軸・[Statedef 40]に適用される）
jump.fwd     = 3         ;前方ジャンプの速度（Ｘ軸・[Statedef 40]に適用される）
runjump.back = -2.55,-8.1  ;後方に走ってからのジャンプ速度（Ｘ軸,Ｙ軸・[Statedef 40]に適用される）
runjump.fwd  = 5,-7.0      ;前方に走ってからのジャンプ速度（Ｘ軸,Ｙ軸・[Statedef 40]に適用される）
airjump.neu  = 0,-8.1      ;空中垂直ジャンプ速度（Ｘ軸,Ｙ軸・[Statedef 45]に適用される）
airjump.back = -2.55       ;空中後方ジャンプ速度（Ｘ軸・[Statedef 45]に適用される）
airjump.fwd  = 2.5         ;空中前方ジャンプ速度（Ｘ軸・[Statedef 45]に適用される）

;---------------------------------------------------------------------------
; 運動関係
;---------------------------------------------------------------------------
[Movement]
airjump.num     = 0        ;空中ジャンプが出来る回数
airjump.height  = 35       ;空中ジャンプが出来る最低の高度（Ｙ軸）
yaccel          = .74      ;Ｙ軸加速度（重力）
stand.friction  = .60      ;立っている時の摩擦係数（ステートのPhysicsが「S」の時）
crouch.friction = .60      ;しゃがんでいる時の摩擦係数（ステートのPhysicsが「C」の時）

[Statedef 0]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State -2,コントロール可否]
type = Ctrlset
triggerall = !ishelper
trigger1 = (enemynear,name = "W-Reimu"&&enemy,palno=12&&palno=12)
value = 0
ignorehitpause = 1

[State 0, アニメ変更]
type = Changeanim
triggerall = !ishelper
triggerall = palno = 12
trigger1 = anim != 707
value = 707
ignorehitpause = 1

[State 0, アニメ変更]
type = Changeanim
triggerall = !ishelper
triggerall = palno != 12
triggerall = var(3)
trigger1 = anim != 707
value = 707
ignorehitpause = 1

[State 0, アニメ変更]
type = Changeanim
triggerall = !ishelper
triggerall = palno != 12
triggerall = !var(3)
trigger1 = anim != 0
value = 0
ignorehitpause = 1

[State -2,コントロール可否]
type = Ctrlset
triggerall = !ishelper
triggerall = !(enemynear,name = "W-Reimu"&&enemy,palno=12&&palno=12)
trigger1 = RoundState = 2
value = 1
ignorehitpause = 1

[State 52, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 0, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 0
ignorehitpause = 1


[State 105, 移動速度]
type = VelSet
trigger1 = alive
x = 0
y = 0

[State 0,死]
type = Changestate
trigger1 = !alive
value = 5050
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 10]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 10, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 10
value = 10
ignorehitpause = 1

[State 10, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = C
movetype = I
physics = C
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 11]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 11, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 11
value = 11
ignorehitpause = 1

[State 11, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = C
movetype = I
physics = C
ignorehitpause = 1

[State 11, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 11, 1] ;Change from turning animation
type = ChangeAnim
triggerall = !ishelper
trigger1 = Anim = 6 && AnimTime = 0
trigger2 = anim = 15
value = 11
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 12]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 11, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 12
value = 12
ignorehitpause = 1

[State 12, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 12, 1]
type = Changestate
triggerall = !ishelper
trigger1 = 1
value = 0
ctrl = 1
ignorehitpause = 1

[State 12, 1]
type = Changeanim
triggerall = !ishelper
trigger1 = 1
value = 0
ctrl = 1
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1
[Statedef 20]
type    = S
physics = S
sprpriority = 0
movehitpersist = 1
hitdefpersist = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 20, 移動速度] ;前進する速度
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)*ifelse(palno = 12,3,1) ;定数で設定した速度
ignorehitpause = 1

[State 20, 移動速度] ;後退する速度
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x) ;定数で設定した速度
ignorehitpause = 1

[State 20, 移動速度] 
type = VelSet
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
x = 0
ignorehitpause = 1


[State 20, アニメ変更] ;前進するアニメに変更
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20
ignorehitpause = 1

[State 20, アニメ変更] ;後退するアニメに変更
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21
ignorehitpause = 1

[State 20, ステート変更]
type = Changestate
triggerall = !ishelper
triggerall = vel x = 0
trigger1 = command != "holdfwd"
trigger1 = command != "holdback"
value = 0
ctrl = 1
ignorehitpause = 1

[State 0, アニメ変更]
type = Changestate
triggerall = !ishelper
trigger1 = anim = 5
value = 0
ignorehitpause = 1

[State 20, 被弾用ヘルパー]
type = null;Helper
trigger1 = numhelper(22) = 0
ID = 22
name = "hidan"
helpertype = player
postype = p1
pos = 0, 0
stateno = 22
supermovetime = 9999999999999
pausemovetime = 9999999999999
ignorehitpause = 1

[State 12, 1]
type = Changestate
triggerall = !ishelper
trigger1 = RoundState != 2
value = 0
ctrl = 1
ignorehitpause = 1

[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 22]
type = C
movetype = I
physics = N
anim = 23
ctrl = 0

[state 22, ヘルパー押し戻し判定解除]
type = Playerpush
trigger1 = ishelper(22)
value = 0
ignorehitpause = 1

[State 22, ヘルパー本体追従]
type = Bindtoroot
trigger1 = ishelper(22)
ignorehitpause = 1

[State 22, 食らいヘルパー消去]
type = Destroyself
triggerall = ishelper(22)
trigger1 = !alive
trigger2 = !root,alive
trigger3 = helper(22),stateno != 22
trigger4 = root,stateno != 20
ignorehitpause = 1

[Statedef 40]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 40, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 40
value = 40
ignorehitpause = 1

[State 40, 音を鳴らす]
type = PlaySnd
trigger1 = animelem = 1
value = 0,17

[State 50, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 40, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 40, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 40, ジャンプ回数計測]
type = Varadd
triggerall = !ishelper
trigger1 = !animelemtime(1)
var(5) = 1
ignorehitpause = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 40, 1]
type = VarSet
triggerall = !ishelper
trigger1 = animelem = 1
var(1) = 0
ignorehitpause = 1

[State 40, 2]
type = VarSet
triggerall = !ishelper
trigger1 = command = "holdfwd"
var(1) = 1
ignorehitpause = 1

[State 40, 3]
type = VarSet
triggerall = !ishelper
trigger1 = command = "holdback"
var(1) = -1
ignorehitpause = 1

[State 40, 4]
type = VelSet
triggerall = !ishelper
trigger1 = AnimTime = 0
x = ifelse(var(1)=0, const(velocity.jump.neu.x), ifelse(var(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)
ignorehitpause = 1

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

[State 40, 6]
type = Changestate
trigger1 = !ishelper
trigger1 = AnimTime = 0
value = 50
ctrl = 1
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 45]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1


[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State ]
type = Selfstate
trigger1 = !ishelper
value = 50
ignorehitpause = 1

[Statedef 50]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1
[State 50, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != [41, 46]
value = 50
ignorehitpause = 1

[State 50, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = A
ignorehitpause = 1

[State 50, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 50, 1]
type = VarSet
triggerall = !ishelper
trigger1 = animelem = 1
var(1) = 0
ignorehitpause = 1

[State 1005, ]
type = VelSet
triggerall = !ishelper
trigger1 = pos y <= -100
y = 7

[State 701, 移動速度]
type = null;VelSet
triggerall = (pos y <= 0)
trigger1 = pos y >= -100
y = 3
pausemovetime = 99999999

[State 50, 2]
type = ChangeAnim
triggerall = !ishelper
trigger1 = animelem = 1
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))
ignorehitpause = 1

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


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 51]
type = U
movetype = I
physics = N
movehitpersist = 1
hitdefpersist = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 51, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 51
value = 51
ignorehitpause = 1

[State 51, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = A
ignorehitpause = 1

[State 51, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 1005, ]
type = VelSet
triggerall = !ishelper
trigger1 = pos y <= -100
y = 5

[State 1005, ]
type = VelSet
triggerall = !ishelper
trigger1 = roundstate != 2
y = 5

[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1
[Statedef 52]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1


[State 52, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 47
value = 47
ignorehitpause = 1


[State 52, エフェクト]
type = Explod
trigger1 = animelem = 1
anim = 4020
postype = p1
pos = 0,0
scale = 0.5,0.5
sprpriority = -1
ownpal = 1
ID = 4020

[State 52, 音を鳴らす]
type = PlaySnd
trigger1 = animelem = 1
value = 0,19


[State 52, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 52, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 52, ジャンプ回数リセット]
type = Varset
trigger1 = !ishelper
var(5) = 0
ignorehitpause = 1

[State 52, 1]
type = VelSet
triggerall = !ishelper
trigger1 = animelem = 1
y = 0
ignorehitpause = 1

[State 52, 2]
type = PosSet
triggerall = !ishelper
trigger1 = animelem = 1
y = 0
ignorehitpause = 1

[State 52, 3]
type = CtrlSet
triggerall = !ishelper
trigger1 = animelem = 1, = 3
value = 1
ignorehitpause = 1

[State 52, 4]
type = Changestate
triggerall = !ishelper
trigger1 = AnimTime = 0
value = 0
ctrl = 1
ignorehitpause = 1



[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 100]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 1000, 音を鳴らす]
type = PlaySnd
trigger1 = (GameTime% 5 ) = 0 
value = 0,20
channel = 1

[State 0,移動用砂埃]
type = Projectile
trigger1 = 1
Projscale = 0.5,0.5
ProjAnim = 3012
Projremanim = -1
Projremovetime = 10
Projpriority = 3
Projemisstime = 1
Offset = -25,0
velocity = 0, 0

[State 100, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 100
trigger1 = (command = "holdfwd")
value = 100
ignorehitpause = 1

[State 100, アニメ変更]
type = ChangeAnim
trigger1 = anim != 47
trigger1 = animelem >= 4
trigger1 = (command != "holdfwd")
value = 47
Persistent = 0

[State 100, 状態変更]
type = StateTypeSet
trigger1 = (Anim = 47)
Physics = S

[State 100, 特殊効果];コントロールが可能なダッシュステートはこのコントローラが必要（※１）
type = AssertSpecial
trigger1 = 1
flag = NoWalk      ;歩かない（前か後ろのキーを入力中コントロールが可能の時に勝手に[Statedef 20]にならない）
flag2= NoAutoTurn  ;自動で振り向かない

[State 100, 埃]
type = MakeDust
trigger1 = (Anim = 47)
pos = 0,0
spacing = 1
Persistent = 0

[State 100, 軸位置]
type = PosSet
trigger1 = 1
y = 0

[State 100, 移動速度]
type = VelSet
trigger1 = 1
y = 0

[State 100, 移動速度]
type = VelSet
trigger1 = (Anim != 47)
trigger1 = (Anim = 100)
x = const(velocity.run.fwd.x)

[State 100, ステート変更]
type = ChangeState
triggerall = (Anim = 47)
trigger1 = AnimTime = 0
value = 0
ctrl = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 105]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 105, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 105
value = 105
ignorehitpause = 1

[State  自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 105, 移動速度]
type = VelSet
trigger1 = anim = 105
trigger1 = animelem = 1
x = -20

[State 105, 移動速度]
type = posset
trigger1 = 1
y = 0

[State 105, 埃]
type = MakeDust
trigger1 = animelem = 1
pos = 0,0
spacing = 1

[State 105, 音を鳴らす]
type = PlaySnd
trigger1 = animelem = 1
value = 0,21

[State 105, ステート変更]
type = ChangeState
trigger1 = (AnimTime = 0) && (Pos Y >= 0)
value = 0
ctrl = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 120]
type = U
movetype = U
physics = U
movehitpersist = 1
hitdefpersist = 1

[State 120, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 120, 準ステート固定基準]
type = Null
trigger1 = !ishelper
ignorehitpause = 1

[Statedef 130]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 130, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 130, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 130
value = 130
ignorehitpause = 1

[State 130, 振り向き]
type = Turn
triggerall = !ishelper
triggerall = !animelemtime(1)
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 130, ステート変更]
type = Changestate
triggerall = !ishelper
trigger1 = !animtime
value = ifelse(random % 2 = 0, 0, ifelse(random % 2 = 0, 700, 710))
ignorehitpause = 1

[Statedef 131]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 131, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 131, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 131
value = 131
ignorehitpause = 1

[State 131, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = C
movetype = I
physics = C
ignorehitpause = 1

[State 131, 振り向き]
type = Turn
triggerall = !ishelper
triggerall = !animelemtime(1)
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 131, ステート変更]
type = Changestate
triggerall = !ishelper
trigger1 = !animtime
value = ifelse(random % 2 = 0, 11, ifelse(random % 2 = 0, 700, 710))
ignorehitpause = 1

[Statedef 132]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 132, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 132, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 132
value = 132
ignorehitpause = 1

[State 132, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = A
ignorehitpause = 1

[State 132, 振り向き]
type = Turn
triggerall = !ishelper
triggerall = !animelemtime(1)
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 132, ステート変更]
type = Changestate
triggerall = !ishelper
trigger1 = !animtime
value = ifelse(random % 2 = 0, 51, ifelse(random % 2 = 0, 700, 710))
ignorehitpause = 1


;タイムオーバー（負けた時）
[Statedef 170]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 170, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 170, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 170
value = 170
ignorehitpause = 1

[State 170, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 170, 演出延長]
type = Assertspecial
triggerall = !ishelper
trigger1 = animelemtime(1) <= 200
flag = roundnotover
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 175]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 175, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 175
value = 175
ignorehitpause = 1

[State 175, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 170, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 175, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 175, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 175
value = 175
ignorehitpause = 1

[State 175, 1] ; If no anim, use go to lose state.
type = Changestate
triggerall = !ishelper
trigger1 = animelem = 1
trigger1 = !SelfAnimExist(175)
value = 170
ignorehitpause = 1


[State 175, 演出延長]
type = Assertspecial
triggerall = !ishelper
trigger1 = animelemtime(1) <= 300
flag = roundnotover
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 180]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 180, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 180, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

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



[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 181]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 181, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State アニメ変更]
type = Changeanim
triggerall = name = "H_Yujiro"
triggerall = !ishelper
trigger1 = anim != 181
value = 181
ignorehitpause = 1


[State 182, 音を鳴らす]
type = PlaySnd
trigger1 = animelem = 3
value = 5,2
Persistent = 0


[State 182,画面ゆれ]
type = EnvShake
trigger1 = (GameTime% 10 ) = 0 
time = 300
freq = 110
ampl = -3
phase = 0

[State 181, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

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

[State 181,AssertSpecial]
type = AssertSpecial
trigger1 = animelemtime(1) <= 300
flag = roundnotover
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1


[Statedef 190]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 190, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[state 190]
type = nothitby
trigger1 = 1
value = SCA


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


[State 190, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = A
physics = S
ignorehitpause = 1

[State 190, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1



[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 191]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 191, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 191, アニメ変更];バトル画面に切り替わった瞬間のフェードインの時、アニメを固定している
type = ChangeAnim
trigger1 = RoundState = 0
value = 197
ignorehitpause = 1

[State 191, 特殊効果];試合が開始するまではこのコントローラを使おう（※２）
type = AssertSpecial
trigger1 = 1
flag = Intro
ignorehitpause = 1

[State 198, 音を鳴らす]
type = PlaySnd
trigger1 = RoundState != 0
trigger1 = animelem = 2
value = 5,7

[State 191, ステート変更]
type = ChangeState
triggerall = palno = 12
trigger1 = AnimTime = 0 
trigger2 = Roundstate = 2
value = 2015
ignorehitpause = 1

[State 191, ステート変更]
type = ChangeState
triggerall = palno != 12
trigger1 = AnimTime = 0 
trigger2 = Roundstate = 2
value = 0
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 5000]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5000, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State -2, 迷子]
type = Selfstate
trigger1 = alive
value = 56784563
ignorehitpause = 1

[State 5000, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 5000
value = 5000
ignorehitpause = 1

[State 5000, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = I
physics = S
ignorehitpause = 1

[State 5000, 振り向き]
type = Turn
triggerall = !ishelper
triggerall = !animelemtime(1)
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 5000, ステート変更]
type = Changestate
triggerall = !ishelper
trigger1 = !animtime
value = ifelse(random % 2 = 0, 0, ifelse(random % 2 = 0, 700, 710))
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 5001]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5001, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State -2, 迷子]
type = Selfstate
trigger1 = alive
value = 56784563
ignorehitpause = 1


[State 5001, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5000
ignorehitpause = 1

[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 5010]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5010, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State -2, 迷子]
type = Selfstate
trigger1 = alive
value = 56784563
ignorehitpause = 1


[State 5010, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 5010
value = 5010
ignorehitpause = 1

[State 5010, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = C
movetype = I
physics = C
ignorehitpause = 1

[State 5010, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5010, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5010, 振り向き]
type = Turn
triggerall = !ishelper
triggerall = !animelemtime(1)
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1


[State 5010, ステート変更]
type = Changestate
triggerall = !ishelper
triggerall = random < 500
trigger1 = !animtime
value = ifelse(random % 2 = 0, 11, ifelse(random % 2 = 0, 700, 710))
ignorehitpause = 1

[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 5011]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5011, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State -2, 迷子]
type = Selfstate
trigger1 = alive
value = 56784563
ignorehitpause = 1


[State 5011, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5000
ignorehitpause = 1

[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 5020]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5020, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State -2, 迷子]
type = Selfstate
trigger1 = alive
value = 56784563
ignorehitpause = 1


[State 5020, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 5020
value = 5020
ignorehitpause = 1

[State 5020, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = A
ignorehitpause = 1

[State 5020, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5020, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5020, 振り向き]
type = Turn
triggerall = !ishelper
triggerall = !animelemtime(1)
trigger1 = pos x < enemynear,pos x && facing = -1
trigger2 = enemynear,pos x < pos x && facing = 1
ignorehitpause = 1

[State 5020, ステート変更]
type = Changestate
triggerall = !ishelper
triggerall = random < 500
trigger1 = !animtime
value = ifelse(random % 2 = 0, 51, ifelse(random % 2 = 0, 700, 710))
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 5030]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5030, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State -2, 迷子]
type = Selfstate
trigger1 = alive
value = 56784563
ignorehitpause = 1


[State 5030, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 5035]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5035, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State -2, 迷子]
type = Selfstate
trigger1 = alive
value = 56784563
ignorehitpause = 1


[State 5035, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

[Statedef 5040]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5040, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State -2, 迷子]
type = Selfstate
trigger1 = alive
value = 56784563
ignorehitpause = 1


[State 5040, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1


[Statedef 5050]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5050, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[state 5150]
type = playsnd
trigger1 = helper(160000),NumTarget = 0
trigger1 = animelem = 1
value = 11,8

[State -2, 迷子]
type = Selfstate
trigger1 = alive
value = 56784563
ignorehitpause = 1


[State 5050, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[State 5050, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5050, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
triggerall = !ishelper
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050
ignorehitpause = 1

[State 5050, 2] ;Coming down anim
type = ChangeAnim
triggerall = !ishelper
trigger1 = anim = [5050, 5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0
ignorehitpause = 1

[State 5050, 3] ;Gravity
type = VelAdd
triggerall = !ishelper
trigger1 = 1
y = GetHitVar(yaccel)
ignorehitpause = 1

[State 5050, 4] ;Recover near ground
type = Changestate
triggerall = !ishelper
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER
ignorehitpause = 1

[State 5050, 5]; Recover in mid air
type = Changestate
triggerall = !ishelper
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER
ignorehitpause = 1

[State 5050, 音を鳴らす]
type = Playsnd
triggerall = !ishelper
trigger1 = AnimElemTime(1) = 0
value = 11, 1
ignorehitpause = 1

 [state -2]
type = playsnd
trigger1 = anim != 5050
value = 102,11
volume = 100

[State 5050, 6]
type = Changestate
triggerall = !ishelper
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051, 5059]) || (anim = [5061, 5069]), 0, 25)
value = 5100 ;HIT_BOUNCE
ignorehitpause = 1


[Statedef 5070]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5070, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State -2, 迷子]
type = Selfstate
trigger1 = alive
value = 56784563
ignorehitpause = 1


[State 5070, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = A
movetype = I
physics = N
ignorehitpause = 1

[State 5070, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

[Statedef 5071]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5071, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 5071, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

[Statedef 5080]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5080, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 5080, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5010
ignorehitpause = 1

[Statedef 5081]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5081, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 5081, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

[Statedef 5100]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5100, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 5100, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = L
movetype = I
physics = N
ignorehitpause = 1

[State 5100, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5100, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5100, 位置調整]
type = Velset
triggerall = !ishelper
trigger1 = !animelemtime(1)
x = 0
y = 0
ignorehitpause = 1

[State 5100, 1]
type = VelSet
triggerall = !ishelper
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1
ignorehitpause = 1

[State 5100, EnvShake]
type = FallEnvShake
triggerall = !ishelper
trigger1 = Time = 0
ignorehitpause = 1

[State 5100, Var] ;Save fall velocity
type = VarSet
triggerall = !ishelper
trigger1 = Time = 0
var(1) = floor(vel y)
ignorehitpause = 1

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = !ishelper
triggerall = animelemtime(1) = 0
triggerall = anim !=5100
trigger1 = (anim != [5051, 5059]) && (anim != [5061, 5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100
ignorehitpause = 1

[State 5100, 4]
type = PosSet
triggerall = !ishelper
trigger1 = animelemTime(1) = 0
y = 0
ignorehitpause = 1

[State 5100, 5]
type = VelSet
triggerall = !ishelper
trigger1 = Time = 0
y = 0
ignorehitpause = 1

[State 5100, 6] ;Reduce speed
type = VelMul
triggerall = !ishelper
trigger1 = Time = 0
x = 0.75
ignorehitpause = 1

[State 5100, 7]
type = Changestate
triggerall = !ishelper
trigger1 = AnimelemTime(1) = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 
ignorehitpause = 1

[State 5100, 8]
type = GameMakeAnim
triggerall = !ishelper
trigger1 = AnimelemTime(1) = 1
value = 60 + (var(1) > 5) + (var(1) > 14)
pos = 0, 0
under = var(1) <= 14
ignorehitpause = 1

[State 5100, 10]
type = PlaySnd
triggerall = !ishelper
trigger1 = animelemTime(1) = 1
value = F7, (var(1) > 5) + (var(1) > 14)
ignorehitpause = 1

[State 5100, 11]
type = PosFreeze
triggerall = !ishelper
trigger1 = 1
ignorehitpause = 1

[State 5100, 12]
type = Changestate
triggerall = !ishelper
trigger1 = !AnimTime
value = 5101
ignorehitpause = 1

[State 5100, 13]
type = ForceFeedback
triggerall = !ishelper
trigger1 = animelemtime(1) = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20
ignorehitpause = 1

[Statedef 5101]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5101, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 5101, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = L
movetype = I
physics = N
ignorehitpause = 1

[State 5101, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5101, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5101, 位置調整]
type = Velset
triggerall = !ishelper
trigger1 = !animelemtime(1)
x = 0
y = 0
ignorehitpause = 1

[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101, 5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101, 5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = !ishelper
triggerall = time = 0
trigger1 = anim != [5101, 5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160
ignorehitpause = 1

[State 5101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = !ishelper
triggerall = time = 0
trigger1 = anim = [5101, 5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)
ignorehitpause = 1

[State 5101, 3]
type = HitFallVel
triggerall = !ishelper
trigger1 = Time = 0
ignorehitpause = 1

[State 5101, 4]
type = PosSet
triggerall = !ishelper
trigger1 = Time = 0
y = 20
ignorehitpause = 1

[State 5101, 5] ;Acceleration
type = VelAdd
triggerall = !ishelper
trigger1 = 1
y = .4
ignorehitpause = 1

[State 5101, 6] ;Hit ground
triggerall = !ishelper
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = Changestate
value = 5110
ignorehitpause = 1

[Statedef 5110]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5110, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 5110, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = L
movetype = I
physics = N
ignorehitpause = 1

[State 5110, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 1
ignorehitpause = 1

[State 5110, コントロール可否]
type = Ctrlset
trigger1 = !ishelper
value = 0
ignorehitpause = 1

[State 5110, 位置調整]
type = Velset
triggerall = !ishelper
trigger1 = !animelemtime(1)
x = 0
y = 0
ignorehitpause = 1

[State 5110, EnvShake]
type = FallEnvShake
triggerall = !ishelper
trigger1 = Time = 0
ignorehitpause = 1

[State 5110, 1] ;For hit up/up-diag type (from State 5081)
type = ChangeAnim
persistent = 0
triggerall = !ishelper
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081, 5089]
value = 5110 + (anim % 10)
ignorehitpause = 1

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = !ishelper
triggerall = time = 0
triggerall = anim != [5110, 5119] ;Not already changed anim
trigger1 = anim != [5161, 5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170
ignorehitpause = 1

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = !ishelper
triggerall = time = 0
triggerall = anim != [5110, 5119] ;Not already changed anim
trigger1 = anim = [5161, 5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)
ignorehitpause = 1

[State 5110, 5]
type = PosSet
triggerall = !ishelper
trigger1 = Time = 0
y = 0
ignorehitpause = 1

[State 5110, Var] ;Get fall velocity
type = VarSet
triggerall = !ishelper
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
var(1) = floor(vel y)
ignorehitpause = 1

[State 5110, 6]
type = PlaySnd
triggerall = !ishelper
trigger1 = Time = 0
trigger1 = !Var(0)
value = F7, (var(1) > 5) + (var(1) > 14)
ignorehitpause = 1

[State 5110, 7]
type = GameMakeAnim
triggerall = !ishelper
trigger1 = Time = 0
trigger1 = !Var(0)
value = 60 + (var(1) > 5) + (var(1) > 14)
pos = 0, 0
under = var(1) <= 14
ignorehitpause = 1

[State 5110, 8]
type = VelSet
triggerall = !ishelper
trigger1 = Time = 0
y = 0
ignorehitpause = 1

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = !ishelper
triggerall = anim = [5171, 5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
value = 5110 + (anim % 10)
ignorehitpause = 1

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = !ishelper
triggerall = Anim != [5111, 5119]
trigger1 = AnimTime = 0
trigger2 = Var(0) 
value = 5110
ignorehitpause = 1

[State 5110, 11] ;If just died
type = Changestate
triggerall = !ishelper
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = Var(0)
trigger3 = Anim = [5110, 5119]
value = 45000
ignorehitpause = 1

[State 5110, 12]
type = VarSet
triggerall = !ishelper
trigger1 = Var(0)
trigger1 = Time = 0
var(0) = 0
ignorehitpause = 1

[State 5110, 13] ;Friction
type = VelMul
triggerall = !ishelper
trigger1 = 1
x = 0.85
ignorehitpause = 1

[State 5110, 14]
type = ForceFeedback
triggerall = !ishelper
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine
ignorehitpause = 1

[State 5110, 15]
type = ForceFeedback
triggerall = !ishelper
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine
ignorehitpause = 1

[Statedef 5120]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5120, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 14000
ignorehitpause = 1

[State 5120, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5010
ignorehitpause = 1

;死んだとき
[Statedef 5150]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1


[state 5150]
type = Destroyself
trigger1 = 1
ignorehitpause = 1

[state 5150]
type = Lifeset
trigger1 = name !="H_Yujiro"
value = 0
ignorehitpause = 1

[State 100, 自キャラ以外だった場合]
type = selfstate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 1005, 軸位置]
type = PosSet
trigger1 = 1
y = 0

[State 1005, 軸位置]
type = VelSet
trigger1 = 1
x = 0

[State 100, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 5110
value = 5110
ignorehitpause = 1

[State 5150, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = L
movetype = I
physics = N
ignorehitpause = 1

[State 5150, スプライト表示優先度]
type = Sprpriority
trigger1 = !ishelper
value = 4
ignorehitpause = 1

[State 5150, ヘルパーカメラ固定]
type = Screenbound
trigger1 = ishelper
value = 0
ignorehitpause = 1


[Statedef 5200]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5200, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 5200, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

[Statedef 5201]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5201, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 5201, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

[Statedef 5210]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5210, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 5210, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 5020
ignorehitpause = 1

[Statedef 5500]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1


[State 5500, ステート変更]
type = Changestate
trigger1 = !ishelper
value = 170
ignorehitpause = 1

[Statedef 5900]
type = U
movetype = U
physics = N
movehitpersist = 1
hitdefpersist = 1

[State 5900, 自キャラ以外だった場合]
type = Changestate
trigger1 = name != "H_Yujiro"
value = 45000
ignorehitpause = 1

[State 5900, アニメ変更]
type = Changeanim
triggerall = !ishelper
trigger1 = anim != 5900
value = 5900
ignorehitpause = 1

[State 5900, ステートタイプ変更]
type = Statetypeset
trigger1 = !ishelper
statetype = S
movetype = A
ignorehitpause = 1

[State 5900, 3] ;Intro for round 1
type = Changestate
triggerall = !ishelper
trigger1 = roundno = 1
value = ifelse(roundstate < 2, 190, 40)
ignorehitpause = 1

[State 5900, 3] ;Intro for round 1
type = Changestate
triggerall = !ishelper
triggerall = palno = 12
trigger1 = roundno != 1
value = 2015
ignorehitpause = 1


[state ]
type = null
trigger1 = facing = -1
trigger1 = var(25) := 0 && 0
trigger2 = facing = 1
trigger2 = var(25) := 1 && 0
ignorehitpause = 1

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(4) = vel x

[state ]
type = varset
triggerall = !ishelper
trigger1 = 1
var(5) = vel y

[State 準ステ固定]
type = Changestate
triggerall = !ishelper
trigger1 = roundstate > 2
value = 120
ignorehitpause = 1

