; ユウシャ（勇者30）のコンスタンツとステートのファイルです。
;===========================================================================
; コンスタンツ（定数）
;===========================================================================
; 基本データ
;---------------------------------------------------------------------------
[Data]
life              = 300   ;ライフ最大値 300*300=90000=1000*90=通常キャラの9割
power             = 30000   ;パワーゲージ最大値
attack            = 100    ;攻撃力
defence           = 300    ;防御力
fall.defence_up   = 50     ;横に倒れている時に一時的に加える防御力（％）
liedown.time      = 40     ;横に倒れている時間（フレーム）
airjuggle         = 15     ;ジャグルポイント限界値（「小ネタ.txt」参照）
sparkno           = S2001  ;デフォルトのヒットスパーク（fightfxから）
guard.sparkno     = S2001  ;デフォルトのガードスパーク（fightfxから）
KO.echo           = 0      ;ＫＯ時の音声（11,0）にエコーを掛けるか否か（0=掛けない,1=掛ける）
volume            = 150      ;キャラの標準の音量（最小-255・最大255）
IntPersistIndex   = 59     ;次のラウンドへ持ち越せる「Var」のアドレスの範囲を決める
FloatPersistIndex = 40     ;次のラウンドへ持ち越せる「FVar」のアドレスの範囲を決める

;---------------------------------------------------------------------------
; サイズ
;---------------------------------------------------------------------------
[Size]
xscale           = 2       ;キャラの横の大きさ（絶対値・float）
yscale           = 2      ;キャラの縦の大きさ（絶対値・float）
ground.back      = 15      ;地上にいる時の「後方の物理的な幅」
ground.front     = 16      ;地上にいる時の「前方の物理的な幅」
air.back         = 12      ;空中にいる時の「後方の物理的な幅」
air.front        = 12      ;空中にいる時の「前方の物理的な幅」
height           = 30      ;キャラの物理的な高さ（高いほど相手は飛び越しにくくなる）
attack.dist      = 50     ;相手がガード態勢に入る最低の距離
proj.attack.dist = 50      ;自分の「Projectile」に対して相手がガード態勢に入る最低の距離
proj.doscale     = 1       ;xscaleとyscaleを「Projectile」にも影響させるか否か（0=させない・1=させる）
head.pos         = 0,-15  ;キャラの標準の頭の座標（Bind系で適用される）
mid.pos          = 0,-15  ;キャラの標準の体中心の座標（Bind系で適用される）
shadowoffset     = 0       ;影のＹ軸方向の位置座標
draw.offset      = 0,0     ;キャラの表示座標（Ｘ軸,Ｙ軸）

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

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

;===========================================================================
; ステート
;===========================================================================
; 基本行動
;===========================================================================
;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

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

[State 0, 1]
type = ChangeAnim
TriggerAll = Var(59) = 1
triggerall = vel x < const(velocity.walk.fwd.x)+1
triggerall = vel x > const(velocity.walk.back.x)
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

;---------------------------------------------------------------------------
; Walk　（ブレイブソード）
[Statedef 20]
type    = S
physics = S
sprpriority = 0
movetype = A

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
trigger1 = var(59) = 0
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
trigger1 = var(59) = 0
x = const(velocity.walk.back.x)

[State 20, 3];前進砂埃
type = MakeDust
triggerall = Time%7 = 0 ;砂埃
triggerall = stateno = 20
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
pos = -5,-2
spacing = 1

[State 20, 3];後退砂埃
type = MakeDust
triggerall = Time%7 = 0 ;砂埃
triggerall = stateno = 20
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
pos = 5,-2
spacing = 1

