
;---------------------------------------------------------------------------
;誰か・立ち
[Statedef 30000]
type = S
physics = S
ctrl = 0
anim = 30000
sprpriority = -1


[State 4005, push]
type=playerpush
trigger1= 1
value=0
ignorehitpause=1

[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State -1]
Type = ParentVarSet
Trigger1 = 1
fV = 27
Value = 0

[State 1];カメラ固定
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

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


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

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

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

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

[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1




[State 900, 4]
type = ChangeState
trigger1 = root,stateno=[190,193]
trigger1 = prevstateno != 30190
value = 30190




[State 900, 4]
type = ChangeState
trigger1 = root,stateno=170
value = 30170

[State 900, 4]
type = ChangeState
trigger1 = root,stateno=[180,183]
value = 30180





[State 900, 4]
type = ChangeState
trigger1 = root,stateno=5150
value = 35150

[State 900, 4]
type = ChangeState
trigger1 = root,stateno=5300||parent,anim=5300
value = 35300

[State 6000]
type = Turn
triggerall = p2dist X < -3
trigger1 = 1



[State 6000]
type = ChangeState
trigger1 = rootdist X != [-50,50]
trigger1 = Pos Y = 0
value = 30020

;---------------------------------------------------------------------------
;負け
[Statedef 30170]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 30170


[State 0, PosSet]
type = velset
trigger1 = 1
y = 0
x = 0

[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0


[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1



[State -1]
Type = ParentVarSet
Trigger1 = time=0
fV = 27
Value = 1


[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1
[State 1];カメラ固定
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 900, 4]
type = null;ChangeState
trigger1 = root,stateno!=5150 && root,stateno!=170
value = 30000

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

;---------------------------------------------------------------------------
;負け
[Statedef 35150]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 30170

[State -1]
Type = ParentVarSet
Trigger1 = time=0
fV = 27
Value = 1


[State 1];カメラ固定
type = screenbound
trigger1 = 1
value = 1
movecamera = 1

[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1


[State 900, 4]
type = sprpriority
trigger1 = time = 0
value=-4

[State 900, 4]
type = ChangeState
trigger1 = root,stateno!=5150 && root,stateno!=170
value = 30000

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;イントロ
[Statedef 30190]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 30190

[State -1]
Type = ParentVarSet
Trigger1 = time=0
fV = 27
Value = 1

[State 191, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 30190



[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1


[State 900, 4]
type = ChangeState
trigger1 = animtime = 0
value = 30000

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

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

;気絶
[Statedef 35300]
type    = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
sprpriority = 2
anim = 30170



[State -1]
Type = ParentVarSet
Trigger1 = time=0
fV = 27
Value = 1


[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State 1];カメラ固定
type = screenbound
trigger1 = 1
value = 1
movecamera = 1


[State 900, 4]
type = ChangeState
trigger1 = parent,anim!=5300
value = 30000
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
;歩く
[Statedef 30020]
type    = S
physics = S
sprpriority = -1
ctrl = 0


[State 4005, push]
type=playerpush
trigger1= 1
value=0
ignorehitpause=1

[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State -1]
Type = ParentVarSet
Trigger1 = 1
fV = 27
Value = 0

[State 1];カメラ固定
type = screenbound
trigger1 = 1
value = 1
movecamera = 1
;---------------------------------------------------------------------------

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


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












[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State 6020]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 30020
value = 30020

[State 6020]
type = ChangeState
trigger1 = rootdist X < -70
trigger1 = Pos Y = 0
value = 30105

[State 6020]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 30021
value = 30021

[State 6020]
type = VelSet
trigger1 = rootdist X > 30
x = 3.33



[State 6020]
type = VelSet
trigger1 = rootdist X < -30
x = -3.33



[State 6020]
type = Turn
trigger1 = time = 0
trigger1 = p2dist X < -3












[State 6020]
type = ChangeState
trigger1 = rootdist X > 70
trigger1 = Pos Y = 0
value = 30100

[State 6020]
type = ChangeState
trigger1 = rootdist X = [-30,30]
trigger1 = Anim != 30000
value = 30000

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 30100]
type    = S
physics = S
anim = 30100
sprpriority = -1
velset=0,0
ctrl=0

[State 4005, push]
type=playerpush
trigger1= 1
value=0
ignorehitpause=1

[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State -1]
Type = ParentVarSet
Trigger1 = 1
fV = 27
Value = 0

[State 1];カメラ固定
type = screenbound
trigger1 = 1
value = 1
movecamera = 1
;---------------------------------------------------------------------------



[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State 100, 1]
type = VelSet
trigger1 = time>=3
x = 9.8



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

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

[State 100, 4]
type = ChangeState
triggerall=Time>=10
trigger1 = rootdist X = [-30,30]
value = 30000



;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 30105]
type    = S
physics = N
ctrl = 0
anim = 30105
sprpriority = -1

[State 4005, push]
type=playerpush
trigger1= 1
value=0
ignorehitpause=1

[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State -1]
Type = ParentVarSet
Trigger1 = 1
fV = 27
Value = 0

[State 1];カメラ固定
type = screenbound
trigger1 = 1
value = 1
movecamera = 1
;---------------------------------------------------------------------------


;---------------------------------------------------------------------------
[State 100, 1]
type = VelSet
trigger1 = time>=3
x = -14.5

[State 4300,1]
type = nothitby
trigger1 = 1
value = SCA
time = 1




[State 105,4]
type=NotHitBy
trigger1=1
value=SAC




[State 1160, 3]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP
time = -1
stateno = 32458

[State 100, 4]
type = ChangeState
triggerall=Time>=10
trigger1 = rootdist X = [-30,30]
value = 30000

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


;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
; CNS ???: ??
[Statedef 30180]
type = S
anim = 30000


[State 0, PosSet]
type = velset
trigger1 = 1
y = 0
x = 0

[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0

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

[State 180, 1]
type = VarRandom
trigger1 = Time = 1
range = 1, 6
v = 1

[State 180, 2]
type = ChangeState
triggerall = Var(1) = [1,3]
trigger1 = root,stateno=[180,183]
value = 30181

[State 180, 3]
type = ChangeState
triggerall = Var(1) = [3,6]
trigger1 = root,stateno=[180,183]
value = 30182

;---------------------------------------------------------------------------
; Win pose 1
; CNS difficulty: basic
; CNS ???: ??
[Statedef 30181]
type = S
ctrl = 0
anim = 30181
velset = 0,0


[State 181, snd]
type = PlaySnd
trigger1 = animelem = 1 || animelem = 3 || animelem = 5 || animelem = 7
value = 30120, 1

[State 181, voice]
type = PlaySnd
trigger1 = animelem = 10
value = 30181,0
channel = 0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;--------------------------------------------------------------------------
; Win pose 2
; CNS difficulty: basic
; CNS ???: ??
[Statedef 30182]
type = S
ctrl = 0
anim = 30182
velset = 0,0

[State 182, Shirt]
Type = Explod
trigger1 = animelem = 5
anim = 30183
sprpriority = 1
ownpal = 1
shadow = -1

[State 191, Play]
type = Playsnd
trigger1 = animelem = 5
value = 30182, 0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
[Statedef 30184]
type = S
ctrl = 0
anim = 30184
velset = 0,0
sprpriority = -3

[State 191, Play]
type = Playsnd
trigger1 = AnimElem = 2
value = 30182, 0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------


; キター
[StateDef 32450]
MoveType = A
Anim = 31110
VelSet = 0, 0
Ctrl = 0
SprPriority = -1





[State 1110, voice]
type = PlaySnd
trigger1 = time = 3
value = 31100
channel = 0

[State 1110, snd]
type = PlaySnd
trigger1 = time = 3
value = 31000, 1

[State InitVel]
type = VelAdd 
trigger1 = time = 3
X = 19.04

[State Friction]
type = VelMul 
trigger1 = time > 3 && animelem = 6, < 0
X = .948

[State 1110, close]
type = ChangeAnim
trigger1 = (time = [4, 15]) && p2bodydist x <= 0 && animelemno(0) = 1
value = anim
elem = 2

[State 1020, vel]
type = posSet
trigger1 = 1
y = enemynear, pos Y


[State 1110, stop]
type = VelSet
trigger1 = animelem = 6
x = 0

[State 1201,end]
type = Destroyself
trigger1 = time>=26


;-----------------------------------------------
;帰る
[Statedef 32458]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 32458
sprpriority = -2
velset = 0,0


[State 100, 1]
type = VelSet
trigger1 = anim = 32458
x = -3.33


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




[State 1010, close]
type = ChangeAnim
triggerall = Anim != 30106
trigger1 = prevstateno =31010
trigger2 = prevstateno = 31210
value = 30106


[State 100, 1]
type = VelSet
trigger1 = anim = 30106
trigger1 = AnimElemtime(2) >0 
x = 14.5









[State 1201,end]
type = Destroyself
trigger1 = frontEdgeBodyDist < -30
trigger2 = backEdgeBodyDist < -30


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

[StateDef 31010]
MoveType = A
Anim = 31010
VelSet = 0, 0
Ctrl = 0
SprPriority = 2

[State 3000, NotHitby]
type = NotHitBy
trigger1 = 1
value = ,AT

[State 1160, 3]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP
time = -1
stateno = 32458


[State 1010, voice]
type = PlaySnd
trigger1 = time = 3
value = 31000,0
channel = 0

[State 1010, snd]
type = PlaySnd
trigger1 = time = 3
value = 31000, 1

[State InitVel]
type = VelAdd 
trigger1 = time = 3
X = 12.04 *1.5

[State 4005, push]
type=playerpush
trigger1= 1
value=1
ignorehitpause=1

[State Friction]
type = VelMul 
trigger1 = time > 3 && animelem = 5, < 0
X = .948

[State 1010, close]
type = ChangeAnim
trigger1 = (time = [4, 18]) && p2bodydist x <= 0 && animelemno(0) = 1
value = anim
elem = 2

[State 1010, hit]
type = HitDef
trigger1 = animelem = 3, = 1
attr = S, sA
hitflag = MAF
guardflag = M
animtype = hard
air.animtype = back
fall.animtype = back
air.type = low
priority = 5
damage = 80 , 9
pausetime = 11, 13
guard.pausetime = 11, 11
sparkno = s2010
guard.sparkno = S2070
sparkxy = -25, -80
hitsound = S3,5
guardsound = S4, 1
ground.type = High
ground.slidetime = 18
ground.hittime = 18
yaccel = .5
ground.velocity = -10.4; 62
air.velocity = -4.4, -7.35; 128, 52
ground.cornerpush.veloff = -19.7; 62
air.cornerpush.veloff = 0
fall.recovertime = 29
air.fall = 1
ID = 1010
givepower = 8, 8


[State 1010, stop]
type = VelSet
trigger1 = animelem = 5
x = 0

[State 1020, vel]
type = ChangeState
triggerall = win
Trigger1 = AnimTime=0
value = 30180

[State 1020, vel]
type = null;ChangeState
triggerall = lose
Trigger1 = AnimTime=0
value = 30170


[State 1010, End]
Type = ChangeState
Trigger1 = AnimTime=0
Value = 32458



[StateDef 31210]
MoveType = A
Anim = 31210
VelSet = 0, 0
Ctrl = 0
SprPriority = 2


[State 1160, 3]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AP
time = -1
stateno = 32458

[State 3000, NotHitby]
type = NotHitBy
trigger1 = 1
value = ,AT

[State 1210, voice]
type = PlaySnd
trigger1 = time = 3
value = 31200,0
channel = 0

[State 1210, snd]
type = PlaySnd
trigger1 = time = 3
value = 31000, 1

[State InitVel]
type = VelAdd 
trigger1 = time = 3
X = 12.04*1.5

[State 4005, push]
type=playerpush
trigger1= 1
value=1
ignorehitpause=1

[State Friction]
type = VelMul 
trigger1 = time > 3 && animelem = 6, < 0
X = .948

[State 1210, close]
type = ChangeAnim
trigger1 = (time = [4, 18]) && p2bodydist x <= 0 && animelemno(0) = 1
value = anim
elem = 2

[State 1210, down]
type = StateTypeSet
trigger1 = animelem = 2
statetype = c

[State 1210, hit]
type = HitDef
trigger1 = animelem = 4, = 1
attr = C, SA
hitflag = MD
guardflag = l
fall.animtype = hard
ground.type = trip
air.type = trip
priority = 5
damage = 80 , 9
pausetime = 11, 13
guard.pausetime = 11, 11
sparkno = s2010
guard.sparkno = S2070
sparkxy = -15, -24
hitsound = S3,5
guardsound = S4, 1
guard.slidetime = 18
guard.hittime = 18
ground.type = low
fall = 1
yaccel = .5
ground.velocity = -4.4, -7.35; 128, 52
guard.velocity = -10.4; 62
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -19.7; 62
fall.recovertime = 25
ID = 1210
envshake.time =  13

[State 1210, stop]
type = VelSet
trigger1 = animelem = 6
x = 0

[State 1020, vel]
type = ChangeState
triggerall = win
Trigger1 = AnimTime=0
value = 30180

[State 1020, vel]
type = null;ChangeState
triggerall = lose
Trigger1 = AnimTime=0
value = 30170

[State 1210, End]
Type = ChangeState
Trigger1 = AnimTime=0
Value = 32458