[State 20, 1] ;AI用;コレが邪魔？
type = VelSet 
triggerall = var(59) >= 2;1 
triggerall = RoundState = 2 
trigger1 = ctrl
trigger1 = statetype != A 
trigger1 = stateno != 201 && stateno != 100 && stateno != 600 ;&& stateno != 20 
trigger1 = vel x != const(velocity.walk.fwd.x) 
x = const(velocity.walk.fwd.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

;ブレイブソードの（通常）
[State 20, ヒット定義]
type = HitDef
trigger1 = Time = 0 
trigger1 = Gametime%5 != 0
attr = S, NA 
damage = Var(56)*1,0
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 1, Hit
pausetime = 1, 1
sparkno = S2001
sparkxy = -6, 2
hitsound = S1, 4
guardsound = 6, 0
ground.type = low
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -1,0
air.velocity = -1,0
air.type = High
air.hittime = 0
;givepower = 0,0;200*var(29),200*var(29)

;ブレイブソードの（時々クリティカル）
[State 20, ヒット定義]
type = HitDef
trigger1 = Time = 0 
trigger1 = Gametime%5 = 0
attr = S, SA 
damage = Var(56)*2,0;クリティカル
animtype = Heavy
guardflag = MA
hitflag = MAFP
priority = 7, Hit
pausetime = 1, 1
sparkno = S2001
sparkxy = -6, 2
hitsound = S1, 1
;guardsound = 6, 0
ground.type = low
ground.slidetime = 20
ground.hittime  = 5
ground.velocity = -5,0
air.velocity = -5,0
air.type = High
air.hittime = 0
;givepower = 200*var(29),200*var(29)

[State 200, ノックバック];攻撃を当てるとノックバックステートへ
type = ChangeState 
trigger1 = MoveContact 
trigger1 = Gametime%7 != 1
value = 201 
ctrl = 0 

[State 200, ノックバック];攻撃を当てるとノックバックステートへ
type = ChangeState 
trigger1 = MoveContact 
trigger1 = Gametime%7 = 1
value = 202 
ctrl = 0 

[State 20, 5] 
type = ChangeState 
triggerall = var(59) = 0
trigger1 = vel X = 0 
value = 0 
ctrl = 1 

;---------------------------------------------------------------------------
;ノックバック
[Statedef 201];ノックバック短い
type    = S
movetype= A
physics = N
juggle  = 0
velset = -5,0
ctrl = 0
anim = 200
sprpriority = 2
facep2 = 1

[State 201, ステート変更]
type = ChangeState
trigger1 = Time = 8
value = 0
ctrl = 1

[Statedef 202];ノックバック長い
type    = S
movetype= A
physics = N
juggle  = 0
velset = -5,0
ctrl = 0
anim = 200
sprpriority = 2
facep2 = 1

[State 201, ステート変更]
type = ChangeState
trigger1 = Time = 16
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
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 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, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

;ブレイブソードの
[State 40, ヒット定義]
type = HitDef
trigger1 = Time = 0 
attr = S, NA 
damage = Var(56)*1,0
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 1, Hit
pausetime = 1, 1
sparkno = S2001
sparkxy = -6, 2
hitsound = S1, 4
guardsound = 6, 0
ground.type = low
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -1,0
air.velocity = -1,0
air.type = High
air.hittime = 0
;givepower = 0,0;200*var(29),200*var(29)

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

;---------------------------------------------------------------------------
; AirJump Start
[Statedef 45]
type    = A
physics = N
ctrl = 0
velset = 0,0

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

[State 45, 2]
type = ChangeAnim
trigger1 = !SelfAnimExist(44)
value = 41

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

[State 45, 4]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 45, 5]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 45, 6]
type = VelSet
trigger1 = Time = 2
x = ifelse(sysvar(1)=0, const(velocity.airjump.neu.x), ifelse(sysvar(1)=1, const(velocity.airjump.fwd.x), const(velocity.airjump.back.x)))
y = const(velocity.airjump.y)

;ブレイブソードの
[State 45, ヒット定義]
type = HitDef
trigger1 = Time = 0 
attr = S, NA 
damage = Var(56)*1,0
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 1, Hit
pausetime = 1, 1
sparkno = S2001
sparkxy = -6, 2
hitsound = S1, 4
guardsound = 6, 0
ground.type = low
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -1,0
air.velocity = -1,0
air.type = High
air.hittime = 0
;givepower = 0,0;200*var(29),200*var(29)

[State 45, 7]
type = ChangeState
trigger1 = Time = 2
value = 50
ctrl = 1

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

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

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

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

;ブレイブソードの
[State 50, ヒット定義]
type = HitDef
trigger1 = Time = 0 
attr = S, NA 
damage = Var(56)*1,0
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 1, Hit
pausetime = 1, 1
sparkno = S2001
sparkxy = -6, 2
hitsound = S1, 4
guardsound = 6, 0
ground.type = low
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -1,0
air.velocity = -1,0
air.type = High
air.hittime = 0
;givepower = 0,0;200*var(29),200*var(29)

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

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

;ブレイブソードの
[State 51, ヒット定義]
type = HitDef
trigger1 = Time = 0 
attr = S, NA 
damage = Var(56)*1,0
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 1, Hit
pausetime = 1, 1
sparkno = S2001
sparkxy = -6, 2
hitsound = S1, 4
guardsound = 6, 0
ground.type = low
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -1,0
air.velocity = -1,0
air.type = High
air.hittime = 0
;givepower = 0,0;200*var(29),200*var(29)

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

[State 52, 1]
type = VelSet
trigger1 = Time = 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, ヒット定義]
type = HitDef
trigger1 = Time = 0 
attr = S, NA 
damage = Var(56)*1,0
animtype = Light
guardflag = MA
hitflag = MAFP
priority = 1, Hit
pausetime = 1, 1
sparkno = S2001
sparkxy = -6, 2
hitsound = S1, 4
guardsound = 6, 0
ground.type = low
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -1,0
air.velocity = -1,0
air.type = High
air.hittime = 0
;givepower = 0,0;200*var(29),200*var(29)

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

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

; RUN_FWD　（騎馬突撃）
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1
movetype = A
Ctrl = 1

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

[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, すり抜け]
type = PlayerPush 
trigger1 = 1 
value = 0 

[State 100, 3];砂埃
type = MakeDust
trigger1 = Time%2 = 1 ;砂埃
pos = -12,-2
spacing = 1

[State 100, 4]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = command != "holdfwd"

trigger2 = var(59) > 0
trigger2 = FrontEdgeDist <= 60
trigger3 = var(59) > 0
trigger3 = time >= 120
trigger4 = roundstate != 2
value = 0
Ctrl = 1

;・騎馬突撃の
[State 100, ヒット定義]
type = HitDef
trigger1 = Time = 0 
attr = S, SA 
damage = Var(56)*1,0
animtype = up
guardflag = MA
hitflag = MAFP
priority = 7, Hit
pausetime = 0, 0
sparkno = S2002
sparkxy = -6, 2
hitsound = S1, 3
guardsound = 6, 0
;fall = 1
ground.type = low
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = 0,0; -5,-5
air.velocity = 0,0;-5,-5
air.type = High
air.hittime = 0
p2stateno = 1120

[State 100,ダッシュ音]
type = PlaySnd
trigger1 = Time = 0 
value = 2,6

[State 100, 1];投げられない設定
type = NotHitBy
trigger1 = Time >= 0
value = ,AT

[State 100, 1];アーマー
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP  
stateno = 100

;---------------------------------------------------------------------------
[Statedef 1120];吹っ飛んだ相手に参照させるステート
Type    = A
Movetype= H
Physics = N
anim = 5011
Velset = 0, 0
Ctrl = 0

[State 1120, 1]
type = VelSet
trigger1 = Time = 0
x = -8
y = -5

[State 1120, 回転中攻撃当たらない]
type = NotHitBy
value = SCA
trigger1 = 1

;回転
[State 1120, Pos]
type = Angleadd
trigger1 = 1
value = -30;value = 40
[State 1120, Pos]
type = AngleDraw
trigger1 = 1

[State 1120];戻る
type = SelfState
trigger1 = time >= 200
trigger2 = BackEdgeDist <= 10

value = 5100

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type    = S
physics = S
anim = 105
sprpriority = 1
movetype = A
Ctrl = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.back.x)

[State 100, 2] 
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] 
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, すり抜け]
type = PlayerPush 
trigger1 = 1 
value = 0 

[State 100, 3];砂埃
type = MakeDust
trigger1 = Time%2 = 1 ;砂埃
pos = 12,-2
spacing = 1

[State 100, 4]
type = ChangeState
trigger1 = var(59) = 0
trigger1 = command != "holdback"
trigger2 = var(59) > 0
trigger2 = time >= 30 || roundstate != 2
value = 0


;・騎馬突撃の
[State 100, ヒット定義]
type = HitDef
trigger1 = Time = 0 
attr = S, SA 
damage = Var(56)*1,0
animtype = up
guardflag = MA
hitflag = MAFP
priority = 7, Hit
pausetime = 0, 0
sparkno = S2002
sparkxy = -6, 2
hitsound = S1, 4
guardsound = 6, 0
;fall = 1
ground.type = low
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -5,-5
air.velocity = -5,-5
air.type = High
air.hittime = 0
;givepower = 200*var(29),200*var(29)
p2stateno = 1120

[State 100,ダッシュ音]
type = PlaySnd
trigger1 = Time = 0 
value = 2,6

[State 100, 1];投げられない設定
type = NotHitBy
trigger1 = Time >= 0
value = ,AT

[State 100, 1];ハイパーアーマー
type = HitOverride
trigger1 = 1
attr = SCA,AA,AT,AP  
stateno = 105

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 5035]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;HITA_RECOV

[State 5035, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5050 ;HITA_FALL


;回転
[State 5035, Pos]
type = Angleadd
trigger1 = 1
value = 40
[State 5035, Pos]
type = AngleDraw
trigger1 = 1



;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling) 
[Statedef 5050]
type    = A
movetype= H
physics = N

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
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

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

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

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

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

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

;回転
[State 5050, Pos]
type = Angleadd
trigger1 = 1
value = 40
[State 5050, Pos]
type = AngleDraw
trigger1 = 1


;===========================================================================
;タイムオーバー（負けた時）
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, 無敵]
type = NotHitBy
trigger1 = 1 ;トリガーを何も書かず「1」にする事により、『無条件で常に実行させる命令』になる。
value = SCA
time = 1

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;勝利ポーズ分岐（common1.cnsには無いけど、これもコモンステート）
[Statedef 180]
type = S

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

;---------------------------------------------------------------------------
;勝利ポーズ（全員集合）
[Statedef 181]
type = S
ctrl = 0
anim = 40
velset = 0,0

[State 181, エフェクト];女神様
type = Explod
trigger1 = TIME = 0
anim = 195
ID = 191
postype = p1
pos = 0,-32
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -3
persistent = 0

[State 181, エフェクト];ドノバン
type = Explod
trigger1 = TIME = 0
anim = 10000
ID = 192
postype = p1
pos = -184,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10001
ID = 193
postype = p1
pos = 115,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];ハンク
type = Explod
trigger1 = TIME = 0
anim = 10002
ID = 194
postype = p1
pos = 92,0
scale= const(size.xscale),const(size.yscale)
shadow =-1
removetime = -1
sprpriority = -1
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10003
ID = 195
postype = p1
pos = -115,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10004
ID = 196
postype = p1
pos = -92,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10005
ID = 197
postype = p1
pos = -69,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10006
ID = 198
postype = p1
pos = 23,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -2
persistent = 0

[State 181, エフェクト];ウスノロ
type = Explod
trigger1 = TIME = 0
anim = 10007
ID = 199
postype = p1
pos = -48,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -3
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10008
ID = 200
postype = p1
pos = -46,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10009
ID = 201
postype = p1
pos = 69,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10010
ID = 202
postype = p1
pos = 138,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10011
ID = 203
postype = p1
pos = 161,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10012
ID = 204
postype = p1
pos = 50,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];セシリア
type = Explod
trigger1 = TIME = 0
anim = 10013
ID = 205
postype = p1
pos = -161,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];カトリーヌ
type = Explod
trigger1 = TIME = 0
anim = 10014
ID = 206
postype = p1
pos = 50,-50
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

[State 181, エフェクト];マオウ
type = Explod
trigger1 = TIME = 0
anim = 10015
ID = 207
postype = p1
pos = -23,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0
ontop = 1

[State 181, エフェクト];オウジョ
type = Explod
trigger1 = TIME = 0
anim = 10016
ID = 208
postype = p1
pos = -45,-99
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -4
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10017
ID = 209
postype = p1
pos = -60,-99
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -5
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10018
ID = 210
postype = p1
pos = -30,-99
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -5
persistent = 0

[State 181, エフェクト];ナイト
type = Explod
trigger1 = TIME = 0
anim = 10019
ID = 211
postype = p1
pos = -138,0
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -2
persistent = 0

[State 181, エフェクト];
type = Explod
trigger1 = TIME = 0
anim = 10020
ID = 212
postype = p1
pos = -138,-28
scale= const(size.xscale),const(size.yscale)
removetime = -1
shadow =-1
sprpriority = -1
persistent = 0

;[State 181, エフェクト];女神様ダブリ
;type = Explod
;trigger1 = TIME = 0
;anim = 10021
;ID = 191
;postype = p1
;pos = 0,0
;scale= const(size.xscale),const(size.yscale)
;removetime = -1
;shadow =-1
;sprpriority = -1
;persistent = 0

;[State 181, エフェクト];女神様のルビー
;type = Explod
;trigger1 = TIME = 0
;anim = 10022
;ID = 213
;postype = p1
;pos = 20,-44
;scale= const(size.xscale)*0.5,const(size.yscale)*0.5
;removetime = -1
;shadow =-1
;sprpriority = -1
;persistent = 0

[State 181,勝利音楽]
type = PlaySnd
trigger1 = Time = 0 
value = 2,3

[State 181, 1] 
type = AssertSpecial 
Trigger1 = Time = [0,260] 
flag = RoundNotOver 

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

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;イントロ（試合開始前の登場演出アクション）
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

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

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

;[State 191,音楽　勇者解凍]
;type = PlaySnd
;trigger1 = Time = 0 
;value = 2,1

[State 191, エフェクト];女神様クネクネ
type = Explod
trigger1 = RoundState= 0
anim = 195
ID = 191
postype = p1
pos = -40,0
scale= const(size.xscale),const(size.yscale)
velocity = 0,0
accel = 0, 0
removetime = 140
persistent = 0

[State 191, エフェクト];宝箱1
type = Explod
trigger1 = RoundState= 0
anim = 2016
ID = 2016
postype = p1
pos = -80,0
scale= const(size.xscale),const(size.yscale)
velocity = 0,0
accel = 0, 0
removetime = 140
persistent = 0
facing = -1

[State 191, エフェクト];宝箱2
type = Explod
trigger1 = RoundState= 0
anim = 2016
ID = 2016
postype = p1
pos = 40,0
scale= const(size.xscale),const(size.yscale)
velocity = 0,0
accel = 0, 0
removetime = 140
persistent = 0

[State 191, エフェクト];薬草
type = Explod
trigger1 = time = 20
trigger1 = RoundState= 0
anim = 2017
ID = 2017
postype = p1
pos = -80,-40
scale= const(size.xscale),const(size.yscale)
velocity = 0,0
accel = 0, 0
removetime = 120
persistent = 0

[State 191, エフェクト];爆弾
type = Explod
trigger1 = time = 20
trigger1 = RoundState= 0
anim = 1300
ID = 1300
postype = p1
pos = 40,-30
scale= const(size.xscale),const(size.yscale)
velocity = 0,0
accel = 0, 0
removetime = 120
persistent = 0

[State 191,音楽　宝箱]
type = PlaySnd
trigger1 = Time = 10
value = 2,11


[State 191, ステート変更];アニメーションが終われば「通常立ち」のステートに変更する
type = ChangeState
trigger1 = AnimTime = 0
value = 0


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

[State 195, コントロール]
type = CtrlSet
trigger1 = Time = 40 ;このステートが４０フレームになったら
value = 1            ;キーコントロールが可能になる。

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


;緊急回避
[Statedef 610]
type    = A
movetype= A
physics = A
velset = 10,-6
ctrl = 0
anim = 610
sprpriority = 0

[State 610]
type = VelMul
trigger1 = 1
y = 0.44

[State 610, すり抜け]
type = PlayerPush 
trigger1 = 1 
value = 0 

[State 610, 4]
type = ChangeState
trigger1 = FrontEdgeDist < 30
value = 51
ctrl = 1


;===========================================================================
; 通常攻撃技
;===========================================================================
;・ブレイブソード
;Walkと統合


;===========================================================================

;===========================================================================
;・飛竜シルドニクス
[Statedef 600]
type    = A
movetype= A
physics = N
juggle  = 7
velset = 8,0
poweradd= 0
ctrl = 1
anim = 600
sprpriority = 2

;[State 600, 音を鳴らす]
;type = PlaySnd
;trigger1 = Time = 1
;value = 0, 0

[State 1120, すり抜け]
type = PlayerPush 
trigger1 = 1 
value = 0 

[State 600, ヒット定義]
type = HitDef
trigger1 = Time = 0
attr = A, SA
hitflag = MAFP
damage = Var(56)/10,0
guardflag = HA ;相手はしゃがみガードが出来ない
priority = 5
pausetime = 0,0
sparkno = S2001
sparkxy = -10,0
hitsound = S1, 4
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = 0,5
air.velocity = 0,5
givepower = 200*var(29),200*var(29)
fall = 0

[State 600, コントロール]
type = CtrlSet
trigger1 = Time >= 10
trigger2 = FrontEdgeDist <= 30
value = 1

[State 201, ステート変更]
type = ChangeState
trigger1 = Time >= 20
trigger2 = FrontEdgeDist <= 30
value = 50
ctrl = 1

;===========================================================================
;・アイテム使用
[Statedef 1300];
type    = A
movetype= A
physics = N
velset = 0,0
anim = 11300
poweradd= 10
ctrl = 1 


[State 1300, エフェクト];薬草エフェクト
type = Explod
triggerall = var(1) = 0
trigger1 = Time = 0
anim = 2017
ID = 2017
postype = p1
pos = 0,-40
scale= const(size.xscale),const(size.yscale)
velocity = 0,0
accel = 0, 0
removetime = 40
bindtime = -1
persistent = 0

[State 1300,薬草音]
type = PlaySnd
triggerall = var(1) = 0
trigger1 = Time = 0
value = 2,9

[State 1300];1回目：薬草消費
type = Lifeset
triggerall = var(1) = 0
trigger1 = Time = 0
value = 30000

[State 1300, Projectile];2回目：爆弾投げ
type = Projectile
triggerall = var(1) = 1
trigger1 = time = 0
ProjID = 1300
projanim = 1300
projhitanim = 2005
velocity = 5,0
accel = 0,0
offset = 20,8
postype = p1
;↓ここからhitdefのパラメーター
attr = A, NP
damage    = 999999,0
guardflag = MA
pausetime = 0,0
animtype  = back
sparkxy = -10,-37
hitsound = S2, 8
guardsound = S2, 8
guard.sparkxy = -10,-37
ground.type = high
ground.slidetime = 15
ground.hittime  =  20
ground.velocity = -4,-6
air.velocity = -4,-6
givepower = 200*var(29),200*var(29)
fall = 1
kill = 0

[State 13050]
type = varadd
trigger1 = Time = 0
var(1) = 1 

[State 1300, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
ctrl = 1
;===========================================================================
;ストライカー
;共通やられ消滅透明
[Statedef 30000];消滅ステート
type = A
movetype = H
anim = 30000
velset = 0,0

[State 30000]
type = DestroySelf
trigger1 = Time = 0


;仲間（突撃）
;仲間（援護）
;仲間（射撃）

;===========================================================================
; 必殺技
;===========================================================================
;・魔王30
;・王女30
;・騎士30
;3つともHELPER_comand.cnsに。

;===========================================================================
; 超必殺技
;===========================================================================
;---------------------------------------------------------------------------

;===========================================================================
;・イニシエの悪魔
[Statedef 13052]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
anim = 2999
ctrl = 0
sprpriority = 0

[State 13052]
type = SuperPause
trigger1 = TIME = 0
time = 120
anim = -1
;sound = ,1
pos = 0,0
movetime = 0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 0

[State 13052,音]
type = PlaySnd
trigger1 = Time = 0
value = 2,8

[State 13052,雷音]
type = PlaySnd
trigger1 = Time = 0
value = 2,7

[State 13052, イニシエの悪魔];
type = Explod
trigger1 = TIME = 0
anim = 2010
ID = 2010
postype = p1
pos = 0,-124
scale= const(size.xscale),const(size.yscale)
supermovetime = 90
pausemovetime = 90
removetime = 90
;shadow =-1
;ontop = 1
ownpal = 1
sprpriority = -2


[State 13052, 雷撃];
type = Explod
trigger1 = TIME = 0
anim = 2011
ID = 2011
postype = p1
pos = 16,-64
scale= const(size.xscale),const(size.yscale)
supermovetime = 90
pausemovetime = 90
removetime = 90
;shadow =-1
;ontop = 1
ownpal = 1
facing = -1
sprpriority = -1

[State 13052, 雷撃];
type = Explod
trigger1 = TIME = 0
anim = 2011
ID = 2011
postype = p1
pos = -16,-64
scale= const(size.xscale),const(size.yscale)
supermovetime = 90
pausemovetime = 90
removetime = 90
;shadow =-1
;ontop = 1
ownpal = 1
sprpriority = -1


[State 13052, 足元魔方陣];
type = Explod
trigger1 = TIME = 0
anim = 2012
ID = 2012
postype = p1
pos = 0,0
scale= const(size.xscale),const(size.yscale)
supermovetime = 90
pausemovetime = 90
removetime = 90
;shadow =-1
;ontop = 1
ownpal = 1
sprpriority = -1

[State 13052]
type = varset
trigger1 = Time = 0
var(3) = 1 

[State 13052]
type = Lifeset
trigger1 = Time = 0
value = 1

[State 13052]
type = Lifeset
trigger1 = Time = 1
value = 30000

[State 13052]
type = PowerSet
trigger1 = Time = 1
value = 30000

[State 13052]
type = varset
trigger1 = Time = 0
var(58) = 99 


[State 13052, ステート変更]
type = ChangeState
trigger1 = Time = 2
value = 0
ctrl = 1
